/* ==========================================================================
   GMR site styles
   Brand: maroon (#7B1D35, from the logo) on warm beige.
   Headers: DM Serif Display. Body: Inter. Both self-hosted in /fonts.
   ========================================================================== */

@font-face {
  font-family: "DM Serif Display";
  src: url("/fonts/dm-serif-display-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --maroon: #7b1d35;
  --maroon-dark: #5f1528;
  --maroon-soft: #f4e6e9;
  --bg: #fbf7f1;
  --bg-2: #f4ede3;
  --surface: #ffffff;
  --ink: #1f1a1c;
  --ink-2: #5e5558;
  --line: #e9e0d6;
  --muted-bg: #ece6df;
  --muted-ink: #776d70;
  --src-hospital: #3d6fa8;
  --src-lab: #b0782a;
  --src-pharmacy: #7d5ba6;
  --src-urgent: #c25a36;
  --shadow-sm: 0 1px 2px rgba(31, 26, 28, 0.06), 0 6px 16px -8px rgba(31, 26, 28, 0.14);
  --shadow: 0 2px 4px rgba(31, 26, 28, 0.05), 0 24px 48px -20px rgba(31, 26, 28, 0.28);
  --display: "DM Serif Display", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--maroon); text-underline-offset: 3px; }
a:hover { color: var(--maroon-dark); }
:focus-visible { outline: 3px solid var(--maroon); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

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

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 20px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; letter-spacing: -0.005em; margin: 0 0 0.45em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 30em; }

/* Shared icon style */
.mark svg, .persona-ic svg, .compare-arrow svg, .chain-down svg, .contact-link svg {
  fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; border-radius: 24%; overflow: hidden; }
.logo img { width: 42px; height: 42px; border-radius: 24%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-dark); color: #fff; }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 0.94rem; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 1.05rem; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--maroon); }
.hero .lead { margin-bottom: 32px; }

.hero-visual { width: 100%; max-width: 420px; justify-self: center; }
.phone {
  margin-inline: auto; width: 100%; max-width: 290px;
  background: #1f1a1c; border-radius: 40px; padding: 10px;
  box-shadow: var(--shadow);
}
.screen { background: var(--bg); border-radius: 31px; padding: 18px 16px 16px; overflow: hidden; }
.app-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; text-align: left; }
.app-title { font-family: var(--display); font-size: 1.3rem; line-height: 1.1; }
.app-sub { font-size: 0.72rem; color: var(--ink-2); }
.app-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--maroon-soft); color: var(--maroon); display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; text-align: left; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; }
.tile-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.tile-value { font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
.records { list-style: none; margin: 0 0 12px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.records li { display: grid; grid-template-columns: 8px 1fr auto; gap: 9px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); line-height: 1.3; }
.records li:last-child { border-bottom: 0; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rec-what { font-size: 0.8rem; font-weight: 600; }
.rec-src { font-size: 0.66rem; color: var(--ink-2); }
.rec-date { font-size: 0.66rem; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.share-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--maroon); color: #fff; border-radius: 12px; padding: 10px; font-size: 0.82rem; font-weight: 600;
}
.share-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.bg-hospital { background: var(--src-hospital); }
.bg-lab { background: var(--src-lab); }
.bg-pharmacy { background: var(--src-pharmacy); }
.bg-urgent { background: var(--src-urgent); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--bg-2); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-2); font-size: 1.1rem; margin: 0; }

/* ---------- Problem -> Solution ---------- */
.compare { display: grid; grid-template-columns: 1fr 84px 1fr; align-items: stretch; }
.side { border-radius: 26px; padding: 32px; display: flex; flex-direction: column; }
.side-before { background: var(--muted-bg); color: var(--ink); }
.side-after { background: var(--maroon); color: #fff; box-shadow: var(--shadow); }
.tag { align-self: flex-start; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; margin-bottom: 22px; }
.tag-before { background: #ddd5cc; color: var(--muted-ink); }
.tag-after { background: rgba(255, 255, 255, 0.16); color: #fff; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.list li { display: flex; align-items: center; gap: 16px; padding: 18px 0; font-size: 1.12rem; line-height: 1.4; }
.list li + li { border-top: 1px solid rgba(0, 0, 0, 0.08); }
.side-after .list li + li { border-top-color: rgba(255, 255, 255, 0.18); }
.list strong { font-weight: 700; }
.mark { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 0.95rem; }
.mark svg { width: 15px; height: 15px; stroke-width: 2.8; }
.side-before .mark { background: #e3d3cd; color: #a23b2c; }
.side-before .list li { color: var(--muted-ink); }
.side-after .mark { background: #fff; color: var(--maroon); }

.compare-arrow { display: grid; place-items: center; }
.compare-arrow span { width: 56px; height: 56px; border-radius: 50%; background: var(--maroon); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.compare-arrow svg { width: 26px; height: 26px; stroke-width: 2.4; }

/* ---------- Personas ---------- */
.personas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.persona { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 30px 20px; text-align: center; }
.persona p { margin: 0; font-family: var(--sans); font-weight: 600; font-size: 1.08rem; line-height: 1.35; }
.persona-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; }
.persona-ic svg { width: 28px; height: 28px; stroke-width: 1.9; }
.ic-maroon { background: var(--maroon-soft); color: var(--maroon); }
.ic-blue { background: #e3ecf6; color: var(--src-hospital); }
.ic-amber { background: #f6ecdc; color: var(--src-lab); }
.ic-purple { background: #ece6f4; color: var(--src-pharmacy); }

/* ---------- The problem in numbers ---------- */
.chain { max-width: 720px; margin: 0 auto; }
.chain-step {
  display: grid; grid-template-columns: 132px 1fr; gap: 24px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 24px 28px;
}
.chain-num { font-family: var(--display); font-size: 3.4rem; line-height: 1; color: var(--maroon); text-decoration: none; }
.chain-num:hover { color: var(--maroon-dark); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.chain-text { font-weight: 600; font-size: 1.12rem; margin: 0 0 12px; }
.bar { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--maroon); border-radius: inherit; }
.w77 { width: 77%; }
.w59 { width: 59%; }
.w7 { width: 7%; }
.chain-down { display: grid; place-items: center; height: 46px; color: var(--maroon); }
.chain-down svg { width: 24px; height: 24px; stroke-width: 2.2; }
.chain-end {
  background: var(--maroon); color: #fff; border-radius: 22px; padding: 26px 28px; text-align: center;
  font-family: var(--display); font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.2;
}
.chain-end-sub { display: block; max-width: 30em; margin: 10px auto 0; font-family: var(--sans); font-size: 1rem; line-height: 1.5; color: #f6e3e7; }
.chain-end-label { display: block; font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #f2c9d2; margin-bottom: 6px; }

/* ---------- Waitlist + founder ---------- */
.cta { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 56px 40px; text-align: center; box-shadow: var(--shadow-sm); }
.cta h2 { margin-bottom: 0.3em; }
.inline-form { display: flex; gap: 10px; max-width: 540px; margin: 28px auto 0; }
.input {
  flex: 1; min-width: 0; min-height: 56px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--ink);
  font: inherit; font-size: 1rem;
}
.input::placeholder { color: var(--ink-2); opacity: 0.65; }
.input:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px var(--maroon-soft); }
.inline-form .btn { min-height: 56px; }
.form-status { font-size: 0.95rem; font-weight: 600; margin: 14px 0 0; }
.form-status:empty { display: none; }
.form-status.ok { color: #2f6b4f; }
.form-status.err { color: var(--maroon); }

.contact {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  max-width: 820px; margin: 32px auto 0; padding: 22px 26px;
  border-radius: 22px; background: var(--bg-2); border: 1px solid var(--line);
}
.contact-who { display: flex; align-items: center; gap: 14px; }
.avatar { width: 52px; height: 52px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--maroon); color: #fff; font-weight: 700; }
.contact-name { font-weight: 700; line-height: 1.3; white-space: nowrap; }
.contact-role { font-size: 0.9rem; color: var(--ink-2); white-space: nowrap; }
.contact-text { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.contact-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.contact-link svg { width: 18px; height: 18px; stroke-width: 2.2; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.9rem; color: var(--ink-2); }
.footer-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 24%; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--ink-2); }
.footer-links a:hover { color: var(--ink); }
.footer-fine { width: 100%; margin: 4px 0 0; font-size: 0.82rem; }

/* ---------- Text pages (privacy, etc.) ---------- */
.prose { max-width: 720px; padding: 64px 0 80px; }
.prose h1 { font-size: clamp(2.4rem, 5vw, 3.2rem); }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose strong { color: var(--ink); }
.updated { font-size: 0.92rem; color: var(--ink-2); }
.eyebrow { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--maroon); margin: 0 0 0.9rem; }

/* 404 */
.center-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.center-page p { color: var(--ink-2); }
.center-page .logo { margin: 0 auto 24px; }
.center-page .logo img { width: 64px; height: 64px; }

/* ==========================================================================
   Tablet and phone: center everything
   ========================================================================== */
@media (max-width: 960px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-copy { text-align: center; max-width: 640px; margin-inline: auto; }
  .hero .lead { margin-inline: auto; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }

  .compare { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .side { align-items: center; text-align: center; }
  .tag { align-self: center; }
  .side .list { width: 100%; }
  .compare-arrow { height: 84px; }
  .compare-arrow svg { transform: rotate(90deg); }

  .personas { grid-template-columns: repeat(2, 1fr); }

  .contact { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
  .contact-who { flex-direction: column; gap: 10px; }

  .footer-grid { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .side { padding: 26px 20px; }
  .list li { flex-direction: column; text-align: center; gap: 10px; padding: 16px 0; font-size: 1.05rem; }
  .persona { padding: 22px 12px; }
  .persona p { font-size: 0.98rem; }
  .persona-ic { width: 52px; height: 52px; margin-bottom: 12px; }
  .chain-step { grid-template-columns: 1fr; text-align: center; gap: 6px; padding: 22px 20px; }
  .cta { padding: 40px 20px; border-radius: 22px; }
  .inline-form { flex-direction: column; }
}
