/* ============================================
   CPES - Animations & Polish Layer
   Loaded after style.css; refines, never destroys.
   ============================================ */

:root {
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.65, 0, 0.35, 1);
  --reveal-dur:     900ms;
}

/* ---------- Page boot fade ---------- */
html, body { background: var(--cream); }
body {
  opacity: 0;
  animation: bodyFadeIn 600ms var(--ease-out-quint) forwards;
}
@keyframes bodyFadeIn { to { opacity: 1; } }

/* ---------- Scroll-driven reveal primitives ---------- */
.reveal {
  opacity: 0;
  will-change: transform, opacity, filter;
  transition:
    opacity var(--reveal-dur) var(--ease-out-quint),
    transform var(--reveal-dur) var(--ease-out-quint),
    filter var(--reveal-dur) var(--ease-out-quint);
  filter: blur(6px);
}
.reveal[data-reveal="fade-up"]    { transform: translate3d(0, 36px, 0); }
.reveal[data-reveal="fade-right"] { transform: translate3d(-36px, 0, 0); }
.reveal[data-reveal="fade-left"]  { transform: translate3d(36px, 0, 0); }
.reveal[data-reveal="zoom-in"]    { transform: scale(0.94); }

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* Deep-dive grid cards: a smooth wave reveal — slower than the snap I had,
   faster than the 900ms hero curve. ~700ms with a light blur so each card
   reads as deliberately "appearing" rather than popping in. */
.work.reveal, .diff.reveal, .gate.reveal, .cell.reveal, .subgate.reveal,
.kill-cell.reveal, .yield-cell.reveal, .anatomy-cell.reveal,
.source-cell.reveal, .stack-cell.reveal,
.audience.reveal, .tree-step.reveal, .input-cell.reveal, .fit.reveal,
.gate-card.reveal, .deep-card.reveal, .link-card.reveal,
.deepdive-card.reveal,
.nav-item.reveal, .pn-link.reveal,
.deliv-list li.reveal {
  transition:
    opacity 720ms var(--ease-out-quint),
    transform 720ms var(--ease-out-quint),
    filter 720ms var(--ease-out-quint);
  filter: blur(4px);
}
/* Once revealed, drop the filter entirely so child links/text render crisp
   on hover/click rather than inheriting any residual blur. */
.work.reveal.is-visible, .diff.reveal.is-visible, .gate.reveal.is-visible,
.cell.reveal.is-visible, .subgate.reveal.is-visible,
.kill-cell.reveal.is-visible, .yield-cell.reveal.is-visible,
.anatomy-cell.reveal.is-visible, .source-cell.reveal.is-visible,
.stack-cell.reveal.is-visible,
.audience.reveal.is-visible, .tree-step.reveal.is-visible,
.input-cell.reveal.is-visible, .fit.reveal.is-visible,
.gate-card.reveal.is-visible, .deep-card.reveal.is-visible,
.link-card.reveal.is-visible, .deepdive-card.reveal.is-visible,
.nav-item.reveal.is-visible, .pn-link.reveal.is-visible,
.deliv-list li.reveal.is-visible {
  filter: none;
}
.work.reveal[data-reveal="fade-up"],
.diff.reveal[data-reveal="fade-up"],
.gate.reveal[data-reveal="fade-up"],
.cell.reveal[data-reveal="fade-up"],
.subgate.reveal[data-reveal="fade-up"],
.kill-cell.reveal[data-reveal="fade-up"],
.yield-cell.reveal[data-reveal="fade-up"],
.anatomy-cell.reveal[data-reveal="fade-up"],
.source-cell.reveal[data-reveal="fade-up"],
.stack-cell.reveal[data-reveal="fade-up"],
.audience.reveal[data-reveal="fade-up"],
.tree-step.reveal[data-reveal="fade-up"],
.input-cell.reveal[data-reveal="fade-up"],
.fit.reveal[data-reveal="fade-up"],
.gate-card.reveal[data-reveal="fade-up"],
.deep-card.reveal[data-reveal="fade-up"],
.link-card.reveal[data-reveal="fade-up"],
.deepdive-card.reveal[data-reveal="fade-up"],
.nav-item.reveal[data-reveal="fade-up"],
.pn-link.reveal[data-reveal="fade-up"],
.deliv-list li.reveal[data-reveal="fade-up"] {
  transform: translate3d(0, 26px, 0);
}

/* ---------- Hero polish ----------
   Bg color sits on .page-hero (transitions cream → navy at night). The
   warm radial gradients live on .page-hero::before (further down) so we
   can fade them out cleanly via opacity - gradients don't transition to
   solid colors. */
.page-hero {
  background-color: var(--cream);
}

/* Decorative mark - slow rotation + subtle scroll parallax */
.deco-mark.tr[data-spin] {
  animation: gentleSpin 60s linear infinite;
  transform-origin: 50% 50%;
}
@keyframes gentleSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Hero word stagger (h1) */
.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  filter: blur(8px);
  transition:
    opacity 700ms var(--ease-out-quint),
    transform 700ms var(--ease-out-quint),
    filter 700ms var(--ease-out-quint);
}
.hero-title.is-visible .word {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}
.hero-title.is-visible .word:nth-child(1) { transition-delay: 60ms; }
.hero-title.is-visible .word:nth-child(2) { transition-delay: 130ms; }
.hero-title.is-visible .word:nth-child(3) { transition-delay: 200ms; }
.hero-title.is-visible .word:nth-child(4) { transition-delay: 270ms; }
.hero-title.is-visible .word:nth-child(5) { transition-delay: 340ms; }
.hero-title.is-visible .word:nth-child(6) { transition-delay: 410ms; }
.hero-title.is-visible .word:nth-child(7) { transition-delay: 480ms; }

/* Gradient text accent */
.gradient-text {
  background: linear-gradient(110deg, var(--terracotta) 0%, #E8A05F 35%, var(--teal) 75%, var(--teal-dark) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientFlow 9s var(--ease-in-out) infinite;
}
@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* CP pill pulse dot */
.cp-pill {
  position: relative;
  transition: transform .25s var(--ease-out-quint), background .25s, border-color .25s;
}
.cp-pill:hover { transform: translateY(-1px); background: rgba(212, 165, 72, 0.14); }
.cp-pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
  position: relative;
  margin-right: 2px;
}
.cp-pill-dot::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  background: var(--teal);
  animation: pingDot 2.4s var(--ease-out-quint) infinite;
}
@keyframes pingDot {
  0%   { transform: scale(1); opacity: 0.6; }
  80%, 100% { transform: scale(2.6); opacity: 0; }
}

/* Hero art - pulse ring + floating mark + orbits */
.hero-art { overflow: visible; }
.hero-art-pulse {
  position: absolute; inset: 12%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 139, 58, 0.22), transparent 60%);
  filter: blur(6px);
  animation: heroPulse 5.5s var(--ease-in-out) infinite;
}
@keyframes heroPulse {
  0%, 100% { transform: scale(1);    opacity: 0.85; }
  50%      { transform: scale(1.08); opacity: 1; }
}
.hero-art img.floating {
  animation: heroFloat 7s var(--ease-in-out) infinite;
  filter: drop-shadow(0 18px 38px rgba(212, 165, 72, 0.18));
  transition: transform .4s var(--ease-out-quint);
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0)   rotate(0deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}

/* Hero orbits */
.hero-orbits {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.orbit {
  position: absolute;
  top: 50%; left: 50%;
  border-radius: 50%;
  border: 1px dashed rgba(212, 165, 72, 0.12);
  transform: translate(-100%, -50%);
}
.orbit-1 { width: 520px; height: 520px; animation: orbitSpin 80s linear infinite; }
.orbit-2 { width: 760px; height: 760px; border-color: rgba(216, 139, 58, 0.10); animation: orbitSpin 120s linear infinite reverse; }
.orbit-3 { width: 1100px; height: 1100px; border-color: rgba(212, 165, 72, 0.07); animation: orbitSpin 200s linear infinite; }
@keyframes orbitSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ---------- Buttons: shimmer + magnetic glow ---------- */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .25s var(--ease-out-quint),
    background .25s,
    box-shadow .35s var(--ease-out-quint),
    color .25s;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out-quint);
  z-index: -1;
}
.btn:hover::before { transform: translateX(120%); }
.btn-primary:hover   { box-shadow: 0 14px 36px rgba(216, 139, 58, 0.32); }
.btn-secondary:hover { box-shadow: 0 14px 36px rgba(212, 165, 72, 0.30); }
.btn-ghost:hover     { box-shadow: 0 14px 36px rgba(212, 165, 72, 0.18); }
.btn .btn-arrow {
  display: inline-block;
  transition: transform .3s var(--ease-out-quint);
}
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ---------- Sticky nav: scroll-aware ---------- */
.nav {
  transform: translateY(-100%);
  animation: navDrop 700ms var(--ease-out-quint) 200ms forwards;
  transition: background .3s var(--ease-out-quint), box-shadow .3s var(--ease-out-quint), border-color .3s;
}
@keyframes navDrop { to { transform: translateY(0); } }
.nav.is-scrolled {
  background: rgba(10, 14, 26, 0.92);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  border-bottom-color: transparent;
}
/* Animated underline on every nav link */
.nav-links a {
  transition: color .25s var(--ease-out-quint);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: auto; bottom: 2px;
  height: 2px;
  width: 0;
  background: var(--terracotta);
  transition: width .35s var(--ease-out-quint);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active::after { width: 100%; }

/* Logo subtle hover lift */
.nav-logo img { transition: transform .3s var(--ease-out-quint), filter .3s; }
.nav-logo:hover img { transform: scale(1.04) rotate(-2deg); }

/* Nav CTA arrow nudge */
.nav-cta { position: relative; overflow: hidden; }
.nav-cta::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 1s var(--ease-out-quint);
}
.nav-cta:hover::after { transform: translateX(120%); }

/* ---------- Stat strip: glow + count-up affordance ---------- */
.stat-strip { overflow: hidden; }
.stat-strip-glow {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 200%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(216, 139, 58, 0.18), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(248, 244, 237, 0.08), transparent 50%);
  pointer-events: none;
  animation: glowDrift 18s var(--ease-in-out) infinite;
}
@keyframes glowDrift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(20px, 14px, 0); }
}
.stat-strip .container { position: relative; z-index: 2; }
.stat-tile { transition: transform .35s var(--ease-out-quint); }
.stat-tile:hover { transform: translateY(-3px); }
.stat-num {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  transition: color .3s;
}
.stat-tile.is-visible .stat-num { animation: statPop 800ms var(--ease-out-quint) both; }
@keyframes statPop {
  0%   { transform: translateY(8px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 1; }
}

/* ---------- Section headers: animated divider ---------- */
.section-header { position: relative; }
.section-header.is-visible::after {
  content: '';
  display: block;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--terracotta), var(--teal));
  border-radius: 2px;
  margin: 24px auto 0;
  transform-origin: left;
  animation: dividerGrow 700ms var(--ease-out-quint) 250ms backwards;
}
@keyframes dividerGrow {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* ---------- Pillar cards: lift, gradient border, arrow reveal ---------- */
.pillar-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform .35s var(--ease-out-quint),
    box-shadow .45s var(--ease-out-quint),
    border-color .35s;
}
.pillar-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--terracotta), var(--teal));
  -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 .35s var(--ease-out-quint);
  pointer-events: none;
  z-index: 1;
}
.pillar-card::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(216, 139, 58, 0.18), transparent 60%);
  top: var(--mx, 50%);
  left: var(--my, 50%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .5s var(--ease-out-quint), opacity .35s;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
.pillar-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}
.pillar-card:hover::before { opacity: 1; }
.pillar-card:hover::after  { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.pillar-card > * { position: relative; z-index: 2; }

.pillar-num {
  position: relative;
  display: inline-block;
}
.pillar-num::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--terracotta);
  margin-top: 6px;
  transition: width .35s var(--ease-out-quint);
}
.pillar-card:hover .pillar-num::after { width: 56px; }
.pillar-arrow {
  display: inline-block;
  margin-top: auto;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--teal);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s var(--ease-out-quint), transform .3s var(--ease-out-quint);
}
.pillar-card:hover .pillar-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- Cross-page prev / next nav (injected on every deep-dive) ---------- */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  background: #0a0e1a;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.page-nav-link {
  display: block;
  padding: 24px 28px;
  background: #131826;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #f4f3ee;
  transition: border-color .2s, background .2s, transform .2s;
}
.page-nav-link:hover {
  border-color: #d4a548;
  background: #1a2030;
  transform: translateY(-2px);
}
.page-nav-link.page-nav-next { text-align: right; }
.page-nav-link.page-nav-empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}
.page-nav-link .page-nav-dir {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #f4f3ee;
}
.page-nav-link .page-nav-sub {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}
@media (max-width: 600px) {
  .page-nav { grid-template-columns: 1fr; padding: 40px 24px 64px; }
  .page-nav-link.page-nav-next { text-align: left; }
}

/* ---------- Capabilities & deep dives block (under #services) ---------- */
.deepdives {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--sand);
}
.deepdives-head {
  max-width: 720px;
  margin: 0 auto 32px;
  text-align: center;
}
.deepdives-head .eyebrow { display: inline-block; margin-bottom: 12px; }
.deepdives-head .lede { margin: 0 auto; font-size: 16px; }
.deepdives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.deepdive-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .2s var(--ease-out-quint), box-shadow .25s, border-color .2s;
}
.deepdive-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--teal);
}
.deepdive-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
}
.deepdive-card h4 {
  margin: 0;
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.deepdive-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.deepdive-link {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal);
  transition: gap .2s, transform .2s;
}
.deepdive-card:hover .deepdive-link { color: var(--teal-dark); }

/* ---------- Steps: connecting line + active number ---------- */
.steps { position: relative; }
.step {
  transition:
    transform .35s var(--ease-out-quint),
    box-shadow .45s var(--ease-out-quint),
    border-color .35s;
}
.step:hover {
  transform: translateX(4px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.10);
  border-color: var(--teal);
}
.step-num {
  position: relative;
  transition: transform .35s var(--ease-out-quint), box-shadow .35s;
}
.step-num::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.25;
  animation: ringPulse 3.5s var(--ease-in-out) infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1);   opacity: 0.0; }
  50%      { transform: scale(1.15); opacity: 0.35; }
}
.step:hover .step-num { transform: scale(1.06) rotate(-3deg); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.step .gate {
  transition: background .25s, color .25s, transform .25s var(--ease-out-quint);
}
.step:hover .gate {
  background: var(--terracotta);
  color: var(--white);
  transform: scale(1.04);
}

/* ---------- Mandate section: animated radial backdrop ---------- */
.mandate-section { position: relative; overflow: hidden; }
.mandate-bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 30% 20%, rgba(212, 165, 72, 0.10), transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(216, 139, 58, 0.10), transparent 45%);
  animation: mandateDrift 22s var(--ease-in-out) infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes mandateDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-30px, 20px, 0) scale(1.05); }
}

/* ---------- Footer: link slide ---------- */
.foot-col a {
  position: relative;
  display: inline-block;
  transition: color .25s, transform .25s var(--ease-out-quint);
}
.foot-col a::before {
  content: '→';
  display: inline-block;
  width: 0;
  overflow: hidden;
  opacity: 0;
  margin-right: 0;
  color: var(--terracotta);
  transition: width .25s var(--ease-out-quint), opacity .25s, margin-right .25s;
}
.foot-col a:hover { transform: translateX(4px); }
.foot-col a:hover::before { width: 14px; opacity: 1; margin-right: 6px; }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 200;
  background: transparent;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--terracotta), var(--teal));
  box-shadow: 0 0 10px rgba(216, 139, 58, 0.4);
  transition: width .15s linear;
}

/* ---------- Selection ---------- */
::selection { background: rgba(216, 139, 58, 0.35); color: var(--charcoal); }

/* ---------- Focus polish ---------- */
.btn:focus-visible,
.nav-cta:focus-visible,
a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 999px;
}

/* ---------- Smooth scroll ---------- */
html { scroll-behavior: smooth; }

/* ============================================
   PHASE TWO - Visual substance & professional polish
   ============================================ */

/* ---------- Subtle film grain (premium texture) ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

body {
  background-color: var(--cream);
}

/* ---------- Hero scene (the half-clipped sun/moon) ---------- */
/* Half-sun cut against the right edge of the viewport. The hero-scene is
   anchored so the celestial body's center sits on the viewport's right
   edge; .page-hero has overflow:hidden so the right half clips. The
   scene is a 3D flip card - front face = sun, back face = moon - and the
   half-clip never moves during the flip because rotateY only rotates
   around the body's own vertical axis. */
.hero-scene {
  position: absolute;
  right: calc((100% - 100vw) / 2);
  top: 38%;
  width: clamp(440px, 56vw, 760px);
  aspect-ratio: 1 / 1;
  transform: translate(50%, -50%);
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  pointer-events: none;
  z-index: 1;
  perspective: 1200px;
  perspective-origin: 50% 50%;
}
.hero-scene .scene-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.celestial {
  position: absolute;
  inset: 0;
}

.celestial-face {
  position: absolute;
  inset: 0;
}

/* Sun: rays sweep left↔right (instead of full 360° spin), breathing corona, animated prominences */
.sun-rays-long  {
  transform-box: fill-box;
  transform-origin: center;
  animation: sweepSun 14s var(--ease-in-out, ease-in-out) infinite alternate;
}
.sun-rays-short {
  transform-box: fill-box;
  transform-origin: center;
  animation: sweepSun 10s var(--ease-in-out, ease-in-out) infinite alternate-reverse;
}
.sun-corona-outer {
  transform-box: fill-box;
  transform-origin: center;
  animation: coronaBreatheOuter 7s ease-in-out infinite;
}
.sun-corona-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: coronaBreatheInner 5s ease-in-out infinite;
}
.sun-disc {
  transform-box: fill-box;
  transform-origin: center;
  animation: sunDiscPulse 6s ease-in-out infinite;
}
.sun-highlight {
  transform-box: fill-box;
  transform-origin: center;
  animation: highlightShimmer 8s ease-in-out infinite;
}

@keyframes sweepSun          { from { transform: rotate(-18deg); } to { transform: rotate(18deg); } }
@keyframes coronaBreatheOuter {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.06); opacity: 0.85; }
}
@keyframes coronaBreatheInner {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.10); opacity: 0.80; }
}
@keyframes sunDiscPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}
@keyframes highlightShimmer {
  0%, 100% { transform: translate(0, 0); opacity: 0.45; }
  50%      { transform: translate(3px, 1px); opacity: 0.55; }
}

/* Solar prominences flicker independently */
.sun-prominences .prom {
  transform-box: fill-box;
  transform-origin: center;
  animation: promFlicker 4.5s ease-in-out infinite;
}
.sun-prominences .prom-2 { animation-duration: 5.5s; animation-delay: -0.8s; }
.sun-prominences .prom-3 { animation-duration: 6.0s; animation-delay: -1.6s; }
.sun-prominences .prom-4 { animation-duration: 4.0s; animation-delay: -2.4s; }
.sun-prominences .prom-5 { animation-duration: 5.0s; animation-delay: -3.2s; }
@keyframes promFlicker {
  0%, 100% { opacity: 0.45; transform: scale(0.95); }
  50%      { opacity: 0.95; transform: scale(1.06); }
}

/* Moon: subtle breathing glow */
.moon-glow-outer {
  transform-box: fill-box;
  transform-origin: center;
  animation: moonGlowPulse 8s ease-in-out infinite;
}
.moon-glow-inner {
  transform-box: fill-box;
  transform-origin: center;
  animation: moonGlowPulse 6s ease-in-out infinite reverse;
}
@keyframes moonGlowPulse {
  0%, 100% { transform: scale(1);    opacity: 1; }
  50%      { transform: scale(1.04); opacity: 0.85; }
}

/* ---------- Page-hero warm radial-gradient layer (day-only) ----------
   The original .page-hero ships a multi-stop radial gradient on cream;
   gradients don't transition smoothly to a solid navy, so we move them
   into a ::before that we can fade out via opacity instead. */
.page-hero { position: relative; isolation: isolate; }
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(216, 139, 58, 0.10), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(212, 165, 72, 0.10), transparent 60%);
  z-index: 0;
  pointer-events: none;
}
.page-hero > .hero-orbits     { z-index: 1; }
.page-hero > .hero-scene      { z-index: 2; }
.page-hero .container         { position: relative; z-index: 3; }

.hero-text { position: relative; z-index: 3; }

/* Mobile/tablet: shrink the half-sun and center it vertically against the hero. */
@media (max-width: 980px) {
  .hero-scene {
    width: clamp(260px, 70vw, 380px);
    top: 30%;
    bottom: auto;
    right: calc((100% - 100vw) / 2);
    transform: translate(20%, -50%);
    opacity: 0.55;

  }
}

/* Hero meta row (Principal · HQ · Languages) */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 165, 72, 0.12);
}
.hero-meta-item { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta-value {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--charcoal);
  letter-spacing: -0.01em;
}

/* ---------- Trust strip / credentials marquee ---------- */
.trust-strip {
  background: var(--charcoal);
  color: var(--cream);
  padding: 18px 0;
  position: relative;
  z-index: 4;
  overflow: hidden;
  border-top: 1px solid rgba(248, 244, 237, 0.08);
  border-bottom: 1px solid rgba(248, 244, 237, 0.08);
}
.trust-strip::before,
.trust-strip::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.trust-strip::before { left: 0;  background: linear-gradient(90deg, var(--charcoal), transparent); }
.trust-strip::after  { right: 0; background: linear-gradient(-90deg, var(--charcoal), transparent); }
.trust-strip .container { max-width: none; padding: 0; overflow: hidden; }
.trust-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: trustScroll 48s linear infinite;
}
.trust-row {
  display: flex;
  gap: 56px;
  padding-right: 56px;
  flex-shrink: 0;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(248, 244, 237, 0.85);
  white-space: nowrap;
}
.trust-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--terracotta);
  flex-shrink: 0;
}
@keyframes trustScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.trust-strip:hover .trust-track { animation-play-state: paused; }

/* ---------- Pillar card icons ---------- */
.pillar-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(212, 165, 72, 0.10), rgba(216, 139, 58, 0.10));
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition:
    transform .35s var(--ease-out-quint),
    background .35s,
    color .35s;
}
.pillar-icon svg { width: 28px; height: 28px; }
.pillar-card:hover .pillar-icon {
  transform: rotate(-6deg) scale(1.06);
  background: linear-gradient(135deg, var(--teal), var(--terracotta));
  color: var(--white);
}

/* ---------- Pillar card refined typography ---------- */
.pillar-card { padding-top: 28px; }
.pillar-card h3 {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  letter-spacing: -0.015em;
}

/* ---------- Pull quote section ---------- */
.quote-section {
  background: var(--cream);
  position: relative;
  overflow: hidden;
  padding: 120px 0;
}
.quote-bg {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 20% 30%, rgba(216, 139, 58, 0.08), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212, 165, 72, 0.06), transparent 50%);
  pointer-events: none;
}
.pull-quote {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  z-index: 2;
}
.quote-mark {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 160px;
  line-height: 0.6;
  color: var(--terracotta);
  opacity: 0.35;
  margin-bottom: 24px;
  letter-spacing: -0.05em;
}
.pull-quote blockquote {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 400;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--charcoal);
  margin: 0 0 28px;
}
.pull-quote blockquote em {
  font-style: italic;
  color: var(--teal);
}
.pull-quote figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.quote-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.quote-meta {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* ---------- Principal card ---------- */
.principal-section { padding-top: 64px; }
.principal-card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 56px;
  align-items: start;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
  transition: box-shadow .4s var(--ease-out-quint);
}
.principal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--teal), var(--terracotta));
}
.principal-card:hover { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.10); }

.principal-portrait {
  position: relative;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(216, 139, 58, 0.20), transparent 60%),
    linear-gradient(135deg, var(--teal), var(--teal-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 16px 48px rgba(212, 165, 72, 0.25);
}
.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 50%;
  display: block;
}
.portrait-monogram {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  font-size: 72px;
  letter-spacing: -0.02em;
  color: var(--cream);
}
.portrait-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(216, 139, 58, 0.5);
  animation: portraitSpin 30s linear infinite;
}
@keyframes portraitSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.principal-body { min-width: 0; }
.principal-role {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 8px;
}
.principal-name {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  font-size: clamp(32px, 3.6vw, 44px);
  letter-spacing: -0.02em;
  color: var(--charcoal);
  margin: 0 0 16px;
  line-height: 1.05;
}
.principal-bio {
  font-size: 17px;
  line-height: 1.7;
  color: var(--charcoal);
  margin: 0 0 32px;
  max-width: 640px;
}

.principal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 28px 0;
  margin: 0 0 32px;
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
}
.principal-fact { display: flex; flex-direction: column; gap: 4px; }
.fact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}
.fact-value {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  font-size: 16px;
  color: var(--charcoal);
  letter-spacing: -0.005em;
}
.fact-meta { font-size: 13px; color: var(--muted); }

.principal-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Mandate drop cap ---------- */
.mandate-lede { position: relative; }
.drop-cap {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 4em;
  line-height: 0.85;
  float: left;
  margin: 6px 12px 0 0;
  color: var(--terracotta);
  letter-spacing: -0.04em;
}
.mandate-section { padding: 120px 0; }

/* ---------- Refined h2 mix-of-types ---------- */
h2 {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  letter-spacing: -0.025em;
}
h2 .gradient-text {
  font-style: italic;
}

/* ---------- Section transition gradient bleed ---------- */
section.alt + section,
section + section.alt,
.stat-strip + section,
section + .quote-section,
.quote-section + section,
section.alt + .mandate-section {
  position: relative;
}
section.alt::before,
.quote-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sand), transparent);
}

/* ---------- Smooth color transition between sections ---------- */
section, .stat-strip, .trust-strip, .quote-section {
  transition: background .4s ease;
}

/* ---------- Responsive overrides ---------- */
@media (max-width: 980px) {
  .principal-card {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px;
    text-align: center;
  }
  .principal-portrait { margin: 0 auto; }
  .principal-bio { margin-left: auto; margin-right: auto; }
  .principal-cta { justify-content: center; }
  .hero-meta { gap: 24px; }
  .pull-quote blockquote { font-size: clamp(20px, 4vw, 28px); }
  .quote-mark { font-size: 100px; }
}
@media (max-width: 640px) {
  .principal-card { padding: 32px 24px; }
  .principal-portrait { width: 140px; height: 140px; }
  .portrait-monogram { font-size: 52px; }
  .hero-meta {
    flex-direction: column;
    gap: 16px;
    padding-top: 20px;
    margin-top: 24px;
  }
  .trust-row { gap: 32px; padding-right: 32px; }
  .trust-item { font-size: 11px; letter-spacing: 0.10em; }
  .quote-section, .mandate-section { padding: 80px 0; }
}

/* ============================================
   PHASE THREE - Recommendations carousel + Contact
   ============================================ */

/* ---------- Recommendations section ---------- */
.recs-section {
  background: var(--cream);
  position: relative;
  overflow: hidden;
  padding: 120px 0;
}
.recs-section .quote-bg {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 20% 30%, rgba(216, 139, 58, 0.08), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(212, 165, 72, 0.06), transparent 50%);
  pointer-events: none;
}
.recs-section .container { position: relative; z-index: 2; }

/* ---------- Carousel ---------- */
.recs-carousel {
  position: relative;
  margin: 0 -24px;
  padding: 8px 24px 24px;
  overflow: hidden;
  /* Soft edge fade so cards drift in/out instead of hard-clipping. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 40px, black calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, black 40px, black calc(100% - 40px), transparent 100%);
}
.recs-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding: 8px 4px 24px;
  animation: recsMarquee 90s linear infinite;
  will-change: transform;
}
.recs-track:hover { animation-play-state: paused; }
@keyframes recsMarquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
/* Hide the manual nav controls — the marquee runs itself. */
.rec-arrow, .recs-dots { display: none !important; }

.rec-card {
  flex: 0 0 min(440px, 86vw);
  scroll-snap-align: start;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--radius-lg);
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  transition:
    transform .35s var(--ease-out-quint),
    box-shadow .45s var(--ease-out-quint),
    border-color .35s;
}
.rec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10);
  border-color: var(--teal);
}
.rec-quote-mark {
  position: absolute;
  top: 10px;
  left: 24px;
  font-family: 'Fraunces', serif;
  font-size: 80px;
  line-height: 0.6;
  color: var(--terracotta);
  opacity: 0.25;
  letter-spacing: -0.05em;
  pointer-events: none;
}
.rec-text {
  font-family: 'Fraunces', 'Inter', serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--charcoal);
  margin: 16px 0 0;
  flex: 1;
  letter-spacing: -0.005em;
}
.rec-author {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--sand);
}
.rec-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(212, 165, 72, 0.18);
}
.rec-card:nth-child(even) .rec-avatar {
  background: linear-gradient(135deg, var(--terracotta), var(--terracotta-dark));
  box-shadow: 0 4px 12px rgba(216, 139, 58, 0.22);
}
.rec-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rec-name {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--charcoal);
  letter-spacing: -0.005em;
}
.rec-title {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}
.rec-rel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 4px;
}

/* Carousel arrows */
.rec-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  color: var(--charcoal);
  border: 1px solid var(--sand);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s var(--ease-out-quint), background .25s, color .25s, box-shadow .25s;
}
.rec-arrow svg { width: 22px; height: 22px; }
.rec-arrow:hover {
  transform: translateY(-50%) scale(1.06);
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(212, 165, 72, 0.30);
}
.rec-arrow:active { transform: translateY(-50%) scale(0.96); }
.rec-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: translateY(-50%);
}
.rec-prev { left: -8px; }
.rec-next { right: -8px; }

/* Pagination dots */
.recs-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.recs-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sand);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background .25s var(--ease-out-quint), transform .25s;
}
.recs-dot:hover { transform: scale(1.3); }
.recs-dot.is-active {
  background: var(--terracotta);
  transform: scale(1.3);
}

/* ---------- Contact section ---------- */
.contact-section {
  padding: 120px 0;
  background: var(--white);
  position: relative;
}
.contact-grid-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.contact-card-home {
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition:
    transform .35s var(--ease-out-quint),
    box-shadow .35s var(--ease-out-quint),
    border-color .35s,
    background .35s;
}
.contact-card-home::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--terracotta));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease-out-quint);
}
.contact-card-home:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
  border-color: var(--teal);
  background: var(--white);
}
.contact-card-home:hover::before { transform: scaleX(1); }
.contact-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 165, 72, 0.12), rgba(216, 139, 58, 0.12));
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: background .35s, color .35s, transform .35s var(--ease-out-quint);
}
.contact-icon svg { width: 22px; height: 22px; }
.contact-card-home:hover .contact-icon {
  background: linear-gradient(135deg, var(--teal), var(--terracotta));
  color: var(--white);
  transform: rotate(-6deg) scale(1.06);
}
.contact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-value {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-weight: 500;
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--charcoal);
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.contact-action {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  margin-top: auto;
  padding-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .25s, color .25s;
}
.contact-card-home:hover .contact-action { gap: 8px; color: var(--terracotta); }
.contact-card-info { cursor: default; }
.contact-card-info:hover { transform: none; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04); border-color: var(--sand); }
.contact-card-info:hover::before { transform: scaleX(0); }
.contact-card-info:hover .contact-action { color: var(--muted); gap: 4px; }
.contact-card-info:hover .contact-icon { transform: none; background: linear-gradient(135deg, rgba(212, 165, 72, 0.12), rgba(216, 139, 58, 0.12)); color: var(--teal); }

/* ---------- Principal tagline ---------- */
.principal-tagline {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ---------- Mobile carousel ---------- */
@media (max-width: 980px) {
  .rec-arrow { display: none; }
  .rec-card { flex-basis: 86vw; }
  .recs-carousel { margin: 0 -16px; padding: 0 16px 16px; }
}

/* ---------- Reduced motion: kill all the things ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  body { opacity: 1; }
  .reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero-title .word { opacity: 1; transform: none; filter: none; }
  .trust-track { animation: none !important; transform: none !important; }
  .portrait-ring { animation: none !important; }
}

/* ---------- Hero aerial-solar background (home page) ----------
   Replaces the warm cream gradient with a drone shot of a solar farm.
   Text legibility comes from a cream-to-transparent overlay on the left
   half so the dark heading/lede stay readable; the photo dominates the
   right half where the sun SVG sits. Swap the URL for a local asset
   (assets/images/hero-solar.jpg) when one is downloaded. */
body[data-page="home"] .page-hero {
  /* Video element fills the hero — no static bg image needed. */
  background-image: none;
}

/* Hero background video. Stays behind the dark gradient overlay so
   text remains readable. Poster shows instantly while the mp4 loads. */
.hero-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  pointer-events: none;
  display: block;
  border: 0;
  background: var(--cream);
}
/* Reduced-motion users get the still poster instead of the loop. */
@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  body[data-page="home"] .page-hero {
    background-image: url("assets/images/hero-solar-poster.jpg");
    background-size: cover;
    background-position: center;
  }
}
/* Layer order on home hero: video < overlay < orbits < scene < text. */
body[data-page="home"] .page-hero::before { z-index: 2; }
body[data-page="home"] .page-hero > .hero-orbits  { z-index: 3; }
body[data-page="home"] .page-hero > .hero-scene   { z-index: 4; }
body[data-page="home"] .page-hero .container      { z-index: 5; }
/* Hide the sun SVG on the home hero - the photo is the visual now. */
body[data-page="home"] .hero-scene { display: none; }
body[data-page="home"] .hero-grid { grid-template-columns: 1fr; }

/* Pillar cards are now anchor tags - keep body-copy color, not link teal. */
a.pillar-card { color: var(--ink); }
a.pillar-card:hover { color: var(--ink); }
a.pillar-card h3 { color: var(--ink); }

/* ---------- Audience chips (Who we work with) ---------- */
.audience-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px auto 0;
  max-width: 920px;
}
.audience-chip-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.audience-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(212, 165, 72, 0.06);
  border: 1px solid rgba(212, 165, 72, 0.18);
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Why CPES comparison block ---------- */
.why-cpes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 48px auto 0;
}
.why-cpes-card {
  background: rgba(248, 244, 237, 0.92);
  border: 1px solid rgba(212, 165, 72, 0.16);
  border-radius: 16px;
  padding: 24px 22px;
  text-align: left;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.why-cpes-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.why-cpes-card h4 {
  font-family: 'Fraunces', 'Space Grotesk', serif;
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.25;
}
.why-cpes-card p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
@media (max-width: 880px) {
  .why-cpes { grid-template-columns: 1fr; }
}

/* ---------- "Who this isn't for" qualifier ---------- */
.not-for-line {
  max-width: 760px;
  margin: 36px auto 0;
  text-align: center;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  padding: 16px 20px;
  border-top: 1px dashed rgba(212, 165, 72, 0.22);
}
.not-for-line strong { color: var(--ink); }

/* ---------- Principal section: stronger, slower entrance ----------
   Default .reveal is 900ms / 36px. The principal card is the visual
   anchor for the page — give it 1500ms, 64px travel, and a soft scale
   so it feels like an arrival rather than a pop. */
.principal-card.reveal {
  transition:
    opacity 1500ms var(--ease-out-quint),
    transform 1500ms var(--ease-out-quint),
    filter 1500ms var(--ease-out-quint);
}
.principal-card.reveal[data-reveal="fade-up"] {
  transform: translate3d(0, 64px, 0) scale(0.97);
  filter: blur(10px);
}
.principal-card.reveal.is-visible {
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}
.principal-section .section-header.reveal {
  transition:
    opacity 1100ms var(--ease-out-quint),
    transform 1100ms var(--ease-out-quint),
    filter 1100ms var(--ease-out-quint);
}

/* =============================================================
   DARK THEME — default and only
   ============================================================= */

/* Token remap. Style.css uses --cream/--white/--sand/--charcoal
   as bg/border tokens. Dark mode redefines the surface tokens so
   the existing component CSS keeps working without edits.
   Palette matches the deep-dive sub-pages (cool blue-navy + gold). */
:root {
  --cream: #0a0e1a;                       /* page bg (cool blue-navy) */
  --white: #131826;                       /* card surface */
  --sand:  rgba(255, 255, 255, 0.08);     /* hairline border */
  --charcoal: #0f1422;                    /* deepest panel (footer) */
  --charcoal-soft: #1a2030;
  --text:  #f4f3ee;                       /* off-white text */
  --muted: #9ca3af;                       /* cool mid-tone */
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);
}

html, body { background: var(--cream); color: var(--text); }
body { isolation: isolate; }

/* Ambient aurora — fixed, behind everything. z-index:-1 keeps it behind
   normal-flow content without requiring every body child to be elevated
   (which would clip the position:fixed sticky nav behind the hero). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(800px 600px at 88% -10%, rgba(216, 139, 58, 0.08), transparent 65%),
    radial-gradient(1000px 700px at -10% 110%, rgba(212, 165, 72, 0.07), transparent 65%);
}

/* Headings + nav links use --charcoal in style.css; flip to text on dark. */
h1, h2, h3, h4, h5, h6 { color: var(--text); }
.nav-links a { color: var(--text); }
.nav-links a:hover, .nav-links a.active { color: #d4a548; }
.nav-links a::after { background: #d4a548; }
.nav-logo img { filter: brightness(1.08) saturate(1.05); }

/* Nav glass — was cream/86%; now dark glass with tint. */
.nav { background: rgba(10, 14, 26, 0.55); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.nav.is-scrolled { background: rgba(10, 14, 26, 0.85); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); border-bottom-color: rgba(255, 255, 255, 0.08); }

/* Hero photo overlay — flip from cream to dark so text stays readable
   and the photo bleeds through on the right with a moodier feel. */
body[data-page="home"] .page-hero {
  background-color: var(--cream);
}
body[data-page="home"] .page-hero::before {
  background:
    linear-gradient(90deg,
      rgba(10, 14, 26, 0.96) 0%,
      rgba(10, 14, 26, 0.90) 28%,
      rgba(10, 14, 26, 0.58) 55%,
      rgba(10, 14, 26, 0.18) 78%,
      rgba(10, 14, 26, 0.00) 100%),
    radial-gradient(1100px 600px at 92% -10%, rgba(216, 139, 58, 0.16), transparent 60%);
}
@media (max-width: 980px) {
  body[data-page="home"] .page-hero::before {
    background:
      linear-gradient(180deg,
        rgba(10, 14, 26, 0.92) 0%,
        rgba(10, 14, 26, 0.86) 60%,
        rgba(10, 14, 26, 0.70) 100%);
  }
}
/* Lede text on the photo — slight luminance bump. */
.page-hero .lede { color: #D9E5DF; }
.page-hero .lede strong { color: var(--text); }
.cp-pill { background: rgba(212, 165, 72, 0.12); color: #d4a548; border: 1px solid rgba(212, 165, 72, 0.28); }
.cp-pill:hover { background: rgba(212, 165, 72, 0.20); }
.cp-pill-dot, .cp-pill-dot::after { background: #d4a548; }
.eyebrow { color: #d4a548; }
.hero-meta { border-top-color: rgba(255, 255, 255, 0.10); }
.hero-meta-label { color: var(--muted); }
.hero-meta-value { color: var(--text); }

/* Section .alt was white; make it a slightly lifted surface. */
section { background: transparent; color: var(--text); }
section.alt { background: rgba(19, 24, 38, 0.55); border-block: 1px solid rgba(255, 255, 255, 0.05); }

/* Stat strip (was solid teal). Now a near-black panel with a warm
   inner glow and hairline borders. */
.stat-strip {
  background:
    radial-gradient(900px 280px at 50% 50%, rgba(216, 139, 58, 0.08), transparent 70%),
    linear-gradient(180deg, #131826 0%, #0a0e1a 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.stat-strip-glow { opacity: 0.55; }
.stat-tile { border-left-color: rgba(255, 255, 255, 0.08); }
.stat-num { color: #E8A05F; text-shadow: 0 0 24px rgba(216, 139, 58, 0.25); }
.stat-label { color: #BCCCC4; }

/* Trust strip masks (use --charcoal which is now near-black). */
.trust-strip { background: var(--charcoal); border-block: 1px solid rgba(255, 255, 255, 0.06); }
.trust-strip::before { background: linear-gradient(90deg, var(--charcoal), transparent); }
.trust-strip::after  { background: linear-gradient(-90deg, var(--charcoal), transparent); }
.trust-item { color: #C8D5CF; }
.trust-dot { background: #d4a548 !important; }

/* Pillar cards — dark glass with subtle warm border. */
.pillar-card {
  background: linear-gradient(180deg, rgba(19, 24, 38, 0.75) 0%, rgba(10, 14, 26, 0.75) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pillar-card:hover { border-color: rgba(216, 139, 58, 0.38) !important; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(216, 139, 58, 0.18) inset; }
a.pillar-card, a.pillar-card h3, a.pillar-card:hover { color: var(--text) !important; }
.pillar-card p { color: var(--muted); }
.pillar-num { color: #E8A05F; }
.pillar-arrow { color: #d4a548; }
.pillar-icon { color: #d4a548; }

/* Approach steps */
.step { background: rgba(19, 24, 38, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); }
.step h3 { color: var(--text); }
.step p { color: var(--muted); }
.step-num { background: linear-gradient(135deg, #e6b85a, #d4a548); color: #0a0e1a; box-shadow: 0 6px 18px rgba(212, 165, 72, 0.4); }
.step:nth-child(even) .step-num { background: linear-gradient(135deg, #d4a548, #b8902f); color: #0a0e1a; box-shadow: 0 6px 18px rgba(212, 165, 72, 0.4); }
.gate { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid rgba(255, 255, 255, 0.08); }

/* Recommendations carousel */
.recs-section { background: transparent; }
.rec-card {
  background: linear-gradient(180deg, rgba(19, 24, 38, 0.85) 0%, rgba(10, 14, 26, 0.85) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.rec-card:hover { border-color: rgba(212, 165, 72, 0.35) !important; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55); }
.rec-text { color: #DCE6E1; }
.rec-author { border-top-color: rgba(255, 255, 255, 0.08); }
.rec-name { color: var(--text); }
.rec-title, .rec-rel { color: var(--muted); }
.rec-quote-mark { color: #E8A05F; opacity: 0.30; }

/* Principal card */
.principal-card {
  background: linear-gradient(180deg, rgba(19, 24, 38, 0.92) 0%, rgba(10, 14, 26, 0.92) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.principal-card::before { background: linear-gradient(90deg, #d4a548, #E8A05F); }
.principal-name { color: var(--text); }
.principal-bio, .principal-tagline { color: #C8D5CF; }
.principal-role { color: #E8A05F; }
.principal-fact { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.06); }
.fact-label { color: var(--muted); }
.fact-value { color: var(--text); }
.fact-meta { color: var(--muted); }

/* Why CPES + audience chips + not-for line */
.why-cpes-card { background: rgba(19, 24, 38, 0.65) !important; border-color: rgba(255, 255, 255, 0.07) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.why-cpes-card h4 { color: var(--text); }
.why-cpes-card p { color: var(--muted); }
.why-cpes-eyebrow { color: #E8A05F; }
.audience-chip { background: rgba(212, 165, 72, 0.08); border-color: rgba(212, 165, 72, 0.22); color: #d4a548; }
.audience-chip-label { color: var(--muted); }
.not-for-line { border-top-color: rgba(255, 255, 255, 0.10); color: var(--muted); }
.not-for-line strong { color: var(--text); }

/* Mandate section */
.mandate-section {
  background:
    radial-gradient(700px 400px at 50% 100%, rgba(216, 139, 58, 0.07), transparent 70%),
    linear-gradient(180deg, #0a0e1a 0%, #060912 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mandate-bg { opacity: 0.28; }
.mandate-lede { color: #C8D5CF; }
.drop-cap { color: #E8A05F !important; }

/* Contact cards (was cream) */
.contact-section { background: transparent; }
.contact-card-home {
  background: linear-gradient(180deg, rgba(19, 24, 38, 0.85), rgba(10, 14, 26, 0.85)) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  color: var(--text) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.contact-card-home:hover { border-color: rgba(216, 139, 58, 0.38) !important; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
.contact-icon { background: linear-gradient(135deg, rgba(212, 165, 72, 0.18), rgba(216, 139, 58, 0.18)); color: #d4a548; }
.contact-label { color: var(--muted); }
.contact-value { color: var(--text); }
.contact-action { color: #d4a548; }
.contact-card-home:hover .contact-action { color: #E8A05F; }

/* Buttons */
.btn-primary { box-shadow: 0 8px 24px rgba(216, 139, 58, 0.35), 0 0 0 1px rgba(216, 139, 58, 0.18) inset; }
.btn-primary:hover { box-shadow: 0 14px 36px rgba(216, 139, 58, 0.50); }
.btn-ghost { color: #d4a548; border-color: rgba(212, 165, 72, 0.45); }
.btn-ghost:hover { background: rgba(212, 165, 72, 0.14); color: var(--text); border-color: #d4a548; }
.nav-cta { background: var(--terracotta); color: var(--text) !important; box-shadow: 0 6px 18px rgba(216, 139, 58, 0.32); }

/* Section gradient flowing text — bump teal stop to brighter for dark. */
.gradient-text {
  background: linear-gradient(110deg, #E89A4E 0%, #F1B879 35%, #d4a548 75%, #1E8B6D 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Footer (already charcoal — give it a hairline) */
footer { background: var(--charcoal); border-top: 1px solid rgba(255, 255, 255, 0.06); }
.foot-col h5 { color: var(--text); }
.foot-col a, .foot-col p { color: #C8D5CF; }
.foot-col a:hover { color: #E8A05F; }
.foot-bottom { color: var(--muted); border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* Scroll progress + grain */
.scroll-progress { background: rgba(255, 255, 255, 0.05); }
.scroll-progress span { background: linear-gradient(90deg, #d4a548, #E8A05F); }
.grain { opacity: 0.35; mix-blend-mode: overlay; }

/* Selection */
::selection { background: rgba(216, 139, 58, 0.45); color: var(--text); }
