/* Design tokens. See DESIGN-LANGUAGE.md. Values marked (source) come from the studied site. */
:root {
  /* Primitives: colour (source) */
  --sw-dark: #05010e;
  --sw-light: #fcfbff;
  --sw-white: #fff;
  --sw-black: #000;
  --sw-ink-soft: #1a1a1a;
  --sw-purple-pale: #f6efff;
  --sw-purple: #7a27f8;
  --sw-purple-mid: #641ed2;
  --sw-purple-deep: #3b188e;
  --sw-green: #39c539;
  --sw-gray-light: #b2b2b2;
  --sw-gray-dark: #666;
  --crt-red: #ff1432cc;
  --crt-cyan: #1ee1ffbf;
  --crt-glow: #fcfbff66;

  /* Semantic roles (light). Dark mode swaps them below (source mapping). */
  --bg-light: var(--sw-light);
  --bg-dark: var(--sw-dark);
  --bg-purple: var(--sw-purple-pale);
  --text-dark: var(--sw-dark);
  --text-light: var(--sw-light);
  --text-gray: var(--sw-gray-dark);
  --text-purple: var(--sw-purple);
  --text-green: #1b7f2a;               /* ours: accessible green on paper */
  --text-on-band: var(--sw-light);
  --text-band-muted: var(--sw-gray-light);
  --text-band-accent: #a875ff;         /* ours: purple readable on ink */
  --fill-cta: var(--sw-dark);
  --fill-cta-hover: var(--sw-purple-mid);
  --border-medium: var(--sw-gray-light);
  --border-dark: var(--sw-dark);
  --border-purple: var(--sw-purple);

  /* Type families (open stand-ins for the source's commercial faces) */
  --font-display: "Archivo", "Arial Black", sans-serif;           /* source: Kuniforma */
  --font-body: "Hanken Grotesk", system-ui, sans-serif;           /* source: PP Mori */
  --font-serif: "Newsreader", "Times New Roman", serif;           /* source: PP Editorial New */
  --font-pixel: "Pixelify Sans", "Courier New", monospace;        /* source: Pixel Operator */

  /* Space (source primitives, px as rem) */
  --s-2: .125rem; --s-4: .25rem; --s-8: .5rem; --s-12: .75rem; --s-16: 1rem; --s-24: 1.5rem;
  --s-32: 2rem; --s-40: 2.5rem; --s-48: 3rem; --s-64: 4rem; --s-80: 5rem; --s-96: 6rem;
  --s-120: 7.5rem; --s-160: 10rem; --s-240: 15rem;
  --grid-margin: 2.5rem;
  --gutter: 1rem;

  /* Shape (source) */
  --r-s: .25rem; --r-r: .5rem; --r-m: 1rem; --r-l: 1.5rem;

  /* Motion (source) */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-expo-out: cubic-bezier(.16, 1, .3, 1);   /* GSAP expo.out */
  --ease-in: cubic-bezier(.11, 0, .5, 0);          /* GSAP power1.in approximation */
  --d-fast: .2s; --d-base: .35s; --d-panel: .45s; --d-photo: .6s; --d-open: .7s; --d-close: .32s;

  /* Type scale (source, tablet/mobile steps via media queries) */
  --t-title-xxl: clamp(3rem, 9.6vw, 13.8rem);
  --t-serif-l: clamp(2.25rem, 5vw, 5rem);
  --t-serif-p: clamp(1.5rem, 2.6vw, 2.5rem);
  --t-title-m: clamp(1.5rem, 2.6vw, 2.5rem);
  --t-title-s: 1.5rem;
  --t-body-r: 1.25rem;
  --t-body-s: 1rem;
  --t-label: .8125rem;       /* ours: slightly under source's 16px labels, for data density */
}

@media (max-width: 991px) { :root { --grid-margin: 1.5rem; } }
@media (max-width: 767px) { :root { --grid-margin: .625rem; --t-body-r: 1.0625rem; } }

/* Dark mode: roles invert (source). Dark sections become light. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-light: var(--sw-dark);
    --bg-dark: var(--sw-light);
    --bg-purple: var(--sw-purple-deep);
    --text-dark: var(--sw-light);
    --text-light: var(--sw-dark);
    --text-gray: var(--sw-gray-light);
    --text-purple: #a875ff;
    --text-green: var(--sw-green);
    --text-on-band: var(--sw-dark);
    --text-band-muted: var(--sw-gray-dark);
    --text-band-accent: var(--sw-purple);
    --fill-cta: var(--sw-light);
    --fill-cta-hover: var(--sw-purple);
    --border-medium: var(--sw-gray-dark);
    --border-dark: var(--sw-light);
  }
}
