/* Self-hosted fonts (Fontsource 5.3.0, latin subset): the server CSP blocks external requests */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  font-stretch: 75% 100%;
  src: url(fonts/bricolage-grotesque-latin-standard-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/dm-mono-latin-400-normal.woff2) format('woff2');
}

:root {
  --ground: #141217;
  --surface: #1E1A22;
  --surface-2: #241F28;
  --border: #3A3340;
  --text: #F4EFE6;
  --text-muted: #CFC7D4;
  --text-faint: #8C8592;
  --ink: #141217;
  --accent: #E63946;      /* set by main.js from the selected pot */
  --font-display: 'Bricolage Grotesque', Georgia, serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); }
a { color: var(--text); } a:hover { color: #FFC300; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.page {
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-display);
  display: flex; flex-direction: column;
  overflow: hidden;
}

/* Top bar */
.topbar {
  max-width: 1280px; width: 100%; margin: 0 auto;
  padding: 28px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .blend { mix-blend-mode: screen; }
.brand-name { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.status-pill {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted);
}

/* Hero */
.hero {
  max-width: 1280px; width: 100%; margin: 0 auto; flex-grow: 1;
  padding: clamp(24px, 5vw, 64px) var(--gutter) 56px;
  display: flex; flex-wrap: wrap; align-items: center; gap: clamp(40px, 6vw, 88px);
}
.hero-copy { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.eyebrow {
  margin: 0; font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
}
h1 {
  margin: 0; font-size: clamp(52px, 8vw, 116px); line-height: 0.92;
  font-weight: 800; letter-spacing: -0.035em;
}
.accent-word { color: var(--accent); transition: color 200ms ease; }
.lede { margin: 0; max-width: 520px; font-size: 20px; line-height: 1.5; color: var(--text-muted); }

/* Paint rack */
.rack {
  flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px;
  padding: 28px; border-radius: 28px; background: var(--surface);
}
.rack-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rack-label {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-faint);
}
.rack-current { font-size: 18px; font-weight: 700; }
.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.swatch {
  aspect-ratio: 1; width: 100%; border: 0; padding: 0; border-radius: 50%;
  cursor: pointer; position: relative;
  transition: box-shadow 150ms ease, transform 150ms ease;
}
.swatch::before { /* gloss highlight */
  content: ""; position: absolute; top: 18%; left: 22%; width: 26%; height: 16%;
  border-radius: 50%; background: rgba(255, 255, 255, 0.35);
}
.swatch[aria-pressed="true"] {
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 7px var(--swatch);
  transform: scale(1.06);
}
.swatch:focus-visible { outline: 3px solid var(--text); outline-offset: 6px; }
.rack-note { margin: 0; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: var(--text-faint); }

/* Stripes + footer */
.stripes {
  display: flex; height: 64px; gap: 8px; margin: 0 -24px;
  transform: rotate(-1.5deg) translateY(8px);
}
.stripes span { border-radius: 999px; }
.stripes span:nth-child(1) { flex: 3; background: #E63946; border-radius: 0 999px 999px 0; }
.stripes span:nth-child(2) { flex: 2; background: #F77F00; }
.stripes span:nth-child(3) { flex: 4; background: #FFC300; }
.stripes span:nth-child(4) { flex: 1; background: #8AC926; }
.stripes span:nth-child(5) { flex: 3; background: #06A77D; }
.stripes span:nth-child(6) { flex: 2; background: #4CC9F0; }
.stripes span:nth-child(7) { flex: 5; background: #3A47D5; }
.stripes span:nth-child(8) { flex: 2; background: #7B2CBF; }
.stripes span:nth-child(9) { flex: 3; background: #D62D91; border-radius: 999px 0 0 999px; }
.footer {
  background: var(--text); color: var(--ink);
  padding: 28px var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
