/* =====================================================================
   OAKCLICK BRAND TOKENS
   Spec: DESIGN.md. Dark-first, 2 quiet + 1 loud:
   quiet 1 = black/charcoal fields, quiet 2 = cool light grey (#EDEFF2,
   never warm), loud = ONE accent. Pages ship Gold (<html data-palette="g">).
   Blue and Mint stay defined here but are not used.
   Rules: no gradients on UI surfaces, flat fields, 1px hairlines, soft shadows.
   ===================================================================== */

/* ---------- Fonts (all OFL, self-hosted) ---------- */
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 600; font-display: swap; src: url("../assets/fonts/inter-tight-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
/* metric-matched fallbacks: headings wrap the same before and after the web fonts arrive */
@font-face { font-family: "Inter Tight Fallback"; src: local("Arial"), local("Liberation Sans"), local("Noto Sans"), local("Helvetica Neue"); font-weight: 100 900; size-adjust: 95%; }
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("Liberation Sans"), local("Noto Sans"), local("Helvetica Neue"); font-weight: 100 900; size-adjust: 107%; }
@font-face { font-family: "Instrument Fallback"; font-style: italic; src: local("Georgia Italic"), local("Georgia-Italic"), local("Noto Serif Italic"), local("NotoSerif-Italic"), local("Times New Roman Italic"); size-adjust: 80%; }

:root {
  /* ---------- Type ---------- */
  --font-display: "Inter Tight", "Inter Tight Fallback", "Inter", system-ui, sans-serif;  /* 600 only */
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-accent: "Instrument Serif", "Instrument Fallback", Georgia, serif;                /* ONE italic word, hero only */

  --fs-h1: clamp(2.6rem, 1.5rem + 4.2vw, 5.25rem);      /* 42 -> 84 */
  --fs-h2: clamp(2rem, 1.4rem + 2.2vw, 3.5rem);         /* 32 -> 56 */
  --fs-h3: clamp(1.375rem, 1.2rem + .7vw, 1.875rem);    /* 22 -> 30 */
  --fs-h4: clamp(1.125rem, 1.07rem + .25vw, 1.3125rem); /* 18 -> 21 */
  --fs-lead: clamp(1.0625rem, 1rem + .3vw, 1.25rem);    /* 17 -> 20 */
  --fs-body: clamp(1rem, .97rem + .12vw, 1.0625rem);    /* 16 -> 17 */
  --fs-small: .9375rem;                                 /* 15 */
  --fs-label: .8125rem;                                 /* 13: uppercase nav, eyebrows */
  --lh-display: 1.02; --lh-head: 1.08; --lh-body: 1.6;
  --track-display: -.035em; --track-head: -.028em; --track-label: .1em;

  /* ---------- Spacing (4px base) ---------- */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px; --sp-10: 144px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;

  /* ---------- Shape ---------- */
  --r-xs: 4px; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* ---------- Motion ---------- */
  --dur-instant: 90ms; --dur-fast: 160ms; --dur-base: 260ms; --dur-slow: 460ms; --dur-reveal: 800ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-standard: cubic-bezier(.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --stagger: 90ms;
  --lift: -2px;
  --z-nav: 50; --z-sheet: 80; --z-toast: 90;

  /* ---------- Neutrals (shared by every palette) ---------- */
  --c-black: #050506;      /* hero, stats, footer */
  --c-ink: #050506;        /* alias kept for older components */
  --c-char: #141516;       /* social proof, services */
  --c-ink-2: #1C1D20;      /* raised surface on dark */
  --c-on-ink: #F5F6F8;     /* text on dark: 19.0:1 on black, 16.9:1 on charcoal */
  --c-muted-ink: #A1A3A9;  /* secondary on dark: 8.1:1 black, 7.3:1 charcoal, 6.7:1 raised */
  --c-dim-ink: #8A8C92;    /* unlit stat label: 6.1:1 on black */
  --c-dim-fig: #5E6066;    /* unlit stat figure (large text only): 3.2:1 on black */
  --c-cloud: #EDEFF2;      /* COOL light grey, never warm */
  --c-white: #FFFFFF;
  --c-text: #050506;       /* on cloud 17.4:1 */
  --c-muted: #4A4D55;      /* on cloud 7.3:1, on white 8.4:1 */
  --c-line: rgba(5, 5, 6, .12);
  --c-line-ink: rgba(245, 246, 248, .12);
  --c-shadow: 5, 5, 6;
}

/* =====================================================================
   ACCENTS: the one loud colour. Components use roles only.
   --c-loud       fill (buttons, active, live bar)
   --c-on-loud    text on the fill
   --c-loud-ink   accent as TEXT on dark fields
   --c-loud-text  accent as TEXT on light fields
   ===================================================================== */

/* ---------- B · BLUE (default) ---------- */
:root, [data-palette="b"] {
  --c-loud: #2D5BFF; --c-loud-hover: #4570FF;
  --c-on-loud: #FFFFFF;     /* 5.2:1 */
  --c-loud-ink: #7E9BFF;    /* 7.8:1 black, 7.0:1 charcoal, 6.4:1 raised */
  --c-loud-text: #1E44D6;   /* 6.4:1 cloud, 7.4:1 white */
  --c-live: #3DDC97;        /* live dot (non-text) */
  --c-focus: #1E44D6; --c-focus-ink: #7E9BFF;
  --c-brand: #2D5BFF;
}
/* ---------- G · GOLD ---------- */
[data-palette="g"] {
  --c-loud: #EEB75D; --c-loud-hover: #F3C778;
  --c-on-loud: #141516;     /* 10.1:1 */
  --c-loud-ink: #EEB75D;    /* 11.2:1 black, 9.3:1 raised */
  --c-loud-text: #7A5200;   /* 6.0:1 cloud */
  --c-live: #EEB75D;
  --c-focus: #7A5200; --c-focus-ink: #EEB75D;
  --c-brand: #EEB75D;
}
/* ---------- M · MINT ---------- */
[data-palette="m"] {
  --c-loud: #3DDC97; --c-loud-hover: #5BE6A9;
  --c-on-loud: #050506;     /* 11.5:1 */
  --c-loud-ink: #3DDC97;    /* 9.5:1 raised */
  --c-loud-text: #08704A;   /* 5.3:1 cloud */
  --c-live: #3DDC97;
  --c-focus: #08704A; --c-focus-ink: #3DDC97;
  --c-brand: #3DDC97;
}

/* derived roles (same formula for every palette) */
:root, [data-palette] {
  --shadow-sm: 0 1px 2px rgba(var(--c-shadow), .08), 0 2px 6px -2px rgba(var(--c-shadow), .10);
  --shadow-md: 0 1px 2px rgba(var(--c-shadow), .08), 0 16px 36px -14px rgba(var(--c-shadow), .28);
  --shadow-lg: 0 1px 2px rgba(var(--c-shadow), .10), 0 28px 60px -24px rgba(var(--c-shadow), .45);
  --shadow-dark: 0 1px 1px rgba(0, 0, 0, .4), 0 30px 70px -24px rgba(0, 0, 0, .8);
  /* motion-graphic hooks (inline SVGs read these): white UI cards on a raised dark field */
  --mg-ink: #050506; --mg-surface: #FFFFFF; --mg-bg: var(--c-ink-2);
  --mg-loud: var(--c-loud); --mg-accent: var(--c-loud-text); --mg-live: var(--c-live);
  --mg-line: var(--c-line); --mg-soft: var(--c-cloud); --mg-muted: var(--c-muted); --mg-on-loud: var(--c-on-loud);
  /* legacy role names used by subpages */
  --c-tint: #E3E7EE; --c-on-tint: #050506;
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --dur-reveal: 0ms; --lift: 0px; --stagger: 0ms; }
}
