/* ─────────────────────────────────────────────────────────────
   Mira marketing site — design tokens mirror the in-app Mira
   design system so the website feels continuous with the product.
   Values match lib/core/design/mira_colors.dart 1:1 wherever
   possible.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Sage palette */
  --sage-50: #F4F7F4;
  --sage-100: #E8EFE8;
  --sage-200: #D4DFD4;
  --sage-300: #B3C7B8;
  --sage-500: #6B8E75;
  --sage-700: #2F5233;
  --sage-800: #234A2C;
  --sage-900: #1A3620;

  /* Sand palette */
  --sand-white: #FFFFFF;
  --sand-50: #FAF7F2;
  --sand-100: #F2EDE4;
  --sand-200: #E8E2D4;
  --sand-300: #D4CDBE;

  /* Terracotta accent */
  --terracotta-100: #FBE7DD;
  --terracotta-500: #D97756;
  --terracotta-700: #A64A2A;

  /* Ink (text) */
  --ink-900: #1A1F1C;
  --ink-700: #3A443D;
  --ink-500: #556158;
  --ink-400: #727F75;
  --ink-300: #8B9690;

  /* Status */
  --info-100: #D4E3EC;
  --info-600: #3C6E88;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --container-max: 1200px;
  --container-narrow: 820px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ─── Reset ─── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ─── Layout primitives ─── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
.container.narrow { max-width: var(--container-narrow); }
.section { padding: clamp(72px, 10vw, 132px) 0; }

/* ─── Typography ─── */

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--sage-800);
}
.wordmark-sm { font-size: 28px; }
.wordmark-light { color: var(--sand-white); }

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-200);
}
.eyebrow-dark { color: var(--sage-700); }

.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(46px, 7.5vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--sand-white);
  margin-bottom: 28px;
}
.display-md {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.028em;
  color: var(--ink-900);
  margin-bottom: 28px;
}
.display-sm {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: inherit;
  margin-bottom: 20px;
}
.serif-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin-bottom: 32px;
}
.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--sage-200);
  max-width: 580px;
  margin-bottom: 36px;
}
.body-lg {
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--ink-500);
  margin-bottom: 22px;
}
.body-lg strong { color: var(--ink-900); font-weight: 600; }

/* ─── Buttons ─── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: transform 0.15s var(--ease-out), background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }
.btn-lg { padding: 16px 28px; font-size: 15.5px; }
.btn-primary {
  background: var(--sand-white);
  color: var(--sage-800);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.btn-primary:hover { background: var(--sage-50); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--sand-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.2); }
.btn-ghost-dark {
  background: transparent;
  color: var(--sand-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.08); }
.btn-light {
  background: var(--sage-100);
  color: var(--sage-800);
}
.btn-light:hover { background: var(--sage-200); }

/* ─── Top nav ─── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(35, 74, 44, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
  min-width: 0;
}
.nav-brand { flex-shrink: 0; }
.nav-ctas { flex-shrink: 0; }
.nav-brand .wordmark { color: var(--sand-white); }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--sand-white); }
.nav-ctas { display: flex; gap: 10px; align-items: center; }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-row { gap: 8px; }
  /* On phones, the nav has only enough room for the brand + one CTA.
     Provider portal CTA hides — providers reach the portal via the
     dedicated "For providers" section + the Get Mira modal's
     fineprint footer link. */
  .nav-ctas .btn-ghost { display: none; }
}

/* ─── Hero ─── */

.hero {
  background: linear-gradient(135deg, var(--sage-900) 0%, var(--sage-800) 60%, var(--sage-700) 110%);
  color: var(--sand-white);
  padding: clamp(72px, 12vw, 140px) 0 clamp(72px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 540px; height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--terracotta-500) 0%, transparent 65%);
  opacity: 0.45;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -100px; left: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(48px, 8vw, 96px);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-copy .eyebrow { color: var(--sage-200); margin-bottom: 24px; display: inline-block; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero-meta { color: rgba(255,255,255,0.55); font-size: 13px; }

/* Phone frame */
.phone-frame {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 9 / 19.5;
  border-radius: 38px;
  background: linear-gradient(180deg, #2F2F2F, #1A1A1A);
  padding: 14px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.4),
    0 0 0 2px rgba(255, 255, 255, 0.06) inset,
    0 0 0 8px rgba(0, 0, 0, 0.3);
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 28px;
  overflow: hidden;
  background: var(--sand-50);
}
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #000;
  border-radius: 14px;
  z-index: 2;
}
.phone-frame-sm { max-width: 260px; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  /* Order: text first (so the headline is what they read on first paint),
     then phone mockup below as supporting visual. Earlier draft had
     visual:-1 which pushed the value prop below the fold on mobile. */
  .hero-copy { order: 1; }
  .hero-visual { order: 2; max-width: 280px; margin: 16px auto 0; }
}

/* ─── Problem section ─── */

.problem { background: var(--sand-50); text-align: center; }
.problem .eyebrow { display: inline-block; margin-bottom: 24px; }
.problem h2 { margin-bottom: 36px; }
.problem .body-lg { text-align: left; max-width: 680px; margin: 0 auto 22px; }
@media (max-width: 720px) {
  .problem h2 br { display: none; }
}

/* ─── Connected Health Record ─── */

.chr-section {
  background: linear-gradient(180deg, var(--sand-50) 0%, var(--sand-100) 100%);
}
.chr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 6vw, 80px);
  align-items: center;
}
.chr-copy .eyebrow { color: var(--sage-700); margin-bottom: 16px; display: inline-block; }
.chr-copy h2 { color: var(--ink-900); }

.bullet-list { list-style: none; }
.bullet-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--sand-200);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-500);
}
.bullet-list li:last-child { border-bottom: none; }
.bullet-list strong { color: var(--ink-900); font-weight: 600; }
.bullet-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: var(--sage-100);
  color: var(--sage-700);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.bullet-list-dark li { border-color: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.78); }
.bullet-list-dark strong { color: var(--sand-white); }
.bullet-icon-sm {
  display: inline-block;
  width: 22px;
  font-weight: 600;
  color: var(--sage-700);
}
.bullet-list-dark .bullet-icon-sm { color: var(--sage-200); }

/* Mock Connected Health Record card */
.record-card {
  background: var(--sand-white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(35, 74, 44, 0.18),
    0 4px 12px rgba(35, 74, 44, 0.06);
  border: 1px solid var(--sand-200);
}
.record-header {
  background: linear-gradient(135deg, var(--sage-800), var(--sage-700));
  padding: 28px 28px 0;
  color: var(--sand-white);
}
.record-eyebrow { font-size: 11px; letter-spacing: 0.18em; color: var(--sage-200); margin-bottom: 10px; font-weight: 600; }
.record-title { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.record-sub { font-size: 13px; color: var(--sage-200); margin-bottom: 24px; }
.record-tabs { display: flex; gap: 22px; padding-bottom: 14px; }
.tab { font-size: 12.5px; font-weight: 500; letter-spacing: 0.02em; padding-bottom: 8px; color: rgba(255, 255, 255, 0.55); }
.tab-active { color: var(--sand-white); border-bottom: 2px solid var(--sand-white); font-weight: 600; }
.record-body { padding: 22px 24px 24px; }
.record-stat-row { display: flex; gap: 18px; padding: 12px 0 18px; border-bottom: 1px solid var(--sand-100); margin-bottom: 14px; }
.stat { flex: 1; }
.stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--sage-800); letter-spacing: -0.02em; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-400); margin-top: 2px; }
.record-row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--sand-100); }
.record-row:last-child { border-bottom: none; }
.record-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.record-row-title { font-size: 13.5px; font-weight: 600; color: var(--ink-900); }
.record-row-meta { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

@media (max-width: 880px) {
  .chr-grid { grid-template-columns: 1fr; }
  .chr-visual { max-width: 460px; margin: 0 auto; }
}

/* ─── Role sections ─── */

.role-section { background: var(--sand-50); }
.role-section-alt {
  background: linear-gradient(135deg, var(--sage-900), var(--sage-800));
  color: var(--sand-white);
}
.role-section-alt .display-sm,
.role-section-alt .role-copy h2 { color: var(--sand-white); }
.role-section-alt .body-lg { color: rgba(255, 255, 255, 0.78); }
.role-section-alt .body-lg strong { color: var(--sand-white); }

.role-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
}
.role-grid-flip { grid-template-columns: 1.1fr 1fr; }
.role-copy .eyebrow { display: inline-block; margin-bottom: 16px; }
.role-copy ul { margin: 24px 0 32px; }

@media (max-width: 880px) {
  .role-grid, .role-grid-flip { grid-template-columns: 1fr; }
  .role-grid-flip .role-visual { order: 1; }
  .role-grid-flip .role-copy { order: 2; }
}

/* Phone home mock — replaces .phone-screen for the For Patients
   section. Mirrors .phone-screen's overflow + border-radius so the
   inner content can never spill out the bottom of the device frame
   (the previous version was missing both, which is why a few extra
   px of bento height made the tiles appear floating below the
   phone). Tightened padding + gap so the greeting + 2x2 grid fit
   the 9/19.5 aspect ratio comfortably at every breakpoint. */
.phone-screen-mock {
  width: 100%; height: 100%;
  background: var(--sand-50);
  border-radius: 22px;
  overflow: hidden;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mock-greeting {
  background: linear-gradient(135deg, var(--sage-800), var(--sage-700));
  color: var(--sand-white);
  border-radius: 14px;
  padding: 16px 14px 18px;
  flex-shrink: 0;
}
.mock-eyebrow { font-size: 8px; letter-spacing: 0.16em; color: var(--sage-200); margin-bottom: 6px; font-weight: 600; }
.mock-name { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
.mock-greet-sub { font-size: 10.5px; color: var(--sage-200); margin-top: 6px; line-height: 1.4; }
.mock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; flex-shrink: 0; }
.mock-tile {
  background: var(--sand-white);
  border-radius: 10px;
  border: 1px solid var(--sand-200);
  padding: 8px 10px;
  font-size: 10px;
  color: var(--ink-700);
  line-height: 1.3;
}
.mock-tile strong { display: block; font-size: 11px; color: var(--ink-900); margin-top: 4px; }
.mock-tile span { color: var(--ink-500); }
.mock-tile-sage { background: var(--sage-50); }
.mock-tile-info { background: var(--info-100); }
.mock-tile-terra { background: var(--terracotta-100); }
.mock-tile-danger { background: #FBE5E0; }

/* Laptop frame */
.laptop-frame {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  aspect-ratio: 16 / 10;
  background: linear-gradient(180deg, #2A2A2A, #161616);
  border-radius: 14px 14px 4px 4px;
  padding: 18px 18px 10px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}
.laptop-frame::after {
  content: "";
  position: absolute;
  bottom: -10px; left: -28px;
  width: calc(100% + 56px);
  height: 14px;
  background: linear-gradient(180deg, #1F1F1F, #2A2A2A);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}
.laptop-screen {
  width: 100%; height: 100%;
  background: var(--sand-50);
  border-radius: 4px;
  overflow: hidden;
}

/* Doctor app mock (laptop) */
.mock-doctor-shell {
  display: grid;
  grid-template-columns: 130px 1fr;
  height: 100%;
  font-size: 11px;
}
.mock-doctor-sidebar {
  background: var(--sage-900);
  color: var(--sand-white);
  padding: 16px 12px;
}
.mock-doctor-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--sand-white);
  margin-bottom: 22px;
}
.mock-doctor-nav {
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}
.mock-doctor-nav.active { background: rgba(255, 255, 255, 0.1); color: var(--sand-white); }
.mock-doctor-main { padding: 22px 24px; background: var(--sand-50); }
.mock-doctor-eyebrow { font-size: 9px; letter-spacing: 0.16em; color: var(--sage-700); font-weight: 600; margin-bottom: 8px; }
.mock-doctor-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-900); margin-bottom: 18px; }
.mock-doctor-card {
  background: var(--sand-white);
  border: 1px solid var(--sand-200);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.mock-doctor-card-name { font-size: 12px; font-weight: 600; color: var(--ink-900); }
.mock-doctor-card-meta { font-size: 10.5px; color: var(--ink-500); margin-top: 2px; }

/* Provider portal mock (laptop) */
.laptop-frame-portal { max-width: 560px; }
.mock-portal-shell {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  height: 100%;
}
.mock-portal-brand {
  background: linear-gradient(135deg, var(--sage-800), var(--sage-700));
  color: var(--sand-white);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
}
.mock-portal-brand::before {
  content: "";
  position: absolute;
  top: -40px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(var(--terracotta-500), transparent 65%);
  opacity: 0.5;
}
.mock-portal-wordmark { font-family: var(--font-display); font-size: 36px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-bottom: 8px; }
.mock-portal-eyebrow { font-size: 9px; letter-spacing: 0.18em; color: var(--sage-200); font-weight: 600; margin-bottom: 22px; }
.mock-portal-headline { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.mock-portal-form { padding: 26px 22px; background: var(--sand-white); }
.mock-portal-form-eyebrow { font-size: 9px; letter-spacing: 0.16em; color: var(--sage-700); font-weight: 600; margin-bottom: 8px; }
.mock-portal-form-title { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink-900); margin-bottom: 20px; }
.mock-portal-input {
  background: var(--sand-100);
  border: 1px solid var(--sand-200);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--ink-500);
  margin-bottom: 8px;
}
.mock-portal-btn {
  background: var(--sage-700);
  color: var(--sand-white);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
}

/* ─── Built in Liberia ─── */

.liberia { background: var(--sand-100); text-align: center; }
.liberia .eyebrow { display: inline-block; margin-bottom: 20px; color: var(--sage-700); }
.liberia h2 { margin-bottom: 56px; }
.liberia-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.liberia-card {
  background: var(--sand-white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  text-align: left;
}
.liberia-icon { font-size: 32px; margin-bottom: 16px; }
.liberia-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; color: var(--sage-800); margin-bottom: 10px; }
.liberia-card p { font-size: 14.5px; color: var(--ink-500); line-height: 1.55; }

/* ─── CTA section ─── */

.cta-section { background: var(--sand-50); }
.cta-card {
  background: linear-gradient(135deg, var(--sage-900), var(--sage-800));
  color: var(--sand-white);
  border-radius: var(--radius-xl);
  padding: clamp(48px, 7vw, 80px) clamp(32px, 6vw, 80px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-card::after {
  content: "";
  position: absolute;
  top: -120px; right: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(var(--terracotta-500), transparent 65%);
  opacity: 0.4;
  pointer-events: none;
}
.cta-card .eyebrow { color: var(--sage-200); display: inline-block; margin-bottom: 14px; }
.cta-card h2 { color: var(--sand-white); margin-bottom: 36px; }
.cta-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  position: relative; z-index: 1;
}
.cta-path {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  text-align: left;
  transition: background 0.2s ease, transform 0.2s var(--ease-out);
  position: relative;
}
.cta-path:hover { background: rgba(255, 255, 255, 0.12); transform: translateY(-2px); }
.cta-path-icon { font-size: 28px; margin-bottom: 14px; }
.cta-path-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 6px; }
.cta-path-desc { font-size: 13.5px; color: rgba(255, 255, 255, 0.7); line-height: 1.5; padding-right: 28px; }
.cta-path-arrow { position: absolute; bottom: 22px; right: 22px; font-size: 22px; color: var(--sage-200); }
.cta-fineprint {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  position: relative; z-index: 1;
}
.cta-fineprint a { color: var(--sand-white); border-bottom: 1px solid rgba(255, 255, 255, 0.3); }

@media (max-width: 720px) {
  .cta-paths { grid-template-columns: 1fr; }
}

/* ─── Footer ─── */

.footer {
  background: var(--sage-900);
  color: rgba(255, 255, 255, 0.6);
  padding: 56px 0 24px;
  font-size: 13.5px;
}
.footer-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-tag { margin-top: 10px; max-width: 280px; line-height: 1.55; }
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.footer-cols h4 { font-size: 11px; letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.4); text-transform: uppercase; font-weight: 600; margin-bottom: 12px; }
.footer-cols a { display: block; padding: 4px 0; color: rgba(255, 255, 255, 0.7); transition: color 0.15s ease; }
.footer-cols a:hover { color: var(--sand-white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 24px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 720px) {
  .footer-row { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ─── Get Mira modal ─── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 28, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  background: var(--sand-white);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 5vw, 44px);
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.32);
  transform: translateY(20px);
  transition: transform 0.3s var(--ease-out);
}
.modal.open .modal-card { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sand-100);
  color: var(--ink-500);
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover { background: var(--sand-200); color: var(--ink-900); }
.modal-eyebrow { display: inline-block; margin-bottom: 12px; }
.modal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink-900);
  margin-bottom: 10px;
}
.modal-sub {
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.55;
  margin-bottom: 24px;
}
.modal-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--sand-200);
  background: var(--sand-50);
  text-decoration: none;
  color: var(--ink-900);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s var(--ease-out);
}
.modal-option-active {
  background: var(--sage-50);
  border-color: var(--sage-200);
}
.modal-option-active:hover {
  background: var(--sage-100);
  border-color: var(--sage-500);
  transform: translateY(-1px);
}
.modal-option-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.modal-option-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--sand-white);
  color: var(--sage-700);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sand-200);
}
.modal-option-active .modal-option-icon {
  background: var(--sage-700);
  color: var(--sand-white);
  border-color: var(--sage-700);
}
.modal-option-body { flex: 1; min-width: 0; }
.modal-option-title { font-size: 14.5px; font-weight: 600; color: var(--ink-900); }
.modal-option-meta { font-size: 12.5px; color: var(--ink-500); margin-top: 2px; }
.modal-option-badge {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-400);
  background: var(--sand-200);
  padding: 4px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.modal-option-arrow {
  font-size: 20px;
  color: var(--sage-700);
  flex-shrink: 0;
}
.modal-fineprint {
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.55;
  text-align: center;
}
.modal-fineprint a { color: var(--sage-700); font-weight: 600; border-bottom: 1px solid var(--sage-200); }
.modal-fineprint a:hover { border-bottom-color: var(--sage-700); }

/* ─── Reveal-on-scroll ─── */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ─────────────────────────────────────────────────────────────
   Mobile-specific tuning. The major grid stacks happen at 880px
   above; this block tightens spacing, sizes, and touch targets
   below 600px for the actual phone-screen experience.
   ───────────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .section { padding: clamp(56px, 12vw, 88px) 0; }

  /* Top nav: tighten the row, ensure CTAs don't overflow.
     `min-width:0` on flex children lets text shrink if needed; the
     explicit `flex-shrink:0` on .nav-ctas elsewhere keeps the CTA
     visually whole. */
  .nav-row { height: 56px; gap: 12px; }
  .nav-ctas { gap: 6px; }
  .nav-ctas .btn { padding: 8px 14px; font-size: 12.5px; }
  .nav-brand .wordmark { font-size: 22px; }

  /* Hero: shrink the phone mockup so it doesn't dominate the small viewport */
  .hero { padding: 56px 0 64px; }
  .phone-frame { max-width: 240px; padding: 10px; border-radius: 30px; }
  .phone-screen { border-radius: 22px; }
  .phone-notch { width: 70px; height: 18px; top: 14px; }
  .phone-frame-sm { max-width: 220px; }

  /* CTA buttons: full-width, larger touch target on mobile */
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; padding: 14px 18px; }

  /* Display headlines: scale down further on tiny screens so they don't
     wrap awkwardly. The clamp() above handles most of this but the
     hero-specific override gives a more confident feel at 360-414px. */
  .display { font-size: clamp(40px, 12vw, 56px); }
  .display-md { font-size: clamp(30px, 10vw, 42px); }
  .display-sm { font-size: clamp(26px, 8vw, 36px); }
  .serif-display { font-size: clamp(24px, 7vw, 32px); }

  /* Connected Health Record card */
  .record-header { padding: 22px 20px 0; }
  .record-tabs { gap: 14px; padding-bottom: 12px; overflow-x: auto; }
  .tab { flex-shrink: 0; }
  .record-body { padding: 18px 18px 20px; }

  /* Role sections */
  .role-section { padding: 64px 0; }
  .bullet-list li { font-size: 14.5px; padding: 12px 0; }

  /* Laptop frames: reduce edge padding, scale down */
  .laptop-frame { padding: 12px 12px 8px; border-radius: 10px 10px 3px 3px; }
  .laptop-frame::after { bottom: -8px; left: -16px; width: calc(100% + 32px); height: 10px; }

  /* CTA section paths: stack with proper vertical rhythm */
  .cta-card { padding: 40px 24px; }
  .cta-paths { gap: 12px; }
  .cta-path { padding: 22px 22px 18px; }
  .cta-path-desc { padding-right: 32px; }
  .cta-path-arrow { bottom: 18px; right: 18px; }

  /* "Built in Liberia" cards stack with slightly more padding */
  .liberia-card { padding: 26px 22px; }
  .liberia-card h3 { font-size: 19px; }

  /* Footer */
  .footer { padding: 40px 0 20px; }
  .footer-cols { gap: 24px; }

  /* Modal: full-bleed on phones */
  .modal { padding: 16px; align-items: flex-end; }
  .modal-card {
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(40px);
  }
  .modal.open .modal-card { transform: translateY(0); }
  .modal-options { gap: 8px; }
  .modal-option { padding: 14px 16px; }
  .modal-option-icon { width: 36px; height: 36px; }
}

/* Smallest phones (320-360px): final squeeze */
@media (max-width: 380px) {
  .container { padding-left: 14px; padding-right: 14px; }
  .nav-links { display: none; }
  .nav-ctas .btn-ghost { display: none; }
  .phone-frame { max-width: 200px; }
  .display { font-size: 38px; line-height: 1; }
}

/* Tablet sweet spot (600-880px): adjust grids before they fully stack */
@media (min-width: 600px) and (max-width: 880px) {
  .role-grid, .role-grid-flip, .chr-grid, .hero-grid {
    gap: 40px;
  }
  .liberia-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}
