/* CHP front-page scroll effects — companion to chp-scroll-effects.js */

/* Nav: floating white pill bar over the hero */
body.home #site-header {
  position: absolute;
  top: 52px;
  left: 7vw;
  right: 7vw;
  z-index: 100;
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(20, 52, 103, 0.10);
  padding: 6px 18px 6px 26px;
}
body.home #site-header.chp-nav-pinned {
  position: fixed;
  top: 52px;
}
body.home #site-header .header-inner {
  max-width: none;
  width: 100%;
}
body.home #site-header .site-branding img {
  max-height: 84px;
  width: auto;
}
@media (max-width: 767px) {
  body.home #site-header .site-branding img {
    max-height: 60px;
  }
}
body.home #site-header nav a {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #143467;
  padding: 9px 14px;
  border-radius: 999px;
  transition: color .18s ease, background-color .18s ease;
}
body.home #site-header nav a:hover {
  color: #006EE1;
  background-color: #F0F5FB;
}
body.home #site-header nav .current-menu-item > a {
  color: #006EE1;
}
.skip-link {
  position: absolute !important;
  left: -9999px !important;
}

/* Scrolly hero: JS adds .chp-scrub-on and injects the video holder. */
.chp-hero-scrolly.chp-scrub-on {
  position: relative;
  height: 260vh;
}
.chp-hero-scrolly.chp-scrub-on .chp-hero-video-holder {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.chp-hero-scrolly.chp-scrub-on .chp-hero-sticky {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Full-bleed hero video, edge to edge.
   !important needed: the scrolly-video lib writes inline styles. */
.chp-scrub-on #chp-hero-video {
  top: 0 !important;
  height: 100vh !important;
  width: 100% !important;
  margin-left: 0 !important;
  border-radius: 0;
  overflow: hidden;
}
/* Bottom of the hero melts into the white section below */
#chp-hero-video::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26vh;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, #FFFFFF 94%);
  pointer-events: none;
  z-index: 2;
}
#chp-hero-video video,
#chp-hero-video canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Hero copy: left-aligned over the card */
.chp-hero-sticky {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  height: 100vh;
  padding: 17vh 7vw 0 !important;
}
.chp-hero-sticky > .elementor-widget,
.chp-hero-sticky > .e-con {
  position: relative;
  z-index: 3;
}
.chp-green { color: #4A7232; }

/* Hero description: soft white drop shadow for readability on the sky */
.chp-hero-sticky .elementor-element-chp0002 {
  text-shadow: 0 1px 7px rgba(255, 255, 255, 0.65);
}

/* Feature bar pinned inside the bottom of the hero card */
.chp-hero-sticky > .elementor-widget.chp-features-widget {
  margin-top: auto;
  align-self: center;
  width: min(1180px, 91%);
  margin-bottom: 0px !important;
}
.chp-hero-features {
  display: flex;
  gap: 18px;
  background: #ffffff;
  border-radius: 22px;
  padding: 20px 28px;
  box-shadow: 0 18px 50px rgba(20, 52, 103, 0.16);
}
.chp-feature {
  flex: 1 1 0;
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.chp-feature .chp-fi {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #EDF4E7;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chp-feature .chp-fi svg { width: 21px; height: 21px; }
.chp-feature h4 {
  margin: 1px 0 4px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #143467;
}
.chp-feature p {
  margin: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #647691;
}

@media (max-width: 1024px) {
  .chp-hero-features { flex-wrap: wrap; }
  .chp-feature { flex: 1 1 42%; }
}
@media (max-width: 1024px) and (min-width: 768px) {
  .chp-hero-sticky { padding: 14vh 6vw 0 !important; }
  .chp-hero-sticky > .elementor-widget.chp-features-widget { margin-bottom: 48px !important; }
}
@media (max-width: 767px) {
  body.home #site-header { left: 10px; right: 10px; padding: 4px 12px; top: 24px; }
  body.home #site-header.chp-nav-pinned { top: 24px; }
  .chp-hero-sticky { padding: 12vh 6vw 0 !important; }

  .chp-feature p { display: none; }
  .chp-hero-features { padding: 14px 16px; gap: 12px; }
  .chp-hero-sticky > .elementor-widget.chp-features-widget { margin-bottom: 20px !important; }
  /* finale lines: keep the longest line inside narrow viewports */
  .chp-scrolly-wrap .chp-scrolly-overlay h2.chp-scrolly-line {
    font-size: clamp(1.9rem, 8.5vw, 3rem) !important;
  }
  .chp-top-btn { right: 16px; bottom: 16px; width: 46px; height: 46px; }
}
@media (max-width: 480px) {
  .chp-scrolly-wrap .chp-scrolly-overlay h2.chp-scrolly-line {
    font-size: clamp(1.7rem, 8vw, 2.4rem) !important;
  }
}

/* Soft clouds flanking the Our Mission section (JS-injected imgs so they can
   drift with scroll) — feathered mask, never sliced off. */
.chp-mission {
  position: relative;
}
.chp-mission .chp-mcloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.85;
  height: auto;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 45%, transparent 72%);
  mask-image: radial-gradient(ellipse 50% 50% at center, #000 45%, transparent 72%);
}
.chp-mcloud-1 { width: 24vw; left: 1.5vw; top: 8%; }
.chp-mcloud-2 { width: 22vw; right: 1.5vw; bottom: 10%; }
.chp-mission > .e-con {
  position: relative;
  z-index: 1;
}

/* Left-aligned mission: eyebrow runs into a fading teal rule, the mission
   statement carries a teal accent bar */
.chp-mission-left .elementor-element-chp000c .elementor-heading-title {
  display: flex;
  align-items: center;
  gap: 18px;
}
.chp-mission-left .elementor-element-chp000c .elementor-heading-title::after {
  content: '';
  flex: 1 0 70px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #21B2CD, rgba(33, 178, 205, 0));
}
.chp-mission-left .elementor-element-chp000e .elementor-heading-title {
  border-left: 4px solid #21B2CD;
  padding-left: 20px;
}

/* Mission photo collage — overlapping tilted shots, parallax + hover */
.chp-collage {
  position: relative;
  width: 100%;
  height: 480px;
}
.chp-collage figure {
  position: absolute;
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(20, 52, 103, 0.22);
  will-change: transform;
}
.chp-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.chp-collage figure:hover img { transform: scale(1.07); }
.chp-collage figure:hover { z-index: 6; }
.chp-col-a { width: 64%; height: 56%; left: 0; top: 3%; transform: rotate(-4deg); z-index: 2; }
.chp-col-b { width: 56%; height: 50%; right: 0; top: 32%; transform: rotate(3deg); z-index: 3; }
.chp-col-c { width: 36%; height: 32%; left: 14%; bottom: 0; transform: rotate(-2deg); z-index: 4; }
@media (max-width: 1024px) {
  .chp-collage { height: 400px; }
}
@media (max-width: 767px) {
  .chp-collage { height: 320px; margin-top: 8px; }
}
@media (max-width: 767px) {
  .chp-mission .chp-mcloud { display: none; }
}

/* Static fallback keeps the original sky image */
.chp-hero-fallback .chp-hero-sticky {
  background: url('/wp-content/uploads/2026/06/hero-sky.webp') top center / cover no-repeat;
}

/* Back-to-top button — revealed by JS after the aerial ship scrub completes */
.chp-top-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 120;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #006EE1 !important;
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(10, 36, 71, 0.35);
  padding: 0;
  line-height: 1;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease, background .2s ease;
}
.chp-top-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.chp-top-btn:hover {
  background: #0a58b8 !important;
}
.chp-top-btn::before {
  content: '';
  display: block;
  width: 22px !important;
  min-width: 22px !important;
  flex: 0 0 22px;
  height: 22px !important;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Sticky wrapper for the HEALTHY PORTS section (built by JS, replaces GSAP pin) */
.chp-ship-wrap {
  position: relative;
  height: 240vh;
  background: #006EE1;
}
.chp-ship-wrap .chp-ship-scrolly {
  position: sticky;
  top: 0;
}