/* ==========================================================================
   tokens.css — Worthy Media Hub design tokens
   Every color, size, radius, duration and easing lives here.
   Themes are scoped with [data-theme="dark|light"] so sections can mix.
   ========================================================================== */

:root {
  /* Brand palette (from the neon "wl" mark) */
  --c-night: #07031a;
  --c-ink: #0e0726;
  --c-deep: #1b0a4a;
  --c-violet: #6a2bff;
  --c-orchid: #b44dff;
  --c-pink: #ff5fd2;
  --c-lilac: #e9e3ff;
  --c-mist: #f4f1fb;
  --c-paper: #fbfaff;
  --c-plum: #140b2e;

  --grad-brand: linear-gradient(120deg, var(--c-violet) 0%, var(--c-orchid) 52%, var(--c-pink) 100%);
  --grad-text: linear-gradient(100deg, #8d5bff 0%, #c86bff 45%, #ff7ad9 100%);
  /* every button and selected chip is one flat brand colour */
  --btn-solid: #6a2bff;
  --btn-solid-hover: #5a1ee6;

  /* Type */
  --f-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-mono: 0.72rem;
  --fs-small: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --fs-lead: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  --fs-h4: clamp(1.2rem, 1.05rem + 0.6vw, 1.65rem);
  --fs-h3: clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem);
  --fs-h2: clamp(1.85rem, 1.15rem + 2.3vw, 3.5rem);
  --fs-h1: clamp(2.6rem, 1.4rem + 5vw, 7rem);
  --fs-mega: clamp(5rem, 2rem + 18vw, 22rem);

  --lh-tight: 0.92;
  --lh-snug: 1.12;
  --lh-body: 1.6;
  --tracking-tight: -0.045em;
  --tracking-mono: 0.14em;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: clamp(4.5rem, 3rem + 6vw, 9rem);
  --sp-10: clamp(6rem, 4rem + 10vw, 14rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --container: 1440px;

  /* Radius — iOS continuous-corner feel */
  --r-xs: 10px;
  --r-sm: 16px;
  --r-md: 24px;
  --r-lg: 34px;
  --r-xl: 44px;
  --r-pill: 999px;

  /* Glass */
  --glass-blur: 22px;
  --glass-sat: 180%;

  /* Motion — studio signature curves */
  --ease: cubic-bezier(.76, 0, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --d-fast: 0.25s;
  --d-mid: 0.6s;
  --d-slow: 1.1s;
  --d-theme: 0.8s;

  /* Layers */
  --z-base: 1;
  --z-raised: 10;
  --z-nav: 100;
  --z-menu: 90; /* under the nav so the burger stays reachable */
  --z-cursor: 400;
  --z-transition: 500;
  --z-splash: 600;
  --z-grain: 700;
}

/* Theme scopes ------------------------------------------------------------ */
:root,
[data-theme="dark"] {
  --bg: var(--c-night);
  --bg-2: var(--c-ink);
  --fg: #f5f2ff;
  --fg-2: rgba(236, 230, 255, 0.68);
  --fg-3: rgba(236, 230, 255, 0.42);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --accent: #a77bff;

  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(30, 16, 70, 0.55);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-hi: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 2px 0 0 rgba(255, 255, 255, 0.04) inset;

  --aurora-1: rgba(106, 43, 255, 0.55);
  --aurora-2: rgba(255, 95, 210, 0.32);
  --aurora-3: rgba(60, 40, 220, 0.45);
  color-scheme: dark;
}

/* Sections follow the live scene: when the page has blended to the other
   theme, whatever is still visible of a section re-inks itself so its text
   stays readable on the new background. Sections with their own fixed
   surfaces (pinned hero, project hero) keep their theme; inner elements can
   pin theirs with their own data-theme. */
html.has-scene[data-scene="dark"] main section[data-theme="light"] {
  --bg: var(--c-night);
  --bg-2: var(--c-ink);
  --fg: #f5f2ff;
  --fg-2: rgba(236, 230, 255, 0.68);
  --fg-3: rgba(236, 230, 255, 0.42);
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);
  --accent: #a77bff;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-bg-strong: rgba(30, 16, 70, 0.55);
  --glass-border: rgba(255, 255, 255, 0.14);
  --glass-hi: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6), 0 2px 0 0 rgba(255, 255, 255, 0.04) inset;
  --aurora-1: rgba(106, 43, 255, 0.55);
  --aurora-2: rgba(255, 95, 210, 0.32);
  --aurora-3: rgba(60, 40, 220, 0.45);
  color-scheme: dark;
}

[data-theme="light"],
html.has-scene[data-scene="light"] main section[data-theme="dark"]:not(.hero):not(.pj-hero) {
  --bg: var(--c-mist);
  --bg-2: var(--c-paper);
  --fg: #120a2b;
  --fg-2: rgba(18, 10, 43, 0.66);
  --fg-3: rgba(18, 10, 43, 0.42);
  --line: rgba(18, 10, 43, 0.1);
  --line-2: rgba(18, 10, 43, 0.18);
  --accent: #6a2bff;

  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.9);
  --glass-hi: rgba(255, 255, 255, 1);
  --glass-shadow: 0 30px 70px -28px rgba(56, 22, 140, 0.35), 0 1px 0 0 rgba(255, 255, 255, 0.9) inset;

  --aurora-1: rgba(140, 92, 255, 0.35);
  --aurora-2: rgba(255, 120, 220, 0.28);
  --aurora-3: rgba(120, 160, 255, 0.28);
  color-scheme: light;
}
