/* Velai Health — design tokens + base */

:root {
  /* Surfaces — warm with forest tint */
  --paper: oklch(0.975 0.008 145);
  --paper-2: oklch(0.955 0.012 145);
  --paper-3: oklch(0.93 0.015 145);
  --line: oklch(0.86 0.012 145);
  --line-soft: oklch(0.91 0.010 145);

  /* Ink */
  --ink: oklch(0.20 0.014 200);
  --ink-2: oklch(0.36 0.012 200);
  --ink-3: oklch(0.52 0.012 200);
  --ink-4: oklch(0.68 0.010 200);

  /* Primary accent — FOREST */
  --coral: oklch(0.50 0.11 155);
  --coral-2: oklch(0.40 0.12 155);
  --coral-wash: oklch(0.94 0.024 155);

  /* Secondary accents */
  --forest: oklch(0.50 0.11 155);
  --forest-2: oklch(0.40 0.12 155);
  --forest-wash: oklch(0.94 0.024 155);
  --terra: oklch(0.62 0.13 38);
  --terra-wash: oklch(0.94 0.022 38);

  /* Typography */
  --font-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-sans: "Geist", "Söhne", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Rhythm */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  overflow-x: hidden;
  font-feature-settings: "ss01", "cv11";
  position: relative;
  background:
    radial-gradient(ellipse 80% 60% at 12% -10%, oklch(0.93 0.04 155 / 0.75) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 110% 20%, oklch(0.92 0.03 145 / 0.55) 0%, transparent 60%),
    radial-gradient(ellipse 90% 40% at 50% 110%, oklch(0.92 0.025 38 / 0.45) 0%, transparent 60%),
    var(--paper);
}
/* paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.32  0 0 0 0 0.42  0 0 0 0 0.32  0 0 0 0.07 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* Scroll-snap mode — only on home */
body.snap {
  scroll-snap-type: y mandatory;
}
body.snap .home-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

main, .nav, .footer { position: relative; z-index: 1; }

/* Section atmosphere markers — a thin running index */
.section, .section-tight {
  position: relative;
}
.section-mark {
  position: absolute;
  top: clamp(40px, 6vw, 80px);
  right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  z-index: 0;
}
.section-mark .bar {
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--ink-4);
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

/* Type system */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.eyebrow .dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--coral);
  border-radius: 50%;
  vertical-align: 1px;
  margin-right: 10px;
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.02;
  color: var(--ink);
  text-wrap: balance;
}
.display em {
  font-style: italic;
  color: var(--coral-2);
  font-weight: 400;
}

h1.display { font-size: clamp(48px, 7.4vw, 112px); }
h2.display { font-size: clamp(40px, 5.4vw, 76px); }
h3.display { font-size: clamp(28px, 3.2vw, 44px); }

.lede {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.45;
  color: var(--ink-2);
  font-weight: 400;
  text-wrap: pretty;
  max-width: 38ch;
}

.body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 62ch;
}

.label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(80px, 11vw, 160px); }
.section-tight { padding-block: clamp(56px, 7vw, 96px); }

.hr {
  height: 1px;
  background: var(--line-soft);
  border: 0;
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1),
              background 0.3s ease,
              color 0.3s ease,
              border-color 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn .arrow {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--coral-2); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.3s, color 0.3s;
}
.btn-text:hover { border-color: var(--coral); color: var(--coral-2); }

/* Reveal — content is visible by default; JS adds .pre-reveal to opt in to
   the fade-up effect, then adds .in on intersect. Content never sits blank
   if animations are paused (reduced motion, sandboxed iframes, etc.). */
.pre-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.85s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
.pre-reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.pre-reveal.reveal-l { transform: translateX(-28px) translateY(0); }
.pre-reveal.reveal-l.in { transform: translateX(0) translateY(0); }
.pre-reveal.reveal-r { transform: translateX(28px) translateY(0); }
.pre-reveal.reveal-r.in { transform: translateX(0) translateY(0); }
.pre-reveal.reveal-scale { transform: scale(0.97) translateY(0); }
.pre-reveal.reveal-scale.in { transform: scale(1) translateY(0); }
.pre-reveal[data-delay="1"] { transition-delay: 0.08s; }
.pre-reveal[data-delay="2"] { transition-delay: 0.16s; }
.pre-reveal[data-delay="3"] { transition-delay: 0.24s; }
.pre-reveal[data-delay="4"] { transition-delay: 0.32s; }
.pre-reveal[data-delay="5"] { transition-delay: 0.40s; }

/* Page enter transition */
.page-enter {
  animation: page-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Section atmospheres */
.section-atm-cream { background: linear-gradient(180deg, transparent 0%, oklch(0.96 0.012 75 / 0.7) 30%, oklch(0.96 0.012 75 / 0.7) 70%, transparent 100%); }
.section-atm-sage  { background: linear-gradient(180deg, transparent 0%, oklch(0.95 0.018 155 / 0.5) 30%, oklch(0.95 0.018 155 / 0.5) 70%, transparent 100%); }
.section-atm-coral { background: linear-gradient(180deg, transparent 0%, oklch(0.96 0.020 22 / 0.45) 30%, oklch(0.96 0.020 22 / 0.45) 70%, transparent 100%); }

/* Thin decorative section divider */
.section-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding-block: 32px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.section-divider::before,
.section-divider::after {
  content: "";
  height: 1px;
  background: var(--line-soft);
}
.section-divider span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-divider .num {
  color: var(--coral);
}

/* Page transitions — keep .reveal as the single source of motion */
.page-enter { opacity: 1; }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px 0;
  transition: backdrop-filter 0.3s, background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 6px;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-suffix {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-3);
  text-transform: uppercase;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  position: relative;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--ink-2);
  border-radius: 8px;
  transition: color 0.25s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px;
  bottom: 4px;
  height: 1px;
  background: var(--coral);
}
.nav-cta { margin-left: 8px; }

/* Hamburger button — hidden on desktop, shown via media query on mobile */
.nav-menu-btn {
  display: none; /* shown via media query */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}
.nav-menu-bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
  width: 100%;
}
.nav-menu-btn.open .nav-menu-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-menu-btn.open .nav-menu-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-menu-btn.open .nav-menu-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile overlay */
.nav-mobile-overlay {
  position: fixed;
  inset: 0;
  top: 0;
  z-index: 49;
  background: color-mix(in oklab, var(--paper) 97%, transparent);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  padding-top: 72px; /* clear the fixed nav */
  animation: nav-overlay-in 0.22s ease both;
}
@keyframes nav-overlay-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-mobile-menu {
  display: flex;
  flex-direction: column;
  padding: 12px var(--gutter) 32px;
}
.nav-mobile-link {
  display: block;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
  transition: color 0.2s, padding-left 0.2s;
  text-decoration: none;
}
.nav-mobile-link:hover { color: var(--ink); padding-left: 8px; }
.nav-mobile-link.active { color: var(--forest); }
.nav-mobile-cta-menu {
  margin-top: 24px;
  align-self: flex-start;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 64px 32px;
  background: var(--paper-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 56px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--ink-2); font-size: 14px; transition: color 0.25s; }
.footer a:hover { color: var(--coral-2); }
.footer-bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  padding-top: 96px;
  display: flex;
  align-items: stretch;
}
.hero-grid {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  padding-block: 40px 64px;
}
.hero-copy { position: relative; z-index: 2; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.hero-meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12px;
  color: var(--ink-2);
}
.hero-meta .pill .ledger {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: var(--coral-wash);
  color: var(--coral-2);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 10px;
}

.hero-h1 {
  margin: 0;
  font-size: clamp(54px, 7.6vw, 116px);
}
.hero-sub {
  margin-top: 28px;
  max-width: 44ch;
}
.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-credit {
  position: absolute;
  bottom: 24px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.hero-credit .scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-credit .scroll-cue .line {
  width: 28px; height: 1px;
  background: var(--ink-4);
  position: relative;
  overflow: hidden;
}
.hero-credit .scroll-cue .line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: cue 2.2s infinite;
}
@keyframes cue {
  0% { transform: translateX(-100%); }
  60% { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* Heart canvas */
.heart-stage {
  position: relative;
  aspect-ratio: 1 / 1.05;
  width: 100%;
  display: grid;
  place-items: center;
}
.heart-stage svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Heart animations */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  8%       { transform: scale(1.022); }
  16%      { transform: scale(0.996); }
  26%      { transform: scale(1.028); }
  36%      { transform: scale(1); }
}
.heart-beat {
  animation: heartbeat 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  transform-box: fill-box;
  transform-origin: center center;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.03); }
}
.halo {
  transform-origin: 240px 280px;
  transform-box: view-box;
  animation: haloPulse 3.2s ease-in-out infinite;
}
@keyframes coronaryFlow {
  0%   { stroke-dashoffset: 0; opacity: 0; }
  10%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { stroke-dashoffset: -360; opacity: 0; }
}
.coronary-pulse-1 { animation: coronaryFlow 3s linear infinite; animation-delay: 0.4s; }
.coronary-pulse-2 { animation: coronaryFlow 3.4s linear infinite; animation-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
  .heart-beat, .halo, .coronary-pulse-1, .coronary-pulse-2 { animation: none; }
}
.heart-callout {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.heart-callout::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink-4);
}
.heart-callout.right::before { order: 2; }
.heart-callout.right { flex-direction: row-reverse; }
.heart-callout .num {
  color: var(--coral-2);
  font-weight: 500;
}

/* Sections */
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 40px;
  margin-bottom: 64px;
  align-items: end;
}
.section-head .eyebrow { padding-top: 6px; }

/* Modality grid */
.mod-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.mod-card {
  background: var(--paper);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 220px;
  transition: background 0.3s ease;
  position: relative;
}
.mod-card:hover { background: var(--paper-2); }
.mod-card .ix {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-4);
  letter-spacing: 0.06em;
}
.mod-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.mod-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-3);
}
.mod-card .glyph {
  height: 56px;
  display: flex;
  align-items: end;
}
.mod-card .glyph svg { height: 100%; }

/* Flow */
.flow-wrap {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 48px;
  position: relative;
  overflow: hidden;
}
.flow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.flow-step {
  position: relative;
  padding-top: 32px;
}
.flow-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.flow-step .num {
  position: absolute;
  top: -14px; left: 0;
  background: var(--paper-2);
  padding-right: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-3);
}
.flow-step .num .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--coral);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: 1px;
}
.flow-step h4 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  font-weight: 400;
}
.flow-step p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
}

/* Audience tabs */
.aud {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.aud-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
}
.aud-tab {
  text-align: left;
  padding: 22px 22px 22px 26px;
  border-left: 2px solid transparent;
  margin-left: -1.5px;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aud-tab .who {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink-3);
  line-height: 1;
  transition: color 0.3s;
}
.aud-tab .why {
  font-size: 13px;
  color: var(--ink-4);
  transition: color 0.3s;
}
.aud-tab.active { border-left-color: var(--coral); }
.aud-tab.active .who { color: var(--ink); }
.aud-tab.active .why { color: var(--ink-3); }
.aud-tab:hover .who { color: var(--ink-2); }

.aud-detail {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 40px;
  min-height: 360px;
  position: relative;
}
.aud-detail .label { margin-bottom: 16px; display: block; }
.aud-detail h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.4vw, 36px);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 20px;
}
.aud-detail .bullets {
  margin-top: 28px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.aud-detail .bullets li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: start;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.aud-detail .bullets li .b-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--coral-2);
  padding-top: 4px;
  letter-spacing: 0.04em;
}

/* Quote / proof */
.proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.proof blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.proof blockquote::before {
  content: "“";
  font-size: 1.2em;
  color: var(--coral);
  line-height: 0;
  margin-right: 4px;
}
.proof .attrib {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-3);
}
.proof .attrib .av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--paper-3);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-2);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.metric {
  background: var(--paper);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.metric .v {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.2vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
}
.metric .v sup {
  font-size: 0.5em;
  vertical-align: top;
  color: var(--coral-2);
  letter-spacing: 0;
  margin-left: 2px;
}
.metric .k {
  font-size: 13.5px;
  color: var(--ink-3);
  line-height: 1.45;
  max-width: 28ch;
}

/* CTA banner */
.cta-banner {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(48px, 6vw, 88px);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 64px;
  align-items: end;
  position: relative;
  overflow: hidden;
}
.cta-banner::after {
  content: "";
  position: absolute;
  inset: auto -10% -60% auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--coral) 0%, transparent 60%);
  opacity: 0.18;
  pointer-events: none;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0;
  color: var(--paper);
  position: relative;
  z-index: 1;
}
.cta-banner h2 em {
  font-style: italic;
  color: oklch(0.74 0.16 22);
}
.cta-banner .right {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cta-banner .right p {
  font-size: 15px;
  line-height: 1.55;
  color: oklch(0.78 0.012 250);
  margin: 0;
  max-width: 36ch;
}
.cta-banner .btn-primary {
  background: var(--paper);
  color: var(--ink);
  align-self: start;
}
.cta-banner .btn-primary:hover { background: var(--coral); color: var(--paper); }

/* Page headers */
.page-hero {
  padding-top: 168px;
  padding-bottom: 88px;
  position: relative;
}
.page-hero .crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.page-hero .crumb .sep { color: var(--ink-4); }
.page-hero h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 96px);
}
.page-hero .lede { margin-top: 28px; max-width: 52ch; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-grid h2 { margin: 0 0 24px; }
.about-grid p { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.about-grid p + p { margin-top: 16px; }
.about-grid .pull {
  border-left: 2px solid var(--coral);
  padding: 8px 0 8px 20px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink);
  margin: 28px 0;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--paper);
  transition:
    transform  0.38s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.38s ease,
    box-shadow 0.38s ease;
}
.team-card:hover {
  transform: translateY(-5px);
  border-color: var(--line);
  box-shadow:
    0 4px 12px oklch(0.20 0.014 200 / 0.06),
    0 16px 40px oklch(0.20 0.014 200 / 0.08);
}
.team-card .photo {
  /* Remove aspect-ratio to let the image define the size */
  /* aspect-ratio: 4 / 4;  <-- DELETE THIS */
  
  /* Use fit-content to hug the image */
  width: fit-content;
  height: fit-content;
  
  /* Keep your styling */
  border-radius: var(--radius);
  background: var(--forest); /* Keep the clean background behind the image */
  
  /* Creates a soft, diffuse green glow behind the image */
  box-shadow: 0 0 20px 5px rgba(42, 91, 69, 0.2);
  border: 1px solid var(--line-soft);
  position: relative;
  display: flex; /* Changed from grid to flex for easier image alignment */
  padding: 8px;  /* This creates your "small bit larger" frame */
}

.team-card .photo img {
  /* Ensure image fits the new container */
  display: block;
  border-radius: calc(var(--radius) - 4px);
  width: 100%;
  max-width: 200px; /* Adjust this to control portrait size */
  height: auto;
}
.team-card h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;
}
.team-card .role {
  font-size: 13px;
  color: var(--ink-3);
}
.team-card .bio {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Services */
.service-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: end;
}
.service-hero .product-card {
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service-hero .product-card .name {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.015em;
  line-height: 1;
}
.service-hero .product-card .desc {
  font-size: 14px;
  color: var(--ink-3);
  line-height: 1.55;
}
.service-hero .product-card .tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.service-hero .product-card .tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  padding: 5px 10px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  text-transform: uppercase;
}

.service-row {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 64px;
  padding: 56px 0;
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.service-row:last-child { border-bottom: 1px solid var(--line-soft); }
.service-row .ix {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.service-row h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 38px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 16px;
  font-weight: 400;
}
.service-row p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 24px;
  max-width: 62ch;
}
.service-row .points {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}
.service-row .points li {
  font-size: 14px;
  color: var(--ink-2);
  padding-left: 22px;
  position: relative;
}
.service-row .points li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 10px; height: 1px;
  background: var(--coral);
}

/* Publications */
.pub-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.pub-filter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.pub-filter:hover { color: var(--ink); }
.pub-filter.active {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.pub-list {
  border-top: 1px solid var(--line-soft);
}
.pub-row {
  display: grid;
  grid-template-columns: 100px 110px 1fr 180px 24px;
  gap: 32px;
  padding: 28px 4px;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
  transition: background 0.25s, padding 0.25s;
  cursor: pointer;
}
.pub-row:hover {
  background: var(--paper-2);
  padding-inline: 12px;
}
.pub-row .year {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.pub-row .kind {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--coral-2);
  padding-top: 1px;
}
.pub-row h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: -4px 0 6px;
  color: var(--ink);
  text-wrap: balance;
}
.pub-row .authors {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
}
.pub-row .venue {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-2);
}
.pub-row .arrow {
  align-self: start;
  color: var(--ink-3);
  transition: color 0.25s, transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pub-row:hover .arrow { color: var(--coral); transform: translateX(4px); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 32px; }
.contact-block .label { display: block; margin-bottom: 8px; }
.contact-block .v {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
}
.contact-block .v a { border-bottom: 1px solid var(--line); transition: border-color 0.25s, color 0.25s; }
.contact-block .v a:hover { border-color: var(--coral); color: var(--coral-2); }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  border-radius: 0;
  transition: border-color 0.25s;
  outline: none;
  font-family: var(--font-sans);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-bottom-color: var(--coral);
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
.field select { appearance: none; background-image: none; cursor: pointer; }
.contact-form .submit {
  align-self: start;
  margin-top: 8px;
}

.contact-success {
  background: var(--forest-wash);
  border: 1px solid color-mix(in oklab, var(--forest) 25%, transparent);
  color: var(--forest-2);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Responsive */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .heart-stage { max-width: 520px; margin: 0 auto; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .mod-grid { grid-template-columns: 1fr 1fr; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .aud { grid-template-columns: 1fr; gap: 32px; }
  .proof { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner { grid-template-columns: 1fr; gap: 32px; }
  .service-hero { grid-template-columns: 1fr; gap: 32px; }
  .service-row { grid-template-columns: 1fr; gap: 16px; }
  .service-row .points { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .pub-row { grid-template-columns: 70px 90px 1fr 24px; gap: 16px; }
  .pub-row .venue { grid-column: 3; }
  .section-head { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 720px) {
  .metric-row { grid-template-columns: 1fr; }
  /* Replace desktop nav with mobile hamburger */
  .nav-links { display: none; }
  .nav-menu-btn { display: flex; }
  .mod-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: 1fr; gap: 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .about-grid { gap: 32px; }

  /* Publications — flex card layout (replaces 4-column grid from 1100px rule) */
  .pub-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    padding: 18px 4px;
  }
  .pub-row > div { width: 100%; margin-top: 8px; }
  .pub-row h4 { font-size: 17px; margin: 0 0 4px; }
  .pub-row .venue { flex: 1; margin-top: 8px; font-size: 13px; }
  .pub-row .arrow { flex-shrink: 0; margin-top: 8px; }

  /* Contact */
  .contact-info { gap: 20px; }
  .contact-block .v { font-size: 17px; }
  .contact-form { padding: 24px; }
}

@media (max-width: 480px) {
  .contact-form { padding: 20px 16px; }
  .pub-row h4 { font-size: 15px; }
  .section { padding-block: clamp(56px, 10vw, 80px); }
  .section-tight { padding-block: clamp(40px, 8vw, 56px); }
}

/* Tweak: palette variants — default is forest (no override needed) */
body[data-palette="terra"] {
  --coral: oklch(0.62 0.13 38);
  --coral-2: oklch(0.54 0.14 38);
  --coral-wash: oklch(0.95 0.022 38);
  --forest: oklch(0.62 0.13 38);
  --forest-2: oklch(0.54 0.14 38);
  --forest-wash: oklch(0.95 0.022 38);
}
body[data-palette="ink"] {
  --coral: oklch(0.30 0.018 200);
  --coral-2: oklch(0.22 0.018 200);
  --coral-wash: oklch(0.94 0.005 200);
  --forest: oklch(0.30 0.018 200);
  --forest-2: oklch(0.22 0.018 200);
  --forest-wash: oklch(0.94 0.005 200);
}
