/* css/hero-carousel.css — Hero factory image carousel (B-2)
   Auto-rotating 5-slide strip right below the hero. CSS owns the
   crossfade (opacity) and a subtle Ken-Burns zoom (transform, GPU);
   hero-carousel.js owns the timer, dot clicks, hover/focus/off-screen
   pause, and prefers-reduced-motion short-circuit.

   Layout: aspect-ratio reserves space → zero CLS. Slides are
   position:absolute stacked; .is-active fades in. All images are
   loading="lazy" (below the fold). The frame is full container width
   on desktop and bleeds to screen edge on mobile. */

.l-hero-gallery {
  padding: 0 0 56px;
  background: var(--c-bg-2, #f7f7f7);
}

.l-hero-gallery-frame {
  position: relative;
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

.l-hero-gallery-track {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.l-hero-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.8s ease, transform 7s ease;
  pointer-events: none;
  will-change: opacity, transform;
}

.l-hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.l-hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.l-hero-slide-cap {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.l-hero-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.l-hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.l-hero-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: var(--c-accent, #eab308);
}

.l-hero-dot:focus-visible {
  outline: 2px solid var(--c-accent, #eab308);
  outline-offset: 3px;
}

/* Mobile: edge-to-edge frame, smaller caption */
@media (max-width: 768px) {
  .l-hero-gallery { padding: 0 0 40px; }
  .l-hero-gallery-frame { padding: 0 16px; }
  .l-hero-slide-cap {
    font-size: 12px;
    left: 12px;
    bottom: 12px;
    padding: 5px 11px;
  }
}

/* Reduced-motion: drop the Ken-Burns zoom and crossfade duration.
   hero-carousel.js additionally skips the auto-advance timer, so the
   first slide stays put and users navigate via dots only. */
@media (prefers-reduced-motion: reduce) {
  .l-hero-slide {
    transition: opacity 0.2s ease;
    transform: none;
  }
  .l-hero-slide.is-active { transform: none; }
}

/* Dark theme */
[data-theme="dark"] .l-hero-gallery { background: var(--c-bg-2, #0a0a0a); }
[data-theme="dark"] .l-hero-dot { background: rgba(255, 255, 255, 0.22); }
[data-theme="dark"] .l-hero-dot.is-active { background: var(--c-accent, #f59e0b); }
[data-theme="dark"] .l-hero-gallery-track {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}
