/* ============================================================
   Physicians AI Insights — Editorial Medical aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Core palette — deep emerald + warm ivory */
  --emerald: #0a6847;
  --emerald-deep: #064e34;
  --emerald-light: #e8f5ee;
  --ivory: #faf8f4;
  --ivory-warm: #f3efe8;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-muted: #7a7a7a;
  --accent: #c4652e;
  --accent-light: #fef3ec;
  --red-clinical: #c0392b;
  --amber-clinical: #d4860b;
  --blue-clinical: #2471a3;
  --green-clinical: #1e8449;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: #ffffff;
  --line: rgba(26, 26, 26, 0.1);
  --line-strong: rgba(26, 26, 26, 0.2);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.12);

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Fonts */
  --f-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Layout */
  --max-w: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  overflow-x: hidden;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
ul, ol { padding: 0; margin: 0; }

.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;
}

/* ---- Utility ---- */
.container {
  width: min(100% - var(--gutter) * 2, var(--max-w));
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--emerald);
}

.section-dark .eyebrow { color: rgba(232,245,238,0.7); }

/* ================================================================
   HEADER / NAV
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding-inline: var(--gutter);
  max-width: calc(var(--max-w) + var(--gutter) * 2);
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--emerald-deep);
}

.brand-sub {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-nav a {
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--emerald);
}

.site-nav a.is-active {
  color: var(--emerald-deep);
  background: var(--emerald-light);
  font-weight: 600;
}

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.5rem 1.1rem !important;
  background: var(--emerald) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border-radius: 999px !important;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover { background: var(--emerald-deep) !important; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(2.5px, 2.5px); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(2.5px, -2.5px); }

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 5rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(10,104,71,0.06), transparent),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(196,101,46,0.04), transparent);
  pointer-events: none;
}

/* Decorative grid dots */
.hero::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 50%;
  height: 100%;
  background-image: radial-gradient(circle, rgba(10,104,71,0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(135deg, transparent 20%, black 50%, transparent 80%);
  -webkit-mask-image: linear-gradient(135deg, transparent 20%, black 50%, transparent 80%);
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-copy { position: relative; z-index: 1; }

.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 5.5vw, 4.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--emerald);
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--emerald);
  color: #fff;
  border-color: var(--emerald);
  box-shadow: 0 4px 16px rgba(10,104,71,0.25);
}

.btn-primary:hover {
  background: var(--emerald-deep);
  border-color: var(--emerald-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10,104,71,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.btn-outline:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  transform: translateY(-1px);
}

.hero-proof {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.hero-proof .proof-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
}

/* Brief card in hero */
.hero-visual {
  position: relative;
  z-index: 1;
}

.brief-card {
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--emerald-deep);
  color: #fff;
}

.brief-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brief-header-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
}

.brief-header-title {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.brief-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  white-space: nowrap;
}

.brief-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
}

.brief-cell {
  padding: 0.9rem 1.1rem;
  background: var(--surface-strong);
}

.brief-cell-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.brief-cell p {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.brief-trends {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.trend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.trend-chip.up { background: rgba(192,57,43,0.1); color: var(--red-clinical); }
.trend-chip.stable { background: rgba(36,113,163,0.1); color: var(--blue-clinical); }
.trend-chip.down { background: rgba(30,132,73,0.1); color: var(--green-clinical); }

.brief-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.1rem;
  background: var(--ivory-warm);
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--ink-muted);
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  color: var(--amber-clinical);
}

.risk-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-clinical);
}

/* Floating accent card near the brief */
.float-query {
  position: absolute;
  top: -1rem;
  right: -1.5rem;
  width: 240px;
  padding: 0.85rem 1rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2;
  animation: float-gentle 6s ease-in-out infinite;
}

.float-query .fq-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.25rem;
}

.float-query .fq-text {
  font-family: var(--f-display);
  font-size: 0.88rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
}

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

/* ================================================================
   PROBLEM SECTION
   ================================================================ */
.problem {
  padding: 6rem 0;
  background: var(--emerald-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.problem::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.03), transparent);
  pointer-events: none;
}

.problem-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.problem-header h2 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 600px;
  margin: 0.75rem auto 1rem;
}

.problem-header p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.72);
  max-width: 580px;
  margin-inline: auto;
}

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

.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  backdrop-filter: blur(8px);
}

.stat-number {
  font-family: var(--f-display);
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  display: block;
}

.stat-card h3 {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.75rem 0 0.35rem;
  color: rgba(255,255,255,0.9);
}

.stat-card p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

/* ================================================================
   CAPABILITIES
   ================================================================ */
.capabilities {
  padding: 6rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0.6rem 0 0.8rem;
  max-width: 16ch;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 560px;
  line-height: 1.7;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.cap-card {
  padding: 1.75rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
}

.cap-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--emerald);
}

.cap-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--emerald-light);
  color: var(--emerald-deep);
  font-weight: 700;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.cap-card h3 {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cap-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ================================================================
   PRE-VISIT BRIEF DEEP DIVE
   ================================================================ */
.previsit {
  padding: 6rem 0;
  background: var(--ivory-warm);
  position: relative;
}

.previsit-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.previsit-features {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.previsit-features li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.pf-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--emerald-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.pf-icon svg {
  width: 14px;
  height: 14px;
  color: var(--emerald);
}

/* ================================================================
   NATURAL LANGUAGE QUERIES (Scenario Switcher)
   ================================================================ */
.queries {
  padding: 6rem 0;
}

.query-demo {
  display: grid;
  grid-template-columns: 0.42fr 0.58fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.query-prompts {
  display: grid;
  gap: 0.6rem;
}

.query-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  background: var(--surface-strong);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.query-btn:hover {
  border-color: var(--emerald);
  color: var(--emerald-deep);
}

.query-btn.is-active {
  border-color: var(--emerald);
  background: var(--emerald-light);
  color: var(--emerald-deep);
  font-weight: 600;
}

.query-result {
  padding: 2rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}

.qr-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}

.qr-question {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.qr-summary {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.qr-translation {
  padding: 0.85rem 1rem;
  background: var(--ink);
  color: #cde4d4;
  border-radius: var(--r-md);
  font-family: var(--f-mono);
  font-size: 0.82rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
}

.qr-translation .tl-label {
  display: block;
  font-family: var(--f-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(205,228,212,0.5);
  margin-bottom: 0.3rem;
}

.qr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.qr-tag {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--emerald-light);
  color: var(--emerald-deep);
  font-size: 0.72rem;
  font-weight: 600;
}

.query-result {
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.query-result.is-swapping {
  opacity: 0.7;
  transform: translateY(3px);
}

/* ================================================================
   CARE GAPS
   ================================================================ */
.gaps {
  padding: 6rem 0;
  background: var(--ivory-warm);
}

.gap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.gap-card {
  padding: 1.5rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  border-left: 4px solid transparent;
  transition: transform 0.25s, box-shadow 0.25s;
}

.gap-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.gap-card[data-type="screening"] { border-left-color: var(--red-clinical); }
.gap-card[data-type="lab"] { border-left-color: var(--amber-clinical); }
.gap-card[data-type="immunization"] { border-left-color: var(--blue-clinical); }
.gap-card[data-type="follow-up"] { border-left-color: var(--green-clinical); }

.gap-type {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.gap-card[data-type="screening"] .gap-type { color: var(--red-clinical); }
.gap-card[data-type="lab"] .gap-type { color: var(--amber-clinical); }
.gap-card[data-type="immunization"] .gap-type { color: var(--blue-clinical); }
.gap-card[data-type="follow-up"] .gap-type { color: var(--green-clinical); }

.gap-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.gap-callout {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, var(--emerald-light), var(--accent-light));
  border: 1px solid rgba(10,104,71,0.12);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.gap-callout-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.gap-callout p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

.gap-callout strong { color: var(--emerald-deep); }

/* ================================================================
   RISK STRATIFICATION
   ================================================================ */
.risk {
  padding: 6rem 0;
}

.risk-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.risk-tiers {
  display: grid;
  gap: 0.75rem;
}

.risk-tier {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.tier-indicator {
  width: 10px;
  height: 40px;
  border-radius: 5px;
}

.tier-indicator.critical { background: var(--red-clinical); }
.tier-indicator.high { background: var(--amber-clinical); }
.tier-indicator.moderate { background: var(--blue-clinical); }
.tier-indicator.low { background: var(--green-clinical); }

.tier-content h4 {
  font-size: 0.92rem;
  font-weight: 700;
}

.tier-content p {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.trajectory-panel {
  padding: 2rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.trajectory-panel h3 {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.trajectory-panel > p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.trajectory-items {
  display: grid;
  gap: 0.75rem;
}

.trajectory-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--r-md);
}

.trajectory-item.improving { background: rgba(30,132,73,0.08); }
.trajectory-item.stable { background: rgba(36,113,163,0.08); }
.trajectory-item.worsening { background: rgba(192,57,43,0.08); }

.traj-arrow {
  font-size: 1.3rem;
  font-weight: 700;
}

.improving .traj-arrow { color: var(--green-clinical); }
.stable .traj-arrow { color: var(--blue-clinical); }
.worsening .traj-arrow { color: var(--red-clinical); }

.traj-info h4 { font-size: 0.88rem; font-weight: 700; }
.traj-info p { font-size: 0.78rem; color: var(--ink-muted); }

/* ================================================================
   FOLLOW-UP INTEGRITY
   ================================================================ */
.followup {
  padding: 6rem 0;
  background: var(--ivory-warm);
}

.followup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.fu-tracking {
  display: grid;
  gap: 0.6rem;
}

.fu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.fu-arrow {
  color: var(--emerald);
  font-weight: 700;
  flex-shrink: 0;
}

.imm-panel {
  padding: 2rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.imm-panel h3 {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.imm-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.imm-row:last-child { border-bottom: 0; }

.imm-window {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--emerald);
}

.imm-detail {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* ================================================================
   POPULATION HEALTH
   ================================================================ */
.population {
  padding: 6rem 0;
  background: var(--emerald-deep);
  color: #fff;
  position: relative;
}

.pop-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.pop-metric {
  padding: 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  text-align: center;
}

.pop-metric .pm-num {
  font-family: var(--f-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 900;
  line-height: 1;
  display: block;
}

.pop-metric .pm-label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
}

.pop-metric .pm-delta {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
}

.pop-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.pop-feature {
  padding: 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--r-lg);
}

.pop-feature h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pop-feature p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.55;
}

/* ================================================================
   NOTE SEARCH
   ================================================================ */
.notesearch {
  padding: 6rem 0;
}

.ns-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 2rem;
}

.ns-step {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  position: relative;
}

.ns-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.ns-step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.ns-step p {
  font-size: 0.8rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Connector arrows between steps */
.ns-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--emerald);
  z-index: 1;
}

.ns-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.75rem;
  list-style: none;
}

.ns-examples li {
  padding: 0.85rem 1.1rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--ink-soft);
  transition: border-color 0.2s, transform 0.2s;
}

.ns-examples li:hover {
  border-color: var(--emerald);
  transform: translateX(4px);
}

.ns-examples li::before {
  content: '"';
  color: var(--emerald);
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-right: 0.15rem;
}

/* ================================================================
   SECURITY
   ================================================================ */
.security {
  padding: 6rem 0;
  background: var(--ivory-warm);
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
}

.sec-card {
  padding: 1.75rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.sec-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--emerald-light);
  color: var(--emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.sec-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.sec-card p {
  font-size: 0.82rem;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ================================================================
   TIMELINE / IMPLEMENTATION
   ================================================================ */
.timeline {
  padding: 6rem 0;
}

.tl-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 2.5rem;
  position: relative;
}

/* Horizontal connector line */
.tl-track::before {
  content: '';
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  right: 1.2rem;
  height: 3px;
  background: linear-gradient(90deg, var(--emerald), var(--emerald-deep));
  border-radius: 2px;
}

.tl-phase {
  text-align: center;
  padding: 0 1rem;
  position: relative;
}

.tl-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  position: relative;
  z-index: 1;
  border: 3px solid var(--ivory);
  margin-bottom: 1rem;
}

.tl-window {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--emerald);
  margin-bottom: 0.3rem;
}

.tl-phase h3 {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.tl-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--emerald-light), var(--accent-light));
  border: 1px solid rgba(10,104,71,0.12);
  border-radius: var(--r-xl);
  text-align: center;
}

.tl-banner .tl-big {
  font-family: var(--f-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--emerald-deep);
  line-height: 1;
}

.tl-banner p {
  font-size: 1rem;
  color: var(--ink-soft);
  text-align: left;
  max-width: 300px;
}

/* ================================================================
   CTA / CONTACT
   ================================================================ */
.cta {
  padding: 6rem 0 4rem;
}

.cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  padding: 3.5rem;
  background: var(--emerald-deep);
  border-radius: var(--r-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.04), transparent);
  pointer-events: none;
}

.cta-copy { position: relative; z-index: 1; }

.cta-copy h2 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  max-width: 14ch;
}

.cta-copy p {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  max-width: 440px;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.btn-cta-primary {
  background: #fff;
  color: var(--emerald-deep);
  border-color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.btn-cta-primary:hover {
  background: var(--emerald-light);
  border-color: var(--emerald-light);
  transform: translateY(-2px);
}

.btn-cta-outline {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.25);
}

.btn-cta-outline:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}

.cta-email {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}

.cta-email a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-brand-text {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.footer-brand-text strong {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.82rem;
  color: var(--ink-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--emerald); }

/* ================================================================
   SCROLL ANIMATIONS
   ================================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.35s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .float-query { animation: none; }
  .btn, .cap-card, .gap-card, .ns-examples li, .query-btn, .query-result { transition: none; }
}

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero { min-height: auto; padding: 6rem 0 3rem; }
  .hero::after { display: none; }

  .float-query { display: none; }

  .cap-grid,
  .gap-grid,
  .security-grid,
  .pop-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .previsit-grid,
  .query-demo,
  .risk-grid,
  .followup-grid {
    grid-template-columns: 1fr;
  }

  .ns-stepper { grid-template-columns: repeat(2, 1fr); }
  .ns-step:not(:last-child)::after { display: none; }

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

  .tl-track { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .tl-track::before { display: none; }

  .cta-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .cta-copy h2 { max-width: none; }
}

@media (max-width: 680px) {
  .header-inner { height: 60px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1rem;
    background: rgba(250,248,244,0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.6rem 0.5rem; }
  .nav-cta { margin-left: 0 !important; align-self: stretch; text-align: center; }

  .nav-toggle { display: flex; }

  .hero h1 { font-size: clamp(2.2rem, 8vw, 3.4rem); }
  .hero-proof { flex-direction: column; gap: 0.5rem; }

  .stats-row,
  .cap-grid,
  .gap-grid,
  .security-grid,
  .pop-metrics,
  .pop-features,
  .ns-stepper,
  .ns-examples {
    grid-template-columns: 1fr;
  }

  .tl-track { grid-template-columns: 1fr; gap: 1.5rem; }

  .brief-grid { grid-template-columns: 1fr; }

  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }

  .cta-card { padding: 2rem 1.5rem; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; }

  .tl-banner { flex-direction: column; gap: 0.75rem; }
  .tl-banner p { text-align: center; }
}
