/* ============================================================
   BabyCo — Hero SLIDER (homepage), CENTERED layout
   Two crossfading slides: Product + Parent Guides.
   Layered on top of style.css (loaded after it, so it overrides).
   ============================================================ */

/* The slider is the positioning context; each slide carries its own bg. */
.hero-slider {
  align-items: stretch;
  justify-content: stretch;
  text-align: center;
  background: #0a101c; /* fallback while images load; overrides style.css bg */
}

/* Kill the base single-image scrim; each slide carries its own. */
.hero-slider::before {
  display: none;
}

/* Slides stack on top of each other and crossfade. */
.hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 6s ease-out, visibility 0s linear 0.9s;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity 0.9s ease, transform 7s ease-out;
  z-index: 1;
}

/* Balanced scrim per slide so centered text always reads. */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 16, 28, 0.62) 0%,
    rgba(10, 16, 28, 0.42) 45%,
    rgba(10, 16, 28, 0.68) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 96px 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-headline {
  font-size: clamp(46px, 8.4vw, 98px);
  line-height: 1.06;
  letter-spacing: -2px;
  margin-bottom: 36px;
}

.hero-eyebrow {
  font-size: 14px;
  padding: 9px 22px;
  margin-bottom: 26px;
}

.hero-actions {
  justify-content: center;
}

.hero-actions .btn {
  font-size: 16.5px;
  padding: 17px 38px;
}

/* Entrance animation — only plays for the currently active slide. */
@keyframes heroUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

.hero-slide.is-active .hero-content > * {
  opacity: 0;
  animation: heroUp 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero-slide.is-active .hero-content > .hero-eyebrow  { animation-delay: 0.12s; }
.hero-slide.is-active .hero-content > .hero-headline { animation-delay: 0.28s; }
.hero-slide.is-active .hero-content > .hero-actions  { animation-delay: 0.46s; }

/* ── Prev / Next arrows (same look as the product-range .pc-arrow) ── */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--white);
  color: var(--text-primary);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(10, 16, 28, 0.28);
  transition: background 0.25s ease, transform 0.25s ease,
    border-color 0.25s ease, color 0.25s ease;
}

.hero-arrow:hover {
  background: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
  transform: translateY(-50%) scale(1.08);
}

.hero-arrow--prev { left: 30px; right: auto; }
.hero-arrow--next { right: 30px; left: auto; }

/* Scroll-down cue — centered at the bottom */
.hero-scrollcue {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 26px;
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}

.hero-scrollcue .hero-scrollcue-line {
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
  order: 2;
}

.hero-scrollcue .hero-scrollcue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-secondary);
  transform: translateY(-100%);
  animation: heroCueSlide 2.2s ease-in-out infinite;
}

@keyframes heroCueSlide {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* Tablet & down: side arrows would crowd the centered headline, so drop them
   to a centered pair near the bottom (where the dots used to sit). */
@media (max-width: 1024px) {
  .hero-arrow {
    top: auto;
    bottom: 92px;
    transform: none;
    width: 44px;
    height: 44px;
    font-size: 14px;
  }
  .hero-arrow:hover { transform: scale(1.06); }
  .hero-arrow--prev { left: calc(50% - 52px); right: auto; }
  .hero-arrow--next { right: calc(50% - 52px); left: auto; }
}

@media (max-width: 768px) {
  .hero-content { padding-top: 84px; }
  .hero-headline { font-size: clamp(38px, 11vw, 60px); letter-spacing: -1px; }
  /* full-width, thumb-friendly CTAs */
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: none;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: opacity 0.4s ease; transform: none; }
  .hero-slide.is-active { transform: none; transition: opacity 0.4s ease; }
  .hero-slide.is-active .hero-content > * { opacity: 1; animation: none; }
  .hero-scrollcue .hero-scrollcue-line::after { animation: none; display: none; }
}
