/* ═══════════════════════════════════════════════════════════
   CONTINUUM FACADES — Main Stylesheet
   ─────────────────────────────────────────────────────────
   Brand colours from Brand Guidelines:
     Teal    #1B8C8C  (logo "continuum" colour)
     Navy    #0D1B3E  (logo "facades" colour / deep backgrounds)
     Mid     #1A3A5C  (mid-weight navy)
     Grey    #4A6175  (supporting grey)
     Light   #EBF4F5  (very light teal tint, backgrounds)
     White   #FFFFFF

   Fonts: Raleway (headings, weight 400 regular)
          Open Sans (body copy, weight 400/600)
   ═══════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand palette */
  --teal:         #1B8C8C;
  --teal-dark:    #157575;
  --teal-light:   #27ACAC;
  --teal-pale:    #E3F4F4;
  --teal-xpale:   #EBF8F8;
  --navy:         #0D1B3E;
  --navy-mid:     #162848;
  --navy-light:   #1A3A5C;
  --grey-dark:    #2C3E50;
  --grey:         #4A6175;
  --grey-mid:     #7B92A3;
  --grey-light:   #C8D6DF;
  --grey-pale:    #F3F5F7;
  --grey-xpale:   #F8FAFB;
  --white:        #FFFFFF;
  --off-white:    #F9FAFB;

  /* Typography */
  --ff-heading: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-body:    'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max:     1600px;
  --gutter:  clamp(1.5rem, 3vw, 3rem);

  /* Motion — all easing kept intentionally gentle */
  --ease:    cubic-bezier(.4, 0, .2, 1);   /* smooth material-design curve */
  --spring:  cubic-bezier(.22, 1, .36, 1); /* soft spring overshoot */
  --ease-out: cubic-bezier(0, 0, .2, 1);  /* decelerate-only for exits */
  --dur:     .38s;                         /* slightly longer base duration */
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* Smoother native anchor scrolling where supported */
  scroll-timeline: none;
}
body {
  font-family: var(--ff-body); font-weight: 400; font-size: 1rem;
  line-height: 1.7; color: var(--navy); background: var(--white);
  overflow-x: hidden;
  /* Promote body to its own compositor layer so scroll never triggers
     a full-page repaint — GPU handles the rasterised layers directly */
  -webkit-overflow-scrolling: touch;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }
button { cursor: pointer; background: none; border: none; font-family: var(--ff-body); }
input, textarea, select { font-family: var(--ff-body); font-size: 1rem; }

/* ── Utilities ───────────────────────────────────────────── */
.container {
  width: 100%; max-width: var(--max);
  margin-left: auto; margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}

/* Eyebrow labels */
/* Eyebrow labels removed — class kept for any residual JS hooks */
.eyebrow, .eyebrow-light { display: none; }

/* Section headings — teal accent line sits BELOW, grows in on scroll */
h2 {
  font-family: var(--ff-heading);
  font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 400;
  line-height: 1.15; color: var(--navy);
  letter-spacing: -.01em;
  padding-bottom: 1.4rem;
  margin-bottom: 1.6rem;
  position: relative;
}
h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2.5px;
  width: 0;
  background: #27ACAC;
  border-radius: 2px;
  transform-origin: left center;
  transition: width .9s cubic-bezier(.22,1,.36,1);
}
h2.line-visible::after {
  width: 36px;
}
/* H2 underline — grow to em width, travel so right-edge reaches em right-edge, reverse */
.proj-head h2.u-animate::after,
.svc-head h2.u-animate::after,
.pillars-head h2.u-animate::after,
.contact-info h2.u-animate::after {
  transition: none;
  animation: underline-travel 1.15s cubic-bezier(.4,0,.2,1) forwards;
}
@keyframes underline-travel {
  /* grow stub (36px) to full em width, left-anchored */
  0%   { width: 36px;                transform: translateX(0); }
  /* fully grown, right edge exactly at em right edge */
  28%  { width: var(--h2-em-w,36px); transform: translateX(0); }
  /* shrink back to 36px while sliding right so right edge stays pinned at em-width */
  /* translateX = em-width - 36px moves left edge to (em-width - 36px), right edge = em-width */
  62%  { width: 36px;                transform: translateX(calc(var(--h2-em-w,36px) - 36px)); }
  /* slide back to origin */
  100% { width: 36px;                transform: translateX(0); }
}
h2 em { font-style: normal; color: #27ACAC; }  /* exact teal-light */
.h2-light       { color: var(--white); }
.h2-light em    { color: #27ACAC; }             /* exact teal-light */

/* Reveal animation */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .85s var(--spring), transform .85s var(--spring);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: .12s; }
.reveal:nth-child(3) { transition-delay: .24s; }
.reveal:nth-child(4) { transition-delay: .36s; }
.reveal:nth-child(5) { transition-delay: .48s; }
.reveal:nth-child(6) { transition-delay: .60s; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 2.25rem; font-family: var(--ff-body); font-size: .72rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  border-radius: 3px;
  transition: background .3s var(--ease),
              color .3s var(--ease),
              border-color .3s var(--ease),
              transform .25s var(--ease);
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-teal {
  background: var(--teal); color: var(--white);
  border: 2px solid var(--teal);
}
.btn-teal:hover { background: var(--teal-dark); border-color: var(--teal-dark); }


/* ── Reach Out — electrical spark burst ── */
#btn-work-with-us {
  position: relative;
  overflow: visible;   /* sparks burst outside the button bounds */
  z-index: 0;
}
.spark {
  position: fixed;        /* anchored to viewport — immune to button transform/hover */
  pointer-events: none;
  z-index: 9999;
  transform-origin: center center;
  animation: spark-fly var(--spark-dur, .55s) cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes spark-fly {
  0%   { opacity: 1;  transform: translate(0,0) scale(1) rotate(var(--spark-rot)); }
  60%  { opacity: .9; transform: translate(var(--spark-tx), var(--spark-ty)) scale(1.1) rotate(var(--spark-rot)); }
  100% { opacity: 0;  transform: translate(calc(var(--spark-tx)*1.7), calc(var(--spark-ty)*1.7)) scale(.5) rotate(var(--spark-rot)); }
}

/* ── Services section CTA ── */
.svc-cta {
  text-align: center;
  margin-top: clamp(3rem, 5vw, 5rem);
}

/* ── Pulse-wave button ── */
/* The button itself sits inside a zero-size anchor point so the
   ::before / ::after rings can overflow in all directions without
   disturbing layout. We use three layered box-shadows on pseudo-
   elements instead of actual siblings so no extra HTML is needed. */
.btn-pulse-wave {
  position: relative;
  isolation: isolate;   /* keeps z-index stacking local */
}

/* Ring 1, 2, 3 — each a pseudo element on a generated <span> injected by JS.
   We drive them via .is-pulsing class + @keyframes instead of :hover
   so the animation re-fires cleanly on every hover (same pattern as pillar cards). */
.pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 3px;                        /* match .btn border-radius */
  border: 2px solid var(--teal-light, #4ecdc4);
  opacity: 0;
  pointer-events: none;
  animation: pulse-wave var(--pw-dur, .9s) cubic-bezier(.2,.6,.4,1) var(--pw-delay, 0s) forwards;
}

@keyframes pulse-wave {
  0%   {
    opacity: .85;
    transform: scale(1);
    border-color: var(--teal-light, #4ecdc4);
  }
  100% {
    opacity: 0;
    transform: scale(1.55, 1.9);   /* expands more on tall axis so rings stay button-shaped */
    border-color: transparent;
  }
}





/* ── Let's Build Something — brick border fades in around the button ──
   JS appends an SVG of brick rectangles to .svc-cta on hover.
   The SVG sits just outside the button border; bricks fade in
   sequentially in a running-bond pattern, then fade out on leave.  */
.btn-brick {
  position: relative;  /* JS uses this to measure for SVG placement  */
  min-width: 220px;    /* wide enough that the brick ring fits cleanly */
}

/* The SVG wrapper spawned by JS */
.brick-svg {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

/* Each brick rect fades in via this animation */
@keyframes brick-appear {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes brick-vanish {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

/* svc-cta needs position:relative so the SVG can be positioned within it */
.svc-cta { position: relative; }

.btn-navy {
  border: 2px solid var(--navy);
}
.btn-navy:hover { background: var(--navy-mid); border-color: var(--navy-mid); }

.btn-outline-white {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,.45);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,.1);
  border-color: var(--white);
}

.btn-block { width: 100%; }


/* ═══════════════════════════════════════════════════════════
   NAVIGATION
═══════════════════════════════════════════════════════════ */
#site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  /* background, blur, and shadow all driven by JS via CSS custom properties */
  background: rgba(255,255,255, calc(.12 * var(--nav-progress, 0)));
  backdrop-filter: blur(calc(20px * var(--nav-progress, 0))) saturate(calc(1 + 0.6 * var(--nav-progress, 0)));
  -webkit-backdrop-filter: blur(calc(20px * var(--nav-progress, 0))) saturate(calc(1 + 0.6 * var(--nav-progress, 0)));
  box-shadow: 0 1px 0 rgba(255,255,255, calc(.10 * var(--nav-progress, 0)));
  border-bottom: 1px solid rgba(255,255,255, calc(.35 * var(--nav-progress, 0)));
}
/* Raise header above the open drawer so the × icon is never hidden */
#site-header:has(.nav-burger.open) {
  z-index: 1060;
}

/* .scrolled is kept as a lightweight hook for JS-driven colour logic */
#site-header.scrolled { /* frosted state fully driven by --nav-progress above */ }

.nav-wrap {
  display: flex; align-items: center; gap: 2rem;
  padding-top: 1.3rem; padding-bottom: 1.3rem;
}

.nav-logo {
  flex-shrink: 0;
  display: flex; align-items: center; gap: .9rem;
  position: relative;            /* ripple rings use absolute positioning */
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.nav-logo:hover {
  transform: translateY(-2px);
}

/* Wordmark — white by default (hero is dark), snaps to black over white bg */
.logo-img {
  height: 68px; width: auto;
  filter: brightness(0) invert(1);       /* white */
  transition: filter .15s ease;
}
/* When scrolled past the hero fade: switch to black */
#site-header.logo--dark .logo-img {
  filter: brightness(0) invert(0);       /* black */
}

/* Teal infinity logomark beside wordmark —
   height matches the full two-line wordmark (68px)
   color filter targets approx #1B8C8C (matching --teal action button) */
.logo-mark-wrap {
  position: relative;          /* stacking context for the white overlay */
  display: inline-flex;
  align-items: center;
  z-index: 1;
  /* Inherit the spring hover transform from nav-logo */
  transition: transform .45s cubic-bezier(.34,1.18,.64,1);
  transform-origin: center center;
}
.nav-logo:hover .logo-mark-wrap {
  transform: scale(1.07);
}

/* Teal layer — always underneath */
.logo-mark {
  height: 68px; width: auto;
  display: block;
  filter: brightness(0) saturate(100%)
          invert(44%) sepia(60%) saturate(700%)
          hue-rotate(130deg) brightness(88%) contrast(100%);
  opacity: .95;
  position: relative; z-index: 1;
}

/* White overlay — fades out as --mark-p goes 0 → 1 (top of hero → scrolled past) */
.logo-mark-white {
  height: 68px; width: auto;
  display: block;
  position: absolute; top: 0; left: 0;
  z-index: 2;
  filter: brightness(0) invert(1);   /* pure white */
  opacity: calc(1 - var(--mark-p, 0));
  pointer-events: none;
  /* Smooth fallback for no-JS or instant load */
  transition: opacity .1s linear;
}

/* Over white background — hide the white overlay entirely (teal shows through) */
#site-header.logo--dark .logo-mark-white {
  opacity: 0;
}

/* Hover: keep same filters, wrapper handles the scale */
.nav-logo:hover .logo-mark,
.nav-logo:hover .logo-mark-white {
  opacity: inherit;
}

/* ── Pond ripple rings spawned by JS on logo hover ── */
.logo-ripple {
  position: absolute;
  /* centred on the logomark: left = 0 (logomark is first child),
     top-centre of the flex row; we use JS to position precisely */
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.85);  /* white over dark hero */
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  animation: logo-ripple-expand var(--ripple-dur, 900ms)
             cubic-bezier(.2, .6, .35, 1)
             var(--ripple-delay, 0ms)
             forwards;
}
/* Switch ripple rings to dark once the hero fades to white */
#site-header.logo--dark .logo-ripple {
  border-color: rgba(13,27,62,.75);           /* navy over white bg */
}
@keyframes logo-ripple-expand {
  0%   { transform: translate(-50%, -50%) scale(.55); opacity: .8; }
  60%  { opacity: .35; }
  100% { transform: translate(-50%, -50%) scale(2.6);  opacity: 0; }
}

/* ── Hamburger button ── */
/* On wide screens: position:fixed so it floats at top-right like before.
   On narrow screens (≤540px): position:relative inside the header flex flow
   so it always sits BELOW the logo and never overlaps it. */
.nav-burger {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0;                      /* gaps handled by margin-bottom on each bar for pixel-perfect alignment */
  padding: 13px;
  width: 86px; height: 86px;
  /* Wide viewport: float fixed at top-right — nudged inward to visually
     balance against the wider logo on the left */
  position: fixed;
  top: 1.3rem;
  right: calc(max(0px, (100vw - 1600px) / 2) + clamp(3rem, 6vw, 6rem));
  /* Push the button to the right end of the flex row (hidden when fixed, but
     needed as a reference point for the narrow breakpoint below) */
  margin-left: auto;
  z-index: 2000;               /* above header(100), drawer(1050), backdrop(1000) */
  /* Default: white bars */
  color: rgba(255,255,255,1);
  background: transparent;
  transition: color .15s ease;
  flex-shrink: 0;
}
/* Open: bars shift to the same grey as the drawer menu items */
.nav-burger.open {
  color: #6b7a8d;              /* exact match to .nav-drawer-inner a colour */
}
/* Over white background: switch bars to near-black (mirrors logo behaviour) */
.nav-burger.logo--dark:not(.open) {
  color: rgba(13,27,62,.85);   /* navy at 85% — dark but not harsh */
}
.nav-burger .bar {
  display: block;
  width: 44px;                 /* all three bars identical length */
  height: 2px; min-height: 2px; max-height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform-origin: center;
  flex-shrink: 0;
  transform: translateZ(0);    /* force GPU layer — pins each bar to whole pixel row */
  /* margin-bottom spaces bars without sub-pixel flex-gap artefacts */
  margin-bottom: 10px;
  transition: transform .5s cubic-bezier(.4,0,.2,1),
              opacity   .4s ease,
              width     .38s cubic-bezier(.4,0,.2,1),
              background .5s var(--ease);
}
.nav-burger .bar:last-child {
  margin-bottom: 0;            /* no trailing gap after bar-3 */
}

/* ── Hover: staggered indent — bars retract from alternating ends
   like a precision instrument closing its sight lines             ── */
.nav-burger:not(.open):hover .bar-1 {
  /* Top bar: shrinks 30% from the right, shifts right to stay left-aligned */
  width: 30px;
  transform: translateX(9px);
  transition-delay: 0s;
}
.nav-burger:not(.open):hover .bar-2 {
  /* Middle bar: extends full width + teal tint — the anchor */
  width: 48px;
  transition-delay: .04s;
  background: var(--teal);
}
.nav-burger:not(.open):hover .bar-3 {
  /* Bottom bar: shrinks 40%, stays right-aligned */
  width: 20px;
  transform: translateX(-14px);
  transition-delay: .08s;
}

/* ── Open state: morph to × ── */
/* offset = gap(11) + bar-height(2) = 13px */
.nav-burger.open .bar-1 { transform: translateY(13px)  rotate(45deg); }
/* bar-2 fades out but bar colour stays in sync */
.nav-burger.open .bar-2 { opacity: 0; transform: scaleX(0); }
.nav-burger.open .bar-3 { transform: translateY(-13px) rotate(-45deg); }

/* ── Side drawer ─────────────────────────────────────────────── */
.nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: clamp(260px, 32vw, 380px);
  background: #ffffff;
  z-index: 1050;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 96px 3rem 1.3rem;
  /* Start off-screen right */
  transform: translateX(105%);   /* 105% so shadow doesn't peek */
  opacity: 0;
  /* Close: quick ease-in so it snaps away cleanly */
  transition: transform .45s cubic-bezier(.4, 0, 1, 1),
              opacity   .3s  cubic-bezier(.4, 0, 1, 1);
  box-shadow: -12px 0 60px rgba(13,27,62,.16);
  pointer-events: none;
  will-change: transform;        /* GPU compositor layer */
}
.nav-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  /* Open: slow deceleration spring — feels weighty and premium */
  transition: transform .65s cubic-bezier(.16, 1, .3, 1),
              opacity   .4s  cubic-bezier(.16, 1, .3, 1);
}

.nav-drawer-inner ul {
  display: flex; flex-direction: column; gap: 0;
  list-style: none; margin: 0; padding: 0;
}
.nav-drawer-inner a {
  display: block;
  font-family: var(--ff-heading);
  font-size: 1.45rem; font-weight: 400;
  letter-spacing: .04em;
  color: #6b7a8d;
  text-decoration: none;
  padding: .85rem 0;
  border-bottom: 1px solid rgba(13,27,62,.07);
  /* Stagger-in: each link starts slightly translated right and invisible */
  opacity: 0;
  transform: translateX(18px);
  transition: color .3s var(--ease),
              padding-left .35s var(--ease),
              opacity  .4s  cubic-bezier(.16,1,.3,1),
              transform .5s  cubic-bezier(.16,1,.3,1);
}
.nav-drawer-inner li:last-child a { border-bottom: none; }
.nav-drawer-inner a:hover { color: var(--navy); padding-left: .5rem; }

/* When drawer is open, slide each link in with a staggered delay */
.nav-drawer.open .nav-drawer-inner li:nth-child(1) a { opacity:1; transform:translateX(0); transition-delay: .08s; }
.nav-drawer.open .nav-drawer-inner li:nth-child(2) a { opacity:1; transform:translateX(0); transition-delay: .13s; }
.nav-drawer.open .nav-drawer-inner li:nth-child(3) a { opacity:1; transform:translateX(0); transition-delay: .18s; }
.nav-drawer.open .nav-drawer-inner li:nth-child(4) a { opacity:1; transform:translateX(0); transition-delay: .23s; }
.nav-drawer.open .nav-drawer-inner li:nth-child(5) a { opacity:1; transform:translateX(0); transition-delay: .28s; }

/* ── Backdrop ──────────────────────────────────────────────────── */
.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(13,27,62,.35);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s cubic-bezier(.4,0,.2,1);
}
.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  transition: opacity .4s cubic-bezier(.16,1,.3,1);
}


/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
/* Hero is fixed behind everything — content sections slide over it */
.hero {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--navy);
  z-index: 0;
  /* Own compositor layer — browser never repaints hero on scroll */
  will-change: transform;
  transform: translateZ(0);
}

/* White fade overlay — JS drives opacity 0→1 as user scrolls */
.hero-fade-overlay {
  position: absolute; inset: 0; z-index: 10;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
}

/* ── Photo slides ── */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.8s ease, transform 12s cubic-bezier(.25,.46,.45,.94);
}
.hero-slide.active { opacity: 1; transform: scale(1); }

/* ── Blue/grey wash removed — hero photos show at full saturation ── */

/* ── Dark vignette ── */
.hero-dim {
  position: absolute; inset: 0; z-index: 1;
  background: rgba(13, 27, 62, 0.22);
}

/* ══ ANIMATED DIAGONAL NAVY SHAPE ══ */
.hero-shapes {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none; overflow: hidden;
}
.shape { position: absolute; will-change: transform; }

/* Single navy diagonal — right edge runs ~65% top → ~52% bottom */
.s-navy {
  inset: -20% 0 -20% -5%;
  background: linear-gradient(
    110deg,
    rgba(13,27,62,.82) 0%,
    rgba(13,27,62,.52) 48%,
    transparent 100%
  );
  clip-path: polygon(0 0, 56% 0, 42% 100%, 0 100%);
  animation: driftNav 20s ease-in-out infinite alternate;
}

@keyframes driftNav {
  0%   { transform: translateX(0)    skewY(.15deg); }
  50%  { transform: translateX(14px)  skewY(-.3deg); }
  100% { transform: translateX(-8px)  skewY(.25deg); }
}

@keyframes drift1 {
  0%   { transform: translateX(0)    skewY(.15deg); }
  50%  { transform: translateX(12px)  skewY(-.25deg); }
  100% { transform: translateX(-8px)  skewY(.2deg); }
}
@keyframes drift2 {
  0%   { transform: translateX(0)    skewY(-.2deg); }
  50%  { transform: translateX(-14px) skewY(.3deg); }
  100% { transform: translateX(10px)  skewY(-.15deg); }
}

/* Hero eyebrow / content removed */
.hero-eyebrow, .hero-body-wrap, .hero-h1,
.hero-sub, .hero-ctas, .hero-stats,
.hstat, .hstat-n, .hstat-plus, .hstat-l, .hstat-sep { display: none; }

/* Dots */
.hero-dots {
  position: absolute; bottom: 5rem; right: var(--gutter);
  z-index: 4; display: flex; flex-direction: column; gap: .8rem;
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: .75rem .6rem;
  border-radius: 2rem;
  border: 1px solid rgba(255,255,255,.15);
}
.hdot {
  width: 12px; height: 12px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.75);
  background: rgba(255,255,255,.18);
  box-shadow: 0 1px 6px rgba(0,0,0,.45);
  transition: background .4s var(--ease), border-color .4s var(--ease), transform .4s var(--spring), width .4s var(--ease), height .4s var(--ease);
  cursor: pointer;
}
.hdot:hover {
  background: rgba(255,255,255,.5);
  border-color: #fff;
  transform: scale(1.2);
}
.hdot.active {
  width: 12px; height: 32px;
  border-radius: 6px;
  background: var(--teal-light);
  border-color: var(--teal-light);
  box-shadow: 0 0 10px rgba(0,200,200,.55);
  transform: none;
}

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 4; width: 28px;
  animation: fadeIn 1.2s 1.2s both;
}
.scroll-puck { animation: puckBob 3s cubic-bezier(.45,.05,.55,.95) infinite; }
@keyframes puckBob {
  0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(.45,.05,.55,.95); }
  50%       { transform: translateY(6px); animation-timing-function: cubic-bezier(.45,.05,.55,.95); }
}

@keyframes fadeUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Slide in from the left — used for hero content panel */
@keyframes slideInLeft {
  from { opacity:0; transform:translateX(-110px); }
  to   { opacity:1; transform:translateX(0); }
}


/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT — sits above the fixed hero; top margin
   creates the scroll distance the hero fade plays over
═══════════════════════════════════════════════════════════ */
#main-content {
  position: relative;
  z-index: 2;                 /* above hero (z-index 0) */
  margin-top: 100svh;         /* start exactly below the viewport */
  background: transparent;    /* projects + services sections show hero through them */
  overflow: hidden;
  /* Own compositor layer so it scrolls independently of the fixed hero */
  transform: translateZ(0);
}

/* ═══════════════════════════════════════════════════════════
   SPLIT SECTION — pillars
   White background with generous breathing room
═══════════════════════════════════════════════════════════ */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 720px;
}

/* Photo half */
.split-photo {
  position: relative; overflow: hidden;
}
.split-photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85) brightness(.88);
  transition: transform 12s cubic-bezier(.25,.46,.45,.94);
}
.split-photo:hover img { transform: scale(1.04); }

/* Single navy diagonal overlay on photo */
.split-photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 45%, rgba(13,27,62,.60) 100%);
}
.split-photo-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(118deg, rgba(13,27,62,.55) 0%, transparent 54%);
  clip-path: polygon(0 0, 66% 0, 40% 100%, 0 100%);
  animation: drift1 20s ease-in-out infinite alternate;
}

/* Content half — WHITE with extra padding */
.split-content {
  background: var(--white);
  padding: clamp(4rem, 7vw, 8rem) clamp(2.5rem, 6vw, 7rem);
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}

/* Crane skyline — top-right of the white content panel, flipped horizontally,
   fades from fully transparent at the base to 30% opacity at the top */
.crane-bg {
  position: absolute;
  /* Align top of crane with the "Our Foundation" eyebrow —
     matches the section's vertical padding so the image starts at the same Y as the eyebrow text */
  top: clamp(4rem, 7vw, 8rem);
  right: 0;
  width: clamp(260px, 55%, 560px);
  height: auto;
  transform: scaleX(-1);               /* flip horizontally */
  pointer-events: none;
  z-index: 0;
  object-fit: contain;
  object-position: top right;
  /* Vertical gradient mask: opaque at top (30% opacity via mask), fully transparent at bottom */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.30) 0%, rgba(0,0,0,.22) 30%, rgba(0,0,0,.08) 65%, transparent 100%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,.30) 0%, rgba(0,0,0,.22) 30%, rgba(0,0,0,.08) 65%, transparent 100%);
}

/* Topographic contour SVG fills the white content panel */
.topo-svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  /* Gentle fade toward text area — keeps lines visible in lower-right */
  -webkit-mask-image: radial-gradient(ellipse at 70% 80%, rgba(0,0,0,.85) 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 80%, rgba(0,0,0,.85) 20%, transparent 75%);
}

/* All direct children of split-content sit above the crane / SVG layers */
.split-content > *:not(.topo-svg):not(.crane-bg) { position: relative; z-index: 1; }
/* Match 'Our Foundation' eyebrow to 'Who We Are' style — same teal, same weight */
.split-content .eyebrow { color: var(--teal); }
.split-content h2 { color: var(--navy); }
.split-content h2 em { color: var(--teal); }

.split-intro {
  font-size: 1rem; font-weight: 400;
  color: var(--grey); line-height: 1.8;
  margin-bottom: 2.5rem;
}

.pillars { display: flex; flex-direction: column; gap: 0; margin-bottom: 3rem; }
.pillar {
  display: grid; grid-template-columns: 44px 1fr; gap: 1.25rem;
  align-items: start;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--grey-pale);
}
.pillar:first-child { padding-top: 0; }
.pillar:last-child  { border-bottom: none; }

/* Flat SVG icon */
.pillar-icon {
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: .2rem;
  color: var(--teal);
}
.pillar-icon svg { width: 28px; height: 28px; }
.pillar-text h3 {
  font-family: var(--ff-heading);
  font-size: 1.05rem; font-weight: 400;
  color: var(--navy); margin-bottom: .45rem; line-height: 1.3;
}
.pillar-text p {
  font-family: var(--ff-body);
  font-size: .88rem; font-weight: 400;
  color: var(--grey); line-height: 1.8;
}


/* ═══════════════════════════════════════════════════════════
   ABOUT BAND — white/light grey with technical graphic
═══════════════════════════════════════════════════════════ */
.about-band {
  background: var(--grey-xpale);
  padding: clamp(6rem, 10vw, 11rem) 0;
  position: relative; overflow: hidden;
}

/* Technical drawing graphic — diagonal rule lines, very sparse */
.about-band::before {
  content: '';
  position: absolute; top: -100px; left: -100px;
  width: 600px; height: 600px; pointer-events: none;
  background-image:
    repeating-linear-gradient(
      -45deg,
      rgba(13,27,62,.025) 0px,
      rgba(13,27,62,.025) 1px,
      transparent 1px,
      transparent 28px
    );
  border-radius: 50%;
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,.6) 30%, transparent 70%);
  mask-image: radial-gradient(circle, rgba(0,0,0,.6) 30%, transparent 70%);
}

/* Second technical mark — cross-hatch top right */
.about-band::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 340px; height: 340px; pointer-events: none;
  background-image:
    linear-gradient(rgba(13,27,62,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,62,.035) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,.5) 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at top right, rgba(0,0,0,.5) 0%, transparent 65%);
}

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(4rem, 7vw, 9rem); align-items: center;
  position: relative; z-index: 1;
}

.about-text p {
  font-family: var(--ff-body);
  font-size: .98rem; font-weight: 400;
  color: var(--grey); line-height: 1.85; margin-bottom: 1.25rem;
}
/* Override eyebrow-light when used in light section */
.about-band .eyebrow-light { color: #27ACAC; }
.about-band .h2-light      { color: var(--navy); }
.about-band .h2-light em   { color: var(--teal); }

.checklist {
  margin-top: 2rem; display: flex; flex-direction: column; gap: .7rem;
}
.checklist li {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--ff-body);
  font-size: .9rem; font-weight: 400;
  color: var(--grey-dark);
  cursor: default;
}

/* Solid teal circle bullet */
.checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--teal);
  transition:
    transform .38s var(--spring),
    background .38s var(--ease),
    box-shadow .38s var(--ease);
}

/* Hover: bullet pulses outward + glows */
.checklist li:hover::before {
  transform: scale(2);
  background: var(--teal);
  box-shadow: 0 0 0 6px rgba(27,140,140,.18), 0 0 0 11px rgba(27,140,140,.06);
}

/* Text nudges right on hover */
.checklist li span {
  display: inline-block;
  transition: transform .3s var(--spring), color .3s;
}
.checklist li:hover span { transform: translateX(6px); color: var(--navy); }

/* Image frame */
.about-visual { position: relative; }
.about-img-frame { position: relative; overflow: hidden; }
.about-img-frame img {
  width: 100%; height: 520px; object-fit: cover;
  display: block; filter: saturate(.85);
}

/* Navy diagonal over image */
.about-img-diag {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(138deg, rgba(13,27,62,.42) 0%, transparent 48%);
  clip-path: polygon(0 0, 68% 0, 42% 100%, 0 100%);
}
/* Navy bottom fade */
.about-img-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(13,27,62,.45) 100%);
  pointer-events: none;
}

/* "Est. 2022" badge */
.about-badge {
  position: absolute; bottom: -1.5rem; left: -1.5rem;
  background: var(--teal);
  padding: 1.25rem 1.75rem;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  z-index: 2;
}
/* Grey variant — distinct from teal CTA buttons */
.about-badge--grey {
  background: var(--navy-light);
}
.badge-label {
  font-family: var(--ff-body);
  font-size: .7rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: rgba(255,255,255,.7);
}
.badge-year {
  font-family: var(--ff-heading);
  font-size: 2.2rem; font-weight: 400;
  line-height: 1; color: var(--white);
}


/* ═══════════════════════════════════════════════════════════
   SERVICES — white/light with generous breathing room
═══════════════════════════════════════════════════════════ */
.services-section {
  position: relative; overflow: hidden;
  padding: clamp(9rem, 13vw, 16rem) 0;
  background: var(--white);
}

/* Remove photo background — no .svc-bg or overlay needed; keep selectors
   in case they're referenced by JS, but visually inert */
.svc-bg { display: none; }

/* Subtle technical cross-hatch background pattern */
.services-section::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(13,27,62,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,62,.028) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 80% 20%, rgba(0,0,0,.45) 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 80% 20%, rgba(0,0,0,.45) 0%, transparent 65%);
}

.svc-inner { position: relative; z-index: 1; }

.svc-head { max-width: 560px; margin-bottom: clamp(3.5rem, 6vw, 6rem); }
.svc-head h2 { color: var(--navy); }
.svc-head h2 em { color: var(--teal); }
.svc-lead {
  font-family: var(--ff-body);
  font-size: 1rem; font-weight: 400;
  color: var(--grey); line-height: 1.7; margin-top: -.4rem;
}

.svc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  /* 3px white gaps — equal in all directions */
  row-gap: 3px;
  column-gap: 3px;
  background: #ffffff;
  box-shadow: 0 0 0 3px #ffffff;
}

/* ── Card: fixed height, clips the glass panel ── */
.svc-card {
  position: relative;
  overflow: hidden;          /* glass slides out through the top edge */
  height: 300px;
  cursor: pointer;
}

/* ── BACK: full-bleed image — always behind, never moves ── */
.svc-back {
  position: absolute; inset: 0;
  background: var(--navy);
  overflow: hidden;
}

/* Gentle scale-in on hover to add depth to the reveal */
.svc-back-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  transition: transform .65s cubic-bezier(.22,1,.36,1);
  transform: scale(1.04);    /* starts slightly zoomed; card hover brings it to 1 */
}
.svc-card:hover .svc-back-img,
.svc-card.tapped .svc-back-img {
  transform: scale(1.08);
}

/* Title label — hidden until glass lifts, then fades up into view */
.svc-back-title {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 3;
  padding: .85rem 1.25rem;
  font-family: var(--ff-heading);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(13,27,62,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  line-height: 1.3;
  text-align: center;
  /* Hidden by default — slides up and fades in once glass has lifted */
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
  transition-delay: 0s;
}
.svc-card:hover .svc-back-title,
.svc-card.tapped .svc-back-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

/* ── FRONT: frosted glass panel — slides up out of view on hover ── */
.svc-front {
  position: absolute; inset: 0;
  z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2.75rem 2rem;
  text-align: center;
  /* Frosted glass */
  background: rgba(220, 228, 235, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  /* Glass edge: subtle bottom border catches light like a pane edge */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.7),   /* top highlight */
    inset 0 -1px 0 rgba(255,255,255,0.35), /* bottom edge glint */
    inset 1px 0 0 rgba(255,255,255,0.25),  /* left edge */
    inset -1px 0 0 rgba(255,255,255,0.25); /* right edge */
  /* Smooth upward slide */
  transition: transform .58s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}
.svc-card:hover .svc-front,
.svc-card.tapped .svc-front {
  transform: translateY(-100%);
}

/* Teal accent line along the bottom of the glass pane — slides away with it */
.svc-front::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal);
  opacity: .85;
}

.svc-icon {
  color: var(--teal);
  margin-bottom: 1.4rem;
  flex-shrink: 0;
}
.svc-icon svg {
  width: 72px; height: 72px;
  display: block;
  /* Crisp teal on glass */
  filter: drop-shadow(0 1px 3px rgba(27,140,140,.25));
}

.svc-front h3 {
  font-family: var(--ff-heading);
  font-size: 1.18rem; font-weight: 400;
  color: var(--navy);
  line-height: 1.35;
  margin: 0;
  /* Subtle text shadow so heading reads clearly on the glass */
  text-shadow: 0 1px 3px rgba(255,255,255,0.6);
}

/* Keep old selectors harmless if referenced elsewhere */
.svc-num { display: none; }
.svc-card h3 { font-family: var(--ff-heading); }
.svc-card p  { font-family: var(--ff-body); }


/* ═══════════════════════════════════════════════════════════
   CONTINUITY PILLARS — navy full-bleed (mirrors services style)
═══════════════════════════════════════════════════════════ */
.pillars-section {
  position: relative; overflow: hidden;
  padding: clamp(9rem, 13vw, 16rem) 0;
  background: var(--navy-light);
}

/* Facade photo behind the navy wash */
.pillars-bg {
  position: absolute; inset: 0; z-index: 0;
}
.pillars-bg img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.55) brightness(.45);
}
.pillars-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    162deg,
    rgba(13,27,62,.84) 0%,
    rgba(9,21,48,.76) 45%,
    rgba(13,27,62,.80) 100%
  );
}

/* Right-side technical drawing SVG */
.tech-svg--pillars {
  position: absolute;
  right: 0; top: 0;
  height: 100%; width: 36%;
  pointer-events: none; z-index: 1;
  opacity: .7;
}

.pillars-inner { position: relative; z-index: 2; }

.pillars-head {
  max-width: 560px;
  margin-bottom: clamp(3.5rem, 6vw, 6rem);
}
.pillars-head h2 { color: var(--white); }
.pillars-head h2 em { color: var(--teal-light); }

/* ═══════════════════════════════════════════════════════════
   CONTINUITY PILLARS — chevron card stack

   Layout strategy:
   • Cards 2 & 3 use negative left-margin to slide behind the card
     to their left, so the chevron tip of card N overlaps card N+1.
   • z-index: card 1 (highest) → card 2 → card 3 (lowest), so the
     left card always paints on top of the right card.
   • filter: drop-shadow() on each card casts a shadow that follows
     the clipped chevron silhouette onto the card behind it.
   • ::before pseudo-element draws the white 1px border by repeating
     the same clip-path 1px larger on every side.
   ════════════════════════════════════════════════════════════ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* No column gap — cards overlap via negative margins on cards 2 & 3 */
  gap: 0;
  margin-bottom: clamp(3rem, 5vw, 5rem);
  align-items: stretch;
  /* overflow visible so drop-shadows aren't clipped by the grid */
  overflow: visible;
}

/* ── Base card ──
   Hover animation concept — on-brand engineering precision:
   • Card lifts (translateY) with a deepened drop-shadow
   • Teal dimension-line sweeps across the top edge (::before scaleX)
   • White chevron border brightens to full white
   • Icon scales up slightly
   • Body text lifts to full opacity
   All transitions are staggered for a sequential, precision feel. */
@keyframes pillar-lunge {
  0%   { transform: translateX(0);    }
  28%  { transform: translateX(16px); }
  55%  { transform: translateX(-4px); }
  75%  { transform: translateX(7px);  }
  90%  { transform: translateX(-1px); }
  100% { transform: translateX(0);    }
}

.pillar-card {
  position: relative;
  overflow: visible;
  background: var(--navy);
  padding: 3rem 3.5rem 3rem 2.5rem;
  transition: filter     .5s var(--ease),
              background .5s var(--ease);
  /* Rightward chevron — 32px notch depth */
  clip-path: polygon(
    0% 0%,
    calc(100% - 32px) 0%,
    100%               50%,
    calc(100% - 32px) 100%,
    0% 100%
  );
  /* Structural shadow: casts onto the card behind */
  filter: drop-shadow(6px 0 16px rgba(0,0,0,.55));
}
/* Lunge right + saturate on hover */
.pillar-card:hover {
  background: #1a3a6e;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,.95))
          drop-shadow(6px 0 20px rgba(0,0,0,.85));
}
/* JS adds this class on mouseenter to re-trigger the animation each time */
.pillar-card.is-lunging {
  animation: pillar-lunge .65s cubic-bezier(.22,1,.36,1) both;
}

/* ── Teal dimension-line sweep across the top edge — ::before ──
   Starts at scaleX(0) from the left, sweeps to full width on hover,
   like a technical drawing callout line being drawn. */
.pillar-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal-light);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .55s cubic-bezier(.22,1,.36,1);
  z-index: 10;
  pointer-events: none;
}
.pillar-card:hover::before {
  transform: scaleX(1);
}

/* ── White chevron border — ::after ──
   Brightens from dim to sharp white on hover */
.pillar-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  background: rgba(255,255,255,.25);
  clip-path: polygon(
    0% 0%,
    calc(100% - 32px) 0%,
    100%               50%,
    calc(100% - 32px) 100%,
    0% 100%
  );
  z-index: -1;
  pointer-events: none;
  transition: background .4s var(--ease);
}
.pillar-card:hover::after {
  background: rgba(255,255,255,.28); /* keep border subtle — saturation does the work */
}

/* ── Icon lifts and brightens on hover ── */
.pillar-card .pillar-card-icon {
  transition: transform .5s cubic-bezier(.22,1,.36,1),
              color     .4s var(--ease);
}
.pillar-card:hover .pillar-card-icon {
  transform: translateY(-4px) scale(1.08);
  color: var(--white);
}

/* ══════════════════════════════════════════════════════
   PILLAR ICON HOVER ANIMATIONS
══════════════════════════════════════════════════════ */

/* ── CARD 1: Brain — hemispheres gently breathe apart ── */
@keyframes brainPulseLeft {
  0%,100% { transform: translateX(0);   opacity: 1; }
  40%      { transform: translateX(-2.5px); opacity: .75; }
}
@keyframes brainPulseRight {
  0%,100% { transform: translateX(0);   opacity: 1; }
  40%      { transform: translateX(2.5px);  opacity: .75; }
}
@keyframes brainFoldFlicker {
  0%,100% { opacity: 1; }
  30%      { opacity: .25; }
  60%      { opacity: .9; }
}

.pillar-card:hover .icon-brain .brain-left {
  animation: brainPulseLeft  .7s cubic-bezier(.37,0,.63,1) forwards;
  transform-origin: center center;
}
.pillar-card:hover .icon-brain .brain-right {
  animation: brainPulseRight .7s cubic-bezier(.37,0,.63,1) forwards;
  transform-origin: center center;
}
.pillar-card:hover .icon-brain .brain-fold {
  animation: brainFoldFlicker .6s ease forwards;
}
.pillar-card:hover .icon-brain .brain-stem {
  animation: brainFoldFlicker .5s ease .1s forwards;
}

/* ── CARD 2: Lightbulb — rays burst outward from centre ── */
@keyframes rayBurst {
  0%   { opacity: 0;   stroke-dashoffset: 8; }
  40%  { opacity: 1;   stroke-dashoffset: 0; }
  100% { opacity: .85; stroke-dashoffset: 0; }
}
@keyframes bulbGlow {
  0%,100% { filter: drop-shadow(0 0 0px currentColor); }
  50%      { filter: drop-shadow(0 0 5px currentColor); }
}

.icon-bulb .bulb-ray {
  opacity: 0;
  stroke-dasharray: 8;
  stroke-dashoffset: 8;
}
.pillar-card:hover .icon-bulb .bulb-ray {
  animation: rayBurst .5s cubic-bezier(.22,1,.36,1) forwards;
}
.pillar-card:hover .icon-bulb .bulb-ray:nth-child(3)  { animation-delay: .00s; }
.pillar-card:hover .icon-bulb .bulb-ray:nth-child(4)  { animation-delay: .06s; }
.pillar-card:hover .icon-bulb .bulb-ray:nth-child(5)  { animation-delay: .12s; }
.pillar-card:hover .icon-bulb .bulb-ray:nth-child(6)  { animation-delay: .18s; }
.pillar-card:hover .icon-bulb .bulb-ray:nth-child(7)  { animation-delay: .24s; }
.pillar-card:hover .icon-bulb .bulb-globe {
  animation: bulbGlow .8s ease .1s forwards;
}

/* ── CARD 3: Target — outer ring rotates, arrow locks in ── */
@keyframes ringPulse {
  0%   { transform: scale(1);    opacity: 1; }
  35%  { transform: scale(1.08); opacity: .6; }
  70%  { transform: scale(.97);  opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes ringPulseInner {
  0%   { transform: scale(1);    opacity: 1; }
  35%  { transform: scale(1.12); opacity: .55; }
  70%  { transform: scale(.96);  opacity: 1; }
  100% { transform: scale(1);    opacity: 1; }
}
@keyframes arrowFly {
  0%   { transform: translate(14px,-14px); opacity: 0; }
  15%  { opacity: 1; }
  72%  { transform: translate(-3px,3px);  }
  88%  { transform: translate(1px,-1px);  }
  100% { transform: translate(0,0);       }
}

.pillar-card:hover .icon-target .target-outer {
  animation: ringPulse .65s cubic-bezier(.22,1,.36,1) forwards;
  transform-origin: 20px 20px;
}
.pillar-card:hover .icon-target .target-inner {
  animation: ringPulseInner .65s cubic-bezier(.22,1,.36,1) .08s forwards;
  transform-origin: 20px 20px;
}
.pillar-card:hover .icon-target .target-arrow {
  animation: arrowFly .65s cubic-bezier(.22,1,.36,1) forwards;
}

/* ── Body text lifts to full opacity on hover ── */
.pillar-card p {
  transition: opacity .4s var(--ease) .05s; /* slight delay after card lifts */
}
.pillar-card:hover p {
  opacity: 1 !important;
}

/* ── Card stacking + graded shades (light → dark, left → right) ── */
/* Card entrance animation */
@keyframes pillarSlideIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card 1 — resting colour = former hover shade; no colour change on hover */
.pillar-card:nth-child(1) {
  z-index: 3;
  background: hsl(220, 100%, 29%);
  animation: pillarSlideIn .65s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .1s;
}

/* Card 2 */
.pillar-card:nth-child(2) {
  z-index: 2;
  margin-left: -32px;
  padding-left: calc(2.5rem + 32px);
  background: hsl(228, 100%, 20%);
  animation: pillarSlideIn .65s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .25s;
}

/* Card 3 */
.pillar-card:nth-child(3) {
  z-index: 1;
  margin-left: -32px;
  padding-left: calc(2.5rem + 32px);
  background: hsl(235, 100%, 13%);
  animation: pillarSlideIn .65s cubic-bezier(.22,1,.36,1) both;
  animation-delay: .4s;
}

/* ALL three cards get the chevron right edge — including the last card.
   The ::after border chevron is also identical for all three. */
/* (no :last-child override — all cards share the same clip-path) */

.pillar-card-icon {
  display: block;
  color: var(--teal-light);
  margin-bottom: 1.5rem;
}
.pillar-card-icon svg { width: 52px; height: 52px; }

.pillar-card h3 {
  font-family: var(--ff-heading);
  font-size: 1.1rem; font-weight: 400;
  color: var(--white); margin-bottom: .85rem; line-height: 1.3;
}
.pillar-card p {
  font-family: var(--ff-body);
  font-size: .88rem; font-weight: 400;
  color: rgba(255,255,255,.48); line-height: 1.8;
}

.pillars-cta { text-align: left; }


/* ═══════════════════════════════════════════════════════════
   PROJECTS — white background, full-bleed photo cards
═══════════════════════════════════════════════════════════ */
.projects-section {
  background: transparent;
  padding-top: clamp(5rem, 8vw, 9rem);
  overflow: hidden;
  position: relative;
}
/* No decorative axis lines */
.projects-section::before,
.projects-section::after { display: none; }

.proj-head { margin-bottom: 3rem; position: relative; z-index: 1; }
.proj-head h2 em { color: var(--teal); }

/* CTA beneath the project rail */
.proj-cta {
  margin-top: clamp(2.5rem, 4vw, 4rem);
  padding-bottom: clamp(4rem, 6vw, 7rem);
  text-align: left;
  position: relative;   /* anchor for brick SVG positioning */
}

/* ═══════════════════════════════════════════════════════════
   PROJECT CAROUSEL — infinite scroll with edge chevrons
═══════════════════════════════════════════════════════════ */

/* Rail wrapper — clips the track and anchors the chevrons */
.proj-rail-wrap {
  position: relative;
  overflow: hidden;   /* hides the cloned cards outside the viewport */
}

/* The scrollable track — JS controls scrollLeft directly */
.proj-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  /* No padding — full bleed so cards touch the viewport edges */
  overflow: auto;     /* must be scrollable so scrollLeft actually moves content */
  cursor: grab;
  will-change: scroll-position;
  /* Hide the native scrollbar on all browsers */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}
.proj-track::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.proj-track.dragging { cursor: grabbing; }

/* Each tile: fixed width so they don't flex-grow when there are many */
.proj-card {
  flex: 0 0 clamp(220px, 28vw, 420px);
  height: 1020px;
  position: relative;
  overflow: hidden;
  user-select: none;
}

/* ── Project card slide-up reveal ── */
.proj-card--hidden {
  opacity: 0;
  transform: translateY(60px);
}
.proj-card--visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .7s cubic-bezier(.22,1,.36,1),
              transform .7s cubic-bezier(.22,1,.36,1);
}

/* Photo layer */
.proj-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: url(#proj-sharpen) saturate(1.25) brightness(1.05);
  transition: transform .9s cubic-bezier(.22,1,.36,1);
}
.proj-card:hover .proj-photo { transform: scale(1.05); }

/* Navy gradient overlay */
.proj-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(13,27,62,.98) 0%,
    rgba(13,27,62,.72) 45%,
    rgba(13,27,62,.18) 75%,
    transparent 88%
  );
  transition: background .6s var(--ease);
}
.proj-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(128deg, rgba(13,27,62,.72) 0%, transparent 50%);
  clip-path: polygon(0 0, 60% 0, 34% 100%, 0 100%);
  opacity: 0; transition: opacity .6s var(--ease);
}
.proj-card:hover .proj-overlay::before { opacity: 1; }

/* Caption — replaced by proj-meta title */
.proj-caption { display: none; }

/* ── Project meta — title always visible at top, details fade in on hover ── */
.proj-meta {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  min-height: 220px;
  padding: 1.6rem 1.75rem 2rem;
  /* Cap text width so it never crosses the diagonal angle line.
     The clip-path on ::before runs from 60% at top to 34% at bottom;
     60% is the tightest constraint at the top where the title sits. */
  max-width: 62%;
  background: none;
  pointer-events: none;
}

/* Fixed-height gradient fill — removed */
.proj-meta::after { display: none; }

/* Teal accent line — full width of the card, on the card itself */
.proj-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--teal);
  z-index: 4; /* above overlay and meta */
  pointer-events: none;
}

/* Teal hairline accent at very top — sits above the gradient ::after */
.proj-meta::before {
  display: none; /* replaced by .proj-card::before */
}

/* Title — always visible */
.proj-meta-title {
  font-family: var(--ff-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.25;
  margin: 0 0 .9rem;
  position: relative; z-index: 1; /* above ::after gradient */
}

/* Detail rows — hidden until hover */
.proj-meta-details {
  position: relative; z-index: 1; /* above ::after gradient */
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .35s var(--ease),
              transform .35s var(--ease);
}
.proj-card:hover .proj-meta-details {
  opacity: 1;
  transform: translateY(0);
}

.proj-meta-details p {
  font-family: var(--ff-body);
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255,255,255,.82);
  margin: 0 0 .25rem;
  line-height: 1.45;
}
.proj-meta-details p:last-child { margin-bottom: 0; }

.proj-meta-label {
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--white);
  margin-right: .25rem;
}
/* proj-card h3 now styled via .proj-meta-title above */

/* ── Edge chevron buttons ── */
.proj-chevron {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  /* Soft dark halo so chevron reads on any photo */
  filter: drop-shadow(0 2px 12px rgba(0,0,0,.55));
  transition: transform .45s cubic-bezier(.22,1,.36,1),
              filter  .35s var(--ease),
              opacity .35s var(--ease);
  opacity: 0.92;
}
.proj-chevron--prev { left:  clamp(12px, 2vw, 32px); }
.proj-chevron--next { right: clamp(12px, 2vw, 32px); }

.proj-chevron:hover {
  opacity: 1;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,.70));
  transform: translateY(-50%) scale(1.12);
}
.proj-chevron--prev:hover { transform: translateY(-50%) scale(1.12) translateX(-3px); }
.proj-chevron--next:hover { transform: translateY(-50%) scale(1.12) translateX(3px); }

.proj-chevron:active {
  transform: translateY(-50%) scale(0.96);
  transition-duration: .12s;
}

.proj-chevron svg { width: 72px; height: 72px; }

/* ── Edge gradient fade (gives a depth hint that more cards exist) ── */
.proj-rail-wrap::before,
.proj-rail-wrap::after {
  content: '';
  position: absolute; top: 0; bottom: 0;
  width: clamp(60px, 8vw, 120px);
  pointer-events: none;
  z-index: 5;
  transition: opacity .4s var(--ease);
}
.proj-rail-wrap::before {
  left: 0;
  background: linear-gradient(to right, rgba(255,255,255,.22) 0%, transparent 100%);
}
.proj-rail-wrap::after {
  right: 0;
  background: linear-gradient(to left, rgba(255,255,255,.22) 0%, transparent 100%);
}

/* Hide the old button row (kept for fallback) */
.proj-controls { display: none; }


/* ═══════════════════════════════════════════════════════════
   TEAM — very light grey, open and airy
═══════════════════════════════════════════════════════════ */
.team-section {
  background: var(--grey-pale);
  padding: clamp(6rem, 10vw, 11rem) 0;
  position: relative; overflow: hidden;
}

/* Technical grid mark bottom right */
.team-section::after {
  content: '';
  position: absolute; bottom: 0; right: 0;
  width: 280px; height: 280px; pointer-events: none;
  background-image:
    linear-gradient(rgba(13,27,62,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,62,.04) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(ellipse at bottom right, rgba(0,0,0,.6) 0%, transparent 68%);
  mask-image: radial-gradient(ellipse at bottom right, rgba(0,0,0,.6) 0%, transparent 68%);
}

.team-head { max-width: 560px; margin-bottom: clamp(3.5rem, 6vw, 6rem); position: relative; z-index: 1; }
.team-head h2 em { color: var(--teal); }
.team-intro { font-family: var(--ff-body); font-size: 1rem; color: var(--grey); line-height: 1.7; margin-top: .4rem; }

.team-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; position: relative; z-index: 1; }
/* 3-column layout for 3 staff members */
.team-grid--3 { grid-template-columns: repeat(3, 1fr); gap: 2px; }

/* Card: full rectangular portrait photo, details below */
.team-card {
  background: var(--white);
  display: flex; flex-direction: column;
  overflow: hidden;
  border-bottom: 3px solid transparent;
  transition: border-color .6s var(--ease), box-shadow .6s var(--ease);
}
.team-card:hover {
  border-color: var(--teal);
  box-shadow: 0 12px 48px rgba(13,27,62,.10);
}

/* Photo container — rectangular portrait, no forced square crop */
.team-img-wrap {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  /* 4:5 portrait aspect ratio — suits these photos well */
  aspect-ratio: 4 / 5;
}

/* Photo fills the container, cropped top-centre */
.team-photo {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center 15%;
  display: block;
  filter: grayscale(1) brightness(.88) contrast(.92);
  transition: transform .9s cubic-bezier(.22,1,.36,1), filter .8s var(--ease);
}
.team-card:hover .team-photo {
  transform: scale(1.03);
  filter: grayscale(0) brightness(.95) contrast(.97) saturate(1);
}

/* Joanne — tighter crop to frame her face correctly at rest;
   hover zoom is inherited from .team-card:hover .team-photo above */
.team-photo--joanne {
  object-position: center 12%;
  transform: scale(1.6) translate(-3%, -10%);
  transform-origin: center 20%;
}
.team-card:hover .team-photo--joanne {
  transform: scale(1.65) translate(-3%, -10%); /* zoom by the same +0.03 delta as other cards */
}

/* Subtle navy wash at bottom of photo — bleeds into details */
.team-img-diag {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 45%;
  pointer-events: none; z-index: 2;
  background: linear-gradient(to top, rgba(13,27,62,.55) 0%, transparent 100%);
}

/* Name sits at bottom of photo, overlaid on the gradient */
.team-name-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 3; padding: 1.5rem 1.75rem 1.25rem;
}
.team-name-overlay h3 {
  font-family: var(--ff-heading);
  font-size: 1.35rem; font-weight: 400;
  color: var(--white); line-height: 1.15;
  margin: 0;
}
.team-name-overlay .team-role {
  font-family: var(--ff-body);
  font-size: .62rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--teal-light);
  margin-top: .3rem; display: block;
}

/* Details below the photo */
.team-details {
  padding: 1.75rem 1.75rem 2rem;
  flex: 1; background: var(--white);
  border-top: 1px solid var(--grey-pale);
}
.team-details h3 {
  /* Hidden — name is overlaid on the photo */
  display: none;
}

.team-img-placeholder {
  width: 100%; height: 100%;
  background: var(--navy-light);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.22);
}
.team-img-placeholder svg { width: 56px; height: 56px; }
.team-quals {
  font-family: var(--ff-body);
  font-size: .65rem; font-weight: 600; letter-spacing: .07em;
  color: var(--teal); margin-bottom: 1rem;
}
.team-bio { font-family: var(--ff-body); font-size: .88rem; color: var(--grey); line-height: 1.8; margin-bottom: 1rem; }
.team-tags { display: flex; gap: .4rem; flex-wrap: wrap; }
.team-tags span {
  font-family: var(--ff-body);
  font-size: .62rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--grey-mid);
  padding: .22rem .65rem; border: 1.5px solid var(--grey-light);
  border-radius: 3px;
}


/* ═══════════════════════════════════════════════════════════
   DIFFERENCE BAND — full-bleed photo + animated overlays
═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   CONTACT — full-bleed photo with navy overlay
═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   CONTACT — light, airy design on --light background
═══════════════════════════════════════════════════════════ */
.contact-section {
  background: var(--white);
  padding: clamp(6rem, 10vw, 11rem) 0;
  position: relative; overflow: hidden;
}

/* Faint engineering grid watermark */
.contact-section::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(13,27,62,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,62,.04) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse at 20% 60%, rgba(0,0,0,.5) 0%, transparent 65%);
  mask-image: radial-gradient(ellipse at 20% 60%, rgba(0,0,0,.5) 0%, transparent 65%);
}

/* Teal accent stripe — top edge */
.contact-section::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%);
}

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(4rem, 7vw, 9rem); align-items: start;
  position: relative; z-index: 1;
}

/* Left column — info */
.contact-info h2 { color: var(--navy); }
.contact-info h2 em { color: var(--teal); }
.contact-lead {
  font-family: var(--ff-body);
  font-size: .98rem; color: rgba(13,27,62,.60); line-height: 1.85;
  margin-bottom: 3rem;
}

.offices { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 1.8rem; }
.office-block h4 {
  font-family: var(--ff-body);
  font-size: .82rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--teal);
  margin-bottom: .9rem; padding-bottom: .6rem;
  border-bottom: 1.5px solid rgba(13,27,62,.14);
}

/* Address left, map fills remaining space to the right */
.office-block-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1.25rem;
}
.office-block-inner address {
  flex: 1 1 auto;   /* address takes remaining space */
}
.office-block p {
  font-family: var(--ff-body); font-size: 1.08rem;
  color: rgba(13,27,62,.65); line-height: 1.9; margin-bottom: .45rem;
}

/* Map frame — fixed equal width on both maps */
.office-map {
  flex: 0 0 200px;
  width: 200px;
  height: auto;
  min-height: 140px;
  border-radius: 6px;
  overflow: hidden;
  border: 1.5px solid rgba(13,27,62,.12);
  box-shadow: 0 2px 12px rgba(13,27,62,.08);
}
.office-block a { color: var(--teal); font-weight: 600; transition: color .3s; }
.office-block a:hover { color: var(--navy); }

.states-row {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.states-label {
  font-family: var(--ff-body);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(13,27,62,.45);
}
.states-badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.states-badges b {
  font-family: var(--ff-body);
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  padding: .22rem .55rem;
  border: 1.5px solid rgba(13,27,62,.22);
  color: rgba(13,27,62,.65); border-radius: 3px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  cursor: default;
}
.states-badges b:hover {
  background: rgba(13,27,62,1);
  color: #ffffff;
  border-color: rgba(13,27,62,1);
}

/* Right column — form card */
.contact-form-wrap {
  background: var(--white);
  border-radius: 6px;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 4vw, 3.5rem) clamp(1rem, 2vw, 1.5rem);
  box-shadow: 0 4px 40px rgba(13,27,62,.08), 0 1px 6px rgba(13,27,62,.04);
  border-top: 3px solid var(--teal);
}

/* Form */
.cform { display: flex; flex-direction: column; gap: 1.75rem; }
.cform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.cform-field { display: flex; flex-direction: column; gap: .42rem; }
.cform-field label {
  font-family: var(--ff-body);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(13,27,62,.60);
}
.cform-field label span { color: var(--teal); }

.cform-field input,
.cform-field select,
.cform-field textarea {
  width: 100%; padding: .85rem 1.1rem;
  border: 1.5px solid rgba(13,27,62,.16);
  background: var(--white); color: var(--navy);
  border-radius: 3px; outline: none;
  font-family: var(--ff-body); font-size: 1.05rem;
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.cform-field input::placeholder,
.cform-field textarea::placeholder { color: rgba(13,27,62,.30); }
.cform-field input:focus,
.cform-field select:focus,
.cform-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27,140,140,.12);
}
.cform-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B8C8C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
  background-size: 12px; padding-right: 2.5rem; cursor: pointer;
  background-color: var(--white);
}
.cform-field select option { background: var(--white); color: var(--navy); }
.cform-field select:focus { background-color: var(--white); }
.cform-field textarea { resize: vertical; min-height: 160px; }
.cform-feedback {
  font-size: .95rem; min-height: 1.5em; margin-top: .15rem;
  font-weight: 600;
}

/* Send Message button — larger text than base .btn */
#contactForm .btn {
  font-size: .92rem;
  position: relative;
  overflow: hidden;   /* clips envelope outside button bounds */
}

/* ── Send Message — paper plane shoot animation ── */

/* Button text nudges left on hover to open space for the plane */
#contactForm .btn .btn-label {
  display: inline-block;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
#contactForm .btn:hover .btn-label {
  transform: translateX(-18px);
}

/* Paper plane + motion lines container */
.send-envelope {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%) translateX(-110%);
  display: flex;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  opacity: 0;
}

/* Motion lines — three horizontal strokes behind the plane */
.send-envelope .motion-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
}
.send-envelope .motion-lines span {
  display: block;
  height: 1.5px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  transform-origin: right center;
}
.send-envelope .motion-lines span:nth-child(1) { width: 18px; }
.send-envelope .motion-lines span:nth-child(2) { width: 12px; }
.send-envelope .motion-lines span:nth-child(3) { width: 7px;  }

/* Trigger: shoot in from left, decelerate to rest at centre-right */
#contactForm .btn:hover .send-envelope {
  animation: env-shoot .52s cubic-bezier(.12,.8,.2,1) forwards;
}
/* On mouse-leave: slide back out left */
#contactForm .btn:not(:hover) .send-envelope {
  animation: env-retreat .3s cubic-bezier(.55,0,1,.45) forwards;
}

@keyframes env-shoot {
  0%   { opacity: 0; transform: translateY(-50%) translateX(var(--env-start, -110%)); }
  12%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(-50%) translateX(var(--env-land, 60%)); }
}
@keyframes env-retreat {
  0%   { opacity: 1; transform: translateY(-50%) translateX(var(--env-land, 60%)); }
  100% { opacity: 0; transform: translateY(-50%) translateX(var(--env-start, -110%)); }
}
.cform-feedback.success { color: #1a8c5c; }
.cform-feedback.error   { color: #c0392b; }


/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════
   FOOTER — dark navy, on-brand, premium
═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--navy);   /* #0D1B3E — deep brand navy */
  position: relative;
  overflow: hidden;
}

/* Subtle cross-hatch at low opacity — engineering flavour */
.site-footer::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* Teal top-edge accent stripe */
.site-footer::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal-light) 100%);
  z-index: 1;
}

.footer-top {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 3.5rem 2rem; padding-top: 7rem; padding-bottom: 6rem;
  border-bottom: 1px solid rgba(255,255,255,.10);
  position: relative; z-index: 2;
}

/* Col 1 — brand */
.footer-brand { display: flex; flex-direction: column; gap: 1.5rem; }

.footer-logo-link { display: flex; align-items: center; gap: 1rem; }

/* Logo wordmark — invert to white on dark background */
.footer-logo-img {
  height: 50px; width: auto;
  filter: brightness(0) invert(1);
  opacity: .90;
}

/* Logomark — teal colour retained */
.footer-logomark {
  height: 50px; width: auto;
  filter: brightness(0) saturate(100%)
          invert(44%) sepia(60%) saturate(700%)
          hue-rotate(130deg) brightness(105%) contrast(100%);
}

.footer-tagline {
  font-family: var(--ff-body);
  font-size: .82rem; font-weight: 400;
  color: rgba(255,255,255,.42); line-height: 1.80;
  max-width: 56ch;
}

.footer-social { display: flex; flex-direction: column; gap: .75rem; margin-top: .5rem; }

.footer-social-heading {
  font-family: var(--ff-body);
  font-size: .72rem; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.35);
  margin: 0;
}

.footer-social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.70); font-size: 1rem;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.footer-social-icon:hover {
  background: var(--teal); color: var(--white); border-color: var(--teal);
}

/* Cols 2 & 3 — links / contact */
.fcol { display: flex; flex-direction: column; gap: 0; }

.fcol-heading {
  font-family: var(--ff-body);
  font-size: .72rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1.4rem;
}

.fcol ul { display: flex; flex-direction: column; gap: .75rem; list-style: none; margin: 0; padding: 0; }
.fcol a {
  font-family: var(--ff-body); font-size: .88rem; font-weight: 400;
  color: rgba(255,255,255,.50); transition: color .3s var(--ease); text-decoration: none;
}
.fcol a:hover { color: var(--white); }

/* Contact list with icons */
.footer-contact-list { gap: 1rem !important; }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: .75rem;
  font-family: var(--ff-body); font-size: .88rem; font-weight: 400;
  color: rgba(255,255,255,.50); text-decoration: none;
  transition: color .3s var(--ease);
}
.footer-contact-item:hover { color: var(--white); }

.footer-contact-item i {
  margin-top: .15em; font-size: .9rem;
  color: var(--teal-light); flex-shrink: 0;
}

/* Bottom bar */
.footer-bar {
  background: rgba(0,0,0,.25);
  border-top: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 2;
}
.footer-bar-inner {
  display: flex; justify-content: center; align-items: center;
  padding-top: 1.2rem; padding-bottom: 1.2rem;
}
.footer-bar-inner p { font-size: .78rem; color: rgba(255,255,255,.28); }

.d-br { display: block; }


/* ═══════════════════════════════════════════════════════════
   TECHNICAL SVG BACKGROUND GRAPHICS
   Positioned absolutely behind section content, very sparse
   and decorative — engineering drawing aesthetic
═══════════════════════════════════════════════════════════ */

/* Base: all tech SVGs are absolute, pointer-events none */
.tech-svg {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Façade elevation — about band, centred background */
.tech-svg--about {
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(900px, 90vw);
  height: auto;
  opacity: 1;
}

/* Bracket detail — projects section, top right */
.tech-svg--projects {
  top: 0; right: 0;
  width: clamp(200px, 28vw, 400px);
  height: auto;
  opacity: 1;
}

/* House plan background — team section */


/* Per-slide engineering detail overlays — hero section */
.hero-detail-img {
  position: absolute;
  top: clamp(120px, 16vh, 160px); right: clamp(20px, 4vw, 80px);
  width: clamp(260px, 34vw, 560px);
  height: auto;
  object-fit: contain;
  object-position: top right;
  z-index: 1;
  pointer-events: none;
  /* Hidden by default — JS adds --active class to match the current slide */
  opacity: 0;
  transition: opacity 0.9s ease;
  /* Invert: white-bg black lines → white lines on dark hero */
  filter: invert(1) brightness(0.75) contrast(0.85);
  /* Diagonal fade: opaque at top-right → fully transparent at bottom-left */
  -webkit-mask-image: linear-gradient(
    135deg,
    rgba(0,0,0,.42) 0%,
    rgba(0,0,0,.32) 34%,
    rgba(0,0,0,.18) 58%,
    rgba(0,0,0,.06) 80%,
    transparent 100%
  );
          mask-image: linear-gradient(
    135deg,
    rgba(0,0,0,.42) 0%,
    rgba(0,0,0,.32) 34%,
    rgba(0,0,0,.18) 58%,
    rgba(0,0,0,.06) 80%,
    transparent 100%
  );
}
.hero-detail-img--active {
  opacity: 1;
}

/* Structural node diagram — about band, right edge */
.tech-svg--about-node {
  top: 50%; right: -20px;
  transform: translateY(-50%);
  width: clamp(180px, 20vw, 300px);
  height: auto;
  opacity: 1;
}

/* Isometric grid + elevation detail — services section, right edge */
.tech-svg--services {
  top: 0; right: 0;
  width: clamp(240px, 30vw, 500px);
  height: 100%;
  opacity: 1;
  z-index: 1; /* above photo, below cards */
}

/* Site plan map — projects section, left margin */
.tech-svg--proj-map {
  top: 50%; left: 0;
  transform: translateY(-50%);
  width: clamp(130px, 16vw, 220px);
  height: auto;
  opacity: 1;
}

/* Structural section drawing — contact section, right edge */


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 1060px) {
  .team-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .split-section { grid-template-columns: 1fr; }
  .split-photo   { height: 360px; }

  .about-grid { grid-template-columns: 1fr; }
  .about-visual { order: -1; }
  .about-img-frame img { height: 340px; }
  .about-badge { bottom: -1rem; left: -1rem; }

  .svc-grid { grid-template-columns: 1fr; }
  .pillars-grid { grid-template-columns: 1fr; }

  /* ── Stacked vertically: swap rightward chevron → downward chevron ── */
  .pillar-card,
  .pillar-card:nth-child(1),
  .pillar-card:nth-child(2),
  .pillar-card:nth-child(3) {
    clip-path: polygon(
      0%   0%,
      100% 0%,
      100% calc(100% - 32px),
      50%  100%,
      0%   calc(100% - 32px)
    );
    filter: drop-shadow(0 6px 16px rgba(0,0,0,.55));
    margin-left: 0;
    padding: 2.5rem 2.5rem 3.5rem; /* extra bottom padding for the notch */
    z-index: auto;
    transform: none;
  }
  /* Cards 2 & 3: overlap upward (instead of leftward); restore z-index for correct paint order */
  .pillar-card:nth-child(1) { z-index: 3; }
  .pillar-card:nth-child(2) {
    z-index: 2;
    margin-top: -32px;
    padding-top: calc(2.5rem + 32px);
  }
  .pillar-card:nth-child(3) {
    z-index: 1;
    margin-top: -32px;
    padding-top: calc(2.5rem + 32px);
  }
  .pillar-card:hover {
    transform: translateY(-3px); /* gentler lift on mobile */
  }
  /* Border ::after: downward chevron outline */
  .pillar-card::after {
    clip-path: polygon(
      0%   0%,
      100% 0%,
      100% calc(100% - 32px),
      50%  100%,
      0%   calc(100% - 32px)
    );
    inset: -1px;
  }

  .team-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; }

  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }

  /* Hide decorative margin graphics on small screens */
  .hero-detail-img,
  .tech-svg--about-node,
  .tech-svg--services,
  .tech-svg--pillars,
  .tech-svg--proj-map,
  
}

@media (max-width: 640px) {
  /* burger is always shown — no overrides needed */

  .hstat-sep  { display: none; }
  .hero-stats { gap: 1.5rem; }

  .team-card { grid-template-columns: 90px 1fr; gap: 1.4rem; padding: 2rem; }

  .cform-row { grid-template-columns: 1fr; }

  .footer-bar-inner { flex-direction: column; align-items: center; }

  .d-br { display: none; }
}

/* ── Narrow nav (≤540px): logo row on top, burger row beneath ── */
@media (max-width: 540px) {
  /* Header becomes a two-row column so burger is always below the logo */
  .nav-wrap {
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding-top: .9rem;
    padding-bottom: 0;
  }

  /* Logo row: centred, small bottom breathing room */
  .nav-logo {
    width: 100%;
    justify-content: center;
    padding-bottom: .6rem;
  }

  /* Shrink images slightly on small phones */
  .logo-img        { height: 48px; }
  .logo-mark       { height: 48px; }
  .logo-mark-white { height: 48px; }

  /* Burger: pull out of fixed positioning so it flows inside the header
     beneath the logo.  margin-left: auto is irrelevant in column layout;
     we centre it instead. */
  .nav-burger {
    position: relative !important;  /* override position:fixed from the base rule */
    top: auto !important;
    right: auto !important;
    width: 100%;
    height: 48px;
    justify-content: center;
    padding: 0;
    margin-left: 0;
    margin-bottom: .5rem;
    z-index: 2000;
  }

  /* Drawer starts below the taller two-row header
     (logo ~48px + padding ~.9+.6rem + burger ~48px + margin ~.5rem ≈ 142px) */
  .nav-drawer { padding-top: 152px; }
}

@media (max-width: 420px) {
  .hero-ctas  { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-slide  { transition: opacity .3s !important; }
}
