/* ============================================================
   ESVI Healthcare Services (EHS) — Design Tokens
   Display: Source Serif 4 (editorial, trust)
   Body:    IBM Plex Sans (clean, institutional)
   Label:   IBM Plex Mono (data / registry feel)
   Palette: deep navy + coordination green + warm parchment
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600;8..60,700&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --navy: #123A5C;
  --navy-dark: #0A2740;
  --navy-tint: #E7EEF4;
  --green: #1E7B4D;
  --green-dark: #145636;
  --green-tint: #E6F2EA;
  --amber: #B9822F;
  --amber-tint: #FBF2E3;
  --cream: #FBFAF6;
  --paper: #FFFFFF;
  --ink: #16211C;
  --ink-soft: #47544D;
  --line: #DCE3DD;

  --display: "Source Serif 4", Georgia, serif;
  --body: "IBM Plex Sans", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", monospace;

  --radius: 4px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--green-dark);
  display: inline-block;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--navy-dark);
  margin: 0 0 0.4em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,246,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { line-height: 1.1; }
.brand-text strong {
  font-family: var(--display); font-size: 1.15rem; color: var(--navy-dark); display: block;
}
.brand-text span {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em;
  color: var(--ink-soft); text-transform: uppercase;
}

nav.main-nav { display: flex; gap: 30px; align-items: center; }
nav.main-nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 500;
  color: var(--ink-soft); position: relative; padding: 4px 0;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--navy-dark); }
nav.main-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--green);
}
.nav-cta {
  background: var(--green); color: #fff !important;
  padding: 9px 18px; border-radius: var(--radius);
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--green-dark); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius);
  font-family: var(--body); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); }
.btn-secondary { background: transparent; color: var(--navy-dark); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy-tint); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.bg-white { background: var(--paper); }
.bg-navy { background: var(--navy-dark); color: #fff; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(255,255,255,0.78); }
.bg-navy .eyebrow, .bg-navy .eyebrow::before { color: #8FC7A6; background: #8FC7A6; }
.bg-tint { background: var(--navy-tint); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero-actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats div strong {
  display: block; font-family: var(--display); font-size: 1.5rem; color: var(--navy-dark);
}
.hero-stats div span { font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Coordination Hub diagram (signature element) ---------- */
.hub-diagram {
  position: relative; width: 100%; aspect-ratio: 1/1; max-width: 480px; margin: 0 auto;
}
.hub-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 132px; height: 132px; border-radius: 50%;
  background: var(--navy);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; text-align: center; z-index: 3;
  box-shadow: 0 0 0 8px rgba(18,58,92,0.08), 0 0 0 16px rgba(18,58,92,0.05);
  animation: pulse 3.2s ease-in-out infinite;
}
.hub-center strong { font-family: var(--display); font-size: 0.95rem; line-height: 1.2; }
.hub-center span { font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.08em; opacity: 0.75; margin-top: 4px; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(18,58,92,0.08), 0 0 0 16px rgba(18,58,92,0.05); }
  50% { box-shadow: 0 0 0 12px rgba(18,58,92,0.12), 0 0 0 24px rgba(18,58,92,0.06); }
}
.hub-spoke {
  position: absolute; width: 108px; text-align: center; z-index: 2;
}
.hub-spoke .spoke-dot {
  width: 52px; height: 52px; border-radius: 50%; background: var(--paper);
  border: 1.5px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px; box-shadow: 0 4px 14px rgba(18,58,92,0.08);
}
.hub-spoke .spoke-dot svg { width: 22px; height: 22px; color: var(--green-dark); }
.hub-spoke span { font-size: 0.72rem; font-weight: 600; color: var(--navy-dark); }
.hub-lines { position: absolute; inset: 0; z-index: 1; }
.hub-lines line { stroke: var(--line); stroke-width: 1.5; }
.hub-lines .draw { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* positions set inline per page via style attr; six-spoke default */
.pos-0 { top: 0%; left: 50%; transform: translate(-50%, 0); }
.pos-1 { top: 25%; left: 100%; transform: translate(-100%, -50%); }
.pos-2 { top: 75%; left: 100%; transform: translate(-100%, -50%); }
.pos-3 { top: 100%; left: 50%; transform: translate(-50%, -100%); }
.pos-4 { top: 75%; left: 0%; transform: translate(0, -50%); }
.pos-5 { top: 25%; left: 0%; transform: translate(0, -50%); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; height: 100%;
}
.card .icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--green-tint);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card .icon svg { width: 22px; height: 22px; color: var(--green-dark); }
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: 0.94rem; }

/* ---------- Numbered flow ---------- */
.flow { display: flex; flex-wrap: wrap; gap: 0; counter-reset: step; }
.flow-step {
  flex: 1 1 150px; position: relative; padding: 0 18px 0 0; counter-increment: step;
}
.flow-step .num {
  font-family: var(--mono); font-size: 0.75rem; color: var(--green-dark);
  border: 1px solid var(--green); border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.flow-step h3 { font-size: 1rem; margin-bottom: 4px; }
.flow-step p { font-size: 0.88rem; }

/* ---------- Table (specialties, comparisons) ---------- */
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th, table.data-table td {
  text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 0.94rem;
}
table.data-table th {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 500;
}

/* ---------- Pill / tag ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--amber-tint); color: var(--amber);
  border: 1px solid #E7CFA0; font-family: var(--mono); font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}

/* ---------- Quote ---------- */
.quote {
  border-left: 3px solid var(--green); padding-left: 24px; margin: 0;
  font-family: var(--display); font-size: 1.3rem; color: var(--navy-dark); font-style: italic;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--green-dark); color: #fff; border-radius: var(--radius);
  padding: 52px 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------- Values strip ---------- */
.values-strip {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px;
  border-top: 1px solid var(--line); padding-top: 28px; margin-top: 10px;
}
.values-strip div { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
.values-strip svg { width: 16px; height: 16px; color: var(--green-dark); }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.75); padding: 56px 0 28px; }
footer.site-footer h4 { color: #fff; font-family: var(--body); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px; }
footer.site-footer a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.92rem; }
footer.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 22px;
  display: flex; justify-content: space-between; font-size: 0.8rem; flex-wrap: wrap; gap: 10px;
}

/* ---------- Page header (interior pages) ---------- */
.page-header { padding: 56px 0 44px; border-bottom: 1px solid var(--line); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.main-nav { position: fixed; top: 76px; left: 0; right: 0; background: var(--cream);
    flex-direction: column; align-items: flex-start; padding: 20px 32px; border-bottom: 1px solid var(--line);
    display: none; gap: 16px; }
  nav.main-nav.open { display: flex; }
  .nav-toggle { display: block; }
}
@media (max-width: 560px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .flow { flex-direction: column; }
  section { padding: 60px 0; }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hub-center { animation: none; }
  .hub-lines .draw { animation: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--green); outline-offset: 2px;
}
