/* Electus Management Group — shared stylesheet.
   Used by index.html AND every standalone page (book, network, 404) so the
   chrome, tokens, and typography can never drift apart. Edit here only. */

:root {
  --brand-h-blue: 232;
  --brand-h-green: 145;

  --bg:        oklch(98.5% 0.006 var(--brand-h-blue));
  --bg-elev:   oklch(100% 0.004 var(--brand-h-blue));
  --bg-sunk:   oklch(96% 0.008 var(--brand-h-blue));
  --surface:   oklch(94% 0.012 var(--brand-h-blue));
  --line:      oklch(89% 0.014 var(--brand-h-blue));
  --line-soft: oklch(93% 0.01 var(--brand-h-blue));

  --ink:       oklch(22% 0.025 var(--brand-h-blue));
  --ink-2:     oklch(38% 0.022 var(--brand-h-blue));
  --ink-3:     oklch(54% 0.018 var(--brand-h-blue));
  --ink-mute:  oklch(64% 0.016 var(--brand-h-blue));

  --brand:     oklch(38% 0.16 var(--brand-h-blue));
  --brand-2:   oklch(52% 0.14 var(--brand-h-blue));
  --brand-soft:oklch(94% 0.03 var(--brand-h-blue));
  --accent:    oklch(58% 0.16 var(--brand-h-green));
  --accent-2:  oklch(68% 0.18 var(--brand-h-green));
  --accent-soft: oklch(94% 0.04 var(--brand-h-green));
  --error:       oklch(52% 0.18 25);
  --error-soft:  oklch(95% 0.04 25);

  --fs-display: clamp(2.75rem, 1.6rem + 5.2vw, 5.75rem);
  --fs-h1:      clamp(2.1rem, 1.4rem + 3vw, 3.75rem);
  --fs-h2:      clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  --fs-body:    1.0625rem;

  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4.5rem;
  --space-4xl: 7rem;

  --ease-spring: linear(
    0, 0.402 7.4%, 0.711 15.3%, 0.929 23.7%,
    1.008 28.2%, 1.067 33.1%, 1.099 38.3%,
    1.103 43.7%, 1.077 49.4%, 1.027 55.3%,
    0.997 61.5%, 0.984 68.2%, 0.991 75.5%, 1
  );
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);

  --dur-fast: 200ms;
  --dur-med: 480ms;
  --dur-slow: 780ms;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --maxw: 1240px;
  --gutter: clamp(1.25rem, 0.7rem + 2.5vw, 2.5rem);
}

[data-theme="dark"] {
  --bg:        oklch(15% 0.018 var(--brand-h-blue));
  --bg-elev:   oklch(19% 0.022 var(--brand-h-blue));
  --bg-sunk:   oklch(12% 0.014 var(--brand-h-blue));
  --surface:   oklch(22% 0.024 var(--brand-h-blue));
  --line:      oklch(30% 0.026 var(--brand-h-blue));
  --line-soft: oklch(24% 0.02 var(--brand-h-blue));
  --ink:       oklch(96% 0.01 var(--brand-h-blue));
  --ink-2:     oklch(82% 0.016 var(--brand-h-blue));
  --ink-3:     oklch(68% 0.02 var(--brand-h-blue));
  --ink-mute:  oklch(56% 0.018 var(--brand-h-blue));
  --brand:     oklch(78% 0.12 var(--brand-h-blue));
  --brand-2:   oklch(70% 0.13 var(--brand-h-blue));
  --brand-soft:oklch(28% 0.05 var(--brand-h-blue));
  --accent:    oklch(74% 0.16 var(--brand-h-green));
  --accent-2:  oklch(80% 0.17 var(--brand-h-green));
  --accent-soft: oklch(28% 0.05 var(--brand-h-green));
  --error:       oklch(65% 0.16 25);
  --error-soft:  oklch(22% 0.06 25);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* iOS: prevent grey tap-highlight flash on every interactive element. */
  -webkit-tap-highlight-color: transparent;
  /* Tell mobile browsers explicitly that the page handles dark + light mode itself.
     Stops iOS Safari from auto-darkening transparent PNGs in dark mode. */
  color-scheme: dark light;
}
/* iOS Safari + notched devices: keep header / footer clear of the home indicator + dynamic island. */
.site-header, .site-footer { padding-left: max(var(--gutter), env(safe-area-inset-left));
                              padding-right: max(var(--gutter), env(safe-area-inset-right)); }
body { padding-bottom: env(safe-area-inset-bottom); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "ss01", "kern", "liga";
  transition: background-color var(--dur-med) var(--ease-out-quart), color var(--dur-med) var(--ease-out-quart);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0;
  color: var(--ink);
}
p { margin: 0; max-width: 65ch; }

.shell { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: color-mix(in oklch, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out-quart), backdrop-filter var(--dur-fast) var(--ease-out-quart);
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); }
/* Low-power devices: drop the blur on the sticky header too (matches #siteGlass behaviour) */
body.low-power .site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ── Under-construction ticker ──────────────────────────
   To toggle the banner, edit the `data-construction` attribute on <body> below:
     "on"  → banner is shown
     "off" → banner is hidden
   The banner code stays in place so you can flip it back any time. */
body[data-construction="off"] #construction-banner { display: none; }

#construction-banner {
  background: oklch(92% 0.22 100);
  color: oklch(24% 0.06 90);
  height: 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid oklch(80% 0.20 100);
}
[data-theme="dark"] #construction-banner {
  background: oklch(42% 0.14 95);
  color: oklch(92% 0.10 95);
  border-bottom-color: oklch(34% 0.12 95);
}
.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: ticker-scroll 22s linear infinite;
  will-change: transform;
}
.ticker-track span {
  font-family: 'Geist Mono', monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-inline: 2.5rem;
}
.ticker-icon {
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
}
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding-block: 0.95rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; font-family: 'Bricolage Grotesque', system-ui, sans-serif; color: var(--ink); }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; overflow: visible; flex-shrink: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-name { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.brand-name strong { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.025em; color: var(--ink); }
.brand-name small {
  font-family: 'Geist Mono', monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 400;
}

.nav-links { display: flex; gap: var(--space-xl); align-items: center; }
.nav-link { font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 0.9375rem; font-weight: 450; color: var(--ink-2); position: relative; padding-block: 0.375rem; transition: color var(--dur-fast) var(--ease-out-quart); }
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1.5px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 2px;
  animation: nav-underline 460ms var(--ease-spring); transform-origin: left center;
}
@keyframes nav-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.nav-actions { display: flex; align-items: center; gap: var(--space-sm); }
.theme-toggle, .nav-cta, .menu-btn {
  height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart), border-color var(--dur-fast) var(--ease-out-quart);
}
.theme-toggle, .menu-btn { width: 44px; border: 1px solid var(--line); color: var(--ink-2); }
.theme-toggle:hover, .menu-btn:hover { transform: scale(1.06); border-color: var(--brand); color: var(--brand); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle:focus-visible, .menu-btn:focus-visible, .nav-cta:focus-visible,
.btn:focus-visible, .ctrl-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav-cta { padding-inline: 1.125rem; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 0.9375rem; font-weight: 500; background: var(--ink); color: var(--bg); border: 1px solid var(--ink); }
.nav-cta:hover { transform: translateY(-1px) scale(1.02); }
.nav-cta:active { transform: translateY(0) scale(0.98); }

.menu-btn { display: none; }
@media (max-width: 880px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-cta { display: none; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-name strong { font-size: 1rem; }
  .brand-name small { font-size: 0.625rem; letter-spacing: 0.14em; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--bg);
  padding: 6rem var(--gutter) 3rem;
  transform: translateY(-100%);
  transition: transform var(--dur-med) var(--ease-out-expo);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.is-open { transform: translateY(0); }
.mobile-menu .nav-link { font-size: 1.75rem; padding-block: 1rem; border-bottom: 1px solid var(--line-soft); }
.mobile-menu-close { position: absolute; top: 1.5rem; right: var(--gutter); }

.page { animation: page-in 620ms var(--ease-out-expo) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.stagger > * { opacity: 0; transform: translateY(18px); animation: rise 720ms var(--ease-out-expo) forwards; }
.stagger > *:nth-child(1) { animation-delay: 80ms; }
.stagger > *:nth-child(2) { animation-delay: 180ms; }
.stagger > *:nth-child(3) { animation-delay: 280ms; }
.stagger > *:nth-child(4) { animation-delay: 380ms; }
.stagger > *:nth-child(5) { animation-delay: 480ms; }
.stagger > *:nth-child(6) { animation-delay: 580ms; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.reveal       { opacity: 0; transform: translateY(24px);  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-38px); transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo); }
.reveal-right { opacity: 0; transform: translateX(38px);  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo); }
.reveal-left.is-in, .reveal-right.is-in { opacity: 1; transform: translateX(0); }

/* Scroll progress bar */
#scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  pointer-events: none; will-change: transform;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 60ms linear;
}

/* Full-page animated background — fixed so it covers every route */
#siteBg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  will-change: transform;
}
/* Frosted glass layer — sits over the animation, under the content */
#siteGlass {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(25px) saturate(160%);
  -webkit-backdrop-filter: blur(25px) saturate(160%);
  background: color-mix(in oklch, var(--bg) 45%, transparent);
}
/* Low-power: drop the blur entirely — re-blurring a full-screen element every
   rAF frame is the main software-rendering bottleneck. Plain tint only. */
#siteGlass.low-power {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: color-mix(in oklch, var(--bg) 55%, transparent);
}

.hero { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero-eyebrow { font-family: 'Geist Mono', monospace; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brand); margin-bottom: var(--space-lg); display: inline-flex; align-items: center; gap: 0.625rem; }
.hero-eyebrow::before { content: ""; width: 24px; height: 1px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.hero-title { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.035em; font-weight: 400; max-width: 18ch; margin-bottom: var(--space-lg); }
.hero-title em { font-style: italic; font-family: 'Source Serif 4', serif; font-weight: 400; color: var(--brand); letter-spacing: -0.015em; }
.hero-title em.green { color: var(--accent); }
.hero-lede { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); max-width: 52ch; margin-bottom: var(--space-2xl); }
.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }

.btn { display: inline-flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1.5rem; border-radius: 999px; font-family: 'Bricolage Grotesque', system-ui, sans-serif; font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.005em; border: 1px solid transparent; transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) var(--ease-out-quart), color var(--dur-fast) var(--ease-out-quart), border-color var(--dur-fast) var(--ease-out-quart); cursor: pointer; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }
.btn-primary:active { transform: translateY(0) scale(0.98); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px) scale(1.02); }
.btn-ghost:active { transform: translateY(0) scale(0.98); }
.btn .arr { transition: transform var(--dur-fast) var(--ease-spring); }
.btn:hover .arr { transform: translateX(3px); }

.hero-image {
  position: absolute; right: calc(-1 * var(--gutter)); top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 38vw, 520px);
  height: clamp(340px, 50vw, 660px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 24%);
  mask-image: linear-gradient(to right, transparent 0%, black 24%);
}
.hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(0.88) saturate(0.85); }
/* float replaced by JS parallax — see setupParallax() */
.hero-image { will-change: transform; }
@media (max-width: 880px) { .hero-image { display: none; } }

.about-photo {
  width: 100%; aspect-ratio: 4/5; max-height: 480px;
  object-fit: cover; object-position: center top;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  display: block;
}

.section { padding-block: var(--space-4xl); position: relative; }
.section-narrow { padding-block: var(--space-3xl); }
.section-head { display: grid; grid-template-columns: 1fr; gap: var(--space-md); margin-bottom: var(--space-3xl); max-width: 880px; }
.section-eyebrow { font-family: 'Geist Mono', monospace; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-mute); display: inline-flex; align-items: center; gap: 0.625rem; }
.section-eyebrow::before { content: ""; width: 18px; height: 1px; background: linear-gradient(90deg, var(--brand), var(--accent)); }
.section-title { font-size: var(--fs-h1); letter-spacing: -0.03em; font-weight: 400; line-height: 1.05; max-width: 22ch; }
.section-title em { font-style: italic; font-family: 'Source Serif 4', serif; color: var(--brand); }
.section-title em.green { color: var(--accent); }
.section-sub { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; margin-top: var(--space-sm); }

/* Four pillars. The gridlines are the container's background showing through
   1px gaps, which means any empty cell renders as a solid block of line
   colour. auto-fit produced a 3-column layout in a middle band of widths,
   leaving two filled cells of nothing in the second row. Column counts must
   therefore divide the item count exactly: 4, 2 or 1, never 3.
   If a fifth pillar is ever added, revisit these breakpoints. */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; }
@media (max-width: 1120px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--bg-elev); padding: var(--space-2xl) var(--space-xl); display: flex; flex-direction: column; gap: var(--space-md); transition: background var(--dur-fast) var(--ease-out-quart); position: relative; }
.pillar:hover { background: var(--bg-sunk); }
.pillar:nth-child(1) .pillar-num { color: var(--brand); }
.pillar:nth-child(2) .pillar-num { color: color-mix(in oklch, var(--brand), var(--accent) 35%); }
.pillar:nth-child(3) .pillar-num { color: color-mix(in oklch, var(--brand), var(--accent) 65%); }
.pillar:nth-child(4) .pillar-num { color: var(--accent); }
.pillar-num { font-family: 'Geist Mono', monospace; font-size: 0.75rem; letter-spacing: 0.12em; }
.pillar-title { font-size: 1.375rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.pillar-body { font-size: 1rem; color: var(--ink-2); line-height: 1.55; }

.services-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-md); }
.service { padding: var(--space-xl); background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--radius-md); display: flex; flex-direction: column; gap: var(--space-sm); transition: transform var(--dur-fast) var(--ease-spring), border-color var(--dur-fast) var(--ease-out-quart); cursor: default; }
.service:hover { transform: translateY(-3px); border-color: var(--brand); }
.service-num { font-family: 'Geist Mono', monospace; font-size: 0.75rem; color: var(--ink-mute); letter-spacing: 0.1em; }
.service-title { font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
.service-body { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.5; }

/* Specialties grid with hover-to-reveal */
.specialties { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (max-width: 1000px) { .specialties { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .specialties { grid-template-columns: 1fr; } }

.specialty {
  padding: var(--space-xl) var(--space-lg);
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 450; font-size: 1.0625rem; letter-spacing: -0.01em;
  position: relative; overflow: hidden;
  /* The hover description is absolutely positioned, so it contributes nothing
     to the cell's height — the cell has to be tall enough on its own. At 110px
     the longest descriptions filled the box edge to edge and were clipped
     outright in the narrowest 4-column layout. */
  min-height: 172px; cursor: default;
  transition: background var(--dur-fast) var(--ease-out-quart);
}
.specialty-content {
  display: flex; align-items: flex-start; gap: var(--space-md); width: 100%;
  transition: opacity var(--dur-fast) var(--ease-out-quart), transform var(--dur-med) var(--ease-out-expo);
}
.specialty-num { font-family: 'Geist Mono', monospace; font-size: 0.75rem; color: var(--accent); letter-spacing: 0.08em; min-width: 26px; flex-shrink: 0; padding-top: 4px; }
.specialty-name { flex: 1; padding-top: 2px; }
.specialty-desc {
  position: absolute; inset: 0;
  padding: var(--space-lg);
  /* Deep navy → deep teal-green gradient. Both stops sit at ~25-28% lightness so
     the near-white body text reads cleanly in either theme. */
  background: linear-gradient(135deg, oklch(28% 0.08 232), oklch(25% 0.07 175));
  color: oklch(96% 0.01 232);
  font-family: 'Source Serif 4', serif;
  font-size: 0.9375rem; font-weight: 400; line-height: 1.5; letter-spacing: -0.005em;
  display: flex; align-items: center;
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--dur-fast) var(--ease-out-quart), transform var(--dur-med) var(--ease-out-expo);
  pointer-events: none;
}
.specialty:hover { background: var(--bg-sunk); }
.specialty:hover .specialty-content { opacity: 0; transform: translateY(-6px); }
.specialty:hover .specialty-desc { opacity: 1; transform: translateY(0); }
.specialty:focus-within .specialty-content { opacity: 0; transform: translateY(-6px); }
.specialty:focus-within .specialty-desc { opacity: 1; transform: translateY(0); }

.about-hero { padding-block: clamp(3rem, 2rem + 4vw, 5rem) var(--space-2xl); }
.about-hero h1 { font-size: var(--fs-display); letter-spacing: -0.035em; font-weight: 400; line-height: 1.04; max-width: 16ch; margin-bottom: var(--space-lg); }
.about-hero h1 em { font-style: italic; font-family: 'Source Serif 4', serif; color: var(--brand); }
.about-hero h1 em.green { color: var(--accent); }

.split { display: grid; grid-template-columns: 1fr 1.4fr; gap: var(--space-3xl); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: var(--space-xl); } }

.prose p { font-size: 1.125rem; line-height: 1.6; color: var(--ink-2); margin-bottom: var(--space-md); max-width: 62ch; }
.prose p:first-child::first-letter { font-family: 'Bricolage Grotesque', sans-serif; font-size: 3.5em; float: left; line-height: 0.85; padding-right: 0.08em; padding-top: 0.06em; color: var(--brand); font-weight: 500; }

.values { display: grid; gap: 0; }
.value { padding: var(--space-lg) 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr; gap: var(--space-lg); align-items: baseline; }
.value:last-child { border-bottom: 1px solid var(--line); }
.value-num { font-family: 'Geist Mono', monospace; font-size: 0.75rem; letter-spacing: 0.1em; }
.value:nth-child(1) .value-num { color: var(--brand); }
.value:nth-child(2) .value-num { color: color-mix(in oklch, var(--brand), var(--accent) 33%); }
.value:nth-child(3) .value-num { color: color-mix(in oklch, var(--brand), var(--accent) 66%); }
.value:nth-child(4) .value-num { color: var(--accent); }
.value-title { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.125rem; font-weight: 500; letter-spacing: -0.015em; margin-bottom: 0.25rem; }
.value-desc { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.55; }

/* Editorial "by the numbers" layout — replaces the legacy 4-up stat grid */
/* Scope list paired with an architectural image so the block fills the measure
   instead of trailing off into empty space on wide screens. */
.scope-wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-3xl); align-items: stretch; }
.scope-wrap .scope { max-width: none; }
.scope-figure { margin: 0; border-radius: var(--radius-lg); overflow: hidden; }
.scope-figure img {
  width: 100%; height: 100%; min-height: 520px; object-fit: cover; display: block;
  filter: brightness(0.78) saturate(0.9);
}
@media (max-width: 880px) {
  .scope-wrap { grid-template-columns: 1fr; gap: var(--space-xl); }
  .scope-figure img { min-height: 0; height: 260px; }
}

.scope { display: grid; gap: var(--space-2xl); max-width: 64ch; }
.scope-row { display: grid; grid-template-columns: 96px 1fr; gap: var(--space-xl); align-items: baseline; margin: 0; }
.scope-num { font-family: 'Source Serif 4', serif; font-style: italic; font-weight: 400; font-size: clamp(3.75rem, 6.5vw, 5.5rem); line-height: 0.9; letter-spacing: -0.04em; color: var(--brand); text-align: right; }
.scope-row:nth-child(2) .scope-num { color: color-mix(in oklch, var(--brand), var(--accent) 50%); }
.scope-row:nth-child(3) .scope-num { color: var(--accent); }
.scope-row:nth-child(4) .scope-num { color: oklch(62% 0.18 200); }
.scope-body { font-size: 1.0625rem; line-height: 1.55; color: var(--ink-2); }
.scope-key { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 0.375rem; }
@media (max-width: 560px) {
  .scope-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .scope-num { text-align: left; font-size: clamp(2.75rem, 11vw, 4rem); }
}

.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-3xl); }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: var(--space-xl); } }
.contact-info { display: grid; gap: var(--space-xl); }
.contact-row { display: grid; gap: 0.375rem; padding-block: var(--space-md); border-top: 1px solid var(--line); }
.contact-row:last-child { border-bottom: 1px solid var(--line); }
.contact-label { font-family: 'Geist Mono', monospace; font-size: 0.6875rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.contact-value { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.0625rem; font-weight: 450; letter-spacing: -0.015em; color: var(--ink); }
.contact-value a:hover { color: var(--brand); }

.dept-list { display: grid; gap: var(--space-sm); padding-top: var(--space-md); border-top: 1px solid var(--line); }
.dept-row { display: flex; justify-content: space-between; gap: var(--space-md); padding-block: var(--space-xs); font-size: 0.9375rem; flex-wrap: wrap; }
.dept-row .dept-name { font-family: 'Bricolage Grotesque', sans-serif; color: var(--ink); font-weight: 500; }
.dept-row a { color: var(--ink-2); transition: color var(--dur-fast) var(--ease-out-quart); padding-block: 0.75rem; display: inline-flex; align-items: center; min-height: 44px; }
.dept-row a:hover { color: var(--brand); }

/* Booking CTA card — replaced the old Web3Forms contact form. Patient-facing
   scheduling now goes through IntakeQ (/book); department email handles the rest. */
.contact-cta {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--space-2xl);
  display: grid; gap: var(--space-md); align-content: start;
}
.contact-cta-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; margin: 0; color: var(--ink);
}
.contact-cta-title em { font-style: italic; font-family: 'Source Serif 4', serif; color: var(--accent); }
.contact-cta-body { color: var(--ink-2); font-size: 1rem; line-height: 1.6; margin: 0; }
.contact-cta-note {
  color: var(--ink-3); font-size: 0.9375rem; line-height: 1.55; margin: 0;
  border-top: 1px solid var(--line-soft); padding-top: var(--space-md);
}

.form { background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: var(--space-2xl); display: grid; gap: var(--space-md); }
.field { display: grid; gap: 0.5rem; }
.field label { font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.8125rem; font-weight: 500; letter-spacing: -0.005em; color: var(--ink-2); }
.field input, .field textarea, .field select { font: inherit; font-size: 1rem; padding: 0.875rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); transition: border-color var(--dur-fast) var(--ease-out-quart), background var(--dur-fast) var(--ease-out-quart); font-family: 'Source Serif 4', serif; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand); background: var(--bg-elev); }
.field textarea { resize: vertical; min-height: 110px; }

.site-footer { border-top: 1px solid var(--line-soft); padding-block: var(--space-2xl); margin-top: var(--space-3xl); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 0.625rem; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.0625rem; font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
.foot-brand img { width: 30px; height: 30px; object-fit: contain; }
.foot-meta { font-family: 'Geist Mono', monospace; font-size: 0.75rem; color: var(--ink-mute); letter-spacing: 0.04em; }
.foot-links { display: flex; gap: var(--space-lg); font-size: 0.875rem; color: var(--ink-2); }
/* Expand tappable area to ≥44px without changing visual size (WCAG AA touch target). */
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0.5rem; }
.foot-links a:hover { color: var(--ink); }

::selection { background: var(--brand-soft); color: var(--ink); }

.skip-link {
  position: absolute; top: -100%; left: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: var(--brand); color: var(--bg-elev);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-size: 0.875rem; font-weight: 500; z-index: 200;
  transition: top var(--dur-fast) var(--ease-out-quart);
  text-decoration: none;
}
.skip-link:focus { top: 0; outline: 2px solid var(--accent); outline-offset: 2px; }

/* Global focus ring for keyboard navigation */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 3px; }
/* Form fields use border-color instead of outline */
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { outline: none; }

/* ── Word-reveal (hero + section titles) ──────────────── */
.wr {
  display: inline-block; overflow: hidden; vertical-align: bottom; line-height: 1.1;
  padding-inline: 0.06em; margin-inline: -0.06em;
  /* Extra clipping room below the baseline so descenders (y, g, j) in italic
     words like "physicians" / "in-house" / "logistics" aren't cut off at
     large heading sizes. The negative margin cancels the added height so
     line spacing/layout is unaffected. */
  padding-bottom: 0.22em;
  margin-bottom: -0.22em;
}
.w  { display: inline-block; animation: word-slide 750ms var(--ease-out-expo) both; }
/* Once split, the heading controls its own visibility — cancel any parent reveal interference */
.hero-title.is-split,
.section-title.is-split,
.about-hero h1.is-split { animation: none; opacity: 1; transform: none; transition: none; }
@keyframes word-slide { from { transform: translateX(-115%); } to { transform: translateX(0); } }

/* ── Eyebrow line draw ────────────────────────────────── */
.hero-eyebrow::before { width: 0; animation: line-extend 400ms 60ms var(--ease-out-expo) forwards; }
.reveal .section-eyebrow::before { width: 0; transition: width 500ms 160ms var(--ease-out-expo); }
.reveal.is-in .section-eyebrow::before { width: 18px; }
@keyframes line-extend { to { width: 24px; } }

/* ── Stagger containers: let children animate instead ─── */
.pillars.reveal, .services-list.reveal, .values.reveal,
.specialties.reveal, .scope.reveal {
  opacity: 1; transform: none; transition: none;
}

/* ── Base hidden state for stagger children ───────────── */
.pillar, .service, .value, .scope-row { opacity: 0; transform: translateY(22px); }
.specialty { opacity: 0; }

/* ── Shared child entrance keyframe ──────────────────── */
@keyframes rise-child {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-child { from { opacity: 0; } to { opacity: 1; } }

/* ── Trigger animations when parent gets .is-in ─────── */
.pillars.is-in .pillar,
.services-list.is-in .service,
.values.is-in .value,
.scope.is-in .scope-row { animation: rise-child 560ms var(--ease-out-expo) forwards; }

.specialties.is-in .specialty  { animation: fade-child 480ms var(--ease-out-expo) forwards; }

.pillars.is-in .pillar:nth-child(1)          { animation-delay:   0ms; }
.pillars.is-in .pillar:nth-child(2)          { animation-delay:  90ms; }
.pillars.is-in .pillar:nth-child(3)          { animation-delay: 180ms; }
.pillars.is-in .pillar:nth-child(4)          { animation-delay: 270ms; }

.services-list.is-in .service:nth-child(1)   { animation-delay:   0ms; }
.services-list.is-in .service:nth-child(2)   { animation-delay:  55ms; }
.services-list.is-in .service:nth-child(3)   { animation-delay: 110ms; }
.services-list.is-in .service:nth-child(4)   { animation-delay: 165ms; }
.services-list.is-in .service:nth-child(5)   { animation-delay: 220ms; }
.services-list.is-in .service:nth-child(6)   { animation-delay: 275ms; }
.services-list.is-in .service:nth-child(7)   { animation-delay: 330ms; }
.services-list.is-in .service:nth-child(8)   { animation-delay: 385ms; }
.services-list.is-in .service:nth-child(9)   { animation-delay: 440ms; }
.services-list.is-in .service:nth-child(10)  { animation-delay: 495ms; }

.values.is-in .value:nth-child(1)            { animation-delay:   0ms; }
.values.is-in .value:nth-child(2)            { animation-delay:  80ms; }
.values.is-in .value:nth-child(3)            { animation-delay: 160ms; }
.values.is-in .value:nth-child(4)            { animation-delay: 240ms; }

.specialties.is-in .specialty:nth-child(1)   { animation-delay:   0ms; }
.specialties.is-in .specialty:nth-child(2)   { animation-delay:  45ms; }
.specialties.is-in .specialty:nth-child(3)   { animation-delay:  90ms; }
.specialties.is-in .specialty:nth-child(4)   { animation-delay: 135ms; }
.specialties.is-in .specialty:nth-child(5)   { animation-delay: 180ms; }
.specialties.is-in .specialty:nth-child(6)   { animation-delay: 225ms; }
.specialties.is-in .specialty:nth-child(7)   { animation-delay: 270ms; }
.specialties.is-in .specialty:nth-child(8)   { animation-delay: 315ms; }
.specialties.is-in .specialty:nth-child(9)   { animation-delay: 360ms; }
.specialties.is-in .specialty:nth-child(10)  { animation-delay: 405ms; }

.scope.is-in .scope-row:nth-child(1) { animation-delay:   0ms; }
.scope.is-in .scope-row:nth-child(2) { animation-delay: 110ms; }
.scope.is-in .scope-row:nth-child(3) { animation-delay: 220ms; }
.scope.is-in .scope-row:nth-child(4) { animation-delay: 330ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  /* Guarantee visibility — don't leave elements stuck at opacity:0 when animations are instant */
  .pillar, .service, .value, .scope-row, .specialty,
  .stagger > *, .w, .reveal, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ── Brochure route ─────────────────────────────────────── */
.brochure-page { display: flex; flex-direction: column; padding: 0; margin: 0; position: relative; }
.brochure-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: 'Geist Mono', monospace; font-size: 0.75rem;
  color: var(--ink-mute); letter-spacing: 0.18em; text-transform: uppercase;
  pointer-events: none;
  z-index: 0;
}
.brochure-frame { position: relative; z-index: 1; background: var(--bg); }
/* Height is set precisely by JS (window.innerHeight - header.offsetHeight).
   The CSS value is a safe fallback shown only for the ~1 frame before JS runs. */
.brochure-frame { display: block; width: 100%; height: calc(100dvh - 112px); border: none; }

/* ============================================================
   LEGAL PAGES  (/privacy, /terms, /disclaimer, /accessibility)
   Long-form prose. Generated pages share these styles; see
   scripts/build-legal.js.
   ============================================================ */
.legal { max-width: 68ch; }
.legal h2 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 500;
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.5rem); letter-spacing: -0.025em;
  color: var(--ink); margin: var(--space-2xl) 0 var(--space-sm);
  padding-top: var(--space-lg); border-top: 1px solid var(--line-soft);
}
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: var(--space-xl); }
.legal h3 {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 500; font-size: 1.0625rem;
  letter-spacing: -0.015em; color: var(--ink); margin: var(--space-lg) 0 0.35rem;
}
.legal p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.65; margin: 0 0 var(--space-md); }
.legal ul { list-style: none; margin: 0 0 var(--space-md); padding: 0; }
.legal li {
  color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6;
  padding: 0.3rem 0 0.3rem 1.25rem; position: relative;
}
.legal li::before {
  content: ''; position: absolute; left: 0; top: 0.95em;
  width: 6px; height: 1px; background: var(--accent); opacity: 0.75;
}
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent-2); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal-updated {
  font-family: 'Geist Mono', monospace; font-size: 0.6875rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--space-xl);
}
.legal-note {
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: var(--space-lg); margin: var(--space-xl) 0;
}
.legal-note p:last-child { margin-bottom: 0; }

/* Second footer row for the legal links. */
.foot-legal {
  display: flex; flex-wrap: wrap; gap: var(--space-lg);
  padding-top: var(--space-md); margin-top: var(--space-md);
  border-top: 1px solid var(--line-soft);
  font-family: 'Geist Mono', monospace; font-size: 0.6875rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.foot-legal a { color: var(--ink-3); display: inline-flex; align-items: center; min-height: 40px; }
.foot-legal a:hover { color: var(--accent); }

/* ============================================================
   NETWORK CROSS-LINK
   A pointer to /network from other pages. Deliberately a ruled band
   rather than another card: the pages it sits on already end in cards
   or grids, and one more box would just read as more of the same.
   ============================================================ */
.net-cta {
  display: grid; grid-template-columns: 1fr auto; align-items: end;
  gap: var(--space-xl);
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--line);
}
.net-cta-label {
  font-family: 'Geist Mono', monospace; font-size: 0.6875rem;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3);
  display: block; margin-bottom: 0.7rem;
}
.net-cta-title {
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 400;
  font-size: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  letter-spacing: -0.03em; line-height: 1.15; color: var(--ink); margin: 0;
}
.net-cta-title em { font-family: 'Source Serif 4', serif; font-style: italic; color: var(--accent); }
.net-cta-sub {
  font-family: 'Source Serif 4', serif; font-size: 1.0625rem; line-height: 1.55;
  color: var(--ink-2); margin: 0.5rem 0 0; max-width: 52ch;
}
.net-cta-link {
  display: inline-flex; align-items: center; gap: 0.6rem; white-space: nowrap;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 0.9375rem; font-weight: 500;
  color: var(--ink); padding: 0.85rem 1.5rem;
  border: 1px solid var(--line); border-radius: 999px;
  transition: color 240ms var(--ease-out-quart), border-color 240ms var(--ease-out-quart),
              background 240ms var(--ease-out-quart), gap 240ms var(--ease-out-quart);
}
.net-cta-link:hover { color: var(--accent); border-color: var(--accent); background: var(--surface); gap: 0.9rem; }
.net-cta-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 700px) {
  .net-cta { grid-template-columns: 1fr; align-items: start; gap: var(--space-lg); }
  .net-cta-link { justify-self: start; }
}

/* Faint drifting band of physician faces behind the home page's network CTA.
   The strip is pre-blurred and pre-scaled by scripts/build-faces-strip.py
   (2.3 KB for all nine), so there is no runtime blur cost and no nine-image
   download on the busiest page.
   The loop translates by exactly one strip width, so it is seamless. */
.net-cta--faces { position: relative; isolation: isolate; }
.net-cta-faces {
  position: absolute; z-index: -1; overflow: hidden;
  /* Decoration only: never clickable, never focusable, never a scroll target. */
  pointer-events: none; user-select: none;
  /* Bleed past the band so the fade has somewhere to happen. */
  inset: calc(-1 * var(--space-md)) 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 15%, #000 85%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 15%, #000 85%, transparent 100%);
}
.net-cta-faces::before {
  content: '';
  position: absolute; top: 50%; left: 0;
  /* Wide enough that a full strip-width shift never exposes the tail. */
  width: calc(100% + 1350px); height: 190px; margin-top: -95px;
  background: url(/img/doctors-strip.webp) repeat-x;
  background-size: 1350px 190px;
  opacity: 0.15;
  animation: faceDrift 80s linear infinite;
  will-change: transform;
  /* Vertical fade, so the band dissolves instead of ending on a hard edge.
     It lives on the moving layer rather than the container because a vertical
     gradient is invariant under horizontal translation, which avoids having
     to composite two masks together. The tail is long and weighted to the
     bottom, where the cut was most obvious. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 44%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 26%, #000 44%, transparent 100%);
}
@keyframes faceDrift { from { transform: translateX(0); } to { transform: translateX(-1350px); } }
@media (prefers-reduced-motion: reduce) { .net-cta-faces::before { animation: none; } }
/* Light theme: the strip is built on a dark card colour, so it reads as a
   grey smudge. Drop it right back. */
[data-theme="light"] .net-cta-faces::before { opacity: 0.07; }
