/* ==========================================================================
   Hero Interrupter Banner
   ========================================================================== */

.hero-interrupter {
  display: flex;
  width: 100%;
  min-height: 46px;
  padding: 20px 20px 10px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.hero-interrupter--blue {
  background: #0055B8;
  color: #fff;
}

.hero-interrupter--green {
  background: var(--Branded-ALGS-green-primary, #0F8A00);
  color: #fff;
}

.hero-interrupter--yellow {
  background: #FFBF3F;
  color: #003A70;
}

.hero-interrupter__text {
  margin: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  line-height: 1.2;
}

@media (min-width: 940px) {
  .hero-interrupter {
    padding: 10px 31px;
  }
  .hero-interrupter__text {
    font-size: var(--font-size-base);
  }
}

/* ==========================================================================
   Hero Component
   ========================================================================== */

.hero {
  position: relative;
  width: 100%;
  /* Base mobile height */
  /* height: 500px; */
  min-height: 800px;
  background-color: var(--color-gray-100);
  overflow: hidden;
  /* Tuck behind header + interrupter so the video bleeds up under the nav.
     The interrupter sits between the header and .hero in the DOM, so we
     only need to clear the header height — the interrupter's own height
     naturally accounts for itself. Uses var(--header-height) token
     (utility-bar + primary-nav). */
  margin-top: calc(-1 * var(--header-height));
  z-index: 1;
}

@media (min-width: 940px) {
  .hero {
    /* Scale with viewport: 775px at 1440px = 53.82vw */
    /* height: 53.82vw; */
    /* min-height: 550px; */
    max-height: 860px;
  }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 800px;
  }
}

@media (min-width: 1440px) {
  .hero {
    /* height: 800px; */
    min-height: 800px;
  }
}

@media (min-width: 1920px) {
  .hero {
    /* Cap height growth on very wide screens */
    height: clamp(775px, 36.4vw, 900px);
    max-height: 900px;
  }
}

/* Headline Band */
.hero__headline-band {
  position: relative;
  z-index: 2;
  background-color: transparent;
  color: var(--color-white);
  padding: var(--space-3) var(--space-4);
  text-align: center;
  transform: translateY(-130px);
  filter: drop-shadow(0px 0px 30px black);
}

.hero__headline {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

@media (min-width: 940px) {
  .hero__headline { font-size: var(--font-size-base); }
}

.hero__headline-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 370px;
  margin: 0 auto;
  object-fit: contain;
}

@media (min-width: 940px) {
  .hero__headline-image {
    max-width: 370px;
  }
}

@media (min-width: 1024px) {
  .hero__headline-image {
    max-width: 370px;
  }
}

/* Media */
.hero__media {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
  z-index: 0;
}

@media screen and (min-width: 940px) {
  .hero__media {
    min-width: 1440px;
  }
}

.hero__video,
.hero__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Shift video down to show man at tree base above promo cards */
  object-position: center calc(68% - 4vw);
}

@media screen and (min-width: 1920px) {
  .hero__video,
  .hero__image {
    object-position: center calc(0% - 25.7vw);
  }
}

/* Mobile background image — hidden on desktop, replaces video on mobile */
.hero__mobile-image {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero__video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-blue-light) 0%, var(--color-green-light) 50%, var(--color-pink-light) 100%);
  background-size: 200% 200%;
  animation: hero-gradient-shift 8s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes hero-gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero[data-playing="false"] .hero__video-placeholder {
  animation-play-state: paused;
}

.hero__video-placeholder-text {
  font-size: var(--font-size-lg);
  color: var(--color-gray-600);
  font-weight: var(--font-weight-medium);
}

/* Content */
.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100% - 60px);
  padding: var(--space-8) var(--space-4);
}

@media (min-width: 940px) {
  .hero__content { padding: var(--space-12) var(--space-8); }
}

.hero__title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-navy);
  margin-bottom: var(--space-4);
  max-width: 600px;
}

@media (min-width: 940px) {
  .hero__title { font-size: var(--font-size-4xl); }
}

@media (min-width: 1024px) {
  .hero__title { font-size: var(--font-size-5xl); }
}

.hero__subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
  max-width: 500px;
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* Promo Cards Section */
.hero__promo-cards {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0;
}

@media (min-width: 940px) {
  .hero__promo-cards {
    bottom: 20px;
  }
}

.hero__promo-cards-container {
  padding: 0 var(--space-4);
}

@media (min-width: 940px) {
  .hero__promo-cards-container {
    padding: 0 var(--space-8);
  }
}

.hero__promo-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 940px) {
  .hero__promo-cards-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .hero__promo-cards-grid {
    /* Left card 653px, right card 471px = 1144px total with gap */
    /* fr values derived from pixel widths: 653+471=1124px available (1144px − 20px gap) */
    grid-template-columns: 653fr 471fr;
    gap: 20px;
    max-width: 1144px;
    margin: 0 auto;
  }
}

/* Promo card styling within hero context */
.hero__promo-cards .promo-card {
  height: 100%;
}

.hero__promo-cards .promo-card__heading {
  color: var(--color-navy);
  font-weight: var(--font-weight-bold);

  @media (max-width: 939px) {
    margin-bottom: var(--space-2);
  }
}

.hero__promo-cards .promo-card__body {
  text-align: center;

  @media (max-width: 939px) {
    padding-inline: var(--space-2);
  }
}

/* DTC Mode: two-column layout — image left, stacked buttons right */
.hero--dtc .hero__content {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.hero--dtc .hero__content-container {
  width: 100%;
}

.hero__dtc-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

@media (min-width: 940px) {
  .hero__dtc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-8);
  }
}

.hero__dtc-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__dtc-image .hero__headline-image {
  max-width: 100%;
  height: auto;
}

.hero__dtc-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero__dtc-cta-heading {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-navy, #003A70);
  text-align: center;
}

.hero__cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero--dtc .hero__cta-group .lm-btn {
  width: 100%;
  justify-content: space-between;
  border-radius: 12px;
  padding: var(--space-4) var(--space-6);
  font-size: var(--font-size-base);
}

@media (min-width: 940px) {
  .hero--dtc .hero__cta-group .lm-btn {
    font-size: var(--font-size-lg);
    padding: var(--space-5) var(--space-8);
  }
}

/* Play/Pause Controls */
.hero__controls {
  position: absolute;
  bottom: 23px;
  right: 26px;
  z-index: 3;
  transition: bottom 0.3s ease;
}

.hero__play-pause {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: var(--color-white);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.hero__play-pause:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.05);
}

.hero__play-pause:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.5);
}

.hero__play-pause-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.hero__play-pause .icon-play { display: none; }
.hero__play-pause .icon-pause { display: block; }

.hero[data-playing="false"] .hero__play-pause .icon-play { display: block; }
.hero[data-playing="false"] .hero__play-pause .icon-pause { display: none; }

/* ==========================================================================
   Mobile Hero Layout
   MUST be at end of file so overrides win at same specificity.
   ========================================================================== */

@media (max-width: 939px) {
  /* Hide video, show static image, hide play/pause */
  .hero__video,
  .hero__video-placeholder {
    display: none;
  }

  .hero__mobile-image {
    display: block;
  }

  .hero__controls {
    display: none;
  }

  /* Hero flows normally — block, auto height, no clipping */
  .hero {
    display: block;
    position: relative;
    min-height: 0;
    height: auto;
    overflow: visible;
    margin-top: 0;
    z-index: auto;
  }

  /* Media area: in-flow, sized by image aspect ratio */
  .hero__media {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: var(--mobile-aspect-ratio, 16 / 9);
  }

  /* Mobile image fills the media area */
  .hero__mobile-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  /* Headline band: absolutely positioned over the media area.
     Since it's the first child and position:absolute removes it from flow,
     the media area starts at top:0 of .hero. Matching aspect-ratio ensures
     the headline band covers exactly the image area. */
  .hero__headline-band {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: var(--mobile-aspect-ratio, 16 / 9);
    transform: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: var(--space-4);
  }

  .hero__headline-image {
    max-width: 65%;
  }

  /* Hide empty content area */
  .hero__content {
    display: none;
  }

  /* Promo cards: static, flow below image */
  .hero__promo-cards {
    position: static;
    bottom: auto;
    left: auto;
    right: auto;
    z-index: auto;
    padding: 0;
  }

  .hero__promo-cards-container {
    padding: 0;
  }

  .hero__promo-cards-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Strip card chrome — full width, no separation, centered content */
  .hero__promo-cards .promo-card,
  .hero__promo-cards .promo-card--hero-overlay {
    border-radius: 0;
    box-shadow: none;
    background: var(--color-white, #fff);
    border: none;
    padding: var(--space-6) var(--space-4);
    text-align: center;
    align-items: center;
    backdrop-filter: blur(16px);
  }

  .hero__promo-cards .promo-card--blue {
    border-top: none;
  }

  .hero__promo-cards .promo-card__content {
    align-items: center;
  }

  .hero__promo-cards .promo-card__ctas {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
}
