/* NextTrack — marketing site. Palette and chips mirror the app (src/renderer). */
:root {
  --ink-950: #0b0d12;
  --ink-900: #11141b;
  --ink-850: #161a23;
  --ink-800: #1c212c;
  --ink-700: #2a3140;
  --ink-500: #6b7488;
  --ink-300: #aab2c3;
  --text: #eef0f5;
  --muted: #a3abbd;
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --green: #34d399;
  --blue: #7dd3fc;
  --radius: 18px;
  --display: 'Sora', 'Avenir Next', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink-950);
  color: var(--text);
  font: 400 16px/1.6 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 5vw, 48px); font-weight: 800; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.amber { color: var(--amber); }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.disc {
  width: 26px; height: 26px; border-radius: 50%;
  border: 5px solid var(--amber); position: relative; flex: none;
}
.disc::after { content: ''; position: absolute; inset: 0; margin: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.disc-lg { display: block; width: 64px; height: 64px; border-width: 11px; margin: 0 auto 22px; }
.disc-lg::after { width: 14px; height: 14px; }
.wordmark { font: 800 20px/1 var(--display); letter-spacing: -0.02em; }
.wordmark span { color: var(--amber); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 13, 18, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.nav-links { display: none; list-style: none; margin: 0; padding: 0; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); }
@media (min-width: 820px) { .nav-links { display: flex; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 14px;
  font: 700 16px/1 var(--ui); text-decoration: none; white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: #111; box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.7); }
.btn-primary:hover { background: #ffb02e; }
.btn-secondary { background: var(--ink-850); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.12); }
.btn-secondary:hover { border-color: rgba(255, 255, 255, 0.28); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; border-radius: 11px; background: var(--amber); color: #111; }
.link-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 18px;
  background: none; border: 0; color: var(--text); font: 600 15px var(--ui); cursor: pointer; padding: 6px 0;
}
.link-btn:hover { color: var(--amber); }
.play { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); position: relative; }
.play::after { content: ''; position: absolute; left: 12px; top: 9px; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 48px 0 64px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -40% auto auto; width: 900px; height: 900px;
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.22), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--ink-850); border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px; font-weight: 600; color: var(--ink-300); margin-bottom: 22px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.hero h1 { font-size: clamp(46px, 9vw, 86px); font-weight: 800; letter-spacing: -0.035em; }
.lede { margin-top: 20px; font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 34ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-row .btn { flex: 1 1 220px; }
.cta-row .btn.is-suggested { order: -1; }
.fine { margin-top: 18px; font-size: 13px; color: var(--ink-500); max-width: 46ch; }
.hero-media { display: flex; justify-content: center; }
.phone {
  position: relative; width: min(330px, 78vw); aspect-ratio: 9 / 16;
  border-radius: 40px; padding: 10px;
  background: linear-gradient(160deg, #2a3140, #0f1218 60%);
  box-shadow: 0 40px 120px -30px rgba(245, 158, 11, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.phone-video { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; background: #000; }
.sound-btn {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px;
  background: rgba(11, 13, 18, 0.72); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.16);
  font: 600 13px var(--ui); cursor: pointer; backdrop-filter: blur(8px);
}
.sound-btn svg { width: 16px; height: 16px; fill: currentColor; }
@media (min-width: 900px) {
  .hero { padding: 80px 0 100px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
  .cta-row .btn { flex: 0 0 auto; }
}

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--ink-900); border-block: 1px solid rgba(255, 255, 255, 0.05); }
.kicker { font: 700 13px var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.section h2 { max-width: 20ch; }

/* steps */
.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 16px; counter-reset: s; }
.step { background: var(--ink-900); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--radius); padding: 26px; }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 18px;
  background: var(--amber-soft); color: var(--amber); font: 800 18px var(--display);
}
.step p { margin-top: 10px; color: var(--muted); }
kbd { font: 600 12px var(--ui); padding: 2px 6px; border-radius: 6px; background: var(--ink-800); border: 1px solid rgba(255, 255, 255, 0.12); }
.deck-chip { font: 700 13px var(--ui); padding: 2px 8px; border-radius: 7px; color: var(--amber); background: var(--amber-soft); border: 1px solid rgba(245, 158, 11, 0.4); white-space: nowrap; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* features */
.features { display: grid; gap: 18px; margin-top: 44px; }
.feature {
  background: var(--ink-950); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 22px;
  overflow: hidden; display: flex; flex-direction: column;
}
.feature-copy { padding: 26px; }
.feature-copy p { margin-top: 10px; color: var(--muted); }
.shot { margin: 0; background: #0d1016; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.shot img { width: 100%; }
.feature-wide .shot { border-bottom: 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.pill { font: 700 11px var(--ui); letter-spacing: 0.06em; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.pill-green { color: #6ee7b7; background: rgba(16, 185, 129, 0.16); }
.pill-blue { color: var(--blue); background: rgba(14, 165, 233, 0.16); }
.feature-list .ticks { list-style: none; margin: 0; padding: 0 26px 26px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-300); }
.ticks li::before {
  content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px;
  background: var(--amber-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5 10 17 19 7' fill='none' stroke='%23f59e0b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
@media (min-width: 820px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; }
  .feature-wide .feature-copy { padding: 40px; }
  .feature-wide .shot { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.06); height: 100%; display: grid; place-items: center; }
  .feature-list { justify-content: center; }
}
@media (min-width: 1080px) {
  .features { grid-template-columns: repeat(3, 1fr); }
  .feature-wide { grid-column: 1 / -1; }
  .feature-list { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
  .feature-list .ticks { padding: 26px 26px 26px 0; }
}

/* real sets */
.sets { display: grid; gap: 40px; align-items: center; }
.sets-copy p:not(.kicker) { margin-top: 18px; color: var(--muted); max-width: 44ch; }
.bpm-lock {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 10px 16px;
  border-radius: 999px; background: var(--ink-850); border: 1px solid rgba(255, 255, 255, 0.1);
  font: 600 15px var(--ui);
}
.upnext {
  list-style: none; margin: 0; padding: 10px; border-radius: 22px;
  background: var(--ink-900); border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.un-row {
  display: grid; grid-template-columns: 26px 1fr auto auto; align-items: center; gap: 12px;
  padding: 14px 12px; border-radius: 14px;
}
.un-row + .un-row { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.un-row:nth-child(4) { background: rgba(245, 158, 11, 0.07); }
.un-n { font: 700 14px var(--ui); color: var(--amber); text-align: center; }
.un-title { min-width: 0; display: flex; flex-direction: column; }
.un-title strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.un-title small { color: var(--ink-500); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reason { font-style: normal; margin-left: 6px; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.06); color: var(--ink-300); font-size: 11px; }
.un-bpm { font: 500 15px var(--ui); color: var(--ink-300); font-variant-numeric: tabular-nums; }
.key {
  --k: #6b7488;
  min-width: 44px; text-align: center; padding: 3px 8px; border-radius: 8px;
  font: 700 13px var(--ui); color: var(--k);
  background: color-mix(in srgb, var(--k) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 35%, transparent);
}
@media (min-width: 900px) { .sets { grid-template-columns: 0.9fr 1.1fr; gap: 64px; } }

/* trust */
.trust { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.trust li { background: var(--ink-950); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: var(--radius); padding: 26px; }
.trust p { margin-top: 8px; color: var(--muted); }
.t-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 16px; background: var(--amber-soft); color: var(--amber); font-size: 20px; }

/* faq */
.faq-wrap { max-width: 820px; }
.faq { margin-top: 36px; display: grid; gap: 10px; }
.faq details { background: var(--ink-900); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 16px; padding: 0 22px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 32px 20px 0; position: relative;
  font: 600 17px var(--ui);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--amber); font-size: 24px; font-weight: 400; transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); }
code { font-size: 0.9em; padding: 1px 5px; border-radius: 5px; background: var(--ink-800); }

/* download */
.download { text-align: center; position: relative; overflow: hidden; }
.download::before {
  content: ''; position: absolute; left: 50%; top: 40%; width: 900px; height: 600px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.16), transparent 70%); pointer-events: none;
}
.download-inner { position: relative; }
.download h2 { margin-inline: auto; max-width: none; }
.download .lede { margin-inline: auto; max-width: 44ch; }
.cta-center { justify-content: center; }
.cta-center .btn { flex: 0 1 260px; }
.download .fine { margin-inline: auto; max-width: 60ch; }

/* footer */
.site-footer { border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 36px 0 48px; color: var(--ink-500); font-size: 14px; }
.footer-inner { display: grid; gap: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink-300); }
.footer-links a:hover { color: var(--text); }
@media (min-width: 820px) {
  .footer-inner { grid-template-columns: auto 1fr auto auto; align-items: center; gap: 28px; }
}

/* video modal */
.video-modal {
  padding: 0; border: 0; background: transparent; max-width: min(420px, 92vw); width: 100%;
}
.video-modal::backdrop { background: rgba(5, 6, 9, 0.86); backdrop-filter: blur(6px); }
.video-modal video { width: 100%; border-radius: 22px; background: #000; aspect-ratio: 9 / 16; }
.video-modal .close {
  position: absolute; right: -6px; top: -48px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--ink-850); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.15); font-size: 18px; cursor: pointer;
}
.video-modal form { position: relative; height: 0; }
.video-modal { overflow: visible; margin-top: 12vh; }

/* legal page */
.legal { padding: 64px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(36px, 6vw, 52px); font-weight: 800; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); margin-top: 12px; }
.legal a { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Camelot wheel colours (same as the app). Classes, not inline styles, so the CSP stays strict. */
.k6 { --k: #f7876a; }
.k7 { --k: #f46d8e; }
.k8 { --k: #e06bc0; }

.wordmark { color: var(--text); }
@media (max-width: 480px) { .reason { display: none; } }

/* ---------- invite form ---------- */
.invite-card {
  margin: 32px auto 0; max-width: 560px; text-align: left;
  background: var(--ink-900); border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 22px;
  padding: 26px; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.8);
}
.invite-form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font: 600 14px var(--ui); color: var(--ink-300); }
.req { color: var(--amber); }
.opt { color: var(--ink-500); font-weight: 500; }
.field input {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--ink-950); color: var(--text); border: 1px solid rgba(255, 255, 255, 0.12);
  font: 500 16px var(--ui);
}
.field input::placeholder { color: var(--ink-500); }
.field input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25); }
.field input[aria-invalid='true'] { border-color: #f87171; }
.field-err, .form-error { color: #fca5a5; font-size: 14px; }
.btn-block { width: 100%; margin-top: 4px; border: 0; cursor: pointer; }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.invite-done { text-align: center; padding: 18px 6px; outline: none; }
.invite-done h3 { font-size: 26px; margin-top: 14px; }
.invite-done p { margin-top: 10px; color: var(--muted); overflow-wrap: anywhere; }
.done-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(52, 211, 153, 0.15); color: var(--green); font: 800 24px var(--ui); }
.download .fine a { color: var(--amber); }

/* ---------- welcome page ---------- */
.welcome { padding: 56px 0 96px; position: relative; overflow: hidden; }
.welcome::before {
  content: ''; position: absolute; left: 50%; top: -120px; width: 1000px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(245, 158, 11, 0.18), transparent 70%); pointer-events: none;
}
.welcome .wrap { position: relative; max-width: 820px; }
.welcome-head { text-align: center; }
.welcome h1 { font-size: clamp(36px, 7vw, 64px); font-weight: 800; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.welcome .lede { margin-inline: auto; max-width: 46ch; }
.dl-grid { display: grid; gap: 12px; margin-top: 32px; }
@media (min-width: 720px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
.dl-btn { flex-direction: column; gap: 4px; min-height: 76px; padding: 14px 18px; white-space: normal; text-align: center; }
.dl-btn small { font: 500 13px var(--ui); opacity: 0.75; }
.dl-btn .dl-top { display: inline-flex; align-items: center; gap: 10px; }
.os-note { margin-top: 12px; text-align: center; font-size: 14px; color: var(--ink-500); }
.welcome-steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 14px; }
.welcome-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; background: var(--ink-900); border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 18px; padding: 20px; }
.welcome-steps .step-n { margin: 0; }
.welcome-steps p { margin-top: 6px; color: var(--muted); }
.callout {
  margin-top: 24px; padding: 18px 20px; border-radius: 16px;
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.3); color: var(--ink-300); font-size: 15px;
}
.callout strong { color: var(--text); }
.callout + .callout { margin-top: 12px; }
.callout-muted { background: var(--ink-900); border-color: rgba(255, 255, 255, 0.08); }
.state-error { text-align: center; max-width: 560px; margin: 0 auto; }
.state-error .done-icon { background: rgba(248, 113, 113, 0.14); color: #fca5a5; }
.state-error h1 { margin-top: 18px; font-size: clamp(30px, 6vw, 46px); }
.state-error p { margin-top: 14px; color: var(--muted); }
.state-error .btn { margin-top: 26px; }
.state-error .fine { margin-inline: auto; }
