:root {
  --indigo: #6366f1;
  --indigo-dark: #4f46e5;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
  --bg-alt: #f6f6fb;
  --card: #ffffff;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f3f4f6;
    --muted: #9ca3af;
    --line: #2a2d3a;
    --bg: #0f1117;
    --bg-alt: #151824;
    --card: #1a1d2b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.accent { color: var(--green); }
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }

/* Buttons share the app's gently rounded rectangle. */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-lg { padding: 16px 28px; font-size: 1.05rem; }
.btn.disabled { opacity: .55; pointer-events: none; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.1rem; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); cursor: pointer; }

/* Hero */
.hero { padding: 72px 0 40px; background: radial-gradient(1000px 500px at 85% 0%, color-mix(in srgb, var(--indigo) 18%, transparent), transparent); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pill { display: inline-block; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--indigo) 12%, transparent); color: var(--indigo); font-weight: 600; font-size: .85rem; margin-bottom: 18px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); }
.hero-points li::before { content: "✓ "; color: var(--green); font-weight: 700; }

/* Phone mockup */
.phone { justify-self: center; width: 300px; aspect-ratio: 9 / 19; border-radius: 40px; background: #0b0c12; padding: 12px; box-shadow: 0 30px 60px -20px rgba(79, 70, 229, .45); position: relative; }
.phone-notch { position: absolute; top: 18px; left: 50%; translate: -50% 0; width: 90px; height: 22px; border-radius: 12px; background: #0b0c12; z-index: 2; }
.phone-screen { height: 100%; border-radius: 30px; background: #f8f8fc; padding: 50px 12px 12px; color: #111827; overflow: hidden; font-size: .8rem; position: relative; }
.notif { position: absolute; top: 46px; left: 10px; right: 10px; background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); display: flex; flex-direction: column; animation: drop 4s ease-in-out infinite; z-index: 1; }
.notif span { color: #6b7280; }
@keyframes drop { 0%, 12% { transform: translateY(-140%); opacity: 0; } 22%, 70% { transform: translateY(0); opacity: 1; } 85%, 100% { transform: translateY(-140%); opacity: 0; } }
.app-title { font-size: 1.25rem; font-weight: 600; margin: 4px 4px 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #c7c8d6; border-radius: 8px; overflow: hidden; margin-bottom: 10px; text-align: center; }
.seg span { padding: 6px 0; font-weight: 500; }
.seg .on { background: #e3e2f8; }
.tile { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 10px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.tile small { display: block; color: #6b7280; font-size: .68rem; }
.tile .px { text-align: right; font-weight: 600; }
.up { color: var(--green) !important; } .down { color: var(--red) !important; }
.badge { width: 62px; text-align: center; border-radius: 8px; background: #e7e7ef; padding: 4px 0; font-weight: 700; }
.badge small { font-weight: 500; font-size: .6rem; color: inherit; }
.badge.red { background: var(--red); color: #fff; } .badge.green { background: var(--green); color: #fff; }

/* Cards & grids */
.grid { display: grid; gap: 20px; margin-top: 36px; }
.features { grid-template-columns: repeat(3, 1fr); }
.signals { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p { color: var(--muted); margin: 0; }
.icon { font-size: 1.6rem; margin-bottom: 10px; }

/* Signal diagrams */
.diagram { width: 100%; height: 80px; margin-bottom: 14px; }
.band-red { fill: color-mix(in srgb, var(--red) 14%, transparent); }
.band-green { fill: color-mix(in srgb, var(--green) 14%, transparent); }
.line { fill: none; stroke: var(--indigo); stroke-width: 2.5; }
.dot-red { fill: var(--red); } .dot-green { fill: var(--green); } .dot-amber { fill: var(--amber); }
.bars rect { fill: color-mix(in srgb, var(--muted) 35%, transparent); rx: 2; }
.spike { fill: var(--indigo); rx: 2; }
.slow { fill: none; stroke: #a855f7; stroke-width: 2.5; }
.fast { fill: none; stroke: #0ea5e9; stroke-width: 2.5; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.steps span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--indigo); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps p { color: var(--muted); margin: 0; }

/* Download */
.download { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; align-items: start; }
.download-card { text-align: center; position: sticky; top: 84px; }
.download-card .btn { margin: 12px 0 6px; }
.install ol { padding-left: 1.2em; margin: 0 0 1em; }
.install li { margin-bottom: .7em; color: var(--muted); }
.install li b { color: var(--ink); }
code { background: var(--bg-alt); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::after { content: "+"; color: var(--indigo); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 12px 0 0; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 20px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-inner > div { max-width: 460px; }
.copyright { margin-top: 24px; }

/* Legal pages */
.legal-body { padding: 48px 0 64px; max-width: 820px; }
.legal-section h2 { font-size: 1.15rem; margin-top: 1.6em; }
.legal-section p { color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner, .download { grid-template-columns: 1fr; }
  .download-card { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .features, .signals { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-top: 1px solid var(--line); }
  .phone { width: 260px; }
}
@media (prefers-reduced-motion: reduce) { .notif { animation: none; } html { scroll-behavior: auto; } }
