/* Keep the same photograph, floral monogram and copy hierarchy across device sizes.
   Only the photo's composition changes to avoid cropping faces on narrow screens. */
.hero .hero-photo-stage {
  display: contents;
}

@media (max-width: 960px) {
  .hero {
    display: block;
    min-height: 0;
    padding: clamp(125px, 16vw, 158px) 0 clamp(74px, 9vw, 98px);
    background: linear-gradient(180deg, #210711, #350c1b 53%, #260912);
  }

  /* Full-bleed cover at these aspect ratios crops people outside the viewport. */
  .hero::before {
    opacity: 0;
    background: none;
    animation: none !important;
    transform: none !important;
  }
  .hero::after {
    background: linear-gradient(180deg, rgba(37, 8, 18, .12), rgba(37, 8, 18, .04));
  }
  .hero .hero-copy {
    width: min(930px, 100%);
    padding: 0 18px;
    gap: 0;
  }

  /* The monogram sits over the photo, as it does on the desktop composition. */
  .hero .hero-photo-stage {
    display: block;
    position: relative;
    width: 100%;
    margin: 10px auto -35px;
    isolation: isolate;
  }
  .hero .hero-photo-band {
    display: block;
    flex: none;
    width: 100vw;
    height: clamp(285px, 87vw, 430px);
    margin: 0 calc(50% - 50vw);
    background-image:
      linear-gradient(180deg,
        rgba(41, 9, 22, .22),
        rgba(41, 9, 22, 0) 35%,
        rgba(43, 9, 22, .05) 64%,
        #350c1b 100%),
      url('assets/ks-how-we-began-new.webp');
    background-position: center, center 44%;
    background-size: cover, cover;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(180deg,
      transparent 0%, #000 9%, #000 72%, transparent 99%);
    mask-image: linear-gradient(180deg,
      transparent 0%, #000 9%, #000 72%, transparent 99%);
  }
  .hero .hero-monogram {
    position: absolute;
    z-index: 2;
    top: 11%;
    left: 50%;
    width: clamp(120px, 31vw, 174px);
    margin: 0;
    transform: translateX(-50%);
    opacity: .95;
  }
  .hero .couple-names {
    position: relative;
    z-index: 4;
    margin: 0 auto;
    font-size: clamp(28px, 4.5vw, 42px);
    line-height: 1.15;
  }
  .hero .couple-names .couple-joiner {
    margin: 3px auto;
  }
  .hero .hero-message {
    margin-top: 22px;
  }
  html[lang="ta"] .hero .couple-names {
    font-size: clamp(19px, 3.5vw, 29px);
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 125px;
    padding-bottom: 74px;
  }
  .hero .hero-copy {
    padding-inline: 18px;
  }
  .hero .couple-names {
    font-size: clamp(28px, 8.5vw, 39px);
    line-height: 1.2;
  }
  html[lang="ta"] .hero .couple-names {
    font-size: clamp(19px, 5.6vw, 27px);
  }
}
@media (max-width: 360px) {
  .hero .hero-monogram {
    width: 120px;
  }
  .hero .hero-copy {
    padding-inline: 14px;
  }
}

/* Native images load predictably, expose high priority, and can retry. */
.hero::before {
  background-image: none !important;
  opacity: 0 !important;
  animation: none !important;
}
.hero .hero-desktop-image {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  pointer-events: none;
}
.hero .hero-mobile-image { display: none; }
@media (max-width: 960px) {
  .hero .hero-desktop-image { display: none; }
  .hero .hero-photo-band {
    position: relative;
    overflow: hidden;
    background-image: none !important;
  }
  .hero .hero-mobile-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 44%;
  }
  .hero .hero-photo-band::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
      rgba(41, 9, 22, .22) 0%,
      rgba(41, 9, 22, 0) 35%,
      rgba(43, 9, 22, .05) 64%,
      #350c1b 100%);
  }
}
