/* Find the Star — shared design system (light)
   Ground: warm paper. Ink: the oxblood curtain. Accent: brass, used sparingly.
   Signal red is reserved for "live / recording" states.
   `.stage` flips any panel to the dark stage for singing moments. */

:root {
  --paper: #faf7f2;
  --paper-2: #f2ede5;
  --card: #ffffff;
  --ink: #1b0a10;
  --ink-80: rgba(27, 10, 16, .8);
  --ink-60: rgba(27, 10, 16, .62);
  --ink-40: rgba(27, 10, 16, .42);
  --ink-20: rgba(27, 10, 16, .2);
  --ink-10: rgba(27, 10, 16, .1);
  --line: rgba(27, 10, 16, .12);
  --wine: #6b1530;
  --wine-2: #8a1c3f;
  --wine-10: rgba(107, 21, 48, .08);
  --brass: #9a7420;
  --brass-2: #c9a24a;
  --brass-10: rgba(154, 116, 32, .1);
  --brass-20: rgba(154, 116, 32, .22);
  --signal: #e0301e;
  --tape: #8a7a6e;
  --stage: #1b0a10;
  --stage-2: #2a0f1a;
  --shadow: 0 30px 60px -28px rgba(27, 10, 16, .35);

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Playfair Display", "Didot", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* the dark stage: same components, re-inked */
.stage {
  --paper: #1b0a10;
  --paper-2: #23101a;
  --card: #2a0f1a;
  --ink: #f4ebdd;
  --ink-80: rgba(244, 235, 221, .82);
  --ink-60: rgba(244, 235, 221, .62);
  --ink-40: rgba(244, 235, 221, .42);
  --ink-20: rgba(244, 235, 221, .2);
  --ink-10: rgba(244, 235, 221, .1);
  --line: rgba(244, 235, 221, .14);
  --wine: #f0c86a;
  --wine-2: #f7d98a;
  --wine-10: rgba(240, 200, 106, .1);
  --brass: #d6a84f;
  --brass-2: #f0c86a;
  --brass-10: rgba(214, 168, 79, .1);
  --brass-20: rgba(214, 168, 79, .25);
  --tape: #9c8b7b;
  --shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
  background: var(--paper);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--brass-2); color: var(--stage); }

/* ---------- type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -.025em;
  line-height: .96;
  text-wrap: balance;
}
.h1 { font-size: clamp(2.75rem, 6.4vw, 6rem); }
.h2 { font-size: clamp(2.1rem, 4.4vw, 3.9rem); }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); font-weight: 700; font-variation-settings: "wdth" 105; letter-spacing: -.015em; line-height: 1.1; }
.h4 { font-size: 1.1rem; font-weight: 700; font-variation-settings: "wdth" 104; letter-spacing: -.01em; line-height: 1.2; }
.display em, .h3 em { font-family: var(--font-serif); font-style: italic; font-weight: 700; font-variation-settings: normal; letter-spacing: -.01em; color: var(--wine); }
.serif-title { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-variation-settings: normal; line-height: 1.05; letter-spacing: 0; }
.eyebrow {
  font-family: var(--font-display);
  font-variation-settings: "wdth" 80;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wine);
}
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink-80); max-width: 36em; text-wrap: pretty; }
.muted { color: var(--ink-60); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.small { font-size: .875rem; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

/* ---------- layout ---------- */
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head .lede { margin-top: .25rem; }
.stack > * + * { margin-top: 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  font-variation-settings: "wdth" 95;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .25s var(--ease), background .25s, border-color .25s, color .25s, box-shadow .25s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--wine); color: #fff; }
.stage .btn-primary { background: var(--brass); color: var(--stage); }
.stage .btn-primary:hover { background: var(--brass-2); color: var(--stage); }
.btn-ghost { border-color: var(--ink-20); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-brass { background: var(--brass-2); color: var(--stage); }
.btn-brass:hover { background: #d9b45c; }
.btn-lg { padding: 1.05rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem .95rem; font-size: .85rem; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.3rem; letter-spacing: .005em; line-height: 1; }
.brand .star { width: 26px; height: 26px; color: var(--brass); flex: none; }
.brand em { font-style: italic; color: var(--wine); }
.brand .wm { white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.topbar .btn { padding: .6rem 1.05rem; font-size: .9rem; }

/* live pill */
.live {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-family: var(--font-mono); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-80);
}
.stage .live { background: rgba(0, 0, 0, .25); }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(224, 48, 30, .5); } 70% { box-shadow: 0 0 0 9px rgba(224, 48, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 48, 30, 0); } }

/* ---------- record sleeve ---------- */
.sleeve { position: relative; display: block; }
.sleeve .jacket { position: relative; display: block; aspect-ratio: 1; }
.sleeve .art {
  position: relative; z-index: 2;
  aspect-ratio: 1; width: 100%; object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 24px 48px -20px rgba(27, 10, 16, .45), 0 0 0 1px rgba(0, 0, 0, .06) inset;
  background: var(--paper-2);
  transition: transform .45s var(--ease);
}
.sleeve .disc {
  position: absolute; z-index: 1; top: 4%; bottom: 4%; left: 4%; aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--brass-2) 0 11%, #0d0d0d 11.5% 13%, transparent 13.2%),
    repeating-radial-gradient(circle at center, #181818 0 2px, #0c0c0c 2px 4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .55s var(--ease);
}
.sleeve:hover .art, .sleeve:focus-visible .art { transform: translateY(-4px); }
.sleeve:hover .disc, .sleeve:focus-visible .disc { transform: translateX(34%) rotate(25deg); }
.sleeve-meta { margin-top: .9rem; display: grid; gap: .15rem; }
.sleeve-meta .title { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 1.35rem; line-height: 1.1; }
.sleeve-meta .artist { font-size: .95rem; color: var(--ink-80); }
.sleeve-meta .year { font-family: var(--font-mono); font-size: .76rem; color: var(--tape); }

/* ---------- artist photo ---------- */
.photo { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: 50%; background: var(--paper-2); box-shadow: 0 0 0 1px var(--line); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1rem; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 70s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: baseline; gap: .8rem; white-space: nowrap; font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: clamp(1.3rem, 2.2vw, 1.9rem); color: var(--ink-80); }
.marquee-item .by { font-family: var(--font-display); font-style: normal; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tape); font-variation-settings: "wdth" 85; }
.marquee-item .sep { color: var(--brass); font-style: normal; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- cards, tags, rules ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.card-tint { background: var(--paper-2); }
.rule { height: 1px; background: var(--line); }
.tag { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--line); font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-60); background: var(--card); }
.tag-brass { border-color: var(--brass-20); color: var(--brass); background: var(--brass-10); }
.tag-wine { border-color: transparent; color: #fff; background: var(--wine); }
.stage .tag-wine { color: var(--stage); background: var(--brass-2); }
.tag-live { border-color: rgba(224, 48, 30, .3); color: var(--signal); }

/* ---------- avatar ---------- */
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--paper-2); flex: none; box-shadow: 0 0 0 1px var(--line); }
.avatar-initial { display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--wine), #b4623a); }

/* ---------- scoring trace (shared) ---------- */
.trace { position: relative; border-radius: 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); overflow: hidden; }
.trace svg { width: 100%; height: auto; display: block; }
.trace .master { fill: none; stroke: rgba(244, 235, 221, .4); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.trace .singer { fill: none; stroke: #f0c86a; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(240, 200, 106, .55)); }
.trace .grid line { stroke: rgba(244, 235, 221, .18); stroke-width: 1; stroke-dasharray: 2 6; }
.trace .head { fill: #f0c86a; }
.trace .legend { position: absolute; left: .75rem; top: .6rem; display: flex; gap: 1rem; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(244, 235, 221, .65); }
.trace .legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: .4rem; background: rgba(244, 235, 221, .4); }
.trace .legend i.b { background: #f0c86a; }
.trace .lyric { position: absolute; right: .75rem; bottom: .6rem; padding: .25rem .6rem; border-radius: 6px; background: rgba(27, 10, 16, .78); font-family: var(--font-serif); font-style: italic; font-weight: 500; font-size: 1.05rem; color: rgba(244, 235, 221, .85); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.5rem; color: var(--ink-60); font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.footer .mono { color: var(--tape); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .sleeve .disc, .sleeve .art, .btn, .btn .arrow { transition: none; }
  .live .dot { animation: none; }
  .marquee-track { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
