/* =====================================================
   AI Lab — Global Stylesheet
   Resets · Design Tokens · Typography · Grid Utilities
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ----- Design Tokens ----- */
:root {
    /* Surfaces */
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    /* alternate section */
    --bg-muted: #f1f5f9;
    /* deeper light */
    --surface: #ffffff;
    --surface-hover: #f8fafc;

    /* Borders */
    --border: #e5e7eb;
    --border-strong: #cbd5e1;

    /* Text */
    --text: #0f172a;
    /* near-black, WCAG AAA on white */
    --text-2: #334155;
    /* secondary text */
    --muted: #64748b;
    /* muted text, WCAG AA on white */
    --muted-strong: #475569;
    /* slightly stronger muted */

    /* Brand — Blue */
    --primary: #2563eb;
    /* blue-600 */
    --primary-hover: #1d4ed8;
    /* blue-700 */
    --primary-dark: #1e3a8a;
    /* blue-900, for gradient ends */
    --primary-soft: #eff6ff;
    /* blue-50 */
    --primary-soft-2: #dbeafe;
    /* blue-100 */
    --primary-soft-border: #bfdbfe;
    /* blue-200 */

    /* Accents — Orange (complementary highlight) */
    --accent: #f97316;
    /* orange-500 */
    --accent-hover: #ea580c;
    /* orange-600 */
    --accent-soft: #fff7ed;
    /* orange-50 */
    --accent-soft-2: #ffedd5;
    /* orange-100 */

    /* Semantic */
    --success: #15803d;
    --success-soft: #dcfce7;
    --warning: #b45309;
    --warning-soft: #fef3c7;
    --danger: #b91c1c;
    --danger-soft: #fee2e2;
    --purple: #6d28d9;
    --purple-soft: #ede9fe;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 24px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.12);

    /* Radius */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    /* Fonts — single web font (Inter) + system mono */
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

    /* Layout */
    --header-h: 72px;
    --gap-card: 24px;
    --gap-card-sm: 16px;
}

/* ----- Resets ----- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 20px);
    /* overflow-x: clip; */
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

body.no-scroll {
    overflow: hidden;
}

img,
svg,
video {
    max-width: 100%;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: 0;
    background: transparent;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: 1rem;
}

/* ----- Typography ----- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-body);
    color: var(--text);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.018em;
}

h1 {
    font-size: clamp(2rem, 4.2vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.125rem;
}

h4 {
    font-size: 1rem;
}

p {
    color: var(--text-2);
    line-height: 1.7;
}

/* Improve readability for screen readers only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ----- Focus styles (accessible) ----- */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ----- Container & Grid ----- */
.container {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .container {
        max-width: 1150px;
    }
}

.row {
    --col-gap: 1.5rem;
    --row-gap: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(var(--row-gap) * -1);
    margin-right: calc(var(--col-gap) * -0.5);
    margin-left: calc(var(--col-gap) * -0.5);
}

.row>* {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    padding-right: calc(var(--col-gap) * 0.5);
    padding-left: calc(var(--col-gap) * 0.5);
    margin-top: var(--row-gap);
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
}

.col-3 {
    flex: 0 0 auto;
    width: 25%;
}

.col-4 {
    flex: 0 0 auto;
    width: 33.333333%;
}

.col-6 {
    flex: 0 0 auto;
    width: 50%;
}

.col-8 {
    flex: 0 0 auto;
    width: 66.666667%;
}

.col-12 {
    flex: 0 0 auto;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-3 {
        width: 25%;
    }

    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-8 {
        width: 66.666667%;
    }

    .col-md-12 {
        width: 100%;
    }
}

@media (min-width: 992px) {
    .col-lg-3 {
        width: 25%;
    }

    .col-lg-4 {
        width: 33.333333%;
    }

    .col-lg-6 {
        width: 50%;
    }

    .col-lg-8 {
        width: 66.666667%;
    }

    .col-lg-12 {
        width: 100%;
    }
}

/* ----- Utility classes ----- */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.align-items-center {
    align-items: center !important;
}

.align-items-start {
    align-items: flex-start !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.d-grid {
    display: grid !important;
}

@media (min-width: 768px) {
    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }

    .d-md-none {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .d-lg-block {
        display: block !important;
    }

    .d-lg-flex {
        display: flex !important;
    }

    .d-lg-none {
        display: none !important;
    }
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 2.5rem !important;
}

.mt-6 {
    margin-top: 3rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 2.5rem !important;
}

.mb-6 {
    margin-bottom: 3rem !important;
}

.p-0 {
    padding: 0 !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.p-5 {
    padding: 2.5rem !important;
}

.pt-0 {
    padding-top: 0 !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.m-auto {
    margin: auto !important;
}

.ml-auto {
    margin-left: auto !important;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

/* ----- Accessibility: reduce motion ----- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}