/* LSDJ product site — brutalist instrument vocabulary carried over from the
   app (frontend/src/ui/tokens.css), opened up for a marketing page: same deep
   matte black, hard square corners, Space Mono, and the cyan/lime/violet
   accent triad, but with a larger type scale and far more breathing room than
   the hardware-dense app. The layout leans into a hardware-rack metaphor:
   bolted feature cells, LED micro-tags, a scrolling combo ticker, and VU-style
   meters as a through-line. */

/* ---------- fonts (self-hosted, same subsets the app ships) ---------- */
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/space-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/space-mono-700.woff2') format('woff2');
}

/* ---------- tokens ---------- */
:root {
  --color-bg: #050507;
  --color-surface: #0e0e12;
  --color-surface-raised: #17171d;
  --color-surface-inset: #09090c;
  --color-border: #26262e;
  --color-border-strong: #3a3a46;

  --color-text: #e8e8ec;
  --color-text-muted: #8a8a98;
  --color-text-silkscreen: #5a5a68;

  --color-lime: #bef264;
  --color-violet: #a855f7;
  --color-cyan: #22d3ee;
  --color-cyan-strong: #67e8f9;

  /* Master accent for the site is cyan, like the app's default. Per-section
     accents are set with --accent on a container and cascade down. */
  --color-accent: var(--color-cyan);
  --color-accent-strong: var(--color-cyan-strong);
  --color-on-accent: #07070a;
  --accent: var(--color-cyan);

  --color-led-ok: #2ecc71;
  --color-led-warn: #f1c40f;
  --color-led-danger: #ff4757;
  --color-led-off: #202027;

  --font-ui: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Product-page type scale — larger than the app's hardware density. */
  --text-xs: 0.7rem;
  --text-s: 0.82rem;
  --text-m: 0.95rem;
  --text-l: 1.15rem;
  --text-xl: 1.6rem;
  --text-2xl: 2.4rem;
  --text-3xl: clamp(2.6rem, 6vw, 5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2.25rem;
  --space-7: 3.5rem;
  --space-8: 5.5rem;

  --silkscreen-spacing: 0.14em;
  --maxw: 72rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 var(--text-m) / 1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  /* Faint accent bloom behind the top of the page. */
  background-image:
    radial-gradient(60rem 40rem at 50% -12rem, rgba(34, 211, 238, 0.10), transparent 62%);
  background-repeat: no-repeat;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-strong); }

img, svg { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* Shared silkscreen micro-label. */
.silkscreen {
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
  color: var(--color-text-silkscreen);
}

/* Eyebrow tag with a lit LED dot — the recurring instrument motif. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.tag__led {
  width: 0.5rem; height: 0.5rem; flex: none;
  background: var(--accent);
  box-shadow: 0 0 8px -1px var(--accent);
}
.tag--center { align-self: center; }

.section {
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}
.section__head--center { align-items: center; text-align: center; }

.section__title {
  margin: 0;
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.section__lead {
  margin: 0;
  max-width: 44rem;
  color: var(--color-text-muted);
  font-size: var(--text-l);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: 700 var(--text-s) var(--font-ui);
  text-transform: uppercase;
  letter-spacing: var(--silkscreen-spacing);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface-raised);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { border-color: var(--color-accent); color: var(--color-text); }
.btn--lg { padding: var(--space-4) var(--space-5); }

.btn--primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.5);
}
.btn--primary:hover {
  background: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  color: var(--color-on-accent);
  box-shadow: 0 0 24px -2px rgba(34, 211, 238, 0.55);
}

.btn__icon { width: 1.1em; height: 1.1em; fill: currentColor; flex: none; }

/* Star button with a live count pill. */
.btn__count {
  padding-left: var(--space-3);
  margin-left: var(--space-1);
  border-left: 1px solid currentColor;
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}
.btn__count[data-empty='true'] { display: none; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-3);
}
.topbar__spacer { flex: 1; }
.topbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.topbar__link {
  color: var(--color-text-muted);
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
}
.topbar__link:hover { color: var(--color-text); }
@media (max-width: 44rem) {
  .topbar__links .topbar__link { display: none; }
}

/* ---------- brand lockup ---------- */
.logo { display: flex; align-items: center; gap: var(--space-3); }
/* Animated hypercube mark, rendered on a canvas (see js/main.js) to mirror the
   app's spinning-record-plus-tumbling-hypercube logo. */
.logo__mark { width: 2.4rem; height: 2.4rem; flex: none; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__word {
  font: 700 var(--text-l) var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.logo__word .dj { color: var(--color-accent); }
.logo__tag {
  font: 700 0.58rem var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
  color: var(--color-text-silkscreen);
}

/* ---------- hero ---------- */
.hero {
  padding-top: var(--space-8);
  padding-bottom: var(--space-7);
  position: relative;
}
/* Faint engineering dot-grid, hero only, to give the fold some texture. */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(124, 124, 138, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 40% 40%, #000, transparent 75%);
  mask-image: radial-gradient(70% 60% at 40% 40%, #000, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}
@media (max-width: 56rem) {
  .hero__grid { grid-template-columns: 1fr; }
}

.hero__title {
  margin: 0 0 var(--space-4);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero__title .accent { color: var(--color-accent); }

.hero__sub {
  margin: 0 0 var(--space-6);
  max-width: 34rem;
  font-size: var(--text-l);
  color: var(--color-text-muted);
}

.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Hero visual: framed demo panel, app-style bright border with a live LED. */
.hero__visual {
  position: relative;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  box-shadow: 0 0 60px -20px rgba(34, 211, 238, 0.4);
}
.hero__visual::after {
  /* Accent hairline at the top edge, like the app status bar. */
  content: '';
  position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: var(--color-accent);
}
.hero__visual-led {
  position: absolute; top: var(--space-3); right: var(--space-3);
  width: 0.5rem; height: 0.5rem; z-index: 2;
  background: var(--color-led-danger);
  box-shadow: 0 0 8px 0 var(--color-led-danger);
  animation: rec-blink 1.6s steps(1) infinite;
}
@keyframes rec-blink { 0%, 60% { opacity: 1; } 61%, 100% { opacity: 0.15; } }
.hero__visual img { display: block; width: 100%; height: auto; transition: opacity 0.4s ease; }

/* Demo loading state: the GIF is heavy, so JS flags the panel with
   .is-loading until it arrives. Hidden by default so no-JS visitors
   never see a stuck overlay. */
.hero__loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  background: var(--color-surface-inset);
}
.hero__visual.is-loading .hero__loading { display: flex; }
.hero__visual.is-loading img { opacity: 0; }
.hero__loading-text {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--color-text-silkscreen);
  animation: loading-blink 1.2s steps(1) infinite;
}
.hero__loading-bar {
  position: relative;
  overflow: hidden;
  width: 8rem;
  height: 2px;
  background: var(--color-led-off);
}
.hero__loading-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -2.5rem;
  width: 2.5rem;
  background: var(--color-accent);
  animation: loading-sweep 1.1s linear infinite;
}
@keyframes loading-blink { 0%, 70% { opacity: 1; } 71%, 100% { opacity: 0.4; } }
@keyframes loading-sweep { from { left: -2.5rem; } to { left: 8rem; } }

/* ---------- impossible-combo ticker (full-bleed marquee) ---------- */
.ticker {
  border-block: 1px solid var(--color-border);
  background: var(--color-surface-inset);
  overflow: hidden;
  padding-block: var(--space-3);
}
.ticker__track {
  display: flex;
  width: max-content;
  gap: var(--space-6);
  animation: ticker-scroll 48s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  font: 700 var(--text-s) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
  display: inline-flex;
  gap: var(--space-3);
}
.ticker__item b { color: var(--color-accent); font-weight: 700; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Features screenshot: the full booth, framed to match the rack below it. */
.feature-shot {
  margin: 0 0 var(--space-7);
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
}
.feature-shot img { display: block; width: 100%; height: auto; }

/* ---------- feature rack (bolted, shared-hairline grid) ----------
   The 1px gaps expose the container background as clean interior rules; no
   doubled borders at any column count. */
.rack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border-strong);
}
@media (max-width: 60rem) { .rack { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 40rem) { .rack { grid-template-columns: 1fr; } }

.rack__cell {
  position: relative;
  padding: var(--space-6);
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: background 0.18s ease;
}
.rack--cyan { --accent: var(--color-cyan); }
.rack--lime { --accent: var(--color-lime); }
.rack--violet { --accent: var(--color-violet); }
.rack__cell:hover {
  background: color-mix(in srgb, var(--accent) 7%, var(--color-surface));
}
.rack__no {
  position: absolute; top: var(--space-4); right: var(--space-5);
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  color: var(--color-text-silkscreen);
  font-variant-numeric: tabular-nums;
}
.rack__icon { width: 2.5rem; height: 2.5rem; color: var(--accent); margin-bottom: var(--space-2); }
.rack__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
.rack__title { margin: 0; font-size: var(--text-xl); font-weight: 700; }
.rack__body { margin: 0; color: var(--color-text-muted); font-size: var(--text-m); }

/* ---------- listen: collision players ----------
   A media well (waveform placeholder, or a screenshot) over a transport row:
   play button, live level meter, and duration. Per-card accent via --accent. */
.section--listen { border-top-color: var(--color-border); }
.pads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
@media (max-width: 56rem) {
  .pads { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }
}

.pad {
  position: relative;
  border: 1px solid var(--color-border-strong);
  background: var(--color-surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.pad--cyan { --accent: var(--color-cyan); }
.pad--lime { --accent: var(--color-lime); }
.pad--violet { --accent: var(--color-violet); }
.pad:hover {
  border-color: var(--accent);
  box-shadow: 0 0 30px -14px var(--accent);
}

/* Square media well. Drop in `<img class="pad__img" src="…" alt="…">` to
   replace the waveform placeholder. */
.pad__media {
  position: relative; aspect-ratio: 1; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%),
    var(--color-surface-inset);
}
.pad__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pad__wave { position: absolute; inset: 0; width: 100%; height: 100%; }
.pad__no {
  position: absolute; top: var(--space-3); left: var(--space-3); z-index: 1;
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Transport row: play button + level meter + duration. */
.pad__controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.pad__play {
  width: 2.2rem; height: 2.2rem; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s ease;
}
.pad__play:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.pad__play svg { width: 1rem; height: 1rem; fill: currentColor; }
.pad__meter {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 2.2rem;
  padding: var(--space-1);
  background: var(--color-surface-inset);
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.pad__meter span { flex: 1; background: var(--color-led-off); min-height: 2px; }
.pad__time {
  flex: none;
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  color: var(--color-text-silkscreen);
  font-variant-numeric: tabular-nums;
}

/* ---------- video ---------- */
.section--watch { background: var(--color-surface-inset); }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-border-strong);
  background:
    repeating-linear-gradient(45deg, #0b0b0f, #0b0b0f 12px, #0d0d12 12px, #0d0d12 24px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.video-frame::after {
  content: '';
  position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: var(--color-accent);
}
.video-frame__play {
  width: 5rem; height: 5rem;
  display: grid; place-items: center;
  border: 1px solid var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.video-frame__play:hover {
  background: color-mix(in srgb, var(--color-accent) 26%, transparent);
  box-shadow: 0 0 30px -4px var(--color-accent);
}
.video-frame__play svg { width: 1.8rem; height: 1.8rem; fill: currentColor; }
.video-frame__cap {
  position: absolute; left: var(--space-3); bottom: var(--space-3);
}

/* ---------- fully-local finale + CTA (full-bleed band) ---------- */
.cta {
  position: relative;
  text-align: center;
  padding-block: var(--space-8);
  border-top: 1px solid var(--color-border-strong);
  background:
    radial-gradient(48rem 26rem at 50% 0%, rgba(34, 211, 238, 0.12), transparent 65%),
    var(--color-surface);
}
.cta::after {
  content: '';
  position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: var(--color-accent);
}
.cta__inner { display: flex; flex-direction: column; align-items: center; }
.cta__title {
  margin: var(--space-4) auto var(--space-4);
  max-width: 34rem;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.cta__sub { margin: 0 auto var(--space-6); max-width: 36rem; color: var(--color-text-muted); font-size: var(--text-l); }
.cta__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

.footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-6);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer__links { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.footer__link {
  color: var(--color-text-muted);
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
}
.footer__link:hover { color: var(--color-text); }
.footer__copy {
  color: var(--color-text-muted);
  font: 700 var(--text-xs) var(--font-ui);
  letter-spacing: var(--silkscreen-spacing);
  text-transform: uppercase;
}
.footer__heart {
  color: var(--color-led-danger);
  font-size: 1.25em;
  line-height: 0;
  vertical-align: -0.12em;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker__track { animation: none; }
  .hero__visual-led { animation: none; }
  .hero__loading-text { animation: none; }
  .hero__loading-bar::after { animation: none; left: 0; width: 100%; opacity: 0.4; }
}
