/* ==========================================================================
   Star Musical Entertainer — hero slider & carousels
   Loaded after style.css so it can build on the existing design tokens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Hero slider
   Each slide keeps the established look: artist cut-out on a branded
   gradient. Only the copy, accent colour and artwork change between slides.
   -------------------------------------------------------------------------- */

.hero-slider {
  position: relative;
  min-height: min(94vh, 900px);
  overflow: hidden;
  background: var(--ink);
}

.hero-slides {
  position: relative;
  height: 100%;
  min-height: inherit;
}

/* Slides stack; only the active one is visible. */
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s var(--ease), visibility .9s var(--ease);
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

/* Per-slide gradient themes, all derived from the logo palette. */
.hero-slide[data-theme="brand"] {
  background: linear-gradient(120deg, #3D0D08 0%, #6B1A10 42%, #2A0F0A 100%);
}
.hero-slide[data-theme="wedding"] {
  background: linear-gradient(125deg, #4A120C 0%, #8A2412 45%, #2A0F0A 100%);
}
.hero-slide[data-theme="devotional"] {
  background: linear-gradient(120deg, #2A0F0A 0%, #5C1410 40%, #123A30 100%);
}
.hero-slide[data-theme="production"] {
  background: linear-gradient(125deg, #1A0B08 0%, #4A120C 50%, #0E2F28 100%);
}

/* Ambient glows and the fine engraved texture, matching the original hero. */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 22% 32%, rgba(240,52,9,.40), transparent 62%),
    radial-gradient(ellipse 60% 50% at 82% 68%, rgba(212,165,66,.20), transparent 60%);
}
.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg, transparent 0 3px, rgba(255,255,255,.022) 3px 4px
  );
  pointer-events: none;
}

.hero-slide-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  width: 100%;
}

/* ---- Slide content, animated in on activation ---- */
.hero-slide-content { max-width: 660px; }

.hero-slide-content > * {
  opacity: 0;
  transform: translateY(24px);
}
.hero-slide.is-active .hero-slide-content > * {
  animation: heroIn .8s var(--ease) forwards;
}
/* Stagger so the eye is led down the slide. */
.hero-slide.is-active .hero-slide-content > *:nth-child(1) { animation-delay: .10s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(2) { animation-delay: .20s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(3) { animation-delay: .30s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(4) { animation-delay: .40s; }
.hero-slide.is-active .hero-slide-content > *:nth-child(5) { animation-delay: .50s; }

@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-slide h1,
.hero-slide .hero-title { margin-bottom: var(--sp-4); }

.hero-slide-text {
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  color: rgba(253,247,239,.88);
  max-width: 560px;
  margin-bottom: var(--sp-5);
}

/* ---- Artist visual ---- */
.hero-slide-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
}
.hero-slide-visual img {
  max-height: min(70vh, 580px);
  width: auto;
  filter: drop-shadow(0 24px 50px rgba(0,0,0,.62));
  opacity: 0;
  transform: translateY(30px) scale(.96);
}
.hero-slide.is-active .hero-slide-visual img {
  animation: heroArtIn 1s var(--ease) .15s forwards,
             floatY 7s ease-in-out 1.15s infinite;
}
@keyframes heroArtIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Decorative rotating ring behind the artist. */
.hero-slide-ring {
  position: absolute;
  width: min(430px, 76%);
  aspect-ratio: 1;
  border: 1px dashed rgba(212,165,66,.28);
  border-radius: 50%;
  top: 46%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 44s linear infinite;
}
.hero-slide-ring::after {
  content: '';
  position: absolute;
  inset: 26px;
  border: 1px solid rgba(240,52,9,.18);
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   2. Hero controls
   -------------------------------------------------------------------------- */

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.25rem, 3vw, 2.25rem);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  pointer-events: none;
}
.hero-controls > * { pointer-events: auto; }

.hero-arrows { display: flex; gap: var(--sp-2); }

.hero-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(212,165,66,.34);
  color: var(--cream);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease), color var(--dur) var(--ease);
}
.hero-arrow:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: scale(1.08);
}
.hero-arrow:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* ---- Dots ---- */
.carousel-dots {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.carousel-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 100px;
  background: rgba(253,247,239,.32);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.carousel-dot:hover { background: rgba(253,247,239,.6); }
.carousel-dot.is-active {
  width: 30px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

/* ---- Slide counter & progress bar ---- */
.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.hero-counter {
  font-family: var(--font-display);
  font-size: .9rem;
  color: rgba(253,247,239,.72);
  letter-spacing: .06em;
}
.hero-counter strong { color: var(--gold); font-size: 1.15rem; }

.hero-progress-track {
  width: clamp(80px, 14vw, 160px);
  height: 3px;
  border-radius: 3px;
  background: rgba(253,247,239,.18);
  overflow: hidden;
}
.hero-progress-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  transform: scaleX(0);
  transform-origin: left center;
}

/* --------------------------------------------------------------------------
   3. Generic carousel (testimonials, gallery)
   -------------------------------------------------------------------------- */

.carousel { position: relative; }

.carousel-viewport {
  overflow: hidden;
  /* Breathing room so hover lift and focus rings are not clipped. */
  padding: 6px 4px 12px;
  margin: -6px -4px -12px;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 100%;
  max-width: 100%;
  padding-inline: calc(var(--sp-3) / 2);
  box-sizing: border-box;
}

/* Controls sit under the track, centred. */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.carousel-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(212,165,66,.3);
  color: var(--sand);
  transition: all var(--dur) var(--ease);
}
.carousel-arrow:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: scale(1.08);
}
.carousel-arrow:disabled { opacity: .3; cursor: not-allowed; transform: none; }

/* Dots in the light-on-dark section context. */
.carousel-controls .carousel-dot { background: rgba(212,165,66,.3); }
.carousel-controls .carousel-dot:hover { background: rgba(212,165,66,.6); }
.carousel-controls .carousel-dot.is-active {
  background: linear-gradient(90deg, var(--red), var(--gold));
}

/* --------------------------------------------------------------------------
   4. Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  /* Firefox does not accept `min-height: auto`; 0 has the same effect here. */
  .hero-slider { min-height: 0; }

  .hero-slide {
    position: relative;
    inset: auto;
    opacity: 1;
    visibility: visible;
    display: none;
    padding-block: calc(var(--header-h) + 1.5rem) 5.5rem;
  }
  /* On small screens slides are shown/hidden rather than cross-faded, which
     keeps the section height correct without absolute positioning. */
  .hero-slide.is-active { display: flex; }

  .hero-slide-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-slide-content { max-width: 100%; margin-inline: auto; }
  .hero-slide-text { margin-inline: auto; }
  .hero-slide .hero-actions,
  .hero-slide .hero-trust { justify-content: center; }

  .hero-slide-visual { order: -1; margin-bottom: var(--sp-4); }
  .hero-slide-visual img { max-height: 290px; }
  .hero-slide-ring { width: 250px; }

  .hero-controls {
    flex-direction: column;
    gap: var(--sp-3);
    bottom: 1.1rem;
  }
  .hero-meta { order: -1; }
}

@media (max-width: 640px) {
  .hero-arrow { width: 42px; height: 42px; }
  .hero-slide-visual img { max-height: 230px; }
  .hero-slide-ring { width: 200px; }
  .hero-counter { font-size: .8rem; }
  .carousel-slide { padding-inline: 0; }
}

/* --------------------------------------------------------------------------
   5. Reduced motion
   Slides still change, but nothing animates or auto-advances.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide-content > *,
  .hero-slide-visual img {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-slide-ring { animation: none !important; }
  .hero-progress-track { display: none; }
  .carousel-track { transition: none !important; }
}
