/* RareWatch design tokens. Loaded first. Every other stylesheet takes its colour, space, radius and type from here.
   Themes are picked with <html data-theme="…"> (set before first paint by theme.js). No colour literals belong
   outside this file, except brand marks (service logos, avatar art) and text that sits on top of artwork (--media-*).

   Idea: the posters are the colour. The interface around them stays quiet: flat surfaces, hairlines, one accent. */

:root {
  /* ---- type ---- */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif; /* headings, names, numbers */
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-xs: 12px; --t-sm: 13px; --t-base: 15px; --t-md: 17px; --t-lg: 20px; --t-xl: 26px; --t-2xl: 34px;
  --t-3xl: clamp(36px, 5.2vw, 60px);
  --lh-tight: 1.08; --lh-snug: 1.3; --lh-body: 1.55;

  /* ---- space (4px base). Use these, not ad-hoc pixel values ---- */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px;
  --gutter: clamp(16px, 4vw, 32px);   /* left/right page padding */
  --page: 1200px;                     /* max content width */
  --section-gap: clamp(32px, 5vw, 56px); /* between page sections */
  --card-pad: clamp(16px, 2.2vw, 24px);  /* inside cards and panels */
  --nav-h: 60px;

  /* ---- shape ---- */
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --r-poster: 8px;
  --ctl: 40px; --ctl-sm: 32px; --ctl-lg: 48px; /* control heights: buttons, inputs, selects */

  /* ---- motion: only in answer to something the person did ---- */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 120ms; --med: 220ms;

  /* ---- layers ---- */
  --z-nav: 50; --z-pop: 60; --z-modal: 100; --z-toast: 120;

  /* ---- text on top of artwork (posters, backdrops, banners). Same in every theme ---- */
  --media-ink: #ffffff;
  --media-mute: rgba(255, 255, 255, .74);
  --media-scrim: linear-gradient(to top, rgba(0, 0, 0, .86), rgba(0, 0, 0, .42) 45%, rgba(0, 0, 0, 0));
  --media-chip: rgba(8, 10, 14, .72);

  /* ---- Midnight (default): Raresix ink blue ---- */
  color-scheme: dark;
  --bg: #070b12;
  --surface-1: #0d131d;      /* cards, panels */
  --surface-2: #141c29;      /* controls, raised rows */
  --surface-3: #1d2738;      /* hover on surface-2, wells */
  --field: #0a1019;          /* input background */
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #dfe6f1;
  --text-strong: #ffffff;
  --mute: #94a2b7;
  --faint: #66748c;
  --accent: #3ba7f5;
  --accent-hi: #7cc8ff;      /* accent used as text on dark, or hover */
  --accent-2: #a6ef3c;       /* second voice: used rarely (live dots, "on your services") */
  --on-accent: #04121f;      /* text on an accent fill */
  --good: #4fd67f; --warn: #f5b942; --bad: #ff6b78; --info: #6cb8ff;
  --star: #f6c244;           /* ratings */
  --scrim: rgba(3, 5, 9, .72);
  --nav-bg: rgba(7, 11, 18, .82);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, .6);
  --shadow-3: 0 24px 60px -16px rgba(0, 0, 0, .75);
  --ambient: radial-gradient(1100px 520px at 18% -12%, rgba(59, 167, 245, .16), transparent 62%);
  --skeleton: rgba(255, 255, 255, .06);

  /* ---- derived (work in every theme) ---- */
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 46%, transparent);
  --hover: color-mix(in srgb, var(--text) 7%, transparent);
  --press: color-mix(in srgb, var(--text) 12%, transparent);
  --good-soft: color-mix(in srgb, var(--good) 15%, transparent);
  --warn-soft: color-mix(in srgb, var(--warn) 15%, transparent);
  --bad-soft: color-mix(in srgb, var(--bad) 14%, transparent);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --profile-accent: var(--accent); /* a member's own colour, set inline on profile pages. Decoration only, never body text */

  /* ---- old names, kept so nothing breaks while files move to the names above. Do not use in new rules ---- */
  --panel: var(--surface-1); --panel2: var(--surface-2);
  --ink-950: var(--bg); --ink-900: var(--surface-1); --ink-800: var(--surface-2); --ink-700: var(--surface-3); --ink-600: var(--line-strong);
  --brand: var(--accent); --brand-deep: var(--accent); --cyan: var(--accent-hi); --lime: var(--accent-2); --steel: var(--mute); --live: var(--bad);
  --radius: var(--r-lg); --display: var(--font-display);
}

/* ---- Noir: true black, silver type, old-title-card gold ---- */
:root[data-theme="noir"] {
  --bg: #000000; --surface-1: #0c0c0d; --surface-2: #161617; --surface-3: #222224; --field: #070708;
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .2);
  --text: #e6e3dc; --text-strong: #ffffff; --mute: #9d9990; --faint: #6f6c65;
  --accent: #e3c06a; --accent-hi: #f3d994; --accent-2: #c9c5bb; --on-accent: #1c1503;
  --star: #e3c06a;
  --scrim: rgba(0, 0, 0, .78); --nav-bg: rgba(0, 0, 0, .84);
  --ambient: radial-gradient(900px 420px at 50% -18%, rgba(255, 255, 255, .07), transparent 65%);
}

/* ---- Velvet: the curtain before the film. Oxblood and brass ---- */
:root[data-theme="velvet"] {
  --bg: #13070b; --surface-1: #1c0b11; --surface-2: #27111a; --surface-3: #341825; --field: #100609;
  --line: rgba(255, 226, 214, .09); --line-strong: rgba(255, 226, 214, .19);
  --text: #f1e2dc; --text-strong: #fff8f4; --mute: #b9989a; --faint: #8a6a70;
  --accent: #e8b24a; --accent-hi: #f6cf83; --accent-2: #ff7d8f; --on-accent: #281503;
  --star: #e8b24a;
  --scrim: rgba(10, 2, 5, .76); --nav-bg: rgba(19, 7, 11, .84);
  --ambient: radial-gradient(1000px 500px at 50% -16%, rgba(200, 40, 70, .2), transparent 64%);
}

/* ---- Drive-in: dusk sky, neon sign ---- */
:root[data-theme="drivein"] {
  --bg: #110c22; --surface-1: #19122f; --surface-2: #231a40; --surface-3: #2f2454; --field: #0e0a1c;
  --line: rgba(226, 216, 255, .1); --line-strong: rgba(226, 216, 255, .2);
  --text: #e9e3fb; --text-strong: #ffffff; --mute: #a69dc8; --faint: #766d99;
  --accent: #ff7d5c; --accent-hi: #ffa58c; --accent-2: #58e0d1; --on-accent: #2a0c03;
  --scrim: rgba(8, 5, 18, .74); --nav-bg: rgba(17, 12, 34, .84);
  --ambient: radial-gradient(1100px 520px at 82% -14%, rgba(255, 125, 92, .18), transparent 60%),
             radial-gradient(900px 480px at 8% -10%, rgba(120, 90, 255, .2), transparent 62%);
}

/* ---- Matinee (light): daylight through the lobby doors ---- */
:root[data-theme="matinee"] {
  color-scheme: light;
  --bg: #eef1f6; --surface-1: #ffffff; --surface-2: #f4f6fa; --surface-3: #e6eaf1; --field: #ffffff;
  --line: rgba(16, 28, 48, .11); --line-strong: rgba(16, 28, 48, .22);
  --text: #222b3a; --text-strong: #0b1220; --mute: #586479; --faint: #8791a3;
  --accent: #1c66d8; --accent-hi: #1553b4; --accent-2: #c9304a; --on-accent: #ffffff;
  --good: #1a8a4a; --warn: #a66a00; --bad: #c9283b; --info: #1c66d8;
  --star: #c98a00;
  --scrim: rgba(18, 26, 42, .46); --nav-bg: rgba(255, 255, 255, .86);
  --shadow-1: 0 1px 2px rgba(16, 28, 48, .08);
  --shadow-2: 0 8px 24px -10px rgba(16, 28, 48, .2);
  --shadow-3: 0 24px 60px -18px rgba(16, 28, 48, .3);
  --ambient: none;
  --skeleton: rgba(16, 28, 48, .07);
}

/* ---- Popcorn (light): butter yellow and the red of the box ---- */
:root[data-theme="popcorn"] {
  color-scheme: light;
  --bg: #fbf2da; --surface-1: #fffaf0; --surface-2: #f7ecd2; --surface-3: #eedfbb; --field: #fffdf7;
  --line: rgba(70, 44, 10, .13); --line-strong: rgba(70, 44, 10, .26);
  --text: #33271a; --text-strong: #1c130a; --mute: #74634b; --faint: #a08d70;
  --accent: #cf1f2e; --accent-hi: #a81422; --accent-2: #17696f; --on-accent: #ffffff;
  --good: #1f7a3f; --warn: #9a5f00; --bad: #b8182a; --info: #17696f;
  --star: #c27c00;
  --scrim: rgba(50, 32, 10, .46); --nav-bg: rgba(255, 250, 240, .88);
  --shadow-1: 0 1px 2px rgba(70, 44, 10, .1);
  --shadow-2: 0 8px 24px -10px rgba(70, 44, 10, .22);
  --shadow-3: 0 24px 60px -18px rgba(70, 44, 10, .32);
  --ambient: none;
  --skeleton: rgba(70, 44, 10, .08);
}

@media (max-width: 700px) {
  :root { --nav-h: 56px; --ctl: 44px; --ctl-sm: 36px; } /* thumb-sized controls on phones */
}
