/* ==========================================================================
   tokens.css — design tokens (the only file to touch to re-skin a site)
   Every other shared file reads these custom properties.
   ========================================================================== */

@font-face{font-family:"Unbounded";src:url("../assets/fonts/unbounded.woff2") format("woff2");font-weight:200 900;font-display:swap}
@font-face{font-family:"Geist";src:url("../assets/fonts/geist.woff2") format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Geist Mono";src:url("../assets/fonts/geist-mono.woff2") format("woff2");font-weight:100 900;font-display:swap}

:root{
  /* --- Brand palette ------------------------------------------------------ */
  --c-ink:        #0E0D12;   /* near-black, warm violet undertone */
  --c-ink-2:      #17151E;   /* raised surface on dark */
  --c-ink-3:      #24212E;   /* borders / hover on dark */
  --c-paper:      #F4F1EA;   /* warm off-white */
  --c-paper-2:    #E9E4D8;   /* raised surface on light */
  --c-fizz:       #D2FF3A;   /* primary accent: acid lime */
  --c-fizz-ink:   #1B2400;   /* text on lime */
  --c-lilac:      #B8A6FF;   /* secondary accent */
  --c-coral:      #FF7A59;   /* tertiary, used sparingly */
  --c-muted-dark: #9A96A8;   /* secondary text on dark */
  --c-muted-light:#4A4654;   /* secondary text on light */

  /* --- Semantic roles (swapped by [data-theme]) --------------------------- */
  --bg: var(--c-ink);
  --surface: var(--c-ink-2);
  --line: var(--c-ink-3);
  --fg: var(--c-paper);
  --fg-muted: var(--c-muted-dark);
  --accent: var(--c-fizz);
  --accent-fg: var(--c-fizz-ink);
  --accent-2: var(--c-lilac);

  /* --- Type ---------------------------------------------------------------- */
  --font-display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* fluid scale: min @ 360px → max @ 1440px */
  --fs-xs:   clamp(.8125rem, .78rem + .1vw, .875rem);
  --fs-sm:   clamp(1rem, .96rem + .12vw, 1.0625rem);
  --fs-base: clamp(1.125rem, 1.08rem + .2vw, 1.25rem);
  --fs-lg:   clamp(1.25rem, 1.15rem + .4vw, 1.5rem);
  --fs-xl:   clamp(1.375rem, 1.2rem + .8vw, 1.875rem);
  --fs-2xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --fs-3xl:  clamp(2.25rem, 1.6rem + 3vw, 4.25rem);
  --fs-4xl:  clamp(2.75rem, 1.6rem + 5.4vw, 7rem);
  --fs-hero: clamp(3.25rem, 1.4rem + 8.6vw, 10.5rem);

  --lh-tight: 1.02;
  --lh-snug: 1.2;
  --lh-body: 1.65;
  --tracking-display: -.035em;
  --tracking-label: .14em;

  /* --- Space (4px base) ---------------------------------------------------- */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem;   --s-7: 3rem; --s-8: 4rem;    --s-9: 6rem; --s-10: 8rem;
  --section-y: clamp(5rem, 3rem + 8vw, 10rem);
  --gutter: clamp(1.25rem, .8rem + 2vw, 3rem);
  --container: 1240px;
  --container-narrow: 860px;

  /* --- Shape & depth ------------------------------------------------------- */
  --r-sm: 10px; --r-md: 16px; --r-lg: 24px; --r-xl: 36px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .18);
  --shadow-md: 0 10px 30px -10px rgb(0 0 0 / .45);
  --shadow-lg: 0 40px 80px -30px rgb(0 0 0 / .6);
  --glow-accent: 0 0 0 1px rgb(210 255 58 / .35), 0 18px 50px -12px rgb(210 255 58 / .45);

  /* --- Motion (CSS side; JS reads the same names from MOTION config) ------- */
  --ease-out: cubic-bezier(.16, 1, .3, 1);       /* expo-ish out */
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 200ms;
  --dur-base: 450ms;
  --dur-slow: 900ms;
  --dur-theme: 700ms;

  --z-nav: 50; --z-overlay: 80;
}

/* Theme scopes: put data-theme on <html> (motion.js does this on scroll) or any section.
   [data-theme="dark"] is explicit so a dark section keeps ink tokens even when a
   parent (like <html data-theme="light">) would otherwise inherit cream. */
[data-theme="dark"]{
  --bg: var(--c-ink);
  --surface: var(--c-ink-2);
  --line: var(--c-ink-3);
  --fg: var(--c-paper);
  --fg-muted: var(--c-muted-dark);
  --accent: var(--c-fizz);
  --accent-fg: var(--c-fizz-ink);
  --accent-2: var(--c-lilac);
}
[data-theme="light"]{
  --bg: var(--c-paper);
  --surface: var(--c-paper-2);
  --line: #D6D0C1;
  --fg: var(--c-ink);
  --fg-muted: var(--c-muted-light);
  --accent: var(--c-ink);
  --accent-fg: var(--c-fizz);
  --accent-2: #6B53E6;
}
[data-theme="fizz"]{
  --bg: var(--c-fizz);
  --surface: #C3F02A;
  --line: rgb(14 13 18 / .18);
  --fg: var(--c-ink);
  --fg-muted: #3B4417;
  --accent: var(--c-ink);
  --accent-fg: var(--c-fizz);
  --accent-2: var(--c-ink);
}
