/* Home hero photo reel (features.heroReel; docs/hero-reel.md). Ships and loads on / only while the flag is on.
   The frame is the hero's own 4:5 box (css .hero-photo), so the reel never shifts the layout: slides stack inside it and
   cross-fade on opacity. Without JS only the first slide is in the page flow (the others carry [hidden]). */
.hero-reel {
  position: relative;
}

.hero-reel .reel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-reel .reel-slide:first-child,
.hero-reel .reel-slide.is-active {
  opacity: 1;
}

/* JS has taken over: the first slide fades like the rest. */
.hero-reel.is-live .reel-slide:first-child:not(.is-active) {
  opacity: 0;
}

.hero-reel .reel-slide[hidden] {
  display: none;
}

.reel-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 2px 10px 2px 2px;
  background: rgba(8, 60, 34, 0.86);
  border-radius: 999px;
  z-index: 2;
}

.reel-controls button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
}

.reel-controls .reel-toggle {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  color: var(--green-deep);
}

/* the 44px hit area is the button; the white disc is drawn at 36px inside it */
.reel-controls .reel-toggle::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
}

.reel-controls .reel-toggle svg {
  position: relative;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.reel-controls .reel-toggle .icon-play {
  display: none;
}

.reel-controls .reel-toggle[aria-pressed="true"] .icon-play {
  display: block;
}

.reel-controls .reel-toggle[aria-pressed="true"] .icon-pause {
  display: none;
}

.reel-dots {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: 4px;
}

.reel-dots button {
  width: 44px;
  height: 44px;
}

.reel-dots button::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-sizing: border-box;
}

.reel-dots button[aria-current="true"]::before {
  background: #ffffff;
}

.reel-count {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.reel-controls button:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .reel-count {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-reel .reel-slide {
    transition: none !important;
  }
}
