/*
 * ITIL v1 design system: tokens and fonts. Look: "Aurora Night" (docs/ux-discovery/home/visual-v2.md).
 * The tokens on :root are custom properties only, so declaring them changes nothing on the shared
 * header/footer. Every rule that styles elements is scoped to main.itil-v1 (base.css, skin.css, fold-*.css).
 *
 * Font: Plus Jakarta Sans variable (wght 200-800), latin subset, normal style, from the official
 * Fontsource npm package @fontsource-variable/plus-jakarta-sans 5.3.0.
 * SIL Open Font License 1.1: public/fonts/itil-v1/LICENSE-plus-jakarta-sans.txt.
 */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../../fonts/itil-v1/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* ---- Dark (night sky) ---- */
    --night: #0A0926;                       /* dark fold background */
    --night-2: #13113A;                     /* panels on dark */
    --night-3: #1D1A52;                     /* raised on dark */
    --on-dark: #FFFFFF;
    --on-dark-2: #C9C8EA;                   /* 12:1 on night, 9.8:1 on night-3 */
    --line-dark: rgba(255, 255, 255, .14);
    --glass: rgba(255, 255, 255, .07);
    --glass-2: rgba(255, 255, 255, .11);    /* hover / raised glass */
    --glass-blur: blur(18px) saturate(140%);
    --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .18);   /* inner top highlight */

    /* ---- Light ---- */
    --paper: #F6F6FE;                       /* cool lilac white */
    --surface: #FFFFFF;
    --mist: #ECEBFB;
    --ink: #0E0D33;                         /* text on light */
    --mute: #474A6B;                        /* 7.9:1 on paper, 7.2:1 on mist */
    --line: #E2E1F3;

    /* ---- Brand light: decoration, gradients, icons and glows ONLY (never body text, never a button fill) ---- */
    --violet: #7C5CFF;
    --blue: #4C8DFF;
    --pink: #F0489B;
    --cyan: #38D6F5;
    --grad: linear-gradient(110deg, #4C8DFF 0%, #8B5CF6 48%, #F0489B 100%);            /* borders, bars, dots, fills */
    --grad-on-dark: linear-gradient(110deg, #6FA5FF 0%, #A78BFA 48%, #FF6BB0 100%);    /* gradient TEXT on dark */
    --grad-ink: linear-gradient(110deg, #2F5BE8 0%, #6D3BE6 48%, #D01C6E 100%);        /* gradient TEXT on light (>= 32px) */
    --link: #4A35E8;                        /* 6.6:1 on paper */
    --link-on-dark: #A9B8FF;                /* 10:1 on night */

    /* Bento tile fills: deep enough for white text (>= 5.4:1 at every stop) */
    --tile-blue: linear-gradient(135deg, #2748D8 0%, #6D3BE6 100%);
    --tile-violet: linear-gradient(135deg, #6D3BE6 0%, #C4177B 100%);
    --tile-indigo: linear-gradient(135deg, #2A2799 0%, #0A6E90 100%);

    /* ---- Action: ONLY the one primary button per fold and the mobile sticky bar ---- */
    --act: #E0195F;                         /* white text 4.7:1 */
    --act-hover: #C2124F;                   /* white text 6.0:1 */
    --act-glow: 0 10px 30px -8px rgba(224, 25, 95, .55);

    /* ---- Aliases: old names keep working ---- */
    --accent: var(--link);
    --accent-on-dark: var(--link-on-dark);
    --ink-2: var(--night-2);
    --line-on-dark: var(--line-dark);

    /* ---- Type: one family ---- */
    --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    --font-body: var(--font-head);
    --fs-small: 16px;                       /* the floor: nothing renders below 16px */
    --fs-body: 17px;
    --fs-lead: 19px;
    --fs-h3: clamp(22px, 1.1rem + 0.6vw, 26px);
    --fs-h2: clamp(32px, 1.3rem + 1.9vw, 50px);
    --fs-h1: clamp(42px, 1.5rem + 3.2vw, 72px);
    --lh-body: 1.6;
    --lh-head: 1.1;
    --track-head: -0.03em;
    --track-h1: -0.035em;
    --track-eyebrow: 0.12em;
    --measure-answer: 62ch;
    --measure-long: 68ch;

    /* ---- Spacing scale: 4 8 12 16 20 24 32 40 48 64 96 128 ---- */
    --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
    --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px; --s-24: 96px; --s-32: 128px;

    /* ---- Grid ---- */
    --container: 1200px;
    --container-wide: 1366px;
    --gutter: 16px;                         /* 32px from 768px (base.css) */
    --gap-hero: 48px; --gap-faq: 48px; --gap-courses: 32px; --gap-start: 32px; --gap-teams: 64px; --gap-contact: 48px;

    /* ---- Shape ---- */
    --r-btn: 999px;
    --r-pill: 999px;
    --r-field: 14px;                        /* selects, inputs, toggles */
    --r-card: 20px;
    --r-tile: 24px;
    --r-panel: 28px;
    --r-fold: 28px;                         /* top radius of a fold sliding over the previous one; 40px from 768px */
    --shadow-card: 0 1px 2px rgba(14, 13, 51, .06), 0 18px 40px -22px rgba(14, 13, 51, .35);
    --shadow-panel: 0 2px 4px rgba(14, 13, 51, .06), 0 30px 70px -30px rgba(14, 13, 51, .45);
    --shadow-lift: 0 2px 4px rgba(14, 13, 51, .06), 0 28px 50px -24px rgba(76, 60, 200, .45);
    --glow-violet: 0 0 0 1px rgba(124, 92, 255, .35), 0 20px 60px -20px rgba(124, 92, 255, .55);

    /* ---- Fold contract: --hdr-h is set by motion.js from the shared header's measured height ---- */
    --hdr-h: 122px;
    --fold-pad-y: 56px;                     /* below 768px; folds flow naturally */

    /* ---- Focus ---- */
    --focus: 3px solid var(--link);
    --focus-on-dark: 3px solid var(--cyan);
    --focus-offset: 3px;

    /* ---- Motion ---- */
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --ease: var(--ease-out);
    --t-fast: 200ms;                        /* hover */
    --t-reveal: 450ms;                      /* scroll reveal */
    --t-hero: 700ms;                        /* hero load */
    --stagger: 70ms;

    /* ---- Sticky bar ---- */
    --sticky-h: 52px;
}
