/* =============================================================
   Hero Banner Component - CSS
   Standardized Spacing and Typography
   Matches Static Index.html exactly
   ============================================================= */

/* Align with global `.container` max-width (styles.css) */
.hero-banner-component .container {
  max-width: 1446px !important;
  padding: 0 20px !important;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

@media (max-width: 1024px) {
  .hero-banner-component .container {
  /*  max-width: 700px !important;*/
    padding: 0 20px !important;
  }
}

@media (max-width: 768px) {
  .hero-banner-component .container {
    max-width: 100% !important;
    padding: 0 20px !important;
  }
}

/* Base Component Settings */
.hero-banner-component {
  position: relative;
  overflow: hidden;
  /* Default hero text colour is white (hero usually sits over a dark image/video).
     When the editor sets a Text Colour in the Style tab, flexible_main_content.twig
     emits --section-color on the parent, which cascades in and wins here. */
  color: var(--section-color, #fff);
  /* Top padding clears the absolutely-positioned nav wave that overlaps the hero.
     Moved here from the twig so it tracks the nav per breakpoint (no rebuild).
     Tablet/desktop resting nav ≈160–200px; from 1440px up the nav scales with the
     viewport (#mainNav ≈15.28vw), so we follow it instead of a fixed value. */
  padding-top: 210px;
}

@media (min-width: 1280px) {
  /* Desktop only: the nav switches to the big menu + vw-scaled wave here, so the
     hero follows it (>=210px, then tracks the viewport on wide screens). */
  .hero-banner-component { padding-top: max(210px, 15.5vw); }
}

@media (max-width: 640px) {
  .hero-banner-component { padding-top: 8rem; } /* ≈128px; mobile wave ≈140px */
}
.hero-banner-component__title,
.hero-banner-component__subtitle,
.hero-banner-component__bottom-text p {
  color: inherit;
}

.hero-banner-component__bg {
  position: absolute;
  inset: -24px 0;
  z-index: 0;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: cover;
  transform: translate3d(0, 0, 0) scale(1.14);
  will-change: transform;
}

/* Editor-controlled tint between the background media (z-0) and the content
   (z-10). Colour / opacity / on-off come from ACF as inline styles on the
   element; this rule only positions it. Default look = the original navy gradient. */
.hero-banner-component__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Video background cover ── */
.hero-banner-component .hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-banner-component .hero-video-wrap video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-banner-component .hero-video-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 0;
}

/* Typography & Visuals */
.hero-banner-component h1 {
  font-family: 'Raleway', sans-serif;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  line-height: 1.1;
}

.hero-banner-component p {
  font-family: 'Raleway', sans-serif;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Vertical rhythm for the hero copy. Replaces the old per-breakpoint tailwind
   pt/pb/-mt stack. Top is kept small so the copy sits HIGH — it still clears the
   nav via the component's own pt-[255px]/pt-32 — while the large bottom padding
   reveals more of the background graphic and leaves room for the absolute splash
   badge. No min-height: the padding alone drives the hero height. */
.hero-banner-component__content {
  padding: 2.5vw 0 24vw;   /* tablets: small gap below the nav, big image reveal */
}

@media (min-width: 1280px) {
  .hero-banner-component__content {
    padding: 1.2vw 0 20vw; /* desktop: tight gap — component padding-top does the nav clearing */
  }
}

@media (max-width: 640px) {
  .hero-banner-component__content {
    padding: 6vw 0 42vw; /* phones: copy high, big image reveal, splash clears */
  }
}

/* Fluid hero type — smooth scaling instead of hard jumps at the md/lg breakpoints.
   Title floors at 32px (mobile) and caps at 64px; subtitle 20px → 36px. */
/* Title caps at 64px only on real desktop (>=1280) — at iPad/tablet widths it
   scales down (e.g. ~51px at 1024) so it doesn't dominate. */
.hero-banner-component__title {
  font-size: clamp(2rem, 5vw, 64px);
}

.hero-banner-component__subtitle {
  font-size: clamp(1.25rem, 3vw, 36px);
}

@media (max-width: 640px) {
  .hero-banner-component .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Mobile: parallax off (JS) — no scale/inset bleed or will-change.
   No min-height: the hero's height comes from __content padding alone. */
@media (max-width: 640px) {
  .hero-banner-component__bg {
    inset: 0;
    transform: none;
    will-change: auto;
    background-position: center bottom;
  }
  .hero-banner-component .hero-video-wrap video {
    object-position: center bottom;
  }
}

/* ── Bottom-left navy splash badge with caption ──
   Figma: 395×185 SVG wave. Caption is 24px Raleway Bold, white, centered both ways
   inside the navy area (which is the bottom ~70% of the SVG). Capped at 2 lines so
   an editor pasting too much text can't blow out the badge. */
.hero-banner-component__splash {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 395px;
  max-width: 32%;
  z-index: 6;
  pointer-events: none;
  line-height: 0;
  /* Drives the responsive text size below. 1 unit = 1px at intrinsic 395px width. */
  --splash-scale: calc(100% / 395);
}

.hero-banner-component__splash-img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-banner-component__splash-text {
  position: absolute;
  /* Left-anchored text, matching Figma left=47 / width=282 / 185-tall splash.
     Vertical centre sits at ~65% of the SVG height — middle of the fully-filled
     navy band that runs below the wave's crests. */
  left: 11.9%;     /* 47 / 395 */
  top: 65%;
  width: 71.4%;    /* 282 / 395 */
  transform: translateY(-50%);
  text-align: left;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-banner-component__splash-text > span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Below ~1200px the splash starts shrinking so the 24px text would overflow.
   Scale the font with the splash itself (container query approximation via vw). */
@media (max-width: 1199px) {
  .hero-banner-component__splash {
    max-width: 38%;
  }
  .hero-banner-component__splash-text {
    font-size: clamp(13px, 2vw, 20px);
  }
}

@media (max-width: 640px) {
  .hero-banner-component__splash {
    width: 230px;
    max-width: 60%;
  }
  .hero-banner-component__splash-text {
    font-size: clamp(10px, 3.4vw, 14px);
  }
}

/* Shared CTA button – outline style, fills on hover.
   Used via partials/cta-button.twig across all components. */
.nwc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 48px;
  border: 3px solid var(--btn-color);
  border-radius: 9999px;
  background: transparent;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  font-size: 20px;
  font-weight: 700;
  font-family: 'Raleway', sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

@media (min-width: 1024px) {
  .nwc-btn {
    min-height: 90px;
    font-size: 32px;
  }
}

.nwc-btn--dark {
  color: #000;
}

.nwc-btn--light {
  color: #fff;
}

.nwc-btn:hover {
  background-color: var(--btn-hover-bg, var(--btn-color));
  color: var(--btn-hover-txt, #fff);
}
