/* ============================================================
   mustang-section.css
   Full-width image section, crossfade overlay, caption and
   AgencyB font-face for the mustang page animation section.
  Source: migrated from legacy prototype styling
   ============================================================ */

/* Load local Agency B font for the caption heading.
   AGENCYB.TTF must be present at assets/font/AGENCYB.TTF */
@font-face {
  font-family: 'AgencyB';
  src: url('../font/AGENCYB.TTF') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

.full-width-image-section {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  position: relative;
  z-index: 1;
  background-color: #000;
  overflow: hidden;
  min-height: auto;
}

.full-width-image {
  display: block;
  width: 100%;
  height: auto;
}

/* Crossfade overlay images: absolutely positioned, fade in/out */
.full-width-image-section .fw-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  will-change: opacity;
  pointer-events: none;
}
.full-width-image-section .fw-img.show {
  opacity: 1;
}

/* Base image shown statically */
.full-width-image-section img.full-width-image {
  opacity: 1;
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.full-width-image-section.perf-fw-fallback img.full-width-image {
  opacity: 1;
}

/* <picture> wrapper must be transparent so block layout of the img is preserved */
.full-width-image-section > picture {
  display: contents;
}

/* Caption anchored in the lower third of the image */
.full-width-image-section .fw-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 5;
  pointer-events: none;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,0.6);
  padding: 1.25rem 2rem;
}
.full-width-image-section .fw-caption h1 {
  margin: 0 0 0.25rem 0;
  line-height: 1;
  font-family: 'AgencyB', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
    font-size: clamp(1rem, 9vw, 12rem);
}

.full-width-image-section .fw-caption p {
  margin: 0;
  font-weight: 300;
      font-size: clamp(0.5rem, 2.8vw, 9rem);
  opacity: 0.95;
  letter-spacing: 0.6px;
}

@media (max-width: 767px) {
  .full-width-image-section .fw-caption {
    bottom: 5%;
    padding: 1rem 1.25rem;
  }

  .full-width-image-section .fw-caption h1 {
    font-size: clamp(1rem, 6vw, 12rem);
    line-height: 1.05;
  }

  .full-width-image-section .fw-caption p {
    width: 92%;
    margin: 0;
    font-size: clamp(0.5rem, 2.8vw, 1.2rem);
    line-height: 1.2;
  }
}

/* Scroll in/out reveal for Mustang caption lines. */
.full-width-image-section .fw-caption h1,
.full-width-image-section .fw-caption p {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1.6s ease, transform 1.6s ease;
  will-change: opacity, transform;
}

.full-width-image-section .fw-caption p {
  transition-delay: 0.18s;
}

.full-width-image-section .fw-caption.is-visible h1,
.full-width-image-section .fw-caption.is-visible p {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .full-width-image-section .fw-caption h1,
  .full-width-image-section .fw-caption p {
    transition: none;
    transform: none;
  }
}

@media (min-width: 768px) {
  /* Full-section dark overlay for consistent contrast */
  .full-width-image-section::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Dim only the lower half: 0.5 at the bottom -> 0 at the middle */
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 50%);
    z-index: 4;
    pointer-events: none;
  }
  .full-width-image-section .fw-caption {
    bottom: 5%;
    padding: 3rem 2rem;
  }
  .full-width-image-section .fw-caption h1 {
    text-shadow: 0 10px 30px rgba(0,0,0,0.85);
  }
  .full-width-image-section .fw-caption p {
    width: 80%;
    margin: 0.5rem auto 0 auto;
    line-height: 1.1;
    opacity: 0.98;
  
  }
}
