:root {
  --eg-header-height: 82px;
  --eg-clientbar-height: 40px;
  --eg-blue: #294483;
  --eg-blue-dark: #17316f;
}

/* Opaque sticky header */
.header {
  background: #ffffff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: 0 8px 24px rgba(17, 27, 49, 0.06);
}

/* Sticky blue client banner */
.client-topbar {
  position: sticky;
  top: var(--eg-header-height);
  z-index: 29;
  background: var(--eg-blue) !important;
  box-shadow: 0 10px 24px rgba(41, 68, 131, 0.16);
}

/* Loading overlay */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  transition: opacity .36s ease, visibility .36s ease;
}
#page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#page-loader .loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
#page-loader .loader-logo {
  width: min(300px, 68vw);
  height: auto;
  display: block;
}
#page-loader .loader-copy {
  color: var(--eg-blue);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: clamp(14px, 1.9vw, 20px);
}
#page-loader .loader-copy small {
  display: block;
  margin-top: 4px;
  color: #6d84b8;
  letter-spacing: .12em;
  font-size: .72em;
}

/* Hero metric boxes removed */
.home-hero .signal-stage .metric {
  display: none !important;
}

/* Hero video integration */
.home-hero .signal-stage.hero-video-applied {
  min-height: 430px;
  height: auto;
  display: grid;
  place-items: center;
}
.home-hero .signal-stage.hero-video-applied .core-shield,
.home-hero .signal-stage.hero-video-applied .orbit {
  display: none !important;
}
.hero-video-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  aspect-ratio: 1 / 1;
  border-radius: 34px;
  overflow: hidden;
  background: #0a1324;
  border: 1px solid rgba(148, 171, 220, 0.55);
  box-shadow: 0 30px 65px rgba(17, 27, 49, 0.22);
}
.hero-video-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 28%, rgba(7,13,25,0.18) 100%);
  z-index: 2;
}
.hero-video-shell::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 44px;
  background: radial-gradient(circle at center, rgba(41,68,131,0.18), rgba(41,68,131,0) 66%);
  z-index: -1;
}
.hero-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.home-hero .signal-stage.hero-video-applied .metric {
  z-index: 3;
  box-shadow: 0 16px 40px rgba(16, 27, 49, 0.14);
}

/* Founder image refinement */
.portrait {
  background: radial-gradient(circle at 50% 38%, #213760 0%, #101b31 68%, #0a1222 100%) !important;
}
.person-stage {
  width: 100%;
  display: grid;
  place-items: center;
  padding: 24px 12px 88px;
}
.portrait-composite {
  width: min(100%, 580px);
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 26px 55px rgba(0, 0, 0, 0.24));
}

/* Better anchor offset with sticky header + client bar */
section[id] {
  scroll-margin-top: 140px;
}

@media (max-width: 1100px) {
  .hero-video-shell {
    width: min(100%, 460px);
  }
}

@media (max-width: 900px) {
  .client-topbar {
    gap: 10px;
    text-align: center;
    padding-inline: 18px;
  }
  .client-topbar span,
  .client-topbar b {
    justify-content: center;
    flex-wrap: wrap;
  }
  .home-hero .signal-stage.hero-video-applied {
    min-height: 360px;
    margin-top: 10px;
  }
  .hero-video-shell {
    width: min(100%, 420px);
    border-radius: 28px;
  }
}

@media (max-width: 720px) {
  .header {
    position: sticky;
    top: 0;
  }
  .client-topbar {
    top: var(--eg-header-height);
    min-height: 52px;
    padding-block: 10px;
    line-height: 1.4;
  }
  .hero-video-shell {
    width: 100%;
    max-width: 360px;
  }
  .home-hero .signal-stage.hero-video-applied .metric {
    font-size: 11px;
    padding: 10px 13px;
  }
  .home-hero .signal-stage.hero-video-applied .metric span {
    font-size: 21px;
  }
  .m1 { top: 10px; left: 0; }
  .m2 { top: 128px; right: 0; }
  .m3 { bottom: 8px; left: 6px; }
  #page-loader .loader-inner {
    gap: 14px;
  }
}
