/* Layout: a sticky top bar, a deep-blue hero with two phones, then alternating
   feature rows on a cool paper ground. Colours come from the app icon's inhaler
   blues; the preventer brown is used only where preventers are meant. */
:root {
  --paper: #f4f7f9;
  --surface: #ffffff;
  --ink: #12212b;
  --ink-soft: #4b5d69;
  --line: #dbe4ea;
  --brand: #2f7fae;
  --brand-ink: #ffffff;
  --brand-soft: #e3eff7;
  --hero: #12304a;
  --hero-2: #1b4566;
  --hero-ink: #eaf3f9;
  --hero-soft: #a9c6da;
  --reliever: #4a9ac4;
  --preventer: #8a4a2b;
  --focus: #f0b429;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.4vw, 3.6rem);

  --radius: 14px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e161c;
    --surface: #152129;
    --ink: #e6eef3;
    --ink-soft: #a3b4bf;
    --line: #253540;
    --brand: #7cc0e8;
    --brand-ink: #0b1b26;
    --brand-soft: #18303f;
    --hero: #0b1d2b;
    --hero-2: #12304a;
    --preventer: #c98a63;
    color-scheme: dark;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

a { color: var(--brand); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 100;
}
.skip:focus { left: 16px; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--hero) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--hero-ink);
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--hero-soft);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: var(--step--1);
  font-weight: 700;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--hero-ink); background: rgb(255 255 255 / 0.08); }
@media (max-width: 560px) {
  .nav .optional { display: none; }
}

/* ── Buttons ─────────────────────────────────────────── */
.play {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #000;
  color: #fff;
  text-decoration: none;
  padding: 10px 20px 10px 16px;
  border-radius: 12px;
  border: 1px solid rgb(255 255 255 / 0.25);
  line-height: 1.15;
  transition: transform 0.15s ease;
}
.play:hover { transform: translateY(-1px); }
.play svg { width: 26px; height: 28px; flex: none; }
.play small { display: block; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; }
.play strong { display: block; font-size: 1.2rem; font-family: var(--font-display); font-weight: 600; }

/* ── Hero ────────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(900px 420px at 85% 10%, var(--hero-2), transparent 70%),
    var(--hero);
  color: var(--hero-ink);
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding-block: 64px 0;
}
.eyebrow {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hero-soft);
  margin-bottom: 16px;
}
.hero h1 { font-size: var(--step-4); font-weight: 700; max-width: 14ch; }
.hero h1 em { font-style: normal; color: #8fc6e6; }
.lede {
  margin-top: 20px;
  font-size: var(--step-1);
  color: var(--hero-soft);
  max-width: 34ch;
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 32px;
  padding-bottom: 64px;
}
.hero-note { font-size: var(--step--1); color: var(--hero-soft); }

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  min-height: 100%;
  align-self: end;
}
.phone {
  width: min(250px, 44vw);
  border-radius: 34px;
  padding: 8px;
  background: #0a141b;
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.35), inset 0 0 0 1px rgb(255 255 255 / 0.12);
  flex: none;
}
.phone img { border-radius: 27px; width: 100%; }
.phones .phone:first-child { transform: translateY(-28px) rotate(-3deg); margin-right: -36px; z-index: 1; }
.phones .phone:last-child { transform: translateY(24px) rotate(3deg); }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; gap: 8px; }
  .hero-actions { padding-bottom: 24px; }
  .phones { margin-top: 16px; }
}

/* ── Medication strip ────────────────────────────────── */
.meds {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.meds .wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-block: 32px;
}
.med { display: flex; gap: 14px; align-items: center; min-width: 0; }
.med img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.med h3 { font-size: var(--step-0); font-weight: 700; letter-spacing: 0; }
.med p { font-size: var(--step--1); color: var(--ink-soft); line-height: 1.4; }
@media (max-width: 860px) {
  .meds .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .meds .wrap { grid-template-columns: 1fr; }
}

/* ── Features ────────────────────────────────────────── */
.section { padding-block: 88px; }
.section-head { max-width: 40rem; margin-bottom: 56px; }
.section-head h2 { font-size: var(--step-3); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: var(--step-1); line-height: 1.5; }

.features { display: grid; gap: 96px; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.feature:nth-child(even) .feature-shot { order: -1; }
.feature-copy { min-width: 0; max-width: 30rem; }
.feature-copy h3 { font-size: var(--step-2); }
.feature-copy p { margin-top: 14px; color: var(--ink-soft); }
.feature-copy ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.feature-copy li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.feature-copy li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--brand-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%232f7fae' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}
.feature-shot {
  display: flex;
  justify-content: center;
  padding: 40px 24px;
  border-radius: 28px;
  background: linear-gradient(160deg, var(--brand-soft), transparent 75%);
}
.feature-shot .phone { width: min(270px, 70vw); box-shadow: 0 24px 48px rgb(18 48 74 / 0.22), inset 0 0 0 1px rgb(255 255 255 / 0.1); }

@media (max-width: 860px) {
  .section { padding-block: 64px; }
  .features { gap: 72px; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature:nth-child(even) .feature-shot { order: 0; }
}

/* ── Trust / support band ────────────────────────────── */
.band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.band .wrap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 56px;
}
.band h3 { font-size: var(--step-1); }
.band p { margin-top: 8px; color: var(--ink-soft); }
@media (max-width: 760px) {
  .band .wrap { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Closing call to action ──────────────────────────── */
.cta { text-align: center; }
.cta .wrap { display: grid; justify-items: center; gap: 20px; padding-block: 88px; }
.cta img.icon { width: 72px; height: 72px; border-radius: 22%; box-shadow: 0 10px 24px rgb(18 48 74 / 0.18); }
.cta h2 { font-size: var(--step-3); max-width: 20ch; }
.cta p { color: var(--ink-soft); max-width: 36rem; }

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--hero);
  color: var(--hero-soft);
  font-size: var(--step--1);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  justify-content: space-between;
  padding-block: 32px;
}
.footer a { color: var(--hero-ink); }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer .disclaimer { flex-basis: 100%; max-width: 60rem; opacity: 0.85; }

/* ── Document pages (privacy, terms) ─────────────────── */
.doc-hero { background: var(--hero); color: var(--hero-ink); }
.doc-hero .wrap { padding-block: 56px 48px; }
.doc-hero h1 { font-size: var(--step-3); }
.doc-hero p { margin-top: 10px; color: var(--hero-soft); }
.doc {
  max-width: 44rem;
  padding-block: 48px 80px;
}
.doc p { margin-block: 0 1em; }
.doc p > strong:only-child {
  display: block;
  margin-top: 2em;
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.doc h2 {
  margin: 2em 0 0.5em;
  font-family: var(--font-display);
  font-size: var(--step-1);
  letter-spacing: -0.01em;
}
.doc ul, .doc ol { margin: 0 0 1em; padding-left: 1.25em; }
.doc li { margin-bottom: 0.35em; }
.doc a { overflow-wrap: anywhere; }

/* ── 404 ─────────────────────────────────────────────── */
.notfound .wrap { display: grid; justify-items: start; gap: 16px; padding-block: 96px; }
.notfound h1 { font-size: var(--step-4); }
.notfound p { color: var(--ink-soft); }

/* Official Google Play badge: the image carries its own padding. */
.badge { display: inline-block; margin: -12px; border-radius: 12px; }
.badge img { width: 200px; height: auto; }
