/* ML Health AI — shared site styles */
:root {
  --primary: #0F2D5C;
  --primary-900: #081B3D;
  --primary-700: #13366E;
  --accent: #2563EB;
  --accent-600: #1D4FD7;
  --ink: #0B1324;
  --ink-2: #334155;
  --ink-3: #64748B;
  --line: #E2E6EE;
  --surface: #F3F4F7;
  --surface-2: #FAFAFB;
  --white: #FFFFFF;
  --amber-bg: #FCEBBD;
  --amber-ink: #7A5A14;
  --success: #0E9F6E;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15,45,92,0.06), 0 1px 1px rgba(15,45,92,0.04);
  --shadow: 0 4px 14px rgba(15,45,92,0.08), 0 1px 2px rgba(15,45,92,0.04);
  --shadow-lg: 0 20px 50px rgba(15,45,92,0.16), 0 4px 12px rgba(15,45,92,0.08);
  --grid-color: rgba(255,255,255,0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'ss01', 'cv11';
}
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 32px; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px; letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-tag {
  font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 999px;
  background: var(--surface); color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.04em; margin-left: 2px;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; position: relative; padding: 4px 0; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); font-weight: 600; }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px;
  height: 2px; background: var(--accent); border-radius: 2px;
}
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: all 0.15s ease; font-family: inherit; white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 1px 2px rgba(37,99,235,0.3);
}
.btn-primary:hover { background: var(--accent-600); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,0.35); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-dark { background: #fff; color: var(--primary); }
.btn-dark:hover { background: #f0f3f9; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

/* ── PAGE HEADER (used on inner pages) ── */
.page-header {
  position: relative;
  background: var(--primary);
  color: #fff;
  padding: 88px 0 96px;
  overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 40%, rgba(0,0,0,0.9), transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 30% 40%, rgba(0,0,0,0.9), transparent 75%);
  pointer-events: none;
}
.page-header::after {
  content: ""; position: absolute;
  top: -30%; right: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.3), transparent 60%);
  filter: blur(40px); pointer-events: none;
}
.page-header-inner { position: relative; z-index: 2; max-width: 1100px; }
.breadcrumbs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: rgba(255,255,255,0.55);
  letter-spacing: 0.06em; margin-bottom: 24px; text-transform: uppercase;
}
.breadcrumbs a { color: rgba(255,255,255,0.7); text-decoration: none; }
.breadcrumbs a:hover { color: #fff; }
h1.page-title {
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.04; font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.page-lede {
  font-size: 19px;
  color: rgba(255,255,255,0.78);
  max-width: 820px;
  margin: 0;
  text-wrap: pretty;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #7FB3FF; box-shadow: 0 0 0 4px rgba(127,179,255,0.2);
}

/* Page-header split layout with a right-rail info card */
.page-header-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 56px;
  align-items: start;
  max-width: none !important;
}
.page-header-main { min-width: 0; }
.ph-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 24px 26px;
  backdrop-filter: blur(4px);
}
.ph-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ph-card-rows { display: flex; flex-direction: column; gap: 12px; }
.ph-card-row {
  display: grid;
  grid-template-columns: 1fr 20px auto;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
}
.ph-card-name { font-weight: 600; color: #fff; letter-spacing: -0.01em; }
.ph-card-sep { color: rgba(255,255,255,0.3); text-align: center; }
.ph-card-note { color: rgba(255,255,255,0.68); text-align: right; }
@media (max-width: 960px) {
  .page-header-split { grid-template-columns: 1fr; gap: 36px; }
  .ph-card { max-width: 520px; }
  .ph-card-note { text-align: left; }
}

/* ── SECTIONS ── */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-eyebrow {
  display: inline-block; font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1; font-weight: 700;
  letter-spacing: -0.03em; margin: 0 0 18px;
  color: var(--ink); text-wrap: balance;
}
h3 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.015em;
  margin: 0 0 10px; color: var(--ink);
}
.section-sub {
  font-size: 18px; color: var(--ink-2);
  max-width: 580px; margin: 0 auto;
  text-wrap: pretty;
}
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── CTA FOOTER BAND ── */
.cta-section { padding: 80px 0 120px; }
.cta-card {
  background: var(--primary); color: #fff;
  border-radius: 20px;
  padding: 64px 56px;
  position: relative; overflow: hidden; text-align: center;
}
.cta-card::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(0,0,0,0.9), transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(0,0,0,0.9), transparent 80%);
}
.cta-card > * { position: relative; z-index: 2; }
.cta-card h2 { color: #fff; margin: 0 auto 14px; max-width: 640px; }
.cta-card p { color: rgba(255,255,255,0.75); max-width: 480px; margin: 0 auto 32px; font-size: 17px; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  background: var(--primary-900); color: rgba(255,255,255,0.7);
  padding: 64px 0 32px; font-size: 13px;
}
.foot-grid {
  display: grid; grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px; margin-bottom: 48px;
}
.foot-brand { max-width: 300px; }
.foot-brand .brand-mark { background: #fff; color: var(--primary); }
.foot-brand .brand-name { color: #fff; }
.foot-brand p { margin: 14px 0 0; color: rgba(255,255,255,0.5); font-size: 13px; }
.foot-col h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.45); margin: 0 0 16px; font-weight: 600;
}
.foot-col a {
  display: block; text-decoration: none;
  color: rgba(255,255,255,0.78); padding: 5px 0;
}
.foot-col a:hover { color: #fff; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  color: rgba(255,255,255,0.4); font-size: 12px;
}

/* ── Demo / Calendly modal ── */
.demo-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
}
.demo-modal.open { display: flex; }
.demo-backdrop {
  position: absolute; inset: 0;
  background: rgba(15,45,92,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: demo-fade 0.2s ease;
}
.demo-panel {
  position: relative;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 40px 80px rgba(15,45,92,0.35);
  width: min(960px, 100%);
  height: min(760px, 92vh);
  display: grid; grid-template-rows: auto 1fr auto;
  overflow: hidden;
  animation: demo-pop 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
.demo-head {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
}
.demo-head h3 { margin: 4px 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.demo-head p { margin: 0; font-size: 14px; color: var(--ink-2); max-width: 580px; line-height: 1.55; }
.demo-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.demo-close {
  background: var(--surface); border: none; border-radius: 50%;
  width: 36px; height: 36px; font-size: 22px; color: var(--ink-2);
  cursor: pointer; line-height: 1; display: grid; place-items: center;
  flex: 0 0 36px;
}
.demo-close:hover { background: var(--line); color: var(--primary); }
.demo-embed { background: var(--surface); overflow: hidden; }
.demo-embed .calendly-inline-widget { width: 100%; height: 100%; }
.demo-foot { padding: 14px 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); text-align: center; background: var(--surface-2); }
.demo-foot a { color: var(--accent); font-weight: 600; }

@keyframes demo-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes demo-pop { from { opacity: 0; transform: translateY(8px) scale(0.98) } to { opacity: 1; transform: none } }

@media (max-width: 600px) {
  .demo-modal { padding: 0; }
  .demo-panel { height: 100vh; border-radius: 0; }
  .demo-head { padding: 20px 20px 14px; }
  .demo-foot { padding: 12px 20px; }
}

/* ── FAQ ── */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-btn {
  width: 100%; padding: 22px 0;
  background: none; border: none;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  cursor: pointer; font-family: inherit;
  font-size: 17px; font-weight: 600; color: var(--ink);
  text-align: left; letter-spacing: -0.01em;
}
.faq-btn:hover { color: var(--primary); }
.faq-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface);
  display: grid; place-items: center;
  font-size: 16px; color: var(--ink-2);
  flex: 0 0 26px;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--primary); color: #fff; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
.faq-item.open .faq-answer { max-height: 600px; }
.faq-answer-inner { padding: 0 0 24px; color: var(--ink-2); font-size: 15px; max-width: 720px; line-height: 1.65; }
.faq-answer-inner p { margin: 0 0 12px; }
.faq-answer-inner p:last-child { margin: 0; }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: all 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Utility cards ── */
.tile {
  background: #fff; border: 1px solid var(--line);
  border-radius: 12px; padding: 28px;
  transition: all 0.2s ease;
}
.tile:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.tile-icon {
  width: 40px; height: 40px;
  background: #EEF2FB; color: var(--primary);
  border-radius: 9px;
  display: grid; place-items: center;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 13px;
}
.tile-title { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 6px; }
.tile-desc { font-size: 14px; color: var(--ink-2); line-height: 1.55; }

.mono { font-family: 'JetBrains Mono', monospace; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
