/*
 * styles/tokens.css - design tokens (owned by core) + three theme slots (filled by Stage 2).
 *
 * Every colour, size and duration used by core CSS comes from here. A theme overrides token
 * VALUES only (plus small, local overrides in its own file); it never renames tokens.
 * Contrast: --c-ink and --c-ink-dim stay >= 4.5:1 on --c-room and --c-surface in every theme.
 */

:root {
  /* colour - taken from the Fantasy Prologue artwork and CD booklet: plum-black room, pink script,
     lavender paper, silver stars, warm-rose string lights */
  --c-room: #0e0a0e;                 /* page, darkest corners */
  --c-wall: #1b1219;                 /* the wall behind everything (plum black) */
  --c-ink: #f6eaf2;                  /* text on the dark room */
  --c-ink-dim: #c9b5c4;              /* secondary text on the dark room */
  --c-accent: #f0a6cf;               /* the cover's pink script: focus rings, active controls, title */
  --c-accent-deep: #6e3c63;          /* outline of the pink script */
  --c-surface: rgb(30 20 28 / 0.88); /* controls on the dark room */
  --c-line: rgb(246 234 242 / 0.2);  /* hairlines on the dark room */
  --c-paper: #efe5f1;                /* lavender booklet paper: modal panels */
  --c-paper-ink: #24162a;            /* ink on paper */
  --c-paper-dim: #6b5672;            /* secondary ink on paper (>= 4.5:1) */
  --c-paper-line: #cdbcd6;           /* rules and tracks on paper */
  --c-silver: #c9c7d6;               /* star stickers, rhinestones */
  --c-light: 255 214 222;            /* bulb glow, RGB triplet: rgb(var(--c-light) / a) */
  --c-bulb: #ffe9ef;                 /* lit frosted star, away from the LED */
  --c-bulb-core: #ffffff;            /* the LED inside it */
  --c-bulb-edge: #f7b7cb;            /* lit star at its tips */
  --c-bulb-off: #6c6270;             /* frosted plastic, unlit */
  --c-bulb-rim: rgb(226 214 232 / 0.55); /* edge of the plastic star */
  --c-wire: rgb(228 222 236 / 0.34);
  --c-shade: #040206;                /* the room losing light (lights switched down) */
  --c-plate-hi: #cdc3d6;             /* wall switch plate: pearl lavender, lit from above */
  --c-plate-lo: #6f6680;
  --c-knob: #2d1f2c;                 /* switch buttons: plum bakelite */

  /* type */
  --font-body: Georgia, "Times New Roman", serif;
  --font-display: "Luxurious Script", var(--font-body);   /* script headings, like the cover */
  --font-caps: "Helvetica Neue", Helvetica, Arial, sans-serif; /* bold caps labels, like the CD post */
  --font-lyric: "Luxurious Script", var(--font-body);
  --t-xs: 0.78rem;
  --t-sm: 0.9rem;
  --t-md: 1rem;
  --t-lg: 1.3rem;
  --t-xl: 1.9rem;
  --t-xxl: clamp(2.4rem, 11vw, 4.5rem);
  --t-title: clamp(2.8rem, 11vw, 4.2rem);  /* script titles (script faces need a larger size) */
  --t-lyric: clamp(1.9rem, 7.5vw, 3.4rem);

  /* space and shape */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2.5rem;
  --tap: 44px;                       /* minimum touch target */
  --r-pill: 999px;
  --r-panel: 14px;

  /* motion (reduced motion: core CSS ignores these and fades only) */
  --m-fast: 150ms;
  --m-base: 300ms;
  --m-slow: 700ms;
  --m-breath-a: 4.4s;                /* string light "breathing", three groups out of phase */
  --m-breath-b: 5.2s;
  --m-breath-c: 5.9s;
  --m-switch-on: 140ms;              /* string lights come up fast (LEDs), with a short flicker */
  --m-switch-off: 320ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* scene */
  --glow-size: clamp(120px, 28vmin, 280px); /* bloom around each bulb */
  --star-size: clamp(29px, 7.2vmin, 34px);
  /* lights switched off: the garland is dark and the room keeps 25% of its light. Opacity blends
     in sRGB, so 25% of the light is 0.25^(1/2.2) = 0.53 on screen */
  --room-dim: 0.53;
  --guitar-len: min(94vw, 1080px, 150svh);   /* length of the (horizontal) guitar on screen */
  --track-guitar: translateY(-22dvh) scale(0.92);            /* while the track sheet is open (phones) */
  --track-guitar-wide: translate(-17vw, -7dvh) scale(0.72);  /* ... next to the side panel (>= 900 px) */

  /* layer order (CONTRACT: wall -> collage -> guitar -> light glow -> film -> UI) */
  --z-wall: 0;
  --z-collage: 1;
  --z-garland: 2;
  --z-guitar: 3;
  --z-glow: 4;
  --z-film: 5;
  --z-ui: 6;
}

/* ---- theme slots: Stage 2 fills these (token values only) ---------------------------- */
:root[data-theme="prologue"] {
  /* soft pink, dreamy; headings in Luxurious Script; default lyric mode: font wipe.
     This is the base look above: nothing to override. */
}

:root[data-theme="link3"] {
  /* cold teal/blue film look (the Link3 tour post): ink-blue room, ice-teal accent, cool grey paper;
     a tight condensed sans (Barlow Condensed, styles/theme-sans.css); headings in cut-out letters
     (features/lyrics, S4) with the same sans until they load; default lyric mode: magazine */
  --c-room: #04090d;
  --c-wall: #0b1820;
  --c-ink: #e8f4f7;
  --c-ink-dim: #a7c3cc;
  --c-accent: #86d4e4;
  --c-accent-deep: #1d6275;
  --c-surface: rgb(6 18 26 / 0.88);
  --c-line: rgb(214 240 246 / 0.22);
  --c-paper: #dcebee;
  --c-paper-ink: #08161d;
  --c-paper-dim: #3a5560;
  --c-paper-line: #b0c8cf;
  --c-silver: #b5ccd3;
  --c-light: 176 226 255;
  --c-bulb: #e3f5ff;
  --c-bulb-core: #ffffff;
  --c-bulb-edge: #7dbde0;
  --c-bulb-off: #5c6b75;
  --c-bulb-rim: rgb(200 224 236 / 0.55);
  --c-wire: rgb(200 222 236 / 0.34);
  --c-shade: #02050a;
  --c-plate-hi: #c2d4dc;
  --c-plate-lo: #5f717c;
  --c-knob: #16262e;
  --font-body: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-caps: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-lyric: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --t-xs: 0.88rem;
  --t-sm: 1rem;
  --t-md: 1.12rem;
  --t-lg: 1.45rem;
  --t-title: clamp(2.4rem, 9vw, 3.4rem);
  --t-lyric: clamp(1.8rem, 6.5vw, 2.9rem);
}

:root[data-theme="plain"] {
  /* calm and readable: one condensed sans, plain white on near-black, warm-white lights; default lyric mode:
     font wipe in that sans */
  --c-room: #0b0b0d;
  --c-wall: #131316;
  --c-ink: #f5f5f6;
  --c-ink-dim: #b8b8c0;
  --c-accent: #f2f2f4;
  --c-accent-deep: #6a6a74;
  --c-surface: rgb(24 24 28 / 0.9);
  --c-line: rgb(245 245 246 / 0.22);
  --c-paper: #1b1b20;
  --c-paper-ink: #f5f5f6;
  --c-paper-dim: #b2b2bb;
  --c-paper-line: #3a3a43;
  --c-silver: #8f8f9a;
  --c-light: 255 238 214;
  --c-bulb: #fff3e0;
  --c-bulb-core: #ffffff;
  --c-bulb-edge: #f1cf9c;
  --c-bulb-off: #6b6762;
  --c-bulb-rim: rgb(230 224 214 / 0.5);
  --c-wire: rgb(230 224 214 / 0.3);
  --c-shade: #040404;
  --c-plate-hi: #cfcac2;
  --c-plate-lo: #6c6860;
  --c-knob: #262420;
  --font-body: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-caps: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-lyric: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --t-xs: 0.88rem;
  --t-sm: 1rem;
  --t-md: 1.12rem;
  --t-lg: 1.45rem;
  --t-title: clamp(2.4rem, 9vw, 3.4rem);
  --t-lyric: clamp(1.8rem, 6.5vw, 2.9rem);
}
