/* RackJam landing — the schematic IS the brand (D-P6).
   Palette: app-dark panel greys + signal hues + ONE loud thing: brand pink. */

:root {
  --bg: #0c0e11;
  --panel: #16181d;
  --panel-edge: #2c313a;
  --ink: #dfe2e6;
  --ink-dim: #9aa0a8;
  --ink-faint: #6b7178;
  --brand: #f5568d;
  --brand-soft: rgba(245, 86, 141, 0.14);
  --sig-audio: #e8e9ec;
  --sig-audio-out: #4fc8cf;
  --sig-cv: #5aa2e0;
  --sig-gate: #e0a33e;
  --sig-clock: #a97fe0;
  --sig-pitch: #5bbf7a;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background:
    /* fine mm grid, fading toward the edges */
    radial-gradient(ellipse 120% 90% at 50% 0%, rgba(245, 86, 141, 0.05), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 23px, rgba(223, 226, 230, 0.028) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(223, 226, 230, 0.028) 23px 24px),
    var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 340;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------ rack rails (top/bottom) */
.rail {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 22px;
  background: linear-gradient(180deg, #1b1e24, #14161b);
  border-bottom: 1px solid var(--panel-edge);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  user-select: none;
}
.rail-bottom { border-bottom: 0; border-top: 1px solid var(--panel-edge); margin-top: 96px; }
.rail-brand { color: var(--brand); font-weight: 600; letter-spacing: 0.3em; }
.rail-holes {
  flex: 1;
  height: 8px;
  background-image: radial-gradient(circle 3px, #0a0b0d 42%, #33383f 46%, transparent 52%);
  background-size: 28px 8px;
  background-position: center;
  background-repeat: repeat-x;
}

/* ------------------------------------------------------------------ hero */
main { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: center;
  padding: 92px 0 72px;
}

.overline {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--brand);
  margin-bottom: 18px;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  font-weight: 640;
  line-height: 1.04;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 96;
}
h1 em {
  font-style: normal;
  color: var(--brand);
  position: relative;
  white-space: nowrap;
}
h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.02em;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  animation: underline 0.7s cubic-bezier(0.7, 0, 0.2, 1) 1.1s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }

.sub {
  margin-top: 22px;
  max-width: 46ch;
  color: var(--ink-dim);
  font-size: 1.06rem;
}

.cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.cta {
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #0c0e11;
  background: var(--brand);
  padding: 13px 22px;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(245, 86, 141, 0.5);
  transition: transform 0.15s ease, box-shadow 0.3s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 8px 28px -6px rgba(245, 86, 141, 0.55); }
.cta-ghost {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink-dim);
  padding: 13px 18px;
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.cta-ghost:hover { border-color: var(--brand); color: var(--ink); }
.beta-note {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--ink-faint);
}

/* ----------------------------------------------------- hero schematic svg */
.hero-rack { min-width: 0; }
.rack-svg { width: 100%; height: auto; display: block; }

.rk-frame { fill: #101216; stroke: var(--panel-edge); stroke-width: 1.5; }
.mod-face { fill: var(--panel); stroke: #3a3e46; stroke-width: 1; }
.brand-face { stroke: var(--brand); stroke-width: 1.5; }
.mod-name {
  fill: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-anchor: middle;
  font-weight: 600;
}
.brand-name { fill: var(--brand); }
.knob { fill: #23262c; stroke: #4a4f58; stroke-width: 1.5; }
.knob.big { stroke-width: 2; }
.brand-knob { stroke: var(--brand); }
.knob-mark { stroke: #c9ccd1; stroke-width: 2; stroke-linecap: round; }
.brand-mark { stroke: var(--brand); }
.jack { fill: #101216; stroke-width: 2.5; stroke: var(--sig-audio); }
.jack.out { fill: currentColor; }
.sig-audio { stroke: var(--sig-audio); }
.sig-audio-out { stroke: var(--sig-audio-out); color: var(--sig-audio-out); }
.sig-cv { stroke: var(--sig-cv); color: var(--sig-cv); }
.sig-gate { stroke: var(--sig-gate); }
.sig-clock { stroke: var(--sig-clock); }
.sig-pitch { stroke: var(--sig-pitch); }
.brand-jack { stroke: var(--brand); }
.jack-label {
  fill: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-anchor: middle;
}
.screen { fill: #0a0c0f; stroke: #3a3e46; }
.screen-wave { fill: none; stroke: var(--sig-audio-out); stroke-width: 1.5; }
.env-shape { fill: none; stroke: var(--sig-gate); stroke-width: 1.5; stroke-linejoin: round; }
.slot { fill: #0a0c0f; stroke: #3a3e46; stroke-width: 0.5; }
.fader { fill: #33383f; stroke: #4a4f58; }
.sliders .fader { transition: y 0.3s; }

.cable {
  fill: none;
  stroke: var(--brand);
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 6px 10px rgba(245, 86, 141, 0.35));
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  animation: patch 1.4s cubic-bezier(0.6, 0, 0.3, 1) 0.5s forwards;
}
@keyframes patch { to { stroke-dashoffset: 0; } }
.cable-end { fill: var(--brand); opacity: 0; animation: pop 0.3s ease 1.7s forwards; }
@keyframes pop { to { opacity: 1; } }

/* -------------------------------------------------------------- features */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 24px 0 0;
}

.panel {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: 30px 26px 26px;
}
.screw {
  position: absolute;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #4a4f58, #16181d 70%);
  border: 1px solid #0a0b0d;
}
.screw::after {
  content: "";
  position: absolute;
  left: 1px; right: 1px; top: 50%;
  height: 1px;
  background: #0a0b0d;
  transform: rotate(38deg);
}
.screw.tl { top: 8px; left: 8px; }
.screw.tr { top: 8px; right: 8px; }
.screw.bl { bottom: 8px; left: 8px; }
.screw.br { bottom: 8px; right: 8px; transform: rotate(72deg); }

.feat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--brand);
  margin-bottom: 12px;
}
.feature h2, .waitlist h2 {
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.feature p { color: var(--ink-dim); font-size: 0.95rem; }

/* -------------------------------------------------------------- waitlist */
.waitlist { margin-top: 20px; padding: 44px 26px; }
.wl-inner { max-width: 560px; margin: 0 auto; text-align: center; }
#waitlist-form {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  justify-content: center;
  flex-wrap: wrap;
}
#wl-email {
  flex: 1;
  min-width: 240px;
  background: #0c0e11;
  border: 1px solid var(--panel-edge);
  border-radius: 4px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
}
#wl-email:focus { border-color: var(--brand); }
#wl-submit {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.92rem;
  color: #0c0e11;
  background: var(--brand);
  border: 0;
  border-radius: 4px;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s;
}
#wl-submit:hover { transform: translateY(-2px); }
#wl-submit:disabled { opacity: 0.55; cursor: default; transform: none; }
.wl-status {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-dim);
  min-height: 1.2em;
}
.wl-status.ok { color: var(--sig-pitch); }
.wl-status.err { color: #e2635a; }

/* ------------------------------------------------------- load choreography */
.reveal, .reveal-late, .reveal-1, .reveal-2, .reveal-3 {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
.reveal { animation-delay: 0.05s; }
.reveal-late { animation-delay: 0.25s; }
.reveal-1 { animation-delay: 0.45s; }
.reveal-2 { animation-delay: 0.58s; }
.reveal-3 { animation-delay: 0.71s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-late, .reveal-1, .reveal-2, .reveal-3 { animation: none; opacity: 1; transform: none; }
  .cable { animation: none; stroke-dashoffset: 0; }
  .cable-end { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 64px; gap: 40px; }
  .features { grid-template-columns: 1fr; }
}
