/* =========================================================
   90 Days Recovery Tracker — landing page
   App-matched palette. Auto light/dark. Mobile-first.
   ========================================================= */

:root {
  --teal: #14B8A6;
  --teal-strong: #0E9384;
  --gold: #D4A574;
  --bg: #FAFAF8;
  --bg-alt: #F2F1EC;
  --card: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --shadow: 0 10px 30px -12px rgba(30, 41, 59, 0.18);
  --shadow-sm: 0 4px 14px -8px rgba(30, 41, 59, 0.25);
  --radius: 18px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --teal: #2DD4BF;
    --teal-strong: #2DD4BF;
    --gold: #D4A574;
    --bg: #0F172A;
    --bg-alt: #131F38;
    --card: #1E293B;
    --text: #F8FAFC;
    --muted: #94A3B8;
    --border: #334155;
    --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 6px 18px -10px rgba(0, 0, 0, 0.55);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--teal-strong); }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; }
.center { text-align: center; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-strong);
  margin: 0 0 12px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; }
.brand-icon { border-radius: 9px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.02rem; }
.brand-sub { font-size: 0.7rem; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
.header-nav { display: flex; align-items: center; gap: 26px; }
.header-nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; transition: color .2s; }
.header-nav a:hover { color: var(--text); }
.nav-cta {
  background: var(--teal); color: #fff !important; padding: 9px 16px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--teal-strong); }
@media (max-width: 720px) {
  .header-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); background:
  radial-gradient(120% 80% at 85% 0%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 60%),
  radial-gradient(90% 70% at 5% 20%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 55%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 3.6rem); font-weight: 850; margin: 6px 0 18px; }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: var(--muted); max-width: 34ch; margin: 0 0 26px; }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.center-cta { justify-content: center; }

.playbadge {
  display: inline-flex; align-items: center; gap: 12px;
  background: #0B1220; color: #fff; text-decoration: none;
  padding: 12px 22px; border-radius: 12px; border: 1px solid #26334d;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: var(--shadow-sm);
}
.playbadge:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.playbadge-icon { width: 26px; height: 26px; flex: none; }
.playbadge-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.playbadge-text small { font-size: 0.62rem; letter-spacing: 0.08em; opacity: .85; }
.playbadge-text strong { font-size: 1.12rem; font-weight: 600; }

.coming-soon { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 600; font-size: 0.92rem; }

.hero-trust { list-style: none; display: flex; gap: 20px; padding: 0; margin: 28px 0 0; flex-wrap: wrap; }
.hero-trust li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.92rem; font-weight: 600; }
.hero-trust li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--teal);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>") center/contain no-repeat;
}

/* ---------- Phone mockup ---------- */
.hero-phone { display: flex; justify-content: center; }
.phone {
  position: relative; width: min(300px, 78vw);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 40px; padding: 12px; box-shadow: var(--shadow);
}
.phone img { border-radius: 30px; width: 100%; height: auto; }
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 22px; background: var(--card); border-radius: 0 0 14px 14px; z-index: 2;
  border: 1px solid var(--border); border-top: none;
}
.phone.small { width: min(270px, 82vw); padding: 10px; border-radius: 34px; }
.phone.small img { border-radius: 26px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 16px; }
.section-lede { font-size: clamp(1.02rem, 2vw, 1.15rem); color: var(--muted); max-width: 60ch; margin: 0 auto; }
.center .eyebrow { margin-left: auto; margin-right: auto; }

.why { background: var(--bg-alt); }
.why-stats { display: flex; justify-content: center; gap: clamp(24px, 6vw, 72px); margin-top: 44px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-num { font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 850; color: var(--teal-strong); line-height: 1; }
.stat-label { color: var(--muted); font-weight: 600; margin-top: 6px; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 48px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-ico {
  width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.5rem;
  border-radius: 14px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--teal) 14%, transparent);
}
.card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; }

/* How it works */
.steps { list-style: none; padding: 0; margin: 52px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.steps li { position: relative; padding-top: 8px; }
.step-num {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--teal); color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.steps h3 { font-size: 1.15rem; margin-bottom: 6px; }
.steps p { color: var(--muted); margin: 0; }

/* Screenshots */
.shots { background: var(--bg-alt); }
.shot-row { display: flex; justify-content: center; gap: clamp(16px, 3vw, 40px); margin-top: 52px; flex-wrap: wrap; }
.shot-row figure { margin: 0; text-align: center; }
.shot-row figcaption { margin-top: 16px; font-weight: 700; color: var(--muted); }

/* Privacy */
.privacy-ico { color: var(--teal-strong); display: flex; justify-content: center; margin-bottom: 12px; }
.privacy-list { list-style: none; padding: 0; margin: 30px 0 0; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.privacy-list li {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: 10px 18px; font-weight: 600; font-size: 0.92rem; box-shadow: var(--shadow-sm);
}

/* Final CTA */
.final-cta {
  background:
    radial-gradient(90% 120% at 50% 0%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 60%);
}
.final-cta h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
.final-cta .cta-row { margin-top: 30px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 48px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.footer-brand img { border-radius: 8px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.footer-note { color: var(--gold); font-weight: 600; margin: 4px 0 0; }
.footer-copy { color: var(--muted); font-size: 0.85rem; margin: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card:hover, .playbadge:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 2; }
  .hero-phone { order: 1; }
  .lede { max-width: none; margin-left: auto; margin-right: auto; }
  .cta-row, .hero-trust { justify-content: center; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .step-num { margin-left: auto; margin-right: auto; }
  .steps li { text-align: center; }
}

@media (max-width: 420px) {
  .playbadge { padding: 11px 18px; }
  .hero-trust { gap: 14px; }
}
