/* ==========================================================================
   Hero
   Desktop/tablet: full-bleed photo, content overlaid on the left.
   Mobile: content on a sky gradient, photo stacked underneath.

   The photo framing is controlled with three custom properties so a new
   hero image only needs these values tuned:
     --hero-pos     object-position of the photo
     --hero-zoom    extra zoom on top of object-fit: cover
     --hero-origin  point the zoom scales from
   ========================================================================== */

.hero {
  --hero-pos: 50% 80%;
  --hero-zoom: 1.35;
  --hero-origin: 0% 30%;

  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(540px, 43vw, 720px);
  overflow: hidden;
  background: var(--color-sky);
}

/* Photo ------------------------------------------------------------------ */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-pos);
  transform: scale(var(--hero-zoom));
  transform-origin: var(--hero-origin);
}

/* Soft light wash on the left so navy text stays readable over the sky */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(243, 248, 252, 0.92) 0%,
      rgba(243, 248, 252, 0.78) 26%,
      rgba(243, 248, 252, 0.28) 46%,
      rgba(243, 248, 252, 0) 60%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
}

/* Content ---------------------------------------------------------------- */
.hero__inner {
  position: relative;
  padding-block: var(--space-8);
}

.hero__content {
  max-width: 34rem;
  animation: hero-rise 700ms var(--ease) both;
}

.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: clamp(0.75rem, 0.65rem + 0.3vw, 0.9375rem);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-navy);
}

.hero__title {
  margin-top: var(--space-3);
  font-size: var(--fs-display);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--color-navy);
}

.hero__title-line {
  display: block;
}

.hero__title-accent {
  color: var(--color-blue);
}

.hero__lead {
  max-width: 27rem;
  margin-top: var(--space-4);
  font-size: clamp(0.975rem, 0.9rem + 0.3vw, 1.125rem);
  font-weight: var(--fw-medium);
  line-height: 1.5;
  color: var(--color-navy);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
}

/* Handwritten tagline ---------------------------------------------------- */
.hero__tagline {
  position: absolute;
  top: clamp(1.5rem, 3.5vw, 3.25rem);
  right: max(var(--container-pad), calc((100% - var(--container-max)) / 2));
  z-index: 1;
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 0.9rem + 2.2vw, 3rem);
  line-height: 1.12;
  text-align: center;
  color: var(--color-white);
  text-shadow: 0 2px 14px rgba(7, 28, 60, 0.35);
  transform: rotate(-9deg);
  transform-origin: center;
  animation: hero-fade 900ms 250ms var(--ease) both;
}

.hero__tagline-line {
  display: block;
}

.hero__tagline-swoosh {
  position: absolute;
  left: 22%;
  right: -6%;
  bottom: -0.32em;
  width: auto;
  height: 0.34em;
  color: var(--color-yellow);
  filter: drop-shadow(0 2px 4px rgba(7, 28, 60, 0.25));
}

@keyframes hero-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Tablet ----------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  .hero {
    --hero-pos: 50% 70%;
    --hero-zoom: 1.45;
    --hero-origin: 0% 55%;
    min-height: 560px;
  }

  .hero__content {
    max-width: 26rem;
  }

  .hero__media::after {
    background: linear-gradient(
      90deg,
      rgba(243, 248, 252, 0.95) 0%,
      rgba(243, 248, 252, 0.82) 34%,
      rgba(243, 248, 252, 0.2) 58%,
      rgba(243, 248, 252, 0) 70%
    );
  }
}

/* Mobile: stack content above the photo ---------------------------------- */
@media (max-width: 767.98px) {
  .hero {
    --hero-media-h: clamp(300px, 88vw, 460px);
    --hero-pos: 58% 70%;
    --hero-zoom: 1.7;
    --hero-origin: 62% 72%;

    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    background: linear-gradient(180deg, var(--color-bg) 0%, #cfe4f2 100%);
  }

  .hero__inner {
    padding-block: var(--space-6) var(--space-4);
  }

  .hero__content {
    max-width: none;
  }

  .hero__lead {
    max-width: 30rem;
  }

  .hero__media {
    position: relative;
    inset: auto;
    z-index: 0;
    order: 2;
    height: var(--hero-media-h);
    /* blend the top of the photo into the sky gradient above */
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%);
  }

  .hero__media::after {
    display: none;
  }

  .hero__tagline {
    top: auto;
    bottom: calc(var(--hero-media-h) - 8.5rem);
    right: var(--container-pad);
    font-size: clamp(1.4rem, 1rem + 2.4vw, 2rem);
  }
}

@media (max-width: 479.98px) {
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }
}
