/* A brief photographic opening, followed by a flowing editorial reveal. */
.hero-cinematic-pending .hero-photo,
.hero-cinematic-pending .hero-wash,
.hero-cinematic-pending .hero-note,
.hero-cinematic-pending [data-hero-intro] {
  visibility: hidden;
}
.hero-cinematic-playing > .hero-photo { visibility: hidden; }

.hero-photo-portal {
  position: absolute;
  z-index: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  contain: layout paint;
  background: var(--ivory);
}
.hero-photo-portal .hero-portal-image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transform-origin: 70% 45%;
}
.hero-portal-outline {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
  pointer-events: none;
}
.hero-portal-outline path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.hero-opening-caption {
  position: absolute;
  left: 50%;
  z-index: 1;
  width: 290px;
  margin-left: -145px;
  text-align: center;
  color: var(--green);
  font: 27px/1.12 var(--serif);
  pointer-events: none;
}
.hero-title-mask {
  display: block;
  /* Extra ink room protects italic flourishes and descenders. */
  clip-path: inset(-.04em -.25em -.18em);
}
.hero-title-ink { display: block; }
.hero-cinematic-playing > .hero-wash { z-index: 1; }
.hero-cinematic-playing > .wrap { z-index: 2; }

@media (max-width: 540px) {
  .hero-opening-caption { font-size: 24px; }
  .hero { margin-bottom: -8px; }
  .hero > :is(.hero-photo, .hero-wash, .wrap) { translate: 0 -8px; }
  /* Translation creates a layer; keep the copy above the wash after the intro. */
  .hero > .wrap { z-index: 2; }

  /* The mobile opening settles into a centred, full-width photo composition. */
  .hero > .hero-photo {
    position: absolute;
    inset: 24% 0 0;
    width: 100%;
    height: 64%;
    object-position: 78% center;
  }
  .hero > .hero-wash {
    display: block;
    z-index: 1;
    background: linear-gradient(180deg,
      var(--ivory) 0%,
      var(--ivory) 26%,
      rgba(247, 244, 238, .75) 32%,
      rgba(247, 244, 238, 0) 45%,
      rgba(247, 244, 238, 0) 59%,
      rgba(247, 244, 238, .78) 74%,
      var(--ivory) 87%,
      var(--ivory) 100%);
  }
  .hero .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: none;
    min-height: calc(100svh - 84px);
    padding: 44px 0 32px;
    text-align: center;
  }
  .hero h1 { margin-bottom: 18px; }
  .hero .hero-subtitle {
    max-width: 330px;
    margin-bottom: 0;
  }
  .hero .hero-content > p:not(.hero-subtitle) {
    max-width: 360px;
    margin-top: clamp(230px, 61vw, 310px);
    margin-bottom: 0;
  }
  .hero .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin-top: 24px;
  }
  .hero .actions .button {
    min-width: 0;
    padding-inline: 8px;
    gap: 6px;
    font-size: clamp(12px, 3.14vw, 13px);
  }
  .hero .hero-foot { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-cinematic-pending :is(.hero-photo, .hero-wash, .hero-note, [data-hero-intro]),
  .hero-cinematic-playing > .hero-photo { visibility: visible !important; }
  .hero-photo-portal, .hero-opening-caption { display: none !important; }
  .hero-cinematic-playing :is(.hero-title-ink, .eyebrow, p, .actions, .hero-foot, .hero-note, .hero-wash) {
    opacity: 1 !important;
    transform: none !important;
  }
}
