.hero-collage-stage {
  position: absolute;
  inset: 0;
  /* This frame shares the collage sky; its insert ends left of the crop. */
  background: url('assets/hero-collage/03.webp') 32% center / cover no-repeat;
  transform: scale(1.08);
  transform-origin: 32% center;
  will-change: transform;
}
.hero-picture .hero-collage-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 32% center;
  transform: none;
  will-change: auto;
}
.hero-picture .hero-collage-frame[hidden], .hero-collage-pause[hidden] { display: none; }
.hero-picture .hero-collage-frame[data-right-crop] {
  clip-path: inset(0 var(--hero-crop-right, 0px) 0 0);
}
.hero-collage-pause {
  position: absolute;
  z-index: 6;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 0;
  appearance: none;
  background: transparent;
  color: #fff;
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  translate: 96px 0;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}
.hero-collage-pause:disabled { pointer-events: none; }
.hero-collage-pause svg {
  width: 36px;
  height: 36px;
  overflow: visible;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* useAnimations Play/Pause, adapted from its 8-frame / 30 fps outline animation.
   https://useanimations.com/icons/play-pause — MIT, see USEANIMATIONS-LICENSE.txt. */
.hero-playback-morph {
  d: path('M10 8 L14 8 L14 16 L14 24 L10 24 Z');
  transition: d 267ms linear;
}
.hero-playback-bar {
  transform-origin: 20px 16px;
  transition: transform 267ms cubic-bezier(.333,0,.667,1), opacity 133ms ease-in-out;
}
.hero-collage-pause[aria-pressed="true"] .hero-playback-morph {
  d: path('M8.938 7 L9 7 L23.062 16 L8.938 25 L8.938 25.062 Z');
}
.hero-collage-pause[aria-pressed="true"] .hero-playback-bar {
  transform: scale(0);
  opacity: 0;
}
@media (hover: hover) {
  .hero-collage-pause:hover { transform: scale(1.06); opacity: .72; }
}
.hero-collage-pause:active { transform: scale(.92); }
.hero-collage-pause:focus-visible { outline: 3px solid #ff6400; outline-offset: 4px; }
.hero-stage .hero-end-copy {
  left: auto;
  right: max(20px, 4vw);
  top: calc(var(--site-header-height, 88px) + 8svh);
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
  font-size: clamp(32px, min(7vw, 8svh), 96px);
  line-height: 1.45;
  letter-spacing: .015em;
}
.hero-stage .hero-brand-name { color: #ba3513; }
@media (max-height: 560px) {
  .hero-stage .hero-end-copy {
    top: calc(var(--site-header-height, 72px) + 20px);
    font-size: clamp(20px, 5svh, 28px);
  }
}
/* On phones the collage occupies the upper frame. Keep the closing message
   below it, with its own reading space and clearance for the playback control. */
@media (max-width: 700px) {
  .hero-stage .hero-end-copy {
    left: max(24px, env(safe-area-inset-left, 0px));
    right: 88px;
    top: auto;
    bottom: max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px));
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: normal;
    font-size: clamp(28px, 6vw, 40px);
    line-height: 1.4;
    letter-spacing: -.02em;
    color: #fff;
  }
  .hero-stage .hero-brand-name { color: #ffae82; }
  .hero-picture::after {
    content: '';
    position: absolute;
    z-index: 2;
    inset: auto 0 0;
    height: clamp(180px, 30svh, 250px);
    background: linear-gradient(180deg, transparent, rgb(29 29 31 / .38) 64%, rgb(29 29 31 / .48));
    opacity: var(--hero-end-opacity, 0);
    pointer-events: none;
  }
}
@media (max-width: 700px) and (max-height: 560px) {
  .hero-stage .hero-end-copy {
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    font-size: clamp(22px, 5svh, 28px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-collage-stage { will-change: auto; }
  .hero-collage-pause, .hero-playback-morph, .hero-playback-bar { transition: none; }
}
