/* ============================================================
   Ally — companion website
   Dark-first, warm, typography-led. Matches the app's
   "Letter" direction: Newsreader serif, Geist sans, gold.
   ============================================================ */

:root {
  --bg:        #0c0b0a;
  --bg-soft:   #131110;
  --bg-deep:   #080706;
  --surface:   #1a1614;
  --surface-2: #221c18;
  --line:        rgba(245, 240, 235, 0.08);
  --line-strong: rgba(245, 240, 235, 0.14);
  --text:   #f3ece3;
  --text-2: rgba(243, 236, 227, 0.72);
  --text-3: rgba(243, 236, 227, 0.50);
  --text-4: rgba(243, 236, 227, 0.32);
  --gold:      #c9a96e;
  --gold-soft: #a88b56;
  --gold-deep: #6a5430;
  --star:   #e7dcc0;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans:  'Geist', -apple-system, system-ui, sans-serif;
  --mono:  'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --maxw: 1120px;
  --readw: 720px;
}

* , *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(201, 169, 110, 0.28); color: #fff; }

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

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

/* ── Type helpers ───────────────────────────────────────── */
.serif { font-family: var(--serif); font-weight: 400; }
.mono {
  font-family: var(--mono); font-weight: 400;
  letter-spacing: 0.28em; text-transform: uppercase;
  font-size: 11px; color: var(--gold);
}
.gold { color: var(--gold); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.01em; }

.eyebrow {
  font-family: var(--mono); font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase;
  font-size: 11px; color: var(--gold);
  display: inline-block;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
.section { padding: clamp(64px, 11vw, 132px) 0; }
.hr { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ── Brand mark (capital A) ─────────────────────────────── */
.mark {
  font-family: var(--serif);
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
  display: inline-block;
}
.wordmark {
  font-family: var(--serif);
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
}
.wordmark .a-cap { color: var(--gold); }

/* The seal — capital A inside a hairline ring, used as a stamp */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; border: 1px solid var(--gold-deep);
  color: var(--gold); font-family: var(--serif); line-height: 1;
  background: radial-gradient(circle at 50% 38%, rgba(201,169,110,0.12), transparent 70%);
}

/* ── Top nav ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 68px;
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
}
.nav.scrolled {
  background: rgba(12, 11, 10, 0.72);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 11px; }
.nav-brand .wordmark { font-size: 23px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 14px; color: var(--text-2); letter-spacing: 0.01em;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  font-size: 13px; color: var(--gold) !important;
  border: 1px solid var(--gold-deep); border-radius: 999px;
  padding: 8px 18px;
  transition: background .2s ease, color .2s ease;
}
.nav-cta:hover { background: var(--gold); color: #1a1410 !important; }
.nav-menu-btn { display: none; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  padding: 14px 26px; letter-spacing: 0.01em;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #1a1410; }
.btn-primary:hover { background: #d8b97c; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--gold-deep); color: var(--gold); }

/* Store badges */
.stores { display: flex; gap: 14px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 11px;
  background: #100e0d; border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 11px 20px 11px 16px;
  transition: border-color .2s ease, background .2s ease;
}
.store-badge:hover { border-color: var(--gold-deep); background: #15120f; }
.store-badge svg { flex: none; }
.store-badge .sb-small { font-size: 10px; color: var(--text-3); letter-spacing: 0.04em; line-height: 1.2; }
.store-badge .sb-big { font-size: 17px; color: var(--text); font-weight: 500; line-height: 1.15; letter-spacing: 0.01em; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { position: relative; padding-top: 152px; padding-bottom: clamp(64px, 9vw, 110px); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.hero-kicker { margin-bottom: 26px; }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.04; letter-spacing: -0.02em; color: var(--text);
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub {
  margin-top: 26px; font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-2); max-width: 30ch; line-height: 1.62;
}
.hero-actions { margin-top: 38px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--text-3); }
.hero-note .gold { color: var(--gold); }

/* atmospheric glow behind hero */
.hero-glow {
  position: absolute; pointer-events: none; z-index: 0;
  width: 900px; height: 900px; right: -180px; top: -240px;
  background: radial-gradient(circle, rgba(201,169,110,0.10), rgba(201,169,110,0.03) 38%, transparent 62%);
}

/* ── Phone mock (the product) ───────────────────────────── */
.phone-stage { position: relative; display: flex; justify-content: center; z-index: 1; }
.phone {
  position: relative; width: 300px; aspect-ratio: 300 / 620;
  background: #050403; border-radius: 44px;
  border: 1px solid rgba(245,240,235,0.10);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.04) inset,
    0 50px 90px -30px rgba(0,0,0,0.85),
    0 0 120px -30px rgba(201,169,110,0.18);
  padding: 9px;
}
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 36px;
  background: var(--bg); overflow: hidden;
  display: flex; flex-direction: column;
}
.phone-notch {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #050403; border-radius: 999px; z-index: 5;
}
.ps-inner { padding: 30px 26px; display: flex; flex-direction: column; height: 100%; }

/* ── Feature rows / cards ───────────────────────────────── */
.lead { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.18; max-width: 18ch; letter-spacing: -0.015em; }
.section-intro { max-width: 620px; }
.section-intro .lead { margin-top: 18px; }
.section-intro p { color: var(--text-2); margin: 20px 0 0; max-width: 52ch; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.step { background: var(--bg); padding: 38px 32px; }
.step .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; color: var(--gold); }
.step h3 { font-size: 23px; margin-top: 20px; color: var(--text); }
.step p { color: var(--text-2); font-size: 15.5px; margin-top: 12px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border: 1px solid var(--line); border-radius: 18px; padding: 32px 30px;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: var(--gold-deep); transform: translateY(-3px); }
.card .ic { color: var(--gold); margin-bottom: 22px; }
.card h3 { font-size: 22px; color: var(--text); }
.card p { color: var(--text-2); font-size: 15px; margin-top: 12px; }

/* feature split (text + visual) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 90px); align-items: center; }
.split.reverse .split-media { order: -1; }
.feature-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 18px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .dot { flex: none; width: 7px; height: 7px; border-radius: 999px; background: var(--gold); margin-top: 9px; box-shadow: 0 0 10px rgba(201,169,110,0.5); }
.feature-list h4 { font-family: var(--serif); font-size: 19px; font-weight: 400; color: var(--text); margin: 0; }
.feature-list p { font-size: 14.5px; color: var(--text-3); margin: 4px 0 0; }

/* message specimen card */
.specimen {
  background: linear-gradient(180deg, #15120f, #0e0c0b);
  border: 1px solid var(--line-strong); border-radius: 22px;
  padding: 38px 36px; position: relative;
  box-shadow: 0 40px 80px -40px rgba(0,0,0,0.8);
}
.specimen .stamp { color: var(--text-3); font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; }
.specimen .greet { font-family: var(--serif); font-size: 17px; color: var(--text-3); margin-top: 18px; }
.specimen .msg-title { font-family: var(--serif); font-size: 27px; color: var(--text); line-height: 1.22; margin-top: 8px; }
.specimen .msg-body { font-family: var(--serif); font-size: 17px; line-height: 1.62; color: var(--text-2); margin-top: 18px; }
.specimen .sign { font-family: var(--serif); font-style: italic; color: var(--gold); margin-top: 22px; font-size: 17px; }

/* ── Privacy stance band ────────────────────────────────── */
.band { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.promise { }
.promise .ic { color: var(--gold); margin-bottom: 16px; }
.promise h4 { font-family: var(--serif); font-size: 20px; font-weight: 400; color: var(--text); }
.promise p { color: var(--text-2); font-size: 14.5px; margin-top: 10px; }

/* ── Pricing ────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 54px; align-items: stretch; }
.plan { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px; padding: 34px 30px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--gold-deep); background: linear-gradient(180deg, #17130f, #0e0c0b); box-shadow: 0 0 80px -40px rgba(201,169,110,0.4); }
.plan .ptag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.plan h3 { font-size: 25px; color: var(--text); margin-top: 16px; }
.plan .price { font-family: var(--serif); font-size: 40px; color: var(--text); margin-top: 14px; letter-spacing: -0.02em; }
.plan .price small { font-family: var(--sans); font-size: 14px; color: var(--text-3); letter-spacing: 0; }
.plan p.pdesc { color: var(--text-2); font-size: 14.5px; margin-top: 12px; min-height: 44px; }
.plan ul { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 12px; }
.plan ul li { display: flex; gap: 11px; font-size: 14.5px; color: var(--text-2); align-items: flex-start; }
.plan ul li svg { flex: none; color: var(--gold); margin-top: 3px; }

/* ── Final CTA ──────────────────────────────────────────── */
.final { text-align: center; position: relative; overflow: hidden; }
.final h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1.1; letter-spacing: -0.02em; max-width: 16ch; margin: 0 auto; }
.final p { color: var(--text-2); margin: 22px auto 0; max-width: 44ch; }
.final .stores { justify-content: center; margin-top: 38px; }

/* ── Footer ─────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding: 64px 0 56px; background: var(--bg-deep); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer .wordmark { font-size: 24px; }
.footer-blurb { color: var(--text-3); font-size: 14px; margin-top: 18px; max-width: 30ch; line-height: 1.6; }
.footer h5 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-4); font-weight: 400; margin: 0 0 18px; }
.footer-col a, .footer-col span { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 13px; cursor: pointer; transition: color .2s ease; }
.footer-col a:hover, .footer-col span:hover { color: var(--gold); }
.footer-base { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.footer-base span { color: var(--text-4); font-size: 12.5px; }

/* ── Chat beacon ────────────────────────────────────────── */
.beacon {
  position: fixed; right: 26px; bottom: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 999px; cursor: pointer;
  background: linear-gradient(150deg, #d8b97c, var(--gold) 55%, var(--gold-soft));
  border: 0; color: #1a1410;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 30px -8px rgba(201,169,110,0.5), 0 4px 12px rgba(0,0,0,0.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.beacon:hover { transform: scale(1.06); box-shadow: 0 16px 38px -8px rgba(201,169,110,0.6); }
.beacon:active { transform: scale(0.97); }
.beacon-tip {
  position: fixed; right: 96px; bottom: 36px; z-index: 89;
  background: var(--surface); border: 1px solid var(--line-strong);
  color: var(--text); font-size: 13.5px; padding: 10px 16px; border-radius: 12px;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,0.6);
  opacity: 0; transform: translateX(8px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease; white-space: nowrap;
}
.beacon-tip.show { opacity: 1; transform: translateX(0); }

/* ── Legal pages ────────────────────────────────────────── */
.legal-hero { padding-top: 140px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(36px, 5.2vw, 58px); letter-spacing: -0.02em; }
.legal-meta { margin-top: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.legal-intro { margin-top: 26px; font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--text-2); max-width: 60ch; }

.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; padding: 64px 0 110px; }
.toc { position: sticky; top: 96px; }
.toc h5 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-4); margin: 0 0 18px; font-weight: 400; }
.toc a { display: block; color: var(--text-3); font-size: 13.5px; line-height: 1.4; padding: 7px 0; border-left: 1px solid var(--line); padding-left: 16px; margin-left: -1px; transition: color .2s ease, border-color .2s ease; }
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--gold); border-left-color: var(--gold); }

.prose { max-width: var(--readw); }
.prose section { padding: 0 0 44px; scroll-margin-top: 96px; }
.prose h2 { font-size: 27px; color: var(--text); display: flex; align-items: baseline; gap: 14px; }
.prose h2 .secnum { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--gold); font-weight: 400; }
.prose h3 { font-family: var(--serif); font-size: 18px; color: var(--gold-soft); font-weight: 500; margin-top: 26px; }
.prose p { color: var(--text-2); margin: 16px 0 0; font-size: 16px; line-height: 1.68; }
.prose p:first-of-type { margin-top: 18px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a.inline { color: var(--gold); border-bottom: 1px solid var(--gold-deep); }
.prose a.inline:hover { border-color: var(--gold); }
.prose ul { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 13px; }
.prose ul li { position: relative; padding-left: 22px; color: var(--text-2); font-size: 15.5px; line-height: 1.6; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 5px; height: 5px; border-radius: 999px; background: var(--gold); }
.prose .term { color: var(--text); font-weight: 500; }
.callout {
  margin-top: 22px; background: var(--bg-soft); border: 1px solid var(--line-strong);
  border-left: 2px solid var(--gold); border-radius: 12px; padding: 22px 24px;
}
.callout p { color: var(--text-2); margin: 0; font-size: 15px; }
.callout strong { color: var(--text); }

/* ── Reveal animation ───────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-sub { max-width: 38ch; }
  /* Mobile leads with the copy (headline + CTAs), then the product mockup */
  .phone-stage { order: 0; }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .split.reverse .split-media { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .cards, .promises, .plans { grid-template-columns: 1fr; }
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  .nav-links { display: none; }
  .nav-links.cta-only { display: flex; }
  /* Uniform top clearance below the 68px fixed nav on phones (home + legal pages) */
  .hero { padding-top: 108px; }
  .legal-hero { padding-top: 108px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .beacon { right: 18px; bottom: 18px; }
}
