:root {
  --bg: #05060d;
  --bg-elev: #0c0e1a;
  --bg-elev-2: #11142a;
  --text: #ffffff;
  --text-dim: #a0a4b8;
  --text-faint: #6b7088;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --warm-1: #ff7a45;
  --warm-2: #ff4d6b;
  --cool-1: #4d9bff;
  --cool-2: #7fc8ff;

  --grad-warm: linear-gradient(90deg, var(--warm-1), var(--warm-2));
  --grad-cool: linear-gradient(90deg, var(--cool-1), var(--cool-2));

  --shadow-glow: 0 30px 80px -20px rgba(77, 155, 255, 0.45);

  --radius-card: 18px;
  --radius-pill: 999px;
  --radius-phone: 38px;

  --container: 1180px;
  --gutter: clamp(20px, 4vw, 56px);

  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1200px 800px at 50% -200px, #0d1230 0%, var(--bg) 60%) var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0; }

/* -- Starfield ------------------------------------------------------------ */

.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.starfield::before,
.starfield::after {
  content: "";
  position: absolute;
  width: 1px;
  height: 1px;
  border-radius: 50%;
  background: #fff;
  opacity: 0.7;
}
.starfield::before {
  top: 0; left: 0;
  box-shadow:
    120px 180px 0 rgba(255,255,255,0.5),
    340px 90px 0 rgba(255,255,255,0.3),
    520px 240px 0 rgba(255,255,255,0.6),
    700px 60px 0 rgba(255,255,255,0.4),
    880px 320px 0 rgba(255,255,255,0.5),
    1060px 140px 0 rgba(255,255,255,0.35),
    1220px 280px 0 rgba(255,255,255,0.55),
    1400px 200px 0 rgba(255,255,255,0.4),
    180px 460px 0 rgba(255,255,255,0.4),
    420px 540px 0 rgba(255,255,255,0.5),
    640px 480px 0 rgba(255,255,255,0.3),
    820px 620px 0 rgba(255,255,255,0.45),
    980px 540px 0 rgba(255,255,255,0.6),
    1180px 460px 0 rgba(255,255,255,0.35),
    1340px 600px 0 rgba(255,255,255,0.5),
    260px 760px 0 rgba(255,255,255,0.4),
    480px 820px 0 rgba(255,255,255,0.5),
    720px 740px 0 rgba(255,255,255,0.3),
    900px 880px 0 rgba(255,255,255,0.55),
    1100px 800px 0 rgba(255,255,255,0.45),
    1280px 920px 0 rgba(255,255,255,0.4),
    60px 980px 0 rgba(255,255,255,0.35),
    380px 1080px 0 rgba(255,255,255,0.5),
    580px 1020px 0 rgba(255,255,255,0.4),
    780px 1140px 0 rgba(255,255,255,0.45),
    1020px 1080px 0 rgba(255,255,255,0.3),
    1240px 1180px 0 rgba(255,255,255,0.5),
    1420px 1020px 0 rgba(255,255,255,0.4),
    140px 1240px 0 rgba(255,255,255,0.35),
    460px 1320px 0 rgba(255,255,255,0.5),
    680px 1280px 0 rgba(255,255,255,0.4),
    920px 1380px 0 rgba(255,255,255,0.45);
}
.starfield::after {
  top: 0; left: 0;
  width: 2px; height: 2px;
  box-shadow:
    240px 130px 0 rgba(255,255,255,0.7),
    600px 380px 0 rgba(255,255,255,0.6),
    1020px 100px 0 rgba(255,255,255,0.7),
    300px 680px 0 rgba(255,255,255,0.55),
    860px 700px 0 rgba(255,255,255,0.65),
    1300px 760px 0 rgba(255,255,255,0.6),
    160px 900px 0 rgba(255,255,255,0.6),
    540px 1140px 0 rgba(255,255,255,0.7),
    1180px 1240px 0 rgba(255,255,255,0.55),
    420px 1380px 0 rgba(255,255,255,0.6);
}

/* -- Layout helpers ------------------------------------------------------- */

main, .footer, .nav { position: relative; z-index: 1; }

.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  text-align: center;
  margin-bottom: 12px;
}
.section-lede {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.075rem;
  max-width: 560px;
  margin: 0 auto 56px;
}

/* -- Nav ------------------------------------------------------------------ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px var(--gutter);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 6, 13, 0.6);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--border);
  background: rgba(5, 6, 13, 0.85);
}

.brand { display: inline-flex; align-items: center; }
.brand__logo {
  display: block;
  height: 36px;
  width: auto;
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.nav__links a {
  position: relative;
  padding: 6px 2px;
  transition: color 0.15s ease;
}
.nav__links a:hover { color: var(--text); }

/* App Store badge — reusable component.
   Wraps Apple's official badge asset. .badge-store--sm shrinks it for the nav. */
.badge-store {
  display: inline-block;
  border-radius: 10px;
  transition: transform 0.15s ease;
}
.badge-store img { display: block; height: 56px; width: auto; }
.badge-store:hover { transform: translateY(-1px); }
.badge-store:focus-visible { outline: 2px solid var(--cool-2); outline-offset: 4px; }

.badge-store--sm img { height: 40px; }

/* -- Hero ----------------------------------------------------------------- */

.hero {
  max-width: var(--container);
  margin: 0 auto;
  padding: 40px var(--gutter);
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(96px, 14vw, 220px);
  align-items: center;
  align-content: center;
}

.hero__copy { max-width: 580px; }

.proof {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 18px 6px 8px;
  border: 1px solid var(--border);
  background: rgba(12, 14, 26, 0.7);
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.proof__avatars {
  display: inline-flex;
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bg-elev);
  background: linear-gradient(135deg, #5b6cff, #ff7a45);
  display: inline-grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  margin-left: -10px;
}
.avatar:first-child { margin-left: 0; background: linear-gradient(135deg, #4d9bff, #7fc8ff); }
.avatar:nth-child(2) { background: linear-gradient(135deg, #ff7a45, #ff4d6b); }
.avatar:nth-child(3) { background: linear-gradient(135deg, #9b6cff, #4d9bff); }
.avatar::before { content: attr(data-i); }

.display {
  font-size: clamp(2.25rem, 4.6vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.display__line { display: block; white-space: nowrap; }

.gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.gradient--warm { background-image: var(--grad-warm); }
.gradient--cool { background-image: var(--grad-cool); }

.lede {
  font-size: 1.125rem;
  color: var(--text-dim);
  margin-bottom: 36px;
  max-width: 480px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* -- Phone cluster -------------------------------------------------------- */

.phones {
  position: relative;
  height: clamp(440px, 56vw, 620px);
  display: grid;
  place-items: center;
}

.phone {
  position: absolute;
  width: clamp(180px, 22vw, 260px);
  aspect-ratio: 9 / 19.5;
  background: #0a0a0f;
  border: 2px solid #1a1d2e;
  border-radius: var(--radius-phone);
  padding: 8px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 30px 60px -20px rgba(0,0,0,0.6);
}
.phone__notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 18px;
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: calc(var(--radius-phone) - 10px);
  overflow: hidden;
  background: linear-gradient(160deg, #0d1a3d 0%, #050816 70%);
}
.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  font-size: 0; /* hide alt text if image is missing */
  color: transparent;
}

.phone--center {
  z-index: 3;
  transform: translateY(0) scale(1);
}
.phone--center::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(closest-side, rgba(77, 155, 255, 0.55), rgba(77, 155, 255, 0) 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}
.phone--side { z-index: 1; opacity: 0.95; }
.phone--left {
  transform: translate(-78%, 30px) rotate(-8deg);
}
.phone--right {
  transform: translate(78%, 30px) rotate(8deg);
}

/* -- How it works --------------------------------------------------------- */

.how {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--gutter);
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  position: relative;
}
.step__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-cool);
  color: #06122b;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--text-dim); font-size: 1rem; }

/* -- Features ------------------------------------------------------------- */

.features {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--gutter);
}
.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(77,155,255,0.18), rgba(127,200,255,0.08));
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--cool-2);
  margin-bottom: 18px;
}
.feature h3 { font-size: 1.2rem; margin-bottom: 10px; }
.feature p { color: var(--text-dim); }

/* -- FAQ ------------------------------------------------------------------ */

.faq {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(60px, 9vw, 120px) var(--gutter);
}
.faq__list { display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 22px;
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-right: 4px;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p {
  color: var(--text-dim);
  margin-top: 12px;
  font-size: 1rem;
}

/* -- Footer --------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 60px var(--gutter) 32px;
}
.footer__top {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.footer__brand {
  display: grid;
  gap: 8px;
  align-content: start;
}
.footer__logo { height: 32px; width: auto; display: block; }
.footer__tag { color: var(--text-faint); font-size: 0.9rem; max-width: 240px; margin-top: 4px; }
.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer__cols h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.footer__cols ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.footer__cols a:hover { color: var(--text); }
.footer__bar {
  max-width: var(--container);
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 0.85rem;
}

/* -- Legal pages (privacy, terms) ---------------------------------------- */

.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) var(--gutter) clamp(40px, 6vw, 72px);
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
}
.legal__header { margin-bottom: 40px; }
.legal__title {
  color: var(--text);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.legal__meta {
  color: var(--text-faint);
  font-size: 0.9rem;
}
.legal__meta span + span::before { content: " · "; }

.legal h2 {
  color: var(--text);
  font-size: 1.5rem;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
}
.legal h3 {
  color: var(--text);
  font-size: 1.125rem;
  margin: 28px 0 10px;
}
.legal p { margin: 0 0 14px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a {
  color: var(--cool-2);
  text-decoration: underline;
  text-decoration-color: rgba(127, 200, 255, 0.35);
  text-underline-offset: 3px;
}
.legal a:hover { text-decoration-color: var(--cool-2); }

.legal ul, .legal ol {
  margin: 0 0 18px;
  padding-left: 22px;
}
.legal li { margin-bottom: 8px; }
.legal li::marker { color: var(--text-faint); }

.legal hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.legal__table-wrap { overflow-x: auto; margin: 0 0 18px; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.95rem;
}
.legal th, .legal td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal tr:last-child th, .legal tr:last-child td { border-bottom: 0; }
.legal th {
  color: var(--text);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
}
.legal th:first-child, .legal td:first-child { width: 30%; white-space: nowrap; }

.legal__footnote {
  margin-top: 40px;
  color: var(--text-faint);
  font-size: 0.875rem;
  font-style: italic;
}

/* -- Reveal animation ----------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* -- Responsive ----------------------------------------------------------- */

@media (max-width: 920px) {
  .hero {
    display: block;
    text-align: center;
    padding: 0 var(--gutter);
  }
  .hero__copy {
    max-width: none;
    min-height: calc(100svh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 0;
  }
  .hero__copy .lede { margin-left: auto; margin-right: auto; }
  .hero .cta-row { justify-content: center; }
  .phones { height: 480px; margin: 0 0 60px; }
  .steps { grid-template-columns: 1fr; }
  .features__grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .nav { gap: 12px; padding: 14px var(--gutter); }
  .nav__links { display: none; }
  .nav .badge-store { margin-left: auto; }
  .brand__logo { height: 30px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .footer__bar { flex-direction: column; gap: 6px; }
  .hero { padding-top: 40px; padding-bottom: 60px; }
  .proof { padding: 6px 14px 6px 6px; font-size: 0.825rem; }
  .lede { font-size: 1rem; }
}

@media (max-width: 480px) {
  .brand__logo { height: 26px; }
  .phones { height: 420px; }
  .phone--side { display: none; }
  .phone--center { transform: scale(1.05); }
  .step, .feature { padding: 24px 22px; }
  .faq details { padding: 16px 18px; }
  .faq summary { font-size: 1rem; }
}

@media (max-width: 360px) {
  .brand__logo { height: 22px; }
  .nav { gap: 8px; }
  .display__line { white-space: normal; }
}
