:root {
  color-scheme: dark;
  --paper: #060606;
  --ink: #f7f5ef;
  --muted: #a8a49b;
  --line: rgba(255, 255, 255, 0.14);
  --red: #ff4c41;
  --cyan: #24b8e8;
  --max: 1180px;
  font-family: Helvetica Neue, Helvetica, Arial, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin-top: 0; }
code, pre { font-family: SFMono-Regular, Consolas, monospace; }

.site-header {
  position: sticky;
  top: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 72px));
  margin: 22px auto 0;
  gap: 28px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.84);
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions {
  display: flex;
  align-items: center;
}

.brand { gap: 10px; font-weight: 740; white-space: nowrap; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 22px rgba(36, 184, 232, 0.18);
}

.nav-links { gap: 32px; font-size: 0.94rem; font-weight: 650; }
.header-cta,
.button,
.copy-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 760;
}
.header-cta { padding: 12px 20px; background: var(--ink); color: var(--paper); }

.hero {
  display: grid;
  place-items: center;
  min-height: calc(100dvh - 74px);
  padding: 48px 24px 28px;
  text-align: center;
}

.hero-mark-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  margin-bottom: 24px;
}

.hero-mark {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.018), 0 0 0 68px rgba(255, 255, 255, 0.012);
}

.hero-sound-line {
  position: absolute;
  inset: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  pointer-events: none;
}

.hero-sound-line path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 190;
  stroke-dashoffset: 190;
  opacity: 0.92;
  filter: drop-shadow(0 0 10px rgba(247, 245, 239, 0.28));
  animation: draw-sound-line 4.2s ease-in-out infinite;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 22px;
  font-size: 5.4rem;
  line-height: 0.93;
  letter-spacing: 0;
}
h1 span { display: block; }
h1 span + span { color: rgba(247, 245, 239, 0.42); }

h2 {
  margin-bottom: 0;
  font-size: 4.6rem;
  font-weight: 560;
  line-height: 1;
}

h3 { margin-bottom: 12px; font-size: 1.3rem; }

.hero-subtitle {
  max-width: 720px;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 1.1rem;
}

.hero-actions { justify-content: center; flex-wrap: wrap; gap: 14px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--ink);
}
.button-primary { background: var(--ink); color: var(--paper); }
.button-secondary { background: transparent; color: var(--ink); }

.showcase,
.flow,
.install,
.site-footer {
  width: min(var(--max), calc(100% - 72px));
  margin-inline: auto;
}
.showcase,
.flow,
.install {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

.flow {
  position: relative;
}

.flow-artifact {
  position: absolute;
  left: clamp(190px, 18vw, 300px);
  top: 58px;
  width: clamp(150px, 12vw, 205px);
  opacity: 0.68;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: rotate(-5deg);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 0.58fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 54px;
}

.showcase .section-heading h2 {
  grid-column: 2;
}

.flow .section-heading {
  align-items: start;
  min-height: 278px;
  margin-bottom: 24px;
}

.flow .section-heading .flow-hold-control {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: end;
  justify-self: start;
  width: 132px;
}

.flow .section-heading .eyebrow {
  margin-top: 218px;
}

.showcase-shell {
  display: grid;
  grid-template-columns: 1fr;
}

.showcase-art,
.variation-stage {
  border-radius: 8px;
}

.showcase-art {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background: #050505;
}

.showcase-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 30%, transparent 0 20%, rgba(0, 0, 0, 0.32) 42%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.64) 48%, rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.showcase-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% center;
}

.command-panel,
.variation-stage {
  position: absolute;
  z-index: 1;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.9);
}

.command-panel {
  top: 42px;
  right: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 156px;
  gap: 22px;
  align-items: center;
  width: min(720px, calc(100% - 84px));
  padding: 70px 28px 28px;
}

.command-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 1.28rem;
  line-height: 1.45;
}

.orange-text {
  color: var(--red);
}

.command-copy {
  position: relative;
  min-height: 178px;
}

.command-reveal {
  position: relative;
  z-index: 1;
  min-height: 178px;
}

.command-reveal.is-rsvp {
  display: grid;
  place-items: center;
  text-align: center;
  font-size: clamp(2rem, 5vw, 4.2rem);
  font-weight: 840;
  line-height: 0.95;
}

.command-panel.is-complete .command-reveal {
  display: block;
  text-align: left;
  font-size: 1.28rem;
  font-weight: 400;
  line-height: 1.45;
}

.command-reveal .is-secret {
  color: var(--red);
}

.command-reveal .is-pending {
  color: rgba(247, 245, 239, 0.12);
  background: linear-gradient(var(--red), var(--red)) left 58% / 100% 0.34em no-repeat;
  text-shadow: none;
}

.command-reveal .rsvp-word {
  min-width: 10ch;
}

.redaction-stack {
  position: absolute;
  inset: 18px 0 auto;
  z-index: 0;
  display: grid;
  gap: 13px;
  opacity: 0.78;
  pointer-events: none;
}

.redaction-stack span {
  display: block;
  height: 16px;
  max-width: var(--w, 100%);
  background: var(--red);
  box-shadow: 0 0 20px rgba(255, 76, 65, 0.16);
}

.redaction-stack span:nth-child(1) { --w: 88%; }
.redaction-stack span:nth-child(2) { --w: 100%; }
.redaction-stack span:nth-child(3) { --w: 76%; }
.redaction-stack span:nth-child(4) { --w: 54%; }

.command-panel.is-revealing .redaction-stack,
.command-panel.is-complete .redaction-stack {
  display: none;
}

.hold-control {
  position: relative;
  display: grid;
  place-items: center;
  width: 148px;
  aspect-ratio: 1;
  border: 1px solid rgba(247, 245, 239, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255, 76, 65, 0.2) 0 34%, rgba(255, 76, 65, 0.08) 35% 36%, transparent 37%),
    rgba(255, 255, 255, 0.035);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: center;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 14px rgba(255, 255, 255, 0.025), 0 0 42px rgba(255, 76, 65, 0.1);
}

.hold-control::before,
.hold-control::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(247, 245, 239, 0.14);
  border-radius: inherit;
}

.hold-control::after {
  inset: -8px;
  border-color: rgba(255, 76, 65, 0.32);
  clip-path: polygon(50% 0, 100% 0, 100% 50%, 50% 50%);
}

.hold-control span {
  max-width: 92px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 860;
  line-height: 1.08;
}

.hold-control small {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 820;
  letter-spacing: 0;
}

.hold-control.is-active {
  border-color: rgba(255, 76, 65, 0.72);
  box-shadow: inset 0 0 0 14px rgba(255, 76, 65, 0.06), 0 0 48px rgba(255, 76, 65, 0.18);
}

.hold-control.is-complete {
  border-color: rgba(36, 184, 232, 0.72);
}

.variation-stage {
  right: 42px;
  bottom: 42px;
  width: min(660px, calc(100% - 84px));
  min-height: 0;
  padding: 20px;
  background: transparent;
}
.variation-meta {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}
.variation-meta strong { color: var(--ink); }

@keyframes draw-sound-line {
  0% {
    stroke-dashoffset: 190;
    opacity: 0;
  }
  18% {
    opacity: 0.92;
  }
  58% {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }
  82%, 100% {
    stroke-dashoffset: -190;
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sound-line path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.variation-layout {
  display: grid;
  min-height: 0;
  gap: 10px;
}

.preview-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 96px;
  padding: 13px 0 0;
}
.preview-card span {
  margin-bottom: 18px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 860;
  text-transform: uppercase;
}
.preview-card:nth-child(2n) span {
  color: var(--cyan);
}
.preview-card strong { font-size: 1rem; line-height: 1.1; }
.preview-card p { margin: 8px 0 0; color: var(--muted); font-size: 0.84rem; line-height: 1.35; }
.primary-card { padding: 16px 0 0; background: transparent; }
.variation-caption { max-width: 520px; margin: 22px 0 0; color: var(--muted); font-size: 0.84rem; }

.variation-command .variation-layout {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.variation-command [data-card="center"] {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.flow-grid article {
  position: relative;
  min-height: 170px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.preview-card.is-locked > :not(.redacted-card),
.flow-grid article.is-locked > :not(.redacted-card) {
  opacity: 0;
}

.preview-card.is-locked::before,
.flow-grid article.is-locked::before {
  content: attr(data-status);
  position: absolute;
  left: 0;
  top: 12px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 840;
  text-transform: uppercase;
}

.preview-card.is-locked:not([data-status])::before,
.flow-grid article.is-locked:not([data-status])::before {
  content: "TARGET LOCKED";
}

.preview-card.is-counting::before,
.flow-grid article.is-counting::before {
  content: attr(data-countdown);
  color: var(--red);
  font-size: 1.7rem;
}

.flow-grid article.is-locked::before {
  left: 32px;
  top: 32px;
}

.preview-card.is-locked::after,
.flow-grid article.is-locked::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8%;
  top: 48px;
  height: 14px;
  background:
    linear-gradient(var(--red), var(--red)) 0 0 / 48% 100% no-repeat,
    linear-gradient(var(--red), var(--red)) 58% 0 / 32% 100% no-repeat;
  opacity: 0.72;
  box-shadow: 0 24px 0 rgba(255, 76, 65, 0.72), 0 48px 0 rgba(255, 76, 65, 0.48);
}

.flow-grid article.is-locked::after {
  left: 32px;
  right: 32px;
  top: 78px;
}

.preview-card.is-revealed,
.flow-grid article.is-revealed {
  animation: target-release 420ms ease-out both;
}

@keyframes target-release {
  from {
    opacity: 0.18;
    transform: translateY(8px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.flow-grid article i {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(247, 245, 239, 0.26);
  border-radius: 999px;
}

.flow-grid article i::before,
.flow-grid article i::after {
  content: "";
  position: absolute;
  background: var(--red);
}

.flow-grid article i::before {
  left: 50%;
  top: -8px;
  bottom: -8px;
  width: 1px;
}

.flow-grid article i::after {
  top: 50%;
  left: -8px;
  right: -8px;
  height: 1px;
}

.flow-grid article:nth-child(2) i::before,
.flow-grid article:nth-child(2) i::after {
  background: var(--cyan);
}
.flow-grid p, .install-copy p { color: var(--muted); }

.install {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1.26fr);
  gap: 70px;
}

.install-artifact {
  position: absolute;
  right: clamp(-96px, -5vw, -42px);
  bottom: -88px;
  width: clamp(170px, 16vw, 270px);
  opacity: 0.72;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: rotate(5deg);
}

.install-copy h2 {
  margin-bottom: 28px;
}

.install-copy > p {
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.45;
}

.onboarding-checklist {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
}

.onboarding-checklist li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.onboarding-checklist li:last-child {
  border-bottom: 1px solid var(--line);
}

.onboarding-checklist span {
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 1;
  border: 1px solid rgba(247, 245, 239, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 840;
}

.onboarding-checklist strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.onboarding-checklist p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.terminal-window {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #0b0b0a;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.42);
}
.terminal-window pre {
  margin: 0;
  padding: 36px 32px 84px;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.76;
}
.copy-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-height: 42px;
  padding: 0 20px;
  background: #fff;
  color: #111;
}

.prerequisite-link {
  display: inline-block;
  margin-left: 6px;
  color: var(--accent, #f5b6a3);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prerequisite-link:hover {
  text-decoration-thickness: 2px;
}

.terminal-fineprint {
  margin: 12px 32px 28px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.terminal-fineprint a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.install-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Tab row above the install panel — pills, no underline. The active
   one fills with the brand cream tone; the inactive ones stay
   subdued on the dark background. Mobile: wraps to two rows. */
.install-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}
.install-tab {
  appearance: none;
  border: 1px solid rgba(247, 245, 239, 0.18);
  background: transparent;
  color: var(--muted);
  padding: 9px 16px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.install-tab:hover {
  color: var(--ink, #f5f3ed);
  border-color: rgba(247, 245, 239, 0.32);
}
.install-tab.is-active {
  background: var(--ink, #f5f3ed);
  color: #111;
  border-color: var(--ink, #f5f3ed);
}

/* Panels — same dark terminal aesthetic regardless of which tab.
   Initially all panels are hidden via [hidden]; .is-active reveals
   the chosen one. Stacked positioning so swap is instant — no
   layout shift. */
.install-panel {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0b0a;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.42);
}
.install-panel[hidden] {
  display: none;
}
.install-panel pre {
  margin: 0;
  padding: 32px 32px 76px;
  overflow-x: auto;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #f7f5ef;
  white-space: pre;
}
.install-panel .copy-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  min-height: 38px;
  padding: 0 18px;
  background: #fff;
  color: #111;
}
.install-fineprint {
  margin: 4px 4px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.install-fineprint a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer {
  padding: 28px 0 44px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

@media (max-width: 1060px) {
  .site-header,
  .showcase,
  .flow,
  .install,
  .site-footer { width: calc(100% - 40px); }
  .section-heading,
  .showcase-shell,
  .install { grid-template-columns: 1fr; }
  .showcase .section-heading h2 { grid-column: 1; }
  .flow .section-heading .flow-hold-control {
    grid-column: 1;
    grid-row: auto;
    margin-top: 22px;
  }
  .showcase-art { grid-row: auto; min-height: 720px; }
  h1 { font-size: 4.6rem; }
  h2 { font-size: 3.5rem; }
  .flow-grid { grid-template-columns: 1fr; }
  .flow-artifact {
    left: auto;
    right: 0;
    top: 34px;
    width: 150px;
    opacity: 0.45;
  }
  .install-artifact {
    right: 0;
    bottom: -56px;
    width: 150px;
    opacity: 0.48;
  }
}

@media (max-width: 760px) {
  .site-header { top: 12px; width: calc(100% - 24px); }
  .nav-links { display: none; }
  .hero { padding-inline: 14px; }
  .hero-mark-wrap { width: 150px; height: 150px; }
  h1 { font-size: 3.35rem; }
  h2 { font-size: 2.65rem; }
  .showcase-art {
    display: grid;
    gap: 12px;
    min-height: 0;
    padding: 240px 12px 12px;
  }
  .showcase-art img {
    height: 230px;
    object-position: 24% center;
  }
  .command-panel,
  .variation-stage {
    position: relative;
    inset: auto;
    width: 100%;
  }
  .command-panel {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .hold-control {
    width: 132px;
    justify-self: end;
  }
  .command-copy p {
    font-size: 1rem;
  }
  .command-reveal.is-rsvp {
    font-size: 2.4rem;
  }
  .command-panel.is-complete .command-reveal {
    font-size: 1rem;
  }
  .variation-command .variation-layout {
    grid-template-columns: 1fr;
  }
  .variation-command [data-card] {
    grid-column: auto;
    grid-row: auto;
  }
}
