/* Colors mirror apps/mobile/src/theme.ts */
:root {
  --bg: #0B1120;
  --bg-raised: #111829;
  --surface: #161D2E;
  --surface-high: #1F2840;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #F3F5FA;
  --text-dim: #9AA3B8;
  --text-muted: #5E6981;
  --accent: #7AA2F7;
  --accent-dim: rgba(122, 162, 247, 0.14);
  --on-accent: #0B1120;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: dark;
}

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

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

body {
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(122, 162, 247, 0.16), transparent 60%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 500 16px/1.5 system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -0.3px; }
.nav-cta {
  font-size: 14px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  transition: border-color .2s, background .2s;
}
.nav-cta:hover { border-color: var(--accent); background: var(--accent-dim); }

/* Hero */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 8px;
  text-align: center;
  animation: rise .8s var(--ease) both;
}
.hero-mark {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 12px 28px rgba(122, 162, 247, 0.25));
}
.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
h1 {
  font-size: clamp(36px, 9vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
h1 span { display: block; color: var(--text-dim); text-wrap: balance; }
.lede {
  color: var(--text-dim);
  font-size: clamp(16px, 2.2vw, 19px);
  max-width: 34em;
  margin: 20px auto 0;
}

/* Buttons */
.ctas { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.store-row { display: flex; gap: 12px; width: 100%; max-width: 360px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 16px;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  width: 100%;
  max-width: 360px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 30px -10px rgba(122, 162, 247, 0.6);
}
.btn-primary:hover { box-shadow: 0 14px 36px -8px rgba(122, 162, 247, 0.7); transform: translateY(-1px); }
.btn-ghost {
  flex: 1;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 15px;
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.3); }
.btn-ghost svg { width: 18px; height: 18px; fill: currentColor; }
.btn-ghost small { color: var(--text-muted); font-size: 13px; font-weight: 600; }

/* Phone showcase */
.showcase {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  padding: 56px 20px 24px;
  overflow: hidden;
  animation: rise 1s .15s var(--ease) both;
}
.phone {
  flex: 0 0 auto;
  width: 240px;
  padding: 7px;
  border-radius: 40px;
  background: linear-gradient(160deg, var(--surface-high), var(--bg) 45%, var(--surface));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 40px 80px -30px rgba(0, 0, 0, 0.9),
    0 0 120px -40px rgba(122, 162, 247, 0.35);
}
.phone img { border-radius: 33px; width: 100%; }
.phone:not(.phone-main) { margin-top: 48px; opacity: .9; }

/* On phones show the hero shot big, side shots peeking in */
@media (max-width: 719px) {
  .showcase { gap: 12px; padding-top: 48px; }
  .phone { width: 64vw; max-width: 280px; }
  .phone:not(.phone-main) { width: 44vw; margin-top: 64px; }
  .phone:first-child { margin-left: -30vw; }
  .phone:last-child { margin-right: -30vw; }
}
@media (min-width: 720px) {
  .showcase { gap: 28px; padding-top: 72px; }
  .phone-main { width: 290px; }
}

/* Features */
.features {
  display: grid;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 20px;
}
.features article {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--surface), var(--bg-raised));
  border: 1px solid var(--border);
}
.icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-dim);
  margin-bottom: 16px;
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.features h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; margin-bottom: 6px; }
.features p { color: var(--text-dim); font-size: 15px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* Closer */
.closer {
  max-width: 1120px;
  margin: 0 auto 0;
  padding: 56px 20px 64px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.closer h2 { font-size: clamp(28px, 6vw, 44px); font-weight: 800; letter-spacing: -0.03em; }
.closer p { color: var(--text-dim); margin: 8px 0 28px; }

footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
}

footer nav { display: flex; justify-content: center; gap: 8px; margin-bottom: 4px; }
footer nav a { color: var(--text-dim); }
footer nav a:hover { color: var(--accent); }

/* Privacy / Terms */
.doc { max-width: 680px; margin: 0 auto; padding: 32px 20px 64px; animation: rise .6s var(--ease) both; }
.doc h1 { font-size: clamp(32px, 7vw, 44px); margin-bottom: 6px; }
.doc .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.3px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--text-dim); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; margin-top: 8px; }
.doc li + li { margin-top: 6px; }
.doc ul + p { margin-top: 12px; }
.doc strong { color: var(--text); }
.doc a { color: var(--accent); }

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* The nav already shows the mark on small screens; keep the fold for the pitch and phones */
@media (max-width: 719px) {
  .hero { padding-top: 24px; }
  .hero-mark { display: none; }
}

/* Small screens: icon beside the text keeps six cards compact */
@media (max-width: 719px) {
  .features article { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; padding: 18px; }
  .features .icon { grid-row: span 2; margin-bottom: 0; }
  .features h3 { font-size: 17px; margin-bottom: 2px; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* FAQ */
.faq { max-width: 680px; margin: 0 auto; padding: 24px 20px 0; }
.faq h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; margin-bottom: 12px; text-align: center; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 2px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-muted); font-weight: 500; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq details p { color: var(--text-dim); font-size: 15px; padding: 0 2px 16px; }

/* 404 */
.notfound { max-width: 560px; margin: 0 auto; padding: 72px 20px 96px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.notfound h1 { font-size: clamp(36px, 8vw, 56px); }
.notfound p { color: var(--text-dim); margin: 12px 0 28px; }
