:root {
  color-scheme: dark;
  --bg: #000000;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --line: #272727;
  --ink: #ececec;
  --mute: #c9c9c9;
  --dim: #8a8a8a;
  --accent: #fa4a61;
  --accent-dim: #2a1116;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --font: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1080px;
  --gutter: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/24px var(--font);
  text-wrap: pretty;
  hyphens: none;
}

img { max-width: 100%; height: auto; display: block; }
button, a { font: inherit; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; letter-spacing: -0.03em; }
p { color: var(--mute); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection { background: var(--accent); color: #fff; }

body { scrollbar-color: #313131 var(--surface); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #313131; border-radius: 8px; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
}
.skip:focus { top: 16px; color: #fff; }

.wrap {
  width: min(var(--max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

/* Island nav */
.top {
  position: sticky;
  top: 0;
  z-index: 12;
  padding: 24px 0 0;
  pointer-events: none;
}
.island {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 8px 8px 8px 16px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.brand:hover { color: var(--ink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--mute);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--ink); }

.menu-btn {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.menu-btn span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 200ms var(--ease-out);
}
.menu-btn span:first-child { top: 16px; }
.menu-btn span:last-child { top: 23px; }
.menu-btn[aria-expanded="true"] span:first-child {
  top: 19px;
  transform: rotate(45deg);
}
.menu-btn[aria-expanded="true"] span:last-child {
  top: 19px;
  transform: rotate(-45deg);
}

.nav-panel {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 180ms var(--ease-out), color 180ms var(--ease-out), transform 100ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #ff6578; color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn[aria-disabled="true"] {
  background: var(--surface-2);
  color: var(--mute);
  cursor: default;
  pointer-events: none;
}

/* Hero */
.hero {
  position: relative;
  padding: 40px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: center;
}
.hero h1 {
  margin: 0 0 16px;
  max-width: 680px;
  font-size: 60px;
  line-height: 1;
  font-weight: 700;
  color: var(--ink);
}
.hero .lede {
  max-width: 680px;
  margin: 0 0 32px;
  font-size: 18px;
  line-height: 28px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.proof {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--dim);
}
.scope-wrap {
  position: relative;
  margin: 0 0 40px;
  height: 160px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.scope-wrap canvas {
  display: block;
  width: 100%;
  height: 160px;
}
.scope-hud {
  position: absolute;
  top: 16px;
  left: var(--gutter);
  display: flex;
  align-items: baseline;
  gap: 8px;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.scope-hud .code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.scope-hud .name {
  font-size: 14px;
  line-height: 20px;
  color: var(--mute);
}

.phone {
  width: 280px;
  margin-inline: auto;
}
.phone img {
  width: 100%;
  border-radius: 40px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
}
.phone figcaption {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--dim);
  text-align: center;
}

/* Tagline */
.tagline {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.tagline p {
  margin: 0;
  max-width: 680px;
  font-size: 48px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.tagline .word {
  color: color-mix(in srgb, var(--ink) 30%, transparent);
  transition: color 700ms var(--ease);
}
.tagline .word.is-on { color: var(--ink); }

/* Sections */
.section { padding: 96px 0; }
.section h2 {
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 40px;
}
.section .intro {
  max-width: 680px;
  margin: 0 0 40px;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 28px;
}
.steps p { margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}

/* Rhythms */
.rhythm-list {
  display: grid;
  gap: 8px;
}
.rhythm {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  cursor: pointer;
  transition: background 180ms var(--ease-out), border-color 180ms var(--ease-out);
}
.rhythm:hover { background: var(--surface-2); }
.rhythm[aria-pressed="true"] {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.rhythm .code {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.06em;
  color: var(--dim);
  text-transform: uppercase;
}
.rhythm[aria-pressed="true"] .code { color: var(--accent); }
.rhythm .title {
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
}
.rhythm .meta {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--dim);
}
.rhythm .bpm {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 16px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.scope-mini {
  height: 120px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.scope-mini canvas {
  display: block;
  width: 100%;
  height: 120px;
}

/* Modes */
.modes { display: grid; gap: 8px; }
.mode {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.mode h3 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 28px;
}
.mode p { margin: 0; }

.note {
  margin: 24px 0 0;
  color: var(--dim);
  font-size: 14px;
  line-height: 20px;
}

/* Shots */
.shots {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots .phone {
  flex: 0 0 220px;
  scroll-snap-align: start;
  width: 220px;
}

/* FAQ */
.faq {
  display: grid;
  gap: 8px;
  max-width: 720px;
}
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 24px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq details p {
  margin: 0 0 16px;
}
.faq details[open] summary { color: var(--accent); }

.close {
  padding: 96px 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
.close h2 {
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 40px;
}
.close .lede {
  max-width: 680px;
  margin: 0 auto 32px;
}
.close .hero-actions { justify-content: center; }

.footer {
  padding: 48px 0 80px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 14px;
  line-height: 20px;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.footer a { color: var(--mute); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.disclaimer { margin: 24px 0 0; max-width: 680px; }

/* Legal */
.legal {
  padding: 80px 0 96px;
  max-width: 680px;
}
.legal h1 {
  margin: 0 0 4px;
  font-size: 36px;
  line-height: 40px;
}
.legal .date {
  margin: 0 0 32px;
  color: var(--dim);
  font-size: 14px;
  line-height: 20px;
}
.legal h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  line-height: 28px;
  color: var(--accent);
  letter-spacing: 0;
  font-weight: 600;
}
.legal p, .legal li { color: var(--mute); }
.legal ul { padding-left: 20px; }

/* 404 */
.flatline {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 24px;
}
.flatline h1 {
  margin: 16px 0 8px;
  font-size: 48px;
  line-height: 1;
}
.flatline p { margin: 0 0 32px; }
.flatline-line {
  width: min(480px, 100%);
  height: 4px;
  margin: 0 auto;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 16px color-mix(in srgb, var(--accent) 50%, transparent);
}

.reveal {
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity 800ms var(--ease), transform 800ms var(--ease), filter 800ms var(--ease);
}
.reveal.is-wait {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(8px);
}

@media (max-width: 860px) {
  .hero h1 { font-size: 48px; }
  .tagline p { font-size: 36px; line-height: 40px; }
  .hero-grid,
  .split { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .phone { width: 220px; }
  .menu-btn { display: block; }
  .nav-links { display: none; }
  .nav-panel {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 9;
    padding: 96px 24px 24px;
  }
  .nav-panel.is-open { display: block; }
  .nav-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
  }
  .nav-panel a {
    display: block;
    color: var(--ink);
    text-decoration: none;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    padding: 12px 0;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  }
  .nav-panel.is-open a { opacity: 1; transform: none; }
  .nav-panel.is-open li:nth-child(1) a { transition-delay: 80ms; }
  .nav-panel.is-open li:nth-child(2) a { transition-delay: 120ms; }
  .nav-panel.is-open li:nth-child(3) a { transition-delay: 160ms; }
  .nav-panel.is-open li:nth-child(4) a { transition-delay: 200ms; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 36px; line-height: 40px; }
  .section h2, .close h2 { font-size: 30px; line-height: 36px; }
  .rhythm { grid-template-columns: 56px 1fr; }
  .rhythm .bpm { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  .rhythm:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  .reveal.is-wait,
  .tagline .word,
  .nav-panel a,
  .btn {
    transition: none;
    filter: none;
    transform: none;
    opacity: 1;
  }
}
