/* ==========================================================================
   MedPin — Care Connected
   Landing page stylesheet
   --------------------------------------------------------------------------
   1. Tokens & theming      5. Sections
   2. Reset & base          6. App mockups
   3. Layout primitives     7. Footer & mobile CTA
   4. Components            8. Responsive & motion
   ========================================================================== */

/* ══ 1. TOKENS ══════════════════════════════════════════════════════════ */

:root {
  /* Brand ramp — sampled from the MedPin logo: the deep blue of "Med" (700),
     the bright blue of "Pin" and the heart (400), and the plate it sits on (50). */
  --brand-950: #04173D;
  --brand-900: #052459;
  --brand-800: #012A78;
  --brand-700: #013696;
  --brand-600: #0B4CB8;
  --brand-500: #1E6FDB;
  --brand-400: #4D9AF9;
  --brand-300: #7FB6FC;
  --brand-200: #A9CDFD;
  --brand-100: #CFE2FE;
  --brand-50:  #E9F1FD;

  /* Semantic — light theme.
     --accent is one step darker than the logo's bright blue: #4D9AF9 lands at
     2.9:1 on white, which is under the 3:1 icons and underlines need. The
     literal logo blue is still used everywhere it sits on navy. */
  --bg:            #FFFFFF;
  --bg-soft:       #EFF5FE;
  --surface:       #FFFFFF;
  --surface-2:     #F7FAFF;
  --fg:            #0A1F4A;
  --fg-muted:      #4A6291;
  --border:        #DCE7F8;
  --border-strong: #BED3F2;
  --primary:       #013696;
  --primary-hover: #012A78;
  --on-primary:    #FFFFFF;
  --accent:        #1E6FDB;
  --ring:          #1E6FDB;
  --good:          #0E7C51;
  --grad:          linear-gradient(100deg, #013696, #2E86F0);
  --warn:          #A45B06;
  --danger:        #B3261E;

  /* Two painted surfaces that are deliberately dark against the light page, so
     they cannot be built from --surface. */
  --band-bg:
    radial-gradient(60% 90% at 85% 15%, rgba(77, 154, 249, .34) 0%, transparent 62%),
    linear-gradient(135deg, #04173D 0%, #012A78 55%, #0B4CB8 100%);
  --phone-frame: linear-gradient(160deg, #0E3A85, #04173D 60%);
  --phone-notch: #04173D;

  --shadow-sm: 0 1px 2px rgba(4, 23, 61, .06), 0 1px 3px rgba(4, 23, 61, .05);
  --shadow-md: 0 4px 12px rgba(4, 23, 61, .08), 0 12px 28px rgba(4, 23, 61, .06);
  --shadow-lg: 0 18px 48px rgba(4, 23, 61, .15), 0 4px 12px rgba(4, 23, 61, .07);

  /* 8pt spacing rhythm */
  --space-1: .25rem;  --space-2: .5rem;   --space-3: .75rem;
  --space-4: 1rem;    --space-5: 1.5rem;  --space-6: 2rem;
  --space-7: 3rem;    --space-8: 4rem;    --space-9: 6rem;

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 26px;
  --radius-xl: 34px;

  --container: 1180px;
  --header-h: 72px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --dur: 220ms;

  color-scheme: light;
}

/* The page is light-only by design: `color-scheme: light` above opts the whole
   document out of the browser's dark-mode form/scrollbar rendering, so a visitor
   whose OS is set to dark still gets the light page exactly as authored. */

/* ══ 2. RESET & BASE ════════════════════════════════════════════════════ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: Figtree, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 var(--space-4);
  color: var(--fg);
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 1.5rem + 2.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); font-weight: 700; }
h3 { font-size: 1.1875rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: .875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

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

button { font: inherit; cursor: pointer; }

/* Every decorative/inline SVG uses stroke by default; fills opt in. */
svg[viewBox] {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

::selection { background: var(--brand-200); color: var(--brand-950); }

.skip-link {
  position: absolute;
  left: 50%;
  top: -100px;
  transform: translateX(-50%);
  z-index: 1000;
  padding: var(--space-3) var(--space-5);
  background: var(--primary);
  color: var(--on-primary);
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 600;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 0; color: var(--on-primary); }

/* ══ 3. LAYOUT ══════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}
.container-narrow { max-width: 780px; }

.section { padding-block: clamp(4rem, 8vw, 7rem); }
.section-soft { background: var(--bg-soft); }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}
.section-head h2 { margin-bottom: var(--space-4); }
.section-sub {
  color: var(--fg-muted);
  font-size: 1.0625rem;
  max-width: 60ch;
  margin-inline: auto;
}

.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ══ 4. COMPONENTS ══════════════════════════════════════════════════════ */

/* -- Eyebrow ------------------------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: .375rem .875rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-muted);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent);
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* -- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: Figtree, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.btn-primary {
  background: var(--primary);
  background-image: linear-gradient(135deg, var(--primary),
                    color-mix(in srgb, var(--primary) 72%, var(--brand-400)));
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background-image: linear-gradient(135deg, var(--primary-hover), var(--primary));
  color: var(--on-primary);
  box-shadow: var(--shadow-md);
}
.btn-sm { min-height: 44px; padding: 0 var(--space-5); font-size: .9375rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--fg);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; }

/* -- Store badges ------------------------------------------------------- */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: 0 var(--space-5);
  border: 1px solid var(--fg);
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.store-btn:hover { color: var(--bg); opacity: .9; box-shadow: var(--shadow-md); }
.store-btn .store-glyph { width: 26px; height: 26px; flex: none; }
.store-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}
.store-btn small { font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.store-btn strong { font-family: Figtree, sans-serif; font-size: 1.0625rem; font-weight: 700; }
.store-btn.on-dark {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #0A1F4A;
}
.store-btn.on-dark:hover { color: #0A1F4A; }

/* There is no iOS build yet, so that button is a <span>: it only has to read as
   unavailable. No hover lift, no pointer, and the label keeps full opacity —
   --fg-muted at the inherited .85 measures 4.34:1, just under the 4.5 the 12px
   line needs. */
.store-btn.is-soon {
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--fg-muted);
  box-shadow: none;
  cursor: default;
}
.store-btn.is-soon:hover {
  color: var(--fg-muted);
  opacity: 1;
  box-shadow: none;
  transform: none;
}
.store-btn.is-soon small { opacity: 1; }
.store-btn.on-dark.is-soon {
  border-color: rgba(232, 241, 254, .42);
  background: transparent;
  color: #C7D6EE;
}
.store-btn.on-dark.is-soon:hover { color: #C7D6EE; }
.store-row-sm .store-btn { min-height: 48px; padding: 0 var(--space-4); }
.store-row-sm .store-btn .store-glyph { width: 22px; height: 22px; }
.store-row-sm .store-btn strong { font-size: .9375rem; }

/* -- Cards -------------------------------------------------------------- */
.card {
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.card p { color: var(--fg-muted); margin-bottom: 0; font-size: .9375rem; }
.card-icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--primary);
}
.card-icon svg { width: 24px; height: 24px; stroke-width: 1.75; }

/* ══ 5. SECTIONS ════════════════════════════════════════════════════════ */

/* -- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  min-height: var(--header-h);
}

/* min-height keeps the tap area at 44px once the lockup shrinks to 38px below
   560px — the artwork gets smaller, the target does not. */
.brand { display: inline-flex; align-items: center; gap: var(--space-3); min-height: 44px; color: var(--fg); }
/* The lockup artwork replaces the composed mark + wordmark whenever it loads.
   It is deep-blue ink on transparent, which reads correctly on the light page. */
.brand-lockup { height: 50px; width: auto; }
.brand:has(.brand-lockup) .brand-mark,
.brand:has(.brand-lockup) .brand-text { display: none; }
.brand:hover { color: var(--fg); }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: Quicksand, Figtree, sans-serif;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.brand-tag {
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.nav { display: flex; gap: var(--space-5); margin-left: auto; }
.nav a {
  position: relative;
  padding: var(--space-2) 0;
  color: var(--fg-muted);
  font-size: .9375rem;
  font-weight: 500;
  transition: color var(--dur) var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease);
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.menu-btn { display: none; }

/* -- Hero --------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6rem); overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 720px;
  background:
    radial-gradient(48% 54% at 20% 32%, color-mix(in srgb, var(--brand-300) 30%, transparent) 0%, transparent 70%),
    radial-gradient(42% 50% at 84% 16%, color-mix(in srgb, var(--brand-500) 22%, transparent) 0%, transparent 68%);
  filter: blur(12px);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  /* The visual column carries two objects now, so it takes the wider share and
     the gap tightens to fund it. --container caps the row at 1180px, so this
     column never exceeds ~543px however wide the window gets — which is what
     sizes the portrait and phone below. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}
.hero h1 { margin-bottom: var(--space-5); }
.lead {
  max-width: 54ch;
  margin-bottom: var(--space-6);
  color: var(--fg-muted);
  font-size: clamp(1rem, .95rem + .3vw, 1.1875rem);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--fg-muted);
  font-size: .875rem;
}
.hero-meta li { display: flex; align-items: center; gap: var(--space-2); }
.hero-meta svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.hero-meta strong { color: var(--fg); font-weight: 700; }

/* Centres the phone and is the positioning context for the float cards, which
   hang off its left and right edges. */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: float 6s var(--ease) infinite;
}
.float-card svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.float-card strong { display: block; font-family: Figtree, sans-serif; font-size: .875rem; line-height: 1.3; }
.float-card small { color: var(--fg-muted); font-size: .75rem; }
/* Straddle the device corners so they never sit on top of screen content. Both
   are anchored right now that the portrait occupies the left half. */
.float-1 { top: -4%; left: 0; }
.float-2 { bottom: 5%; right: -6%; animation-delay: -3s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* -- Trust strip -------------------------------------------------------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-soft); }
.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-6);
  text-align: center;
}
.stat strong {
  display: block;
  font-family: Figtree, sans-serif;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 1.875rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--primary);
  /* "HIPAA-ready" only just fits its cell in the 2-up strip at 320px; break it
     rather than spill if the fallback font renders wider than Figtree. */
  overflow-wrap: break-word;
}
.stat span { color: var(--fg-muted); font-size: .875rem; }

/* -- Steps -------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.step {
  position: relative;
  padding: clamp(1.75rem, 2.5vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: Figtree, sans-serif;
  font-weight: 800;
}
.step p { color: var(--fg-muted); font-size: .9375rem; margin: 0; }
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(clamp(1.75rem, 2.5vw, 2.25rem) + 20px);
  right: calc(clamp(1rem, 2.5vw, 2rem) * -1);
  width: clamp(1rem, 2.5vw, 2rem);
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

/* -- Preview shots ------------------------------------------------------ */
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.shot {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
}
.shot figcaption {
  margin-top: var(--space-4);
  color: var(--fg-muted);
  font-size: .875rem;
  font-weight: 500;
  text-align: center;
}
.shot-center .phone { transform: scale(1.06); }
.shot-center figcaption { margin-top: calc(var(--space-4) + 10px); }

/* -- Split / privacy ---------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.ticks { margin: var(--space-5) 0 0; padding: 0; list-style: none; }
.ticks li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: .9375rem;
}
.ticks li:last-child { border-bottom: 0; }
.ticks svg { width: 20px; height: 20px; flex: none; margin-top: 3px; color: var(--accent); stroke-width: 2.25; }

.notice {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border));
  border-left: 4px solid var(--warn);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.notice-icon {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin-bottom: var(--space-4);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 15%, transparent);
  color: var(--warn);
}
.notice-icon svg { width: 22px; height: 22px; }
.notice h3 { margin-bottom: var(--space-3); }
.notice p { color: var(--fg-muted); font-size: .9375rem; }
.notice-strong { color: var(--fg) !important; font-weight: 600; }

/* -- Reviews ------------------------------------------------------------ */
.rating-row {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  color: var(--fg-muted);
  font-size: .9375rem;
  font-weight: 500;
}
.stars { display: inline-flex; gap: 2px; }
.stars svg { width: 18px; height: 18px; fill: #F0A202; stroke: #F0A202; stroke-width: 1.5; }

.quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin: 0;
  padding: clamp(1.5rem, 2.5vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.quote blockquote { margin: 0; font-size: 1rem; line-height: 1.7; }
.quote figcaption { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.quote figcaption span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.quote strong { font-family: Figtree, sans-serif; font-size: .9375rem; }
.quote small { color: var(--fg-muted); font-size: .8125rem; }
.avatar {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 18%, var(--surface));
  color: var(--primary);
  font-family: Figtree, sans-serif;
  font-weight: 700;
}

/* -- Download band ------------------------------------------------------ */
.download {
  position: relative;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--band-bg);
  color: #E8F1FE;
  overflow: hidden;
}
.download-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.download h2 { color: #FFFFFF; }
.download p { color: rgba(232, 241, 254, .84); max-width: 46ch; }
.download .store-row { margin-top: var(--space-6); }
.download-fine { font-size: .8125rem; color: rgba(232, 241, 254, .68) !important; }
.download-visual { display: grid; place-items: center; }

/* -- FAQ ---------------------------------------------------------------- */
.faq { display: grid; gap: var(--space-3); }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq details[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  font-family: Figtree, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--primary); }
.chev {
  position: relative;
  width: 20px; height: 20px;
  flex: none;
  transition: transform var(--dur) var(--ease);
}
.chev::before, .chev::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease);
}
.chev::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] .chev::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq p {
  margin: 0;
  padding: 0 var(--space-5) var(--space-5);
  color: var(--fg-muted);
  font-size: .9375rem;
}

/* ══ 6. APP MOCKUPS ═════════════════════════════════════════════════════ */

/* The device height follows its own content, so narrower screens (where the
   simulated UI text rewraps taller) grow the frame instead of clipping it.
   The min-height below is only a floor that preserves the phone proportions. */
.phone {
  position: relative;
  display: flex;
  width: min(300px, 86vw);
  min-height: calc(min(300px, 86vw) * 610 / 300);
  padding: 11px;
  border: 1px solid var(--border-strong);
  border-radius: 42px;
  background: var(--phone-frame);
  box-shadow: var(--shadow-lg);
}
.phone::before {
  content: "";
  position: absolute;
  top: 20px; left: 50%;
  width: 92px; height: 22px;
  border-radius: 999px;
  background: var(--phone-notch);
  transform: translateX(-50%);
  z-index: 3;
}
/* Trimmed from 330px so the portrait beside it has room in the 543px column. */
.phone-hero { width: min(306px, 88vw); min-height: calc(min(306px, 88vw) * 610 / 300); }
.phone-sm   { width: min(258px, 76vw); min-height: calc(min(258px, 76vw) * 610 / 300); }

.phone-screen {
  position: relative;
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  border-radius: 32px;
  background: var(--surface);
  overflow: hidden;
  /* A simulated app screen never inherits the section's centred text. */
  text-align: start;
}

.app-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 42px var(--space-4) var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.app-bar-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.app-bar-title strong { font-family: Figtree, sans-serif; font-size: .875rem; }
.status { display: inline-flex; align-items: center; gap: 5px; color: var(--fg-muted); font-size: .6875rem; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; }
.app-bar-icon { width: 18px; height: 18px; margin-left: auto; color: var(--fg-muted); }

/* Chat */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--space-4);
  background: var(--surface-2);
  overflow: hidden;
}
.msg {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 16px;
  font-size: .75rem;
  line-height: 1.5;
}
.msg.bot {
  align-self: flex-start;
  border-bottom-left-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
}
.msg.user {
  align-self: flex-end;
  border-bottom-right-radius: 5px;
  background: var(--primary);
  color: var(--on-primary);
}
/* Messages only start hidden once JS has taken over the sequence. */
.chat.is-animated > [data-step] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}
.chat.is-animated > [data-step].in { opacity: 1; transform: none; }

.msg.typing { display: flex; gap: 4px; padding: 12px; overflow: hidden; }
/* Collapse rather than vanish, so the frame doesn't jump when the reply lands. */
.msg.typing.out {
  height: 0 !important;
  padding-block: 0;
  margin-bottom: -8px;
  opacity: 0;
  transition: height 240ms var(--ease), padding 240ms var(--ease),
              margin 240ms var(--ease), opacity 160ms var(--ease);
}
.msg.typing span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-muted);
  animation: blink 1.2s infinite;
}
.msg.typing span:nth-child(2) { animation-delay: .18s; }
.msg.typing span:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  padding: 6px 11px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--primary);
  font-size: .6875rem;
  font-weight: 600;
}
.card-msg { max-width: 96%; display: flex; flex-direction: column; gap: 6px; }
.card-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--good);
  font-weight: 700;
  font-size: .75rem;
}
.card-title svg { width: 14px; height: 14px; stroke-width: 2; }
.card-action { color: var(--primary); font-weight: 700; font-size: .6875rem; }

.composer {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.composer span {
  flex: 1;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg-muted);
  font-size: .75rem;
}
.composer button {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
}
.composer button svg { width: 15px; height: 15px; stroke-width: 2; }

/* Dashboard-style panes */
.pane { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: var(--space-4); background: var(--surface-2); overflow: hidden; }
.pane-card {
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.pane-card.accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.pane-card.tight { padding: 10px 13px; }
.pane-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--fg-muted);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.pane-card strong { display: block; font-family: Figtree, sans-serif; font-size: .9375rem; }
.pane-card strong em { font-style: normal; font-size: .6875rem; color: var(--fg-muted); font-weight: 500; }
.pane-sub { display: block; margin-top: 2px; color: var(--fg-muted); font-size: .6875rem; }
.pane-sub.good { color: var(--good); font-weight: 600; }
.pane-body { margin: 0; font-size: .75rem; line-height: 1.55; color: var(--fg); }
.spark { height: 30px; margin: 6px 0 2px; }
.spark svg { width: 100%; height: 100%; stroke: var(--accent); stroke-width: 2.5; }

.progress { height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.progress span { display: block; width: 66%; height: 100%; border-radius: 999px; background: var(--accent); }
.q { margin: 6px 0 2px; font-family: Figtree, sans-serif; font-size: .9375rem; font-weight: 700; line-height: 1.3; }
.opts { display: flex; flex-direction: column; gap: 7px; }
.opts button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--fg);
  font-size: .75rem;
  text-align: left;
}
.opts button.on {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--primary);
  font-weight: 700;
}
.opts button svg { width: 14px; height: 14px; flex: none; stroke-width: 2.5; }
.pane-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  color: var(--danger);
  font-size: .6875rem;
  line-height: 1.45;
  font-weight: 600;
}
.pane-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; stroke-width: 2; }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 2px;
  border-bottom: 1px solid var(--border);
  font-size: .75rem;
  color: var(--fg-muted);
}
.row:last-child { border-bottom: 0; }
.row b { font-variant-numeric: tabular-nums; font-family: Figtree, sans-serif; }
.row b.ok { color: var(--good); }
.row b.warn { color: var(--warn); }

/* ── Customer support ─────────────────────────────────────────────────── */

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
.support-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease),
              box-shadow 200ms var(--ease);
}
.support-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.support-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--primary);
}
.support-icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.support-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.support-text small { color: var(--fg-muted); font-size: .8125rem; }
.support-text strong {
  color: var(--fg);
  font-family: Figtree, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  /* Both the address and the number are long enough to overflow the card at
     360px, where the grid has already dropped to one column. */
  overflow-wrap: break-word;
}
.support-card:hover .support-text strong { color: var(--primary); }

.support-note {
  display: flex;
  gap: var(--space-3);
  margin: var(--space-5) 0 0;
  color: var(--fg-muted);
  font-size: .875rem;
  text-align: left;
}
.support-note svg {
  width: 18px; height: 18px; flex: none;
  margin-top: 2px;
  color: var(--warn);
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ══ 7. FOOTER & MOBILE CTA ═════════════════════════════════════════════ */

.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: var(--space-7);
}
.footer-note { max-width: 40ch; margin: var(--space-4) 0 var(--space-3); color: var(--fg-muted); font-size: .9375rem; }
.footer-contact {
  margin: 0 0 calc(var(--space-5) - 10px);
  padding: 0;
  list-style: none;
  font-size: .9375rem;
}
.footer-contact a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  /* 10px of vertical padding puts the link itself on a 44px row, matching the
     footer nav — see the note on .footer-cols a. */
  padding: 10px 0;
  color: var(--fg);
  font-weight: 600;
  text-decoration: none;
}
.footer-contact svg {
  width: 18px; height: 18px; flex: none;
  color: var(--accent);
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.footer-contact a:hover { color: var(--primary); }
.footer-contact a:hover svg { color: var(--primary); }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.footer-cols h4 { margin-bottom: var(--space-3); color: var(--fg-muted); }
.footer-cols a {
  display: block;
  /* 10px, not 7px: at 15px/1.65 that is what puts the row at 44px, the touch
     minimum the rest of the page is built to. */
  padding: 10px 0;
  color: var(--fg);
  font-size: .9375rem;
  transition: color var(--dur) var(--ease);
}
.footer-cols a:hover { color: var(--primary); }

.footer-bottom {
  padding-block: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border);
}
.disclaimer {
  max-width: 90ch;
  margin-bottom: var(--space-3);
  color: var(--fg-muted);
  font-size: .8125rem;
  line-height: 1.6;
}
.disclaimer strong { color: var(--fg); }
/* Copyright left, attribution right on one row; they stack on narrow screens
   rather than the attribution being squeezed onto three lines. */
.copyright {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  margin: 0;
  color: var(--fg-muted);
  font-size: .8125rem;
}
.powered strong { color: var(--fg); font-weight: 600; }

.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -6px 24px rgba(4, 23, 61, .1);
  transform: translateY(110%);
  transition: transform 260ms var(--ease);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta-text { display: flex; align-items: center; gap: var(--space-3); }
.mobile-cta-text span { display: flex; flex-direction: column; line-height: 1.25; }
.mobile-cta-text strong { font-family: Figtree, sans-serif; font-size: .9375rem; }
.mobile-cta-text small { color: var(--fg-muted); font-size: .75rem; }

/* ══ 8. MOTION & RESPONSIVE ═════════════════════════════════════════════ */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero .eyebrow { align-self: center; }
  .hero .store-row, .hero-meta { justify-content: center; }
  .hero-visual { margin-top: var(--space-5); }
  .split { grid-template-columns: 1fr; }
  .download-inner { grid-template-columns: 1fr; text-align: center; }
  .download p { margin-inline: auto; }
  .download .store-row { justify-content: center; }
  .download-visual { order: -1; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* Three 300px mockups plus their gaps need ~960px of row. Below 1060px the
   container cannot give them that, and because body sets overflow-x: hidden the
   third one is silently clipped off the right edge instead of being scrollable —
   document.scrollWidth stays clean, so this hides from overflow checks. Step
   down to two before that can happen. */
@media (max-width: 1060px) {
  .shots { grid-template-columns: repeat(2, 1fr); justify-items: center; }
}

@media (max-width: 860px) {
  .grid-3, .steps, .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: 1fr; justify-items: center; gap: var(--space-7); }
  .shot-center .phone { transform: none; }
  .step:not(:last-child)::after { display: none; }

  .menu-btn { display: inline-grid; }
  .header-cta { display: none; }
  /* The drawer below goes position:absolute, so .nav's margin-left:auto leaves
     the flex flow with it and nothing is left pushing the actions over — the
     hamburger would sit against the logo. Put the auto margin here instead. */
  .header-actions { margin-left: auto; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: var(--space-2) clamp(1.25rem, 4vw, 2.5rem) var(--space-4);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    display: none;
    /* Landscape on a phone leaves ~390px of height. Scroll the drawer rather
       than letting the last links fall off the bottom with no way to reach. */
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: var(--space-3) 0; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }

  .mobile-cta { display: flex; }
  .site-footer { padding-bottom: 84px; }
}

@media (max-width: 560px) {
  .brand-lockup { height: 38px; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  /* Three footer columns leave ~110px each here, which wraps "Medical advisory
     board" onto three ragged lines. Two columns give every link room. */
  .footer-cols { grid-template-columns: repeat(2, 1fr); gap: var(--space-4) var(--space-5); }
  .support-grid { grid-template-columns: 1fr; }
  .strip-inner { gap: var(--space-5) var(--space-4); }
  .brand-tag { display: none; }
  .store-btn { flex: 1 1 100%; justify-content: center; }
  .hero-meta { gap: var(--space-2) var(--space-4); font-size: .8125rem; }
  .float-card { display: none; }

  /* The mockup is near life-size here, so nudge its simulated UI up a step. */
  .msg, .composer span, .opts button, .pane-body { font-size: .8125rem; }
  .pane-card strong, .q { font-size: 1rem; }
  .pane-eyebrow { font-size: .6875rem; }
  .pane-sub, .chips button, .card-action, .card-title, .row, .pane-note { font-size: .75rem; }
}

@media (max-width: 380px) {
  .container { padding-inline: 1rem; }
  .header-inner { gap: var(--space-3); }
  .section-head { margin-bottom: var(--space-7); }
  .quote, .card, .step { padding: 1.25rem; }
  .faq summary { padding-inline: var(--space-4); font-size: 1rem; }
  .faq p { padding-inline: var(--space-4); }
  .strip-inner { grid-template-columns: 1fr 1fr; }
  .mobile-cta-text small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .chat.is-animated > [data-step] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .mobile-cta, .hero-glow, .float-card { display: none !important; }
}
