:root {
  --bg-top: #1f2233;
  --bg-bottom: #2b2f45;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.14);
  --text: #f4f5fb;
  --text-dim: #b6bad0;
  --accent: #ffce5c;
  --accent-ink: #2a2410;
  --radius: 18px;
  --maxw: 1040px;
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
/* Paint the root so the iOS safe-area insets and rubber-band overscroll match
   the page instead of showing white. Safari fills those regions from <html>;
   a fixed gradient on <body> alone doesn't reach them. */
html {
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom)) fixed;
  background-color: var(--bg-top);
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---------- Nav ---------- */
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 28px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
}
.nav__brand:hover {
  text-decoration: none;
}
.nav__logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}
.nav__links {
  display: flex;
  gap: clamp(12px, 3vw, 26px);
}
.nav__links a {
  color: var(--text-dim);
  font-weight: 600;
}
.nav__links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ---------- Layout ---------- */
.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 32px);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
  padding: clamp(28px, 7vw, 72px) 0 clamp(20px, 4vw, 40px);
}
.hero__title {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  font-weight: 850;
}
.hero__sub {
  margin: 18px 0 0;
  max-width: 540px;
  color: var(--text-dim);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
}
.hero__cta {
  margin-top: 28px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.hero__free {
  margin: 14px 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.hero__media {
  /* min-width: 0 lets the carousel shrink inside the grid column instead of
     forcing the track's full width and overflowing the page. */
  min-width: 0;
}
@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__sub {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__cta {
    justify-content: center;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn:hover {
  text-decoration: none;
}
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--primary:hover {
  filter: brightness(1.05);
}
.btn--ghost {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}
.btn--ghost:hover {
  background: var(--surface-strong);
}

/* ---------- Screenshots in a device frame ---------- */
.shots {
  display: flex;
  gap: clamp(16px, 4vw, 40px);
  justify-content: center;
  flex-wrap: wrap;
  margin: clamp(16px, 4vw, 40px) 0;
}
/* iPhone-style bezel around a screenshot. The screenshots are app UI only, so
   the frame + notch supply the device chrome. */
.device {
  --bezel: 10px;
  width: 280px;
  max-width: 100%;
  padding: var(--bezel);
  background: #0c0e16;
  border-radius: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 0 0 2px rgba(255, 255, 255, 0.06);
  position: relative;
}
.device picture {
  display: block;
}
.device__screen {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 30px;
}
/* The notch sits over the top of the screen. */
.device::before {
  content: "";
  position: absolute;
  top: var(--bezel);
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 18px;
  background: #0c0e16;
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.shots .device {
  width: clamp(200px, 40vw, 270px);
}

/* ---------- Screenshot carousel ---------- */
/* Native horizontal scroll with snap = swipe on touch, no JS. The peeking
   neighbours at the edges signal there's more to browse. */
.carousel {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-padding-inline: 50%;
  scrollbar-width: none;
}
.carousel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.carousel::-webkit-scrollbar {
  display: none;
}
.carousel__track {
  display: flex;
  gap: clamp(16px, 4vw, 28px);
  width: max-content;
  padding: 6px 4px 16px;
}
.carousel__slide {
  flex: 0 0 auto;
  scroll-snap-align: center;
}
.carousel__slide .device {
  width: clamp(220px, 72vw, 280px);
}
.carousel-section {
  margin: clamp(24px, 5vw, 48px) 0;
}

/* ---------- App Store badge ---------- */
.badge {
  display: inline-flex;
}
.badge:hover {
  text-decoration: none;
  opacity: 0.92;
}
.badge img {
  display: block;
  height: 54px;
  width: auto;
  border-radius: 11px;
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: clamp(24px, 5vw, 48px) 0;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.feature__icon {
  font-size: 1.8rem;
}
.feature h3 {
  margin: 10px 0 6px;
  font-size: 1.1rem;
}
.feature p {
  margin: 0;
  color: var(--text-dim);
}

/* ---------- Band ---------- */
.band {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 6vw, 56px);
  margin: clamp(24px, 5vw, 48px) 0;
}
.band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}
.band p {
  margin: 0 auto 24px;
  max-width: 640px;
  color: var(--text-dim);
}

/* ---------- Pages (prose) ---------- */
.page {
  max-width: 760px;
  margin: 0 auto;
}
.page--center {
  text-align: center;
}
.page__title {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 8px 0 16px;
}
.page h2 {
  margin: 32px 0 10px;
}
.lead {
  font-size: 1.15rem;
  color: var(--text-dim);
}
.muted {
  color: var(--text-dim);
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.card p {
  margin: 4px 0;
}
/* Aligned, monospaced value formula: lhs · = · rhs columns line up the equals. */
.formula {
  display: block;
}
.formula__row {
  display: grid;
  grid-template-columns: 4.5em 1.5em 1fr;
  align-items: baseline;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  margin: 4px 0;
}
.formula__lhs {
  color: var(--accent);
  font-weight: 700;
}
.formula__eq {
  text-align: center;
  color: var(--text-dim);
}
.formula__note {
  margin: 12px 0 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.steps {
  padding-left: 20px;
}
.steps li {
  margin: 8px 0;
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 16px;
  margin: 10px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
}
.faq p {
  margin: 0 0 12px;
  color: var(--text-dim);
}

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: 14px;
  max-width: 520px;
}
.form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
}
.form input,
.form textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 13px;
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form .btn {
  justify-self: start;
}

/* ---------- Footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px clamp(16px, 4vw, 28px) 56px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  text-align: center;
}
.footer__links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.footer__links a {
  color: var(--text-dim);
  font-weight: 600;
}
.footer__note {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
}
.footer__note + .footer__note {
  margin-top: 4px;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* ---------- Home FAQ ---------- */
.home-faq {
  max-width: 760px;
  margin: clamp(24px, 5vw, 48px) auto;
}
.home-faq h2 {
  text-align: center;
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
}

.band__cta {
  display: flex;
  justify-content: center;
}

/* ---------- Light palette (matches the app's light theme) ---------- */
@media (prefers-color-scheme: light) {
  :root {
    --bg-top: #f5f6fc;
    --bg-bottom: #e6e8f4;
    --surface: rgba(20, 24, 48, 0.05);
    --surface-strong: rgba(20, 24, 48, 0.09);
    --border: rgba(20, 24, 48, 0.14);
    --text: #1c2030;
    --text-dim: #5a5f78;
  }
  /* The badge artwork is black-on-transparent; give it a hairline on light. */
  .badge img {
    box-shadow: 0 0 0 1px var(--border);
  }
}
