/* Snore AI — marketing site. Design tokens mirror the iOS app. */
:root {
  --bg: #0b1023;
  --bg-2: #10173a;
  --surface: #171e3a;
  --surface-2: #232c52;
  --primary: #7c8cff;
  --purple: #a78bfa;
  --accent: #4ed9c6;
  --gold: #f5c15c;
  --danger: #ff6b6b;
  --warning: #ffb020;
  --text: #f2f4ff;
  --text-dim: #9aa3c7;
  --radius: 28px;
  --radius-sm: 16px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.gradient-text {
  background: linear-gradient(120deg, var(--primary), var(--accent) 60%, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  --btn-bg: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary), #6d7bff);
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(124, 140, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(124, 140, 255, 0.7); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 16px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.appstore-badge:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, 0.4); }
.appstore-badge svg { width: 26px; height: 26px; }
.appstore-badge .small { font-size: 11px; color: #cfd3e6; line-height: 1; }
.appstore-badge .big { font-size: 19px; font-weight: 600; line-height: 1.1; }

/* ── Nav ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  background: rgba(11, 16, 35, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, #131a3e, #0b1023);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.08);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; }
.nav-toggle svg { width: 26px; height: 26px; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
#stars { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero .glow {
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,140,255,0.28), rgba(124,140,255,0) 62%);
  z-index: 0; pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; }
.hero p.lead { margin-top: 20px; font-size: clamp(17px, 2vw, 20px); color: var(--text-dim); max-width: 34ch; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.trust { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-dim); font-size: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 7px; }
.trust svg { width: 16px; height: 16px; color: var(--accent); }

/* ── Phone mockup ───────────────────────────────────────── */
.phone {
  position: relative; width: 280px; margin: 0 auto;
  border-radius: 46px; padding: 12px;
  background: linear-gradient(160deg, #222a52, #10163200);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.03) inset;
}
.phone-screen {
  border-radius: 36px; background: linear-gradient(180deg, #131a3e, #0b1023);
  padding: 26px 20px 30px; overflow: hidden; position: relative;
}
.phone-notch { position:absolute; top:14px; left:50%; transform:translateX(-50%); width:96px; height:22px; background:#000; border-radius:999px; }
.screen-label { text-align: center; font-size: 12px; letter-spacing: 0.12em; color: var(--text-dim); margin-top: 20px; text-transform: uppercase; font-weight: 700; }
.ring { width: 168px; height: 168px; margin: 16px auto 8px; position: relative; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(135deg); }
.ring .val { font-size: 50px; font-weight: 800; letter-spacing: -0.03em; }
.ring .cap { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: -6px; }
.screen-stats { display: flex; justify-content: space-around; margin-top: 14px; }
.screen-stats div { text-align: center; }
.screen-stats .n { font-size: 17px; font-weight: 800; }
.screen-stats .l { font-size: 11px; color: var(--text-dim); }
.screen-stats .n.a { color: var(--accent); }
.screen-stats .n.b { color: var(--primary); }
.screen-stats .n.c { color: var(--warning); }

/* ── Sections ───────────────────────────────────────────── */
section { position: relative; }
.section { padding: 84px 0; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em; line-height: 1.1; font-weight: 800; }
.section-head p { margin-top: 14px; color: var(--text-dim); font-size: 17px; }

/* ── Feature grid ───────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(23,30,58,0.7));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(124,140,255,0.35); }
.tile {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  margin-bottom: 16px; color: #fff;
}
.tile svg { width: 24px; height: 24px; }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.card p { margin-top: 8px; color: var(--text-dim); font-size: 15px; }

/* Tinted tiles (match app icon tiles) */
.t-primary { background: linear-gradient(140deg, #9aa6ff, var(--primary)); box-shadow: 0 8px 20px -6px rgba(124,140,255,0.6); }
.t-accent  { background: linear-gradient(140deg, #7ff0e0, var(--accent));  box-shadow: 0 8px 20px -6px rgba(78,217,198,0.55); }
.t-purple  { background: linear-gradient(140deg, #c4b0ff, var(--purple));  box-shadow: 0 8px 20px -6px rgba(167,139,250,0.55); }
.t-gold    { background: linear-gradient(140deg, #ffdd9e, var(--gold));    box-shadow: 0 8px 20px -6px rgba(245,193,92,0.5); color:#241a02; }
.t-warning { background: linear-gradient(140deg, #ffd07f, var(--warning)); box-shadow: 0 8px 20px -6px rgba(255,176,32,0.5); color:#241a02; }
.t-danger  { background: linear-gradient(140deg, #ff9d9d, var(--danger));  box-shadow: 0 8px 20px -6px rgba(255,107,107,0.5); }

/* ── Steps ──────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: rgba(23,30,58,0.5); border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius); padding: 30px 26px; }
.step .num {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; margin-bottom: 16px;
  background: rgba(124,140,255,0.14); color: var(--primary); border: 1px solid rgba(124,140,255,0.3);
}
.step h3 { font-size: 18px; font-weight: 700; }
.step p { margin-top: 6px; color: var(--text-dim); font-size: 15px; }

/* ── What Works showcase ────────────────────────────────── */
.showcase {
  background: linear-gradient(135deg, rgba(78,217,198,0.08), rgba(23,30,58,0.9));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
}
.compare { background: rgba(11,16,35,0.55); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius); padding: 26px; }
.compare .factor { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.compare .factor h4 { font-size: 18px; font-weight: 800; }
.compare .pct { font-size: 26px; font-weight: 800; color: var(--accent); }
.bar-row { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 12px; margin: 10px 0; }
.bar-row .lbl { font-size: 13px; color: var(--text-dim); }
.bar-row .track { height: 12px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; width: 0; transition: width 1.1s var(--ease); }
.bar-row .fill.with { background: linear-gradient(90deg, rgba(78,217,198,0.6), var(--accent)); }
.bar-row .fill.without { background: linear-gradient(90deg, rgba(154,163,199,0.5), var(--text-dim)); }
.bar-row .min { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.compare .note { margin-top: 14px; font-size: 12.5px; color: var(--text-dim); }

/* ── Pricing ────────────────────────────────────────────── */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(23,30,58,0.7));
  border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 30px 26px;
  display: flex; flex-direction: column;
}
.price.featured { border-color: rgba(245,193,92,0.5); box-shadow: 0 24px 60px -30px rgba(245,193,92,0.5); }
.price .plan { font-size: 15px; font-weight: 700; color: var(--text-dim); }
.price .amount { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 2px; }
.price .per { font-size: 14px; color: var(--text-dim); }
.badge {
  align-self: flex-start; margin-bottom: 14px; padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.04em;
  background: rgba(245,193,92,0.16); color: var(--gold); border: 1px solid rgba(245,193,92,0.35);
}
.price ul { list-style: none; margin: 20px 0 0; }
.price li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; color: var(--text-dim); font-size: 14.5px; }
.price li svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 2px; }

/* ── Privacy highlight band ─────────────────────────────── */
.privacy-band { background: linear-gradient(135deg, rgba(124,140,255,0.1), rgba(23,30,58,0.6)); border: 1px solid rgba(255,255,255,0.08); border-radius: 32px; padding: 48px; text-align: center; }
.privacy-band .shield { width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 20px; display: grid; place-items: center; background: linear-gradient(140deg, #9aa6ff, var(--primary)); box-shadow: 0 14px 34px -12px rgba(124,140,255,0.7); }
.privacy-band .shield svg { width: 34px; height: 34px; color: #fff; }
.privacy-points { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgba(11,16,35,0.5); border: 1px solid rgba(255,255,255,0.08); font-size: 14px; color: var(--text); }
.chip svg { width: 15px; height: 15px; color: var(--accent); }

/* ── Disclaimer + CTA ───────────────────────────────────── */
.disclaimer { max-width: 720px; margin: 40px auto 0; text-align: center; color: var(--text-dim); font-size: 13px; line-height: 1.6; }
.final-cta { text-align: center; padding: 96px 0; position: relative; }
.final-cta h2 { font-size: clamp(30px, 5vw, 48px); letter-spacing: -0.02em; font-weight: 800; }
.final-cta p { color: var(--text-dim); margin-top: 14px; font-size: 18px; }
.final-cta .hero-cta { justify-content: center; margin-top: 30px; }

/* ── Footer ─────────────────────────────────────────────── */
footer { border-top: 1px solid rgba(255,255,255,0.06); padding: 44px 0; color: var(--text-dim); }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
footer .links { display: flex; gap: 24px; flex-wrap: wrap; }
footer a { color: var(--text-dim); font-size: 14px; transition: color 0.2s; }
footer a:hover { color: var(--text); }
footer .small { font-size: 13px; }

/* ── Legal doc (privacy.html) ───────────────────────────── */
.doc { max-width: 780px; margin: 0 auto; padding: 130px 24px 90px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -0.02em; font-weight: 800; }
.doc .updated { color: var(--text-dim); margin-top: 10px; font-size: 15px; }
.doc .summary { margin: 28px 0; background: linear-gradient(135deg, rgba(124,140,255,0.1), rgba(23,30,58,0.6)); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 24px 26px; }
.doc .summary strong { color: var(--text); }
.doc h2 { font-size: 22px; font-weight: 700; margin: 40px 0 12px; letter-spacing: -0.01em; }
.doc h3 { font-size: 17px; font-weight: 700; margin: 24px 0 8px; }
.doc p, .doc li { color: var(--text-dim); font-size: 16px; }
.doc p { margin-bottom: 14px; }
.doc ul { margin: 0 0 16px 22px; }
.doc li { margin-bottom: 8px; }
.doc a.inline { color: var(--primary); border-bottom: 1px solid rgba(124,140,255,0.4); }
.doc .toc { list-style: none; margin: 0 0 8px; padding: 0; columns: 2; }
.doc .toc li { margin-bottom: 6px; }
.doc .toc a { color: var(--primary); }

/* ── Reveal animation ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero p.lead, .hero h1 { max-width: none; }
  .hero-cta, .trust { justify-content: center; }
  .phone { order: -1; }
  .grid, .steps, .pricing { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr; padding: 32px; }
  .nav-links { display: none; }
  .nav-cta .btn:not(.nav-menu-btn) { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0;
    background: rgba(11,16,35,0.96); backdrop-filter: blur(18px);
    padding: 18px 24px 24px; gap: 18px; border-bottom: 1px solid rgba(255,255,255,0.08);
  }
  .doc .toc { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  #stars { display: none; }
}
