/* Homepage only: the existing type and palette frame an authored image sequence. */
.home-hero .hero-canvas {
  /* Limit extreme panoramas so the full framed object survives wide displays. */
  height: max(clamp(340px, 62vw, 76dvh), 33.333334vw);
  max-height: none;
}
.home-hero .hero-image {
  opacity: 0;
  object-fit: var(--hero-fit, cover);
  object-position: var(--hero-position, 50% 50%);
  transition: opacity 800ms ease;
  background: transparent;
}
.home-hero #hero-image:not([aria-hidden]),
.home-hero .hero-image.is-current { opacity: 1; }
.home-hero #hero-image-next:not([src]) { visibility: hidden; }
.home-hero .hero-caption-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px 30px;
}
.home-hero #hero-caption-context { text-align: right; }
.hero-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.hero-controls[hidden], .hero-controls button[hidden] { display: none; }
.hero-controls button {
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px;
  min-width: 40px;
  min-height: 40px;
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}
.hero-controls button:hover { background: var(--bg-surface); }
.hero-controls button:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 1px;
}
.hero-controls #hero-toggle { margin-right: 8px; color: var(--muted); }
#hero-counter {
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.hero-description-row {
  width: min(var(--max-width), calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0 34px;
  display: grid;
  grid-template-columns: minmax(0, 48rem) 1fr;
  gap: 16px 44px;
  min-height: 150px;
}
.hero-view-label {
  margin: 0 0 8px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
#hero-description {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  line-height: 1.22;
}
#hero-credit {
  margin: 0;
  align-self: end;
  text-align: right;
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.5;
}
@media (max-width: 700px) {
  .home-hero .hero-canvas {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
  }
  .home-hero .hero-image { object-fit: cover; }
  .home-hero .hero-caption-row {
    width: calc(100% - 28px);
    grid-template-columns: 1fr auto;
    gap: 0 12px;
    padding-top: 10px;
    font-size: 0.64rem;
  }
  .home-hero #hero-caption-context {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: 0.6rem;
    letter-spacing: 0.06em;
  }
  .hero-controls { grid-column: 2; grid-row: 1 / 3; gap: 0; }
  .hero-controls button { min-width: 32px; padding: 6px; }
  .hero-controls #hero-toggle { margin-right: 2px; }
  .hero-description-row {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    min-height: 174px;
    gap: 12px;
    padding: 18px 0 28px;
  }
  #hero-credit { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .home-hero .hero-image { transition: none; }
}
