:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --surface: #13131c;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f3ff;
  --muted: #a3a0b8;
  --faint: #6c6982;
  --mauve: #cba6f7;
  --violet: #8b5cf6;
  --pink: #f5c2e7;
  --red: #f38ba8;
  --green: #a6e3a1;
  --amber: #f9e2af;
  --radius: 18px;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .beat, .beat-close, .lede { text-wrap: balance; }
p { text-wrap: pretty; }
h1, h2, h3 { margin: 0; letter-spacing: -0.035em; line-height: 1.02; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--mauve); outline-offset: 3px; border-radius: 6px; }

.grad {
  background: linear-gradient(100deg, var(--mauve) 10%, var(--pink) 55%, #fff 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--text); color: #0a0a10;
  font-weight: 600; border-radius: 999px; padding: 12px 22px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s;
  box-shadow: 0 0 0 0 rgba(203, 166, 247, 0);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: #fff; box-shadow: 0 10px 40px -8px rgba(203, 166, 247, .55); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 16px 30px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-ghost { color: var(--muted); font-weight: 500; padding: 12px 8px; transition: color .2s; }
.btn-ghost:hover { color: var(--text); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(7, 7, 11, .55);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
@media (max-width: 640px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  padding: clamp(120px, 18vh, 180px) var(--gutter) 0;
  text-align: center;
}
.hero-media { position: absolute; inset: 0 0 auto 0; height: 92vh; min-height: 620px; z-index: -1; overflow: hidden; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; opacity: .42; filter: saturate(1.1); }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 0%, rgba(7,7,11,.55) 60%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(7,7,11,.35) 0%, rgba(7,7,11,.2) 40%, var(--bg) 100%);
}
.hero-copy { max-width: 1160px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--mauve); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(42px, 7.2vw, 104px); font-weight: 800; letter-spacing: -0.05em; line-height: .98; }
.lede { max-width: 640px; margin: 28px auto 0; font-size: clamp(18px, 2vw, 22px); color: #d6d3e6; line-height: 1.45; }
.cta-row { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 40px; }
.micro { margin-top: 18px; font-size: 13px; color: var(--faint); }

.hero-shot {
  max-width: var(--max); margin: clamp(56px, 9vw, 100px) auto 0;
  perspective: 1600px;
}
.hero-shot .window {
  transform: rotateX(18deg) scale(.94); transform-origin: 50% 0;
  animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%;
}
@keyframes settle { to { transform: rotateX(0) scale(1); } }
@supports not (animation-timeline: view()) { .hero-shot .window { transform: none; } }

/* App window frame */
.window {
  margin: 0; position: relative;
  border-radius: 12px; overflow: hidden;
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow:
    0 0 0 1px rgba(0,0,0,.6),
    0 40px 120px -20px rgba(139, 92, 246, .35),
    0 30px 60px -30px rgba(0,0,0,.9);
}
.window img { width: 100%; height: auto; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; }
.film .film-still { display: none; }

/* Pain */
.pain {
  max-width: 960px; margin: 0 auto; text-align: center;
  padding: clamp(120px, 18vw, 200px) var(--gutter) clamp(90px, 12vw, 150px);
}
.beat {
  font-size: clamp(28px, 4.4vw, 54px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.12;
  margin-bottom: .42em;
}
.beat.dim { color: rgba(245, 243, 255, .34); }
.beat.verdict { color: var(--red); margin-top: .1em; }
.beat-close {
  margin: 1.8em auto 0; max-width: 28ch;
  font-size: clamp(18px, 2vw, 22px); font-weight: 400; letter-spacing: -0.01em; color: var(--muted);
}

/* Calculator */
.calc { max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter) clamp(100px, 14vw, 180px); text-align: center; }
.calc .eyebrow { margin-bottom: 16px; }
.calc h2 { font-size: clamp(34px, 5vw, 60px); margin-bottom: 48px; }
.calc-card {
  text-align: left;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .9);
}
.calc-inputs { padding: clamp(28px, 4.5vw, 48px); display: grid; gap: 40px; align-content: center; }
.slider { display: grid; gap: 16px; cursor: pointer; }
.slider-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.slider-label { font-size: 15px; font-weight: 500; color: var(--muted); }
.slider-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin: 0; border-radius: 99px;
  background: linear-gradient(to right, var(--mauve) 0 var(--fill, 0%), rgba(255,255,255,.1) var(--fill, 0%) 100%);
  cursor: pointer; outline-offset: 8px;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.5), 0 0 0 1px rgba(0,0,0,.15);
  transition: transform .15s ease;
}
input[type=range]::-moz-range-thumb {
  width: 20px; height: 20px; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.12); }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.2); }

.calc-output {
  padding: clamp(28px, 4.5vw, 48px);
  background: linear-gradient(160deg, rgba(139, 92, 246, .16), rgba(139, 92, 246, .03) 60%);
  border-left: 1px solid var(--line);
  display: grid; gap: 28px; align-content: center;
}
.stat { display: grid; gap: 6px; }
.stat-value {
  font-size: clamp(56px, 7vw, 88px); font-weight: 700; letter-spacing: -0.05em; line-height: .95;
  font-variant-numeric: tabular-nums; color: var(--text);
}
.stat-sub { padding-top: 24px; border-top: 1px solid var(--line); }
.stat-sub .stat-value { font-size: clamp(36px, 4vw, 48px); color: var(--mauve); }
.stat-label { font-size: 15px; color: var(--muted); }
.calc-note { font-size: 15px; font-weight: 500; color: var(--text); }
@media (max-width: 760px) {
  .calc-card { grid-template-columns: 1fr; }
  .calc-output { border-left: 0; border-top: 1px solid var(--line); }
}

/* Features */
.features { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: center;
  padding: clamp(70px, 10vw, 130px) 0;
  border-top: 1px solid var(--line);
}
.feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.flip .feature-copy { order: 2; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--mauve); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 18px; }
.feature h2 { font-size: clamp(34px, 4.6vw, 58px); margin-bottom: 22px; }
.feature-copy p { color: var(--muted); font-size: 18.5px; }
.points, .checks, .includes { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.points li, .includes li, .checks li { position: relative; padding-left: 34px; color: #dcd9ea; }
.points li::before, .includes li::before, .checks li::before {
  content: ""; position: absolute; left: 2px; top: .22em; width: 20px; height: 20px;
  background: var(--c, var(--mauve));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 6.8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.checks li { padding-left: 38px; }
.checks li::before { left: 3px; top: .22em; width: 18px; height: 18px; }
.checks li::after {
  content: ""; position: absolute; left: 0; top: calc(.22em - 3px); width: 24px; height: 24px; border-radius: 50%;
  background: var(--c); opacity: .16;
}
.checks .bad { --c: var(--red); }
.checks .fix { --c: var(--mauve); }
.checks .ok { --c: var(--amber); }
.checks .bad::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 6.5l7 7M13.5 6.5l-7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6.5 6.5l7 7M13.5 6.5l-7 7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.checks .ok::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5.5v5.5' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.5' r='1.2' fill='%23000'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 5.5v5.5' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Ccircle cx='10' cy='14.5' r='1.2' fill='%23000'/%3E%3C/svg%3E"); }
.feature-shot .window { transform: translateZ(0); }
.feature-panel, .feature-panel.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.panel {
  margin: 0; justify-self: center; max-width: 540px; width: 100%;
  border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: #1e1e2e;
  box-shadow: 0 40px 120px -30px rgba(243, 139, 168, .35), 0 30px 60px -30px rgba(0,0,0,.9);
}

.panel-ai { box-shadow: 0 40px 120px -30px rgba(139, 92, 246, .45), 0 30px 60px -30px rgba(0,0,0,.9); }
.panel img { width: 100%; height: auto; }

.feature-pair { display: block; text-align: center; }
.feature-copy.center { max-width: 720px; margin: 0 auto 56px; }
.stack { position: relative; text-align: left; padding-bottom: 12%; }
.stack-back { width: 82%; }
.stack-front { position: absolute; right: 0; bottom: 0; width: 46%; }
.stack-front .panel { max-width: none; }

@media (max-width: 860px) {
  .feature, .feature.flip, .feature-panel, .feature-panel.flip { grid-template-columns: 1fr; }
  .feature.flip .feature-copy { order: 0; }
  .stack { padding-bottom: 0; display: grid; gap: 20px; }
  .stack-back, .stack-front { position: static; width: 100%; }
}

/* Details grid */
.details { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 130px) var(--gutter); border-top: 1px solid var(--line); }
.details h2 { font-size: clamp(34px, 4.6vw, 58px); text-align: center; margin-bottom: 56px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.cell { background: var(--bg); padding: 28px 26px 32px; }
.cell h3 { font-size: 17px; letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 8px; }
.cell p { color: var(--muted); font-size: 15px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

/* Pricing */
.pricing { padding: clamp(80px, 10vw, 140px) var(--gutter); display: grid; place-items: center; position: relative; }
.pricing::before {
  content: ""; position: absolute; width: min(900px, 100%); aspect-ratio: 2; z-index: -1;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .28), transparent);
  filter: blur(20px);
}
.price-card {
  width: min(520px, 100%); text-align: center;
  background: linear-gradient(180deg, rgba(30,30,46,.9), rgba(13,13,20,.95));
  border: 1px solid rgba(203,166,247,.25); border-radius: 30px;
  padding: clamp(32px, 6vw, 56px);
}
.price-card h2 { font-size: clamp(56px, 9vw, 88px); letter-spacing: -0.06em; white-space: nowrap; }
.price-card .once { color: var(--mauve); }
.price-sub { color: var(--muted); margin-top: 14px; font-size: 18px; }
.includes { text-align: left; margin: 32px 0 36px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; padding: clamp(60px, 8vw, 110px) var(--gutter); }
.faq h2 { font-size: clamp(34px, 4.6vw, 58px); margin-bottom: 36px; }
.qa { border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; padding: 24px 40px 24px 0; position: relative;
  font-size: 19px; font-weight: 600; letter-spacing: -0.015em;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 300; color: var(--muted); transition: transform .25s;
}
.qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa p { color: var(--muted); padding: 0 40px 26px 0; }

/* Outro */
.outro { position: relative; isolation: isolate; min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter); overflow: hidden; }
.outro-media { position: absolute; inset: 0; z-index: -1; }
.outro-media video { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.outro-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, var(--bg) 0%, rgba(7,7,11,.35) 35%, rgba(7,7,11,.5) 70%, var(--bg) 100%); }
.outro h2 { font-size: clamp(48px, 9vw, 120px); font-weight: 800; letter-spacing: -0.055em; }
.outro p { font-size: clamp(20px, 2.4vw, 26px); color: #dcd9ea; margin: 18px 0 40px; }

/* Footer */
.foot {
  max-width: var(--max); margin: 0 auto; padding: 36px var(--gutter) 48px;
  display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border-top: 1px solid var(--line); color: var(--faint); font-size: 13px;
}
.foot p { max-width: 720px; }

/* Reveal on scroll (Datastar adds .in). Without JS everything shows. */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.delay { transition-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-shot .window { animation: none; transform: none; }
  .hero-media video, .outro-media video, .film video { display: none; }
  .film .film-still { display: block; }
}

/* Download guide */
.download { max-width: 820px; margin: 0 auto; padding: clamp(60px, 8vw, 110px) var(--gutter) 0; }
.download h2 { font-size: clamp(34px, 4.6vw, 58px); margin-bottom: 14px; }
.download-sub { color: var(--muted); margin-bottom: 32px; }
.dl-table { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; }
.dl-row + .dl-row { border-top: 1px solid var(--line); }
.dl-system { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-system span { font-weight: 600; }
.dl-system small { color: var(--faint); font-size: 14px; }
.dl-file, .dl-note code { font: 500 14px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--mauve); }
.dl-file { flex-shrink: 0; padding: 6px 10px; border-radius: 8px; background: rgba(203, 166, 247, 0.08); white-space: nowrap; }
.dl-note { margin-top: 16px; color: var(--faint); font-size: 14px; }
@media (max-width: 640px) {
  .dl-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .dl-file { white-space: normal; overflow-wrap: anywhere; }
}
.dl-note + .dl-note { margin-top: 6px; }
.dl-note a, .foot a { color: var(--mauve); }
.dl-note a:hover, .foot a:hover { text-decoration: underline; }
