/* =====================================================================
   v-4 Sticky Cinematic — variant overrides
   100vh hero, sticky title pin, transparent->solid header transition,
   pronounced scroll-reveals, scroll indicator. Calm D3 below the fold.
   ===================================================================== */

/* ---------- Header transition: transparent over hero -> solid navy ---------- */
.hdr.is-cinematic {
  position: fixed; top: 0; left: 0; right: 0;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,.10);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
  z-index: 50;
  isolation: isolate;
}
.hdr.is-cinematic::before {
  content: '';
  position: absolute;
  inset: -20px 0 -60px 0;
  background: linear-gradient(180deg, rgba(7,15,31,.85) 0%, rgba(7,15,31,.55) 60%, rgba(7,15,31,0) 100%);
  pointer-events: none;
  z-index: -1;
  transition: opacity .25s ease;
}
.hdr.is-cinematic.is-scrolled::before { opacity: 0; }
.hdr.is-cinematic .brand img {
  filter: brightness(0) invert(1);
  transition: filter .25s ease;
}
.hdr.is-cinematic .primary-nav > a,
.hdr.is-cinematic .mega-trigger {
  color: var(--paper);
  /* Stage 7 tweak (round 2): tabs read as clickable pills, fill on hover like Book Consultation */
  padding: 8px 14px;
  border-radius: 4px;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.hdr.is-cinematic .primary-nav > a:hover,
.hdr.is-cinematic .mega-trigger:hover {
  background: var(--paper);
  color: var(--navy);
  border-bottom-color: transparent;
}
.hdr.is-cinematic .primary-nav > a.active {
  background: rgba(255,255,255,.12);
  border-bottom-color: var(--yellow);
}
.hdr.is-cinematic .btn-ghost {
  color: var(--paper); border-color: rgba(255,255,255,.7);
}
.hdr.is-cinematic .btn-ghost:hover { background: var(--paper); color: var(--navy); border-color: var(--paper); }

.hdr.is-cinematic.is-scrolled {
  background: var(--paper);
  border-bottom: 2px solid var(--navy-bar);
  box-shadow: 0 4px 18px rgba(7,41,86,.08);
}
.hdr.is-cinematic.is-scrolled .brand img { filter: none; }
.hdr.is-cinematic.is-scrolled .primary-nav > a,
.hdr.is-cinematic.is-scrolled .mega-trigger { color: var(--navy); }
/* Stage 7 tweak: tabs hover-fill on the scrolled (white) header too */
.hdr.is-cinematic.is-scrolled .primary-nav > a:hover,
.hdr.is-cinematic.is-scrolled .mega-trigger:hover {
  background: var(--navy);
  color: var(--paper);
}
.hdr.is-cinematic.is-scrolled .primary-nav > a.active {
  background: rgba(7,41,86,.06);
}
.hdr.is-cinematic.is-scrolled .btn-ghost { color: var(--navy); border-color: var(--navy); }
.hdr.is-cinematic.is-scrolled .btn-ghost:hover { background: var(--navy); color: var(--paper); }

/* push first section below the fixed header so utility-strip gap is correct */
.utility-strip.is-cinematic { position: relative; z-index: 51; }

/* ---------- Hero override: 100vh + sticky inner pin ----------
   Use min-height so the rail / CTAs never get clipped by the next section
   on shorter viewports (the previous fixed 100vh caused rail bleed into
   the trusted-by strip on ~900px-tall windows). */
.hero-cinematic[data-variant="sticky"] {
  min-height: 100vh;
  height: auto;
  margin-top: 0;
  padding-bottom: 32px;
}
.hero-cinematic[data-variant="sticky"] .hero-overlay {
  background: linear-gradient(180deg, rgba(7,41,86,.45) 0%, rgba(3,14,31,.92) 100%);
}
.hero-cinematic[data-variant="sticky"] .hero-pin {
  position: sticky; top: 0;
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.hero-cinematic[data-variant="sticky"] .hero-frame {
  padding: 0;
  text-align: center;
  align-items: center;
}
.hero-cinematic[data-variant="sticky"] .sheet-meta {
  margin-inline: auto;
  justify-content: center;
}
.hero-cinematic[data-variant="sticky"] .hero-title {
  text-align: center;
  /* Stage 7 tweak (round 2): "Building Technologists" billboard at wf-3 scale */
  font-size: clamp(80px, 11vw, 180px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: .92;
  text-wrap: balance;
}
.hero-cinematic[data-variant="sticky"] .hero-lede {
  margin-inline: auto;
  text-align: center;
  text-wrap: pretty;
}
.hero-cinematic[data-variant="sticky"] .ctas { justify-content: center; }
.hero-cinematic[data-variant="sticky"] .hero-rail { justify-content: center; }

/* ---------- Scroll indicator ---------- */
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 3; color: rgba(255,255,255,.7);
  font: 600 10px/1 var(--font-mono); letter-spacing: .18em; text-transform: uppercase;
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.scroll-cue .arrow {
  display: inline-block; font-size: 16px; line-height: 1;
  animation: cueBounce 1.8s ease-in-out infinite;
}
@keyframes cueBounce {
  0%, 100% { transform: translateY(0); opacity: .65; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ---------- Reveal stagger (uses inline --delay on each .reveal) ---------- */
.reveal { transition-delay: var(--delay, 0ms); }

/* ---------- Mobile: drop the sticky/pin behaviour ---------- */
@media (max-width: 768px) {
  .hdr.is-cinematic {
    position: sticky;
    background: var(--paper);
    border-bottom: 2px solid var(--navy-bar);
  }
  .hdr.is-cinematic .brand img { filter: none; }
  .hdr.is-cinematic .primary-nav > a,
  .hdr.is-cinematic .mega-trigger { color: var(--navy); }
  .hdr.is-cinematic .btn-ghost { color: var(--navy); border-color: var(--navy); }

  .hero-cinematic[data-variant="sticky"] { height: 100vh; min-height: 560px; }
  .hero-cinematic[data-variant="sticky"] .hero-pin {
    position: static;
    height: 100%;
    padding: 24px;
  }
  .scroll-cue { bottom: 18px; }
}

/* ---------- Reduced motion: kill the bounce + sticky transform ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-cinematic[data-variant="sticky"] .hero-pin {
    position: relative;
    height: auto;
    padding: 120px 0 88px;
  }
  .hero-cinematic[data-variant="sticky"] { height: auto; min-height: 720px; }
  .scroll-cue { display: none; }
  .scroll-cue .arrow { animation: none; }
}

/* =====================================================================
   MOBILE NAV — hamburger + slide-in drawer (replaces hidden primary-nav)
   Activates at <=1100px (matches the existing _shared.css breakpoint).
   ===================================================================== */

/* Hamburger button: hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 1px solid var(--navy);
  border-radius: 4px; padding: 0;
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  transition: background .2s ease, border-color .2s ease;
}
.nav-toggle-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy);
  transition: transform .25s ease, opacity .25s ease, background .2s ease;
  transform-origin: center;
}
.nav-toggle:hover { background: var(--navy); }
.nav-toggle:hover .nav-toggle-bar { background: var(--paper); }

/* Cinematic mode: invert the hamburger so it reads on dark hero */
.hdr.is-cinematic .nav-toggle { border-color: rgba(255,255,255,.7); }
.hdr.is-cinematic .nav-toggle .nav-toggle-bar { background: var(--paper); }
.hdr.is-cinematic .nav-toggle:hover { background: var(--paper); border-color: var(--paper); }
.hdr.is-cinematic .nav-toggle:hover .nav-toggle-bar { background: var(--navy); }
.hdr.is-cinematic.is-scrolled .nav-toggle { border-color: var(--navy); }
.hdr.is-cinematic.is-scrolled .nav-toggle .nav-toggle-bar { background: var(--navy); }

/* Open state: morph bars into an X */
.nav-toggle.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Backdrop */
.mobile-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 15, 31, .55);
  z-index: 90;
  opacity: 0;
  transition: opacity .24s ease;
}
.mobile-drawer-backdrop.is-open { opacity: 1; }

/* Drawer */
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: var(--navy, #072956);
  color: var(--paper);
  z-index: 100;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .26s ease;
  box-shadow: -16px 0 40px rgba(0,0,0,.35);
  padding: 0;
}
.mobile-drawer.is-open { transform: translateX(0); }

.mobile-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.mobile-drawer-head .brand img {
  height: 32px; width: auto;
  filter: brightness(0) invert(1);
}
.nav-close {
  background: transparent; border: 1px solid rgba(255,255,255,.4);
  width: 40px; height: 40px; border-radius: 4px;
  color: var(--paper);
  font: 300 28px/1 var(--font-display);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s ease, border-color .2s ease;
}
.nav-close:hover { background: rgba(255,255,255,.1); border-color: var(--paper); }

.mobile-nav {
  display: flex; flex-direction: column;
  padding: 18px 0;
  flex: 1;
  overflow-y: auto;
}
.mobile-nav > a {
  display: block;
  padding: 16px 24px;
  font: 600 16px/1.2 var(--font-display);
  color: var(--paper);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.mobile-nav > a:hover {
  background: rgba(255,255,255,.06);
  border-left-color: var(--yellow, #ffd23f);
}
.mobile-nav > a.active {
  background: rgba(255,255,255,.08);
  border-left-color: var(--yellow, #ffd23f);
}

.mobile-drawer-foot {
  padding: 20px 24px 28px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 14px;
}
.mobile-drawer-foot .btn {
  width: 100%; justify-content: center;
}
.mobile-drawer-foot .mobile-tel,
.mobile-drawer-foot .mobile-mail {
  font: 500 14px/1.4 var(--font-body);
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.mobile-drawer-foot .mobile-tel:hover,
.mobile-drawer-foot .mobile-mail:hover { color: var(--paper); }

/* Activate hamburger + drawer at the same breakpoint primary-nav hides */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
}
@media (min-width: 1101px) {
  .mobile-drawer, .mobile-drawer-backdrop { display: none !important; }
}

/* =====================================================================
   MISSION STATEMENT + P.A.C.E. CORE VALUES (in the home About section)
   Editable from WP admin — Pages → Home → "About — Mission & P.A.C.E."
   ===================================================================== */
.mission {
  margin: 28px 0 0;
  padding: 22px 24px;
  border-left: 4px solid var(--yellow, #ffd23f);
  background: rgba(7, 41, 86, .04);
  border-radius: 0 6px 6px 0;
}
.mission p {
  margin: 0;
  font: 500 italic 18px/1.55 var(--font-display);
  color: var(--navy);
}

.pace {
  margin-top: 32px;
}
.pace-intro {
  margin: 0 0 18px;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yellow-deep, #b8860b);
}
.pace-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.pace-item {
  position: relative;
  padding: 18px 18px 18px 60px;
  background: var(--paper, #fff);
  border: 1px solid var(--line, rgba(7, 41, 86, .12));
  border-radius: 6px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pace-item:hover {
  transform: translateY(-2px);
  border-color: rgba(7, 41, 86, .25);
  box-shadow: 0 8px 22px rgba(7, 41, 86, .08);
}
.pace-letter {
  position: absolute;
  top: 14px; left: 16px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--navy, #072956);
  color: var(--paper, #fff);
  font: 700 16px/1 var(--font-display);
  border-radius: 4px;
  letter-spacing: 0;
}
.pace-title {
  margin: 0 0 6px;
  font: 700 15px/1.2 var(--font-display);
  color: var(--navy);
  letter-spacing: -.005em;
}
.pace-body {
  margin: 0;
  font: 400 13px/1.5 var(--font-body);
  color: var(--slate, #4a5568);
}

@media (max-width: 720px) {
  .pace-grid { grid-template-columns: 1fr; }
  .mission { padding: 18px 18px; }
  .mission p { font-size: 16px; }
}
