/* tokens.css: design tokens only, no selectors that paint. Loaded first.
   Units, type scale: agent/scale.md. Contrast: agent/colour.md. */

:root {
    /* ---- Brand ---- */
    --base: #F6F8FC;
    --base-50: #FFFFFF;
    --base-100: #F6F8FC;
    --base-200: #EEF3FA;
    --base-300: #D8E0EC;
    --base-400: #7E90AA;
    --base-500: #64748B;
    --base-600: #475569;
    --base-700: #334155;
    --base-800: #1E293B;
    --base-900: #0F172A;
    --brand: #0F172A;
    --accent: #0070F3;

    --blue-fill: #0070F3;         /* white text on this: 4.55:1 AA */
    --blue-fill-hover: #0057C2;   /* white text on this: 6.68:1 */
    --blue-text: #0057C2;         /* on white: 6.68:1 · on --surface: 6.29:1 */
    --blue-wash: #EAF2FE;         /* tinted surface, never carries text alone */

    --emergency: #C2410C;         /* white text on this: 5.18:1 AA */
    --emergency-hover: #9A3412;   /* white text on this: 7.31:1 */
    --accent-orange: #FF6B00;     /* rules, icon fills. NEVER behind white text: 2.86:1 */
    --star: #F59E0B;              /* review stars; decorative */

    /* ---- Ink & surface ---- */
    --ink: #0F172A;               /* on --surface: 17.10:1 */
    --ink-body: #334155;          /* on --surface:  9.74:1 */
    --ink-muted: #475569;         /* on --surface:  7.13:1, lowest text token */
    --ink-placeholder: #64748B;   /* on white: 4.8:1, placeholders must clear AA */
    --ink-on-dark: #FFFFFF;

    --surface: #F6F8FC;           /* page */
    --surface-raised: #FFFFFF;    /* cards, form fields */
    --surface-sunken: #EEF3FA;    /* alternating bands */
    --surface-ink: #0F172A;       /* dark band */

    --border: #D8E0EC;            /* decorative dividers, non-text */
    --border-strong: #7E90AA;     /* input borders. UI boundary owing 3:1; see agent/colour.md */

    /* ---- Dark surfaces. Ratios are against --surface-ink / --ink-raised. ---- */
    --ink-raised: #1E293B;        /* cards on a dark band */
    --ink-border: #334155;
    --ink-border-strong: #475569;
    --on-ink: #E2E8F0;            /* 14.48:1 / 11.87:1. Body text on dark. */
    --on-ink-muted: #94A3B8;      /* 6.96:1 / 5.71:1. Meta on dark; thinnest margin on the site. */
    --on-ink-soft: #CBD5E1;       /* 12.02:1 / 9.85:1. Secondary text on dark. */
    --blue-on-ink: #60A5FA;       /* links/icons on dark; never on white */
    --blue-on-scrim: #7FB8FF;     /* 6.6:1 on the hero scrim */

    /* Hero scrim base, as channels so alpha ramps have one source of truth. */
    --scrim-rgb: 2 6 23;

    /* ---- Feedback ---- */
    --success-surface: #ECFDF5;
    --success-border: #6EE7B7;
    --success-ink: #065F46;
    --danger-surface: #FEF2F2;
    --danger-border: #FCA5A5;
    --danger-ink: #991B1B;

    /* ---- Type ---- */
    --font-display: 'Montserrat', system-ui, sans-serif;
    --font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;

    /* Heading scale. Reference --fs-N, never --fs-N-c or a raw clamp; see agent/scale.md */
    --fs-1-c: clamp(4.4rem, 2.96rem + 3.8vw, 7.2rem);   /* h1, ceiling 72px */
    --fs-1: var(--fs-1-c, 5.6rem);
    --fs-2-c: clamp(3.6rem, 2.56rem + 2.6vw, 5.2rem);   /* h2 */
    --fs-2: var(--fs-2-c, 4rem);
    --fs-3-c: clamp(2.4rem, 2.1rem + 0.9vw, 2.8rem);    /* h3 */
    --fs-3: var(--fs-3-c, 2.6rem);
    --fs-4-c: clamp(2rem, 1.85rem + 0.5vw, 2.3rem);     /* h4 */
    --fs-4: var(--fs-4-c, 2.1rem);
    --fs-5-c: clamp(1.8rem, 1.7rem + 0.3vw, 2rem);      /* h5 */
    --fs-5: var(--fs-5-c, 1.9rem);
    --fs-6-c: clamp(1.6rem, 1.55rem + 0.2vw, 1.8rem);   /* h6 */
    --fs-6: var(--fs-6-c, 1.7rem);

    /* Body / UI scale. Fixed rem; scales with the root, not the viewport. */
    --text-xs: 1.3rem;    /* 13px: legal, meta */
    --text-sm: 1.5rem;    /* 15px: labels, captions */
    --text-base: 1.7rem;  /* 17px: body */
    --text-lg: 2.1rem;    /* 21px: lead paragraph */
    --text-xl: 2.6rem;    /* 26px: standalone large UI text */

    /* The wordmark sits outside the reading scale on purpose. */
    --text-logo: 2.4rem;
    --text-logo-word: 1.1rem;

    --leading-tight: 1.08;   /* display */
    --leading-snug: 1.25;    /* headings */
    --leading-normal: 1.65;  /* prose */

    --tracking-display: -0.025em;  /* floor is -0.04em; never go tighter */
    --tracking-label: 0.06em;

    --measure: 68ch;   /* prose line-length cap. Fixed px width; see agent/hero.md */

    /* ---- Space ---- */
    --space-1: 0.4rem;   /* 4px */
    --space-2: 0.8rem;   /* 8px */
    --space-3: 1.2rem;   /* 12px */
    --space-4: 1.6rem;   /* 16px */
    --space-5: 2.4rem;   /* 24px */
    --space-6: 3.2rem;   /* 32px */
    --space-7: 4.8rem;   /* 48px */
    --space-8: 6.4rem;   /* 64px */
    --space-9: 9.6rem;   /* 96px */

    --section-y: clamp(5.6rem, 3.2rem + 6vw, 10.4rem);
    --gutter: clamp(1.6rem, 0.8rem + 2.5vw, 3.2rem);   /* floors at 1.6rem per the house rule */
    --container-max: 120rem;   /* 1200px at base */
    --floating-cta-block-size: 5.6rem;

    /* ---- Radius, shadow ---- */
    --radius-sm: 0.6rem;
    --radius: 1rem;
    --radius-lg: 1.6rem;
    --radius-pill: 99rem;   /* always exceeds any pill height */

    --shadow-sm: 0 0.1rem 0.2rem rgba(15, 23, 42, 0.06);
    --shadow: 0 0.4rem 1.2rem rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 1.2rem 3.2rem rgba(15, 23, 42, 0.12);

    /* ---- Motion. Never ease-in on UI; see agent/motion.md ---- */
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);      /* enter, exit, hover */
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);  /* on-screen movement */

    --dur-press: 140ms;   /* button press feedback */
    --dur-fast: 120ms;
    --dur: 200ms;         /* hovers, dropdowns */
    --dur-slow: 400ms;    /* drawers, scroll reveals */
    --stagger: 60ms;      /* delay between siblings entering */

    /* ---- Z-index. Semantic, ordered. No arbitrary 999 / 9999 anywhere. ---- */
    --z-base: 0;
    --z-raised: 10;
    --z-sticky: 100;
    --z-dropdown: 200;
    --z-fab: 300;
    --z-backdrop: 400;
    --z-modal: 500;
}
