/* ==========================================================================
   Three Peaks - Agentic Company Builders
   Shared design system. Dark-only, hand-written CSS, no build step.
   ========================================================================== */

:root {
  --bg: #070814;
  --bg-2: #0a0b1f;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.05);
  --ink: #f4f5ff;
  --muted: #a3a7c4;
  --muted-2: #797e9e;
  --violet: #8b5cf6;
  --teal: #2dd4bf;
  --blue: #60a5fa;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --max: 1120px;
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --grad: linear-gradient(100deg, var(--violet), var(--teal));
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient backdrop so dark areas never feel flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 18% 0%, rgba(139, 92, 246, 0.10), transparent 70%),
    radial-gradient(55% 45% at 92% 8%, rgba(45, 212, 191, 0.08), transparent 70%),
    var(--bg);
}

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

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  font-weight: 600;
  /* Even out line lengths so a heading never strands a lone word on the last
     line (orphan/widow). No-op on single-line titles; ignored gracefully on
     engines without support, where the &nbsp; pairs in the markup still hold. */
  text-wrap: balance;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 18px;
  display: inline-block;
}

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: clamp(18px, 2.2vw, 21px); color: #d9dbf0; }
.lede .gradient-text { font-weight: 600; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.25s var(--ease);
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border-color: transparent;
  box-shadow: none;
  isolation: isolate;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.72;
  transition: opacity 0.25s var(--ease);
  pointer-events: none;
}
.btn-primary:hover { background: var(--surface-2); box-shadow: none; }
.btn-primary:hover::after { opacity: 1; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: var(--teal); background: var(--surface-2); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 20, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand img { height: 30px; width: auto; filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.45)); }
.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); text-decoration: none; }
.nav-cta { padding: 9px 18px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.nav-toggle svg { display: block; }

/* ---------- Section / image-as-background pattern ---------- */
.section { position: relative; overflow: hidden; }
.section-media { position: absolute; inset: 0; z-index: 0; }
.section-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.section-scrim { position: absolute; inset: 0; z-index: 1; }
.section > .container { position: relative; z-index: 2; }

/* Scrim variants guarantee text contrast regardless of the image */
.scrim--center {
  background:
    radial-gradient(120% 90% at 50% 64%, rgba(7, 8, 20, 0.86) 8%, rgba(7, 8, 20, 0.25) 55%, transparent 78%),
    linear-gradient(180deg, rgba(7, 8, 20, 0.55) 0%, rgba(7, 8, 20, 0.2) 30%, rgba(7, 8, 20, 0.85) 100%);
}
/* Hero scrim: keep the peaks bright up top, darken only a band behind the text near the bottom, then fade into the page */
.scrim--hero {
  background:
    radial-gradient(95% 55% at 50% 80%, rgba(7, 8, 20, 0.72), transparent 62%),
    linear-gradient(180deg, transparent 40%, rgba(7, 8, 20, 0.45) 78%, var(--bg) 100%);
}
.scrim--left {
  background:
    linear-gradient(90deg, rgba(7, 8, 20, 0.92) 0%, rgba(7, 8, 20, 0.66) 42%, rgba(7, 8, 20, 0.18) 74%, transparent 100%),
    linear-gradient(180deg, rgba(7, 8, 20, 0.35), rgba(7, 8, 20, 0.5));
}
.scrim--right {
  background:
    linear-gradient(270deg, rgba(7, 8, 20, 0.92) 0%, rgba(7, 8, 20, 0.66) 42%, rgba(7, 8, 20, 0.18) 74%, transparent 100%),
    linear-gradient(180deg, rgba(7, 8, 20, 0.35), rgba(7, 8, 20, 0.5));
}
/* Left darkening for text, plus a smooth bottom fade into the page background */
.scrim--left-fade {
  background:
    linear-gradient(90deg, rgba(7, 8, 20, 0.9) 0%, rgba(7, 8, 20, 0.6) 40%, rgba(7, 8, 20, 0.16) 72%, transparent 100%),
    linear-gradient(180deg, transparent 42%, rgba(7, 8, 20, 0.3) 72%, rgba(7, 8, 20, 0.82) 90%, var(--bg) 100%);
}
.scrim--veil {
  background: linear-gradient(180deg, rgba(7, 8, 20, 0.55) 0%, rgba(7, 8, 20, 0.4) 45%, rgba(7, 8, 20, 0.8) 100%);
}
.scrim--bottom {
  background: linear-gradient(180deg, rgba(7, 8, 20, 0.3) 0%, rgba(7, 8, 20, 0.55) 55%, var(--bg) 100%);
}

/* ---------- Hero ---------- */
.hero { min-height: 86vh; display: flex; align-items: flex-end; padding: 96px 0 clamp(64px, 12vh, 120px); }
.hero-inner { max-width: 760px; }
.hero h1 {
  font-size: clamp(44px, 8vw, 88px);
  letter-spacing: -0.03em;
  margin: 0 0 24px;
  text-shadow: 0 2px 30px rgba(7, 8, 20, 0.85);
}
.hero .lede { max-width: 600px; margin: 0 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Centered home hero (peaks rising above the text, like the reference) */
.hero--center .hero-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.hero--center .hero-cta { justify-content: center; }
.hero--center .lede { margin-left: auto; margin-right: auto; }

/* Smaller hero for inner pages */
.subhero { min-height: 62vh; }
.subhero h1 { font-size: clamp(34px, 5.5vw, 58px); }

/* ---------- Content blocks ---------- */
.block { padding: clamp(48px, 6vw, 88px) 0; position: relative; }
.block-head { max-width: 720px; margin-bottom: 40px; }
.block-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.block h2 { font-size: clamp(28px, 4.4vw, 44px); margin-bottom: 20px; }
.block h2 + .lede { margin-top: 0; }
.build-subhead { margin-top: clamp(40px, 6vw, 56px); margin-bottom: 28px; }
.build-subhead h3 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(22px, 3.2vw, 28px); font-weight: 600; margin: 0 0 10px; }
.build-subhead .muted { margin: 0; font-size: 15px; line-height: 1.55; }

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

[id] { scroll-margin-top: 88px; }

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); background: var(--surface-2); }
.card:hover::after { opacity: 0.8; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--muted); font-size: 15.5px; }
.card .kicker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px; display: block;
}
.card-link { display: flex; flex-direction: column; height: 100%; }
.card-link:hover { text-decoration: none; }

/* ---------- Platform stack (isometric architecture diagram, glow-free) ---------- */
/* Plate vertical positions are scroll-driven in app.js (assemble on scroll). */
.platform-stack { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; }
.platform-feature .pf-copy { max-width: 520px; }
.stack-visual svg { width: 100%; height: auto; display: block; overflow: visible; }
.spine { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 6; }
.plate { cursor: default; transition: opacity 0.3s var(--ease); }
/* One-time assemble. JS adds .stack-animate + .is-collapsed on load, then drops
   .is-collapsed the first time the diagram scrolls into view. Plates fan from
   the gathered center positions to their natural spread, then latch. */
.stack-animate .plate { transition: opacity 0.3s var(--ease), transform 0.85s var(--ease); }
.stack-animate.is-collapsed .l1 { transform: translateY(184px); }
.stack-animate.is-collapsed .l2 { transform: translateY(92px); }
.stack-animate.is-collapsed .l3 { transform: translateY(0); }
.stack-animate.is-collapsed .l4 { transform: translateY(-92px); }
.stack-animate.is-collapsed .l5 { transform: translateY(-184px); }
.stack-animate .l4 { transition-delay: 0s, 0.07s; }
.stack-animate .l3 { transition-delay: 0s, 0.14s; }
.stack-animate .l2 { transition-delay: 0s, 0.21s; }
.stack-animate .l1 { transition-delay: 0s, 0.28s; }
/* Per-layer color identity, shared by the diagram plate and its legend row.
   --lc is the layer hue; --lc-soft is the low-opacity fill used when active. */
[data-layer="human"]         { --lc: #fbbf24; --lc-soft: rgba(251, 191, 36, 0.14); }
[data-layer="orchestration"] { --lc: #a78bfa; --lc-soft: rgba(167, 139, 250, 0.14); }
[data-layer="context"]       { --lc: #60a5fa; --lc-soft: rgba(96, 165, 250, 0.14); }
[data-layer="blocks"]        { --lc: #2dd4bf; --lc-soft: rgba(45, 212, 191, 0.14); }
[data-layer="infra"]         { --lc: #34d399; --lc-soft: rgba(52, 211, 153, 0.14); }

.plate .top { fill: rgba(255, 255, 255, 0.045); stroke: var(--lc, var(--line-strong)); stroke-opacity: 0.4; stroke-width: 1.2; transition: fill 0.3s var(--ease), stroke 0.3s var(--ease), stroke-opacity 0.3s var(--ease), stroke-width 0.3s var(--ease); }
.plate .side { fill: rgba(255, 255, 255, 0.02); stroke: var(--line); stroke-width: 1; transition: stroke 0.3s var(--ease), stroke-opacity 0.3s var(--ease); }
.plate .node { fill: var(--lc, var(--muted-2)); fill-opacity: 0.5; transition: fill 0.3s var(--ease), fill-opacity 0.3s var(--ease); }
.plate .plate-ico { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s var(--ease); }
.plate .plate-num { fill: var(--lc, var(--muted-2)); fill-opacity: 0.85; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13px; }
.platform-stack.has-active .plate:not(.is-active) { opacity: 0.34; }
.plate.is-active .top { fill: var(--lc-soft); stroke: var(--lc); stroke-opacity: 1; stroke-width: 2; }
.plate.is-active .side { stroke: var(--lc); stroke-opacity: 0.5; }
.plate.is-active .node { fill: var(--lc); fill-opacity: 1; }
.plate.is-active .plate-ico { stroke: var(--ink); }
.plate:focus { outline: none; }
.plate:focus-visible .top { stroke: var(--lc); stroke-opacity: 1; stroke-width: 2; }

/* chips double as the legend on the homepage platform section */
.chips li[data-layer] { cursor: default; transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease); }
.chips li[data-layer].is-active { border-color: var(--lc, var(--teal)); }
.chips li[data-layer].is-active b { color: var(--ink); }
.platform-stack.has-active .chips li[data-layer]:not(.is-active) { opacity: 0.5; }

.stack-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend-item { padding: 13px 16px; border-radius: 12px; border-left: 2px solid var(--line-strong); cursor: default; transition: background 0.3s var(--ease), border-color 0.3s var(--ease), opacity 0.3s var(--ease); }
.legend-item .ln { display: flex; align-items: baseline; gap: 10px; }
.legend-item .num { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 12px; color: var(--lc, var(--muted-2)); }
.legend-item h3 { font-size: 16px; margin: 0; }
.legend-item p { margin: 5px 0 0 22px; color: var(--muted); font-size: 14px; }
.legend-item.is-active { background: var(--surface); border-left-color: var(--lc, var(--teal)); }
.legend-item.is-active h3 { color: var(--ink); }
.platform-stack.has-active .legend-item:not(.is-active) { opacity: 0.5; }

@media (max-width: 880px) {
  .platform-stack { grid-template-columns: 1fr; gap: 30px; }
  .platform-feature .pf-copy { max-width: none; }
  .stack-visual { max-width: 400px; margin: 0 auto; }
}

/* ---------- Lenses Layout ---------- */
.lenses-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.lens-item {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 36px;
  gap: 32px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.lens-item:hover {
  transform: translateX(8px);
  background: var(--surface-2);
}
.lens-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--line-strong);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.8;
}
.lens-content h3 {
  font-size: 24px;
  margin-bottom: 4px;
}
.lens-content p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
@media (max-width: 520px) {
  .lens-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px;
  }
}

/* ---------- Process strip ---------- */
.process {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 10px;
}
.process::before {
  content: "";
  position: absolute; top: 26px; left: 8%; right: 8%; height: 2px;
  background: var(--grad); opacity: 0.5;
}
.step { position: relative; text-align: center; padding: 0 8px; }
.step .dot {
  width: 54px; height: 54px; margin: 0 auto 18px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink);
  position: relative; z-index: 1;
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.22);
}
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- Pillars ---------- */
.pillar { text-align: left; }
.pillar .pillar-mark {
  width: 46px; height: 46px; border-radius: 12px; margin-bottom: 18px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  display: grid; place-items: center;
}
.pillar .pillar-mark span { width: 16px; height: 16px; border-radius: 4px; background: var(--grad); }

/* ---------- Three lenses -> one summit (topographic convergence) ---------- */
.peaks-visual { position: relative; width: 100%; max-width: 760px; margin: 0 auto 52px; aspect-ratio: 760 / 470; }
.peaks-svg { position: relative; z-index: 1; width: 100%; height: 100%; display: block; overflow: visible; }

/* Aurora atmosphere wash (behind the SVG so the blur stays cheap) */
.peaks-aurora {
  position: absolute; inset: -2% 3% 4%; z-index: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(36% 44% at 30% 60%, rgba(139, 92, 246, 0.32), transparent 70%),
    radial-gradient(38% 46% at 70% 56%, rgba(45, 212, 191, 0.28), transparent 70%),
    radial-gradient(46% 40% at 50% 78%, rgba(96, 165, 250, 0.28), transparent 72%),
    radial-gradient(26% 30% at 50% 30%, rgba(244, 245, 255, 0.12), transparent 70%);
  filter: blur(26px) saturate(1.12);
  opacity: 0; transition: opacity 1.4s var(--ease) 0.2s;
  animation: peaks-drift 26s ease-in-out infinite;
}
.peaks-visual.in .peaks-aurora { opacity: 0.92; }
@keyframes peaks-drift {
  0%, 100% { transform: translate3d(-1%, 0, 0) scale(1.01); }
  50%      { transform: translate3d(1%, -1.6%, 0) scale(1.04); }
}

/* Contour ridgelines draw on as the peaks converge */
.ridge { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 1.5s var(--ease), opacity 1.2s var(--ease); }
.peaks-visual.in .ridge { stroke-dashoffset: 0; opacity: 1; }
.ridge-fill { opacity: 0; transition: opacity 1.3s var(--ease) 0.55s; }
.peaks-visual.in .ridge-fill { opacity: 1; }

/* glowing apex point at each peak tip */
.apex { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0.3); transition: opacity 0.7s var(--ease) 1s, transform 0.7s var(--ease) 1s; }
.peaks-visual.in .apex { opacity: 1; transform: scale(1); }
.peaks-visual.in .apex--violet { animation: apex-breathe 5s ease-in-out 2.2s infinite; }
.peaks-visual.in .apex--teal   { animation: apex-breathe 5s ease-in-out 2.6s infinite; }
.peaks-visual.in .apex--blue   { animation: apex-breathe 5s ease-in-out 3s infinite; }
@keyframes apex-breathe { 0%, 100% { opacity: 0.75; } 50% { opacity: 1; } }

/* per-peak slide-in (spread -> converge) */
.peak { transform-box: view-box; transition: transform 1.5s var(--ease); }
.peak--violet { transform: translate(-30px, 14px); }
.peak--teal   { transform: translate(30px, 14px); }
.peak--blue   { transform: translate(0, 26px); }
.peaks-visual.in .peak { transform: translate(0, 0); }
.peaks-visual.in .ridge.r3 { transition-delay: 0.45s; }
.peaks-visual.in .ridge.r4 { transition-delay: 0.58s; }
.peaks-visual.in .ridge.r5 { transition-delay: 0.71s; }
.peaks-visual.in .ridge.r6 { transition-delay: 0.84s; }

/* convergence rays climb from each apex into the summit, then gently pulse energy upward */
.peaks-ray { fill: none; stroke-width: 1.3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 1.2s var(--ease) 0.95s, opacity 0.9s var(--ease) 0.95s; }
.peaks-visual.in .peaks-ray { stroke-dashoffset: 0; opacity: 0.6; }
.peaks-visual.in .peaks-rays { animation: ray-glow 4.2s ease-in-out 2.3s infinite; }
@keyframes ray-glow { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }

/* Summit beacon - cinematic layered bloom + anamorphic lens flare */
.beacon-halo, .beacon-ring, .beacon-spark, .beacon-core, .beacon-streak {
  transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(0.4);
  transition: opacity 0.9s var(--ease) 1.15s, transform 0.9s var(--ease) 1.15s;
}
.peaks-visual.in .beacon-halo,
.peaks-visual.in .beacon-spark,
.peaks-visual.in .beacon-core { opacity: 1; transform: scale(1); }
.peaks-visual.in .beacon-ring { opacity: 0.7; transform: scale(1); }
.beacon-streak.streak-h { transform: scaleX(0.15); transition: opacity 1s var(--ease) 1.35s, transform 1.1s var(--ease) 1.35s; }
.beacon-streak.streak-v { transform: scaleY(0.15); transition: opacity 1s var(--ease) 1.5s, transform 1.1s var(--ease) 1.5s; }
.peaks-visual.in .beacon-streak.streak-h { opacity: 0.95; transform: scaleX(1); }
.peaks-visual.in .beacon-streak.streak-v { opacity: 0.8; transform: scaleY(1); }
.peaks-visual.in .beacon-spark { animation: beacon-pulse 4.2s ease-in-out 1.9s infinite; }
.peaks-visual.in .beacon-halo  { animation: beacon-halo 6s ease-in-out 1.9s infinite; }
.peaks-visual.in .beacon-ring  { animation: beacon-ripple 5.5s ease-in-out 2.1s infinite; }
.peaks-visual.in .beacon-streak.streak-h { animation: streak-flicker 5s ease-in-out 2.4s infinite; }
@keyframes beacon-pulse { 0%, 100% { transform: scale(1); opacity: 0.95; } 50% { transform: scale(1.14); opacity: 1; } }
@keyframes beacon-halo { 0%, 100% { opacity: 0.5; } 50% { opacity: 0.85; } }
@keyframes beacon-ripple { 0% { transform: scale(0.7); opacity: 0.5; } 70% { transform: scale(1.6); opacity: 0; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes streak-flicker { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
.lenses-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 960px; margin: 0 auto; }
.lens-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px 28px 42px; transition: transform 0.3s var(--ease), background 0.3s var(--ease); }
.lens-card::before { content: ""; position: absolute; left: 22px; top: 34px; width: 8px; height: 8px; border-radius: 50%; }
.lens-card--violet::before { background: #8b5cf6; box-shadow: 0 0 10px rgba(139, 92, 246, 0.5); }
.lens-card--teal::before { background: #2dd4bf; box-shadow: 0 0 10px rgba(45, 212, 191, 0.5); }
.lens-card--blue::before { background: #60a5fa; box-shadow: 0 0 10px rgba(96, 165, 250, 0.5); }
.lens-card:hover { transform: translateY(-3px); background: var(--surface-2); }
.lens-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; margin: 0 0 6px; color: var(--ink); }
.lens-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
@media (max-width: 880px) {
  .lenses-cards { grid-template-columns: 1fr; max-width: 480px; }
  .peaks-visual { max-width: 460px; }
}
@media (max-width: 420px) {
  .peaks-visual { max-width: 340px; }
}
@media (prefers-reduced-motion: reduce) {
  .peaks-aurora { animation: none; opacity: 0.9; transform: scale(1.04); }
  .ridge { stroke-dashoffset: 0; opacity: 1; transition: none; }
  .ridge-fill { opacity: 1; transition: none; }
  .apex { opacity: 1; transform: none; transition: none; animation: none; }
  .peak { transform: none; transition: none; }
  .peaks-ray { stroke-dashoffset: 0; opacity: 0.6; transition: none; }
  .peaks-visual.in .peaks-rays { animation: none; }
  .beacon-halo, .beacon-spark, .beacon-core { opacity: 1; transform: none; transition: none; animation: none; }
  .beacon-ring { opacity: 0.5; transform: none; transition: none; animation: none; }
  .beacon-streak.streak-h { opacity: 0.9; transform: none; transition: none; animation: none; }
  .beacon-streak.streak-v { opacity: 0.75; transform: none; transition: none; animation: none; }
}

/* ---------- Engagement cubes (2x2 block) ---------- */
.cube-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 900px; }
.cube {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; min-height: 232px; overflow: hidden;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.cube:nth-child(1) { --ca: #a78bfa; }
.cube:nth-child(2) { --ca: #2dd4bf; }
.cube:nth-child(3) { --ca: #34d399; }
.cube:nth-child(4) { --ca: #60a5fa; }
.cube:hover { transform: translateY(-4px); background: var(--surface-2); text-decoration: none; }
.cube::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: var(--ca);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity 0.3s var(--ease); pointer-events: none;
}
.cube:hover::after { opacity: 0.75; }
.cube-num { position: absolute; top: 26px; right: 28px; font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; color: var(--ca); }
.cube-ico { width: 44px; height: 46px; display: block; }
.cube-ico svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cube-ico polygon { stroke: var(--ca); stroke-opacity: 0.55; stroke-width: 1; stroke-linejoin: round; transition: fill-opacity 0.3s var(--ease); }
.cube-ico .cube-top { fill: var(--ca); fill-opacity: 0.85; }
.cube-ico .cube-left { fill: var(--ca); fill-opacity: 0.4; }
.cube-ico .cube-right { fill: var(--ca); fill-opacity: 0.22; }
.cube:hover .cube-ico .cube-left { fill-opacity: 0.55; }
.cube:hover .cube-ico .cube-right { fill-opacity: 0.35; }
.cube h3 { font-size: 19px; margin: 0; }
.cube p { margin: 0; color: var(--muted); font-size: 15px; }
.cube-grid--3 { grid-template-columns: repeat(3, 1fr); max-width: none; }
@media (max-width: 880px) { .cube-grid--3 { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cube-grid { grid-template-columns: 1fr; } .cube { min-height: 0; } }

/* ---------- Healthcare case studies ---------- */
.cases { display: grid; gap: 20px; }
.case {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(26px, 3.4vw, 42px) clamp(26px, 3.4vw, 42px) clamp(26px, 3.4vw, 42px) clamp(30px, 3.6vw, 46px);
  overflow: hidden;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.case:hover { transform: translateY(-3px); background: var(--surface-2); border-color: var(--line-strong); }
.case::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--ca, var(--teal)); opacity: 0.85;
}
.case:nth-child(1) { --ca: #a78bfa; }
.case:nth-child(2) { --ca: #2dd4bf; }
.case:nth-child(3) { --ca: #60a5fa; }
.case-eyebrow {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ca, var(--teal));
  margin-bottom: 14px;
}
.case-eyebrow .case-tag {
  font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
  padding: 3px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.case h3 { font-size: clamp(20px, 2.6vw, 26px); margin: 0 0 14px; }
.case-narrative { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.case-narrative + .case-narrative { margin-top: 12px; }
.case-narrative strong { color: #d9dbf0; font-weight: 600; }
.case-aside { display: flex; flex-direction: column; gap: 14px; }
.case-metric { border-left: 2px solid var(--ca, var(--line-strong)); padding-left: 14px; }
.case-metric .n { display: block; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 17px; color: var(--ink); line-height: 1.25; }
.case-metric .l { display: block; margin-top: 4px; font-size: 13px; color: var(--muted-2); line-height: 1.45; }
@media (max-width: 760px) {
  .case { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- Founders band (full-bleed photo + background copy) ---------- */
.founders-band { padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.founders-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: clamp(380px, 54vh, 580px); }
.founders-photo { position: relative; overflow: hidden; }
.founders-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.founders-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, transparent 62%, rgba(7, 8, 20, 0.55) 100%);
}
.founders-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(36px, 5vw, 72px) clamp(24px, 5vw, 76px);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(139, 92, 246, 0.12), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(45, 212, 191, 0.1), transparent 60%),
    var(--bg-2);
}
.founders-copy .eyebrow { margin-bottom: 14px; }
.founders-copy h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 18px; }
.founders-copy .lede { margin: 0; max-width: 32em; }
.founders-bios { margin: 20px 0 0; display: grid; gap: 12px; max-width: 34em; }
.founders-bios p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.founders-bios strong { color: var(--ink); font-weight: 600; }
.founders-copy .founders-names { margin: 20px 0 0; font-family: 'Space Grotesk', sans-serif; font-size: 14px; letter-spacing: 0.04em; color: var(--muted); }
.founders-copy .mt-cta { margin-top: 26px; }

@media (max-width: 760px) {
  .founders-grid { grid-template-columns: 1fr; }
  .founders-photo { min-height: 300px; }
  .founders-photo::after { background: linear-gradient(180deg, transparent 55%, rgba(7, 8, 20, 0.6) 100%); }
}

/* Founder stat callouts */
.founders-stats {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px 28px; margin: 26px 0 4px; max-width: 34em;
}
.founders-stats .fstat { display: flex; flex-direction: column; gap: 5px; }
.founders-stats .fstat-num {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(22px, 2.4vw, 27px); line-height: 1; letter-spacing: -0.01em;
  color: var(--ink);
}
.founders-stats .fstat-lbl { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted-2); }
.founders-stats .fstat:nth-child(1) .fstat-num { color: #b79bff; }
.founders-stats .fstat:nth-child(2) .fstat-num { color: #7af0e0; }
.founders-stats .fstat:nth-child(3) .fstat-num { color: #a8cdff; }
.founders-stats .fstat:nth-child(4) .fstat-num { color: var(--ink); }

/* ---------- Validation / social-proof strip ---------- */
.proof { border-bottom: 1px solid var(--line); padding: clamp(30px, 4.5vw, 48px) 0; background: var(--bg); }
.proof-label {
  text-align: center; margin: 0 0 22px;
  font-family: 'Space Grotesk', sans-serif; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-2);
}
.logo-wall {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  row-gap: clamp(18px, 3vw, 26px); column-gap: clamp(24px, 4.5vw, 60px);
}
.logo-mark {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(16px, 2vw, 21px); letter-spacing: 0.01em;
  color: var(--muted); opacity: 0.7; white-space: nowrap;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}
.logo-mark:hover { opacity: 1; color: var(--ink); }
.proof-caption { text-align: center; margin: 24px 0 0; font-size: 13px; color: var(--muted-2); }

@media (max-width: 760px) {
  .founders-stats { gap: 18px 22px; }
}

/* ---------- Team (About) ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.team-card {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 24px 28px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.team-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.team-avatar {
  width: 88px; height: 88px; margin: 0 auto 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--teal);
}
.team-avatar--mascot {
  background: var(--surface-2);
  border-color: rgba(45, 212, 191, 0.35);
  animation: mascot-bob 3.5s var(--ease) infinite;
}
.team-avatar--mascot span { background: transparent; }
.peak-mascot { width: 52px; height: auto; display: block; }
.team-card h3 { font-size: 20px; margin-bottom: 6px; }
.team-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 14px;
}
.team-quote {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-style: italic;
  color: var(--teal); margin: -6px 0 10px;
}
.team-card p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.team-card--mascot:hover .peak-mascot { animation: mascot-wiggle 0.5s var(--ease); }
@keyframes mascot-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  75% { transform: rotate(6deg); }
}
.team-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  vertical-align: middle;
}
.team-card--mascot:hover { border-color: rgba(45, 212, 191, 0.45); }
@keyframes mascot-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ---------- Related row ---------- */
.related { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4.6vw, 46px); margin-bottom: 18px; }
.cta-band .lede { margin: 0 auto 30px; max-width: 560px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 54px 0 60px; background: var(--bg-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.footer .brand { margin-bottom: 14px; }
.footer-tag { color: var(--muted); max-width: 320px; font-size: 15px; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif; font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted-2); margin-bottom: 14px; font-weight: 600;
}
.footer-col a { display: block; color: var(--muted); margin-bottom: 9px; font-size: 15px; }
.footer-col a:hover { color: var(--ink); text-decoration: none; }
.footer-base {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted-2);
}

/* ---------- Chips (mini layer list) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 26px 0 0; padding: 0; }
.chips li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13.5px; font-weight: 500;
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: #d9dbf0;
}
.chips li b { color: var(--teal); font-weight: 600; }

/* ---------- Eyebrow row helpers ---------- */
.stack > * + * { margin-top: 18px; }
.mt-cta { margin-top: 32px; }
.measure { max-width: 640px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(7, 8, 20, 0.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 22px;
    transform: translateY(-130%); transition: transform 0.35s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav-links .nav-cta { margin-top: 14px; justify-content: center; border-bottom: 0; }
  .nav-toggle { display: inline-flex; }
  .grid-3, .grid-2, .grid-4, .team-grid { grid-template-columns: 1fr; }
  .related { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, 1fr); gap: 30px 18px; }
  .process::before { display: none; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  .hero { min-height: 86vh; padding: 90px 0 70px; }
  .card { padding: 24px; }
  .layer { grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; }
  .layer-num { width: 44px; height: 44px; font-size: 18px; }
}

/* Mobile crops keep the headline-safe region of each image visible */
@media (max-width: 760px) {
  .hero .section-media img { object-position: 50% 38%; }
  .scrim--left, .scrim--right { background: linear-gradient(180deg, rgba(7,8,20,0.6) 0%, rgba(7,8,20,0.5) 40%, rgba(7,8,20,0.9) 100%); }
  .scrim--left-fade { background: linear-gradient(180deg, rgba(7,8,20,0.5) 0%, rgba(7,8,20,0.5) 38%, rgba(7,8,20,0.85) 82%, var(--bg) 100%); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .team-card:hover { transform: none; }
  .team-avatar--mascot { animation: none; }
  .team-card--mascot:hover .peak-mascot { animation: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
