/*
  Sparkns Racks — Homepage hero: full-screen industry background slider.
  7 slides · crossfade · Ken Burns · arrows · dots · auto-advance 5.5s
*/

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&display=swap');

/* ================================================== */
/* Shell                                                */
/* ================================================== */

.sr-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0a0a0a;
}

/* ================================================== */
/* Slides                                               */
/* ================================================== */

.sr-hero__slides {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.sr-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
  will-change: opacity;
}

.sr-hero__slide.is-active {
  opacity: 1;
}

/* ---- Ken Burns wrapper ---- */
.sr-hero__kenburns {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sr-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  will-change: transform;
}

@keyframes sr-kenburns {
  from { transform: scale(1.0); }
  to   { transform: scale(1.08); }
}

.sr-hero__slide.is-active .sr-hero__img {
  animation: sr-kenburns 6s linear forwards;
}


/* ================================================== */
/* Scrim — dark gradient + green radial glow           */
/* ================================================== */

.sr-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 50% 110%,
      rgba(140, 198, 63, 0.08) 0%,
      transparent 70%
    ),
    linear-gradient(180deg,
      rgba(0, 0, 0, 0.48) 0%,
      rgba(0, 0, 0, 0.42) 40%,
      rgba(0, 0, 0, 0.52) 70%,
      rgba(0, 0, 0, 0.62) 100%
    );
}

/* ================================================== */
/* Content                                              */
/* ================================================== */

.sr-hero__content {
  position: relative;
  z-index: 3;
  max-width: 660px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
  color: #fff;
}

/* Content entrance: each child element gets is-visible toggled directly (same pattern as slides) */
.sr-hero__title,
.sr-hero__subhead,
.sr-hero__actions {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.72s ease, transform 0.72s ease;
}

.sr-hero__title.is-visible    { opacity: 1; transform: none; transition-delay: 0ms; }
.sr-hero__subhead.is-visible  { opacity: 1; transform: none; transition-delay: 140ms; }
.sr-hero__actions.is-visible  { opacity: 1; transform: none; transition-delay: 280ms; }

.sr-hero__title {
  font-family: 'Archivo Black', 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: clamp(28px, 4.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.5px;
  text-transform: none;
  margin: 0 0 28px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

.sr-hero__subhead {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  margin: 0 auto 44px;
  max-width: 480px;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
  font-weight: 400;
  letter-spacing: 0.1px;
}

.sr-hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Secondary "Explore Products" button */
.sr-hero__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #fff;
  text-decoration: none;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.sr-hero__btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

/* ================================================== */
/* Arrow buttons                                        */
/* ================================================== */

.sr-hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, background 0.25s ease,
              border-color 0.25s ease, transform 0.25s ease;
}

.sr-hero__arrow--prev { left: 28px; }
.sr-hero__arrow--next { right: 28px; }

.sr-hero:hover .sr-hero__arrow,
.sr-hero__arrow:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.sr-hero__arrow:hover {
  background: rgba(143, 191, 92, 0.22);
  border-color: rgba(143, 191, 92, 0.65);
  transform: translateY(-50%) scale(1.1);
}

.sr-hero__arrow:focus-visible {
  outline: 2px solid #8FBF5C;
  outline-offset: 3px;
}

/* ================================================== */
/* Dot navigation                                       */
/* ================================================== */

.sr-hero__dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sr-hero__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease, border-radius 0.3s ease;
}

.sr-hero__dot:hover {
  background: rgba(255, 255, 255, 0.72);
}

.sr-hero__dot.is-active {
  background: #8FBF5C;
  width: 24px;
  border-radius: 6px;
}

.sr-hero__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ================================================== */
/* Screen-reader live region                            */
/* ================================================== */

.sr-hero__live {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================== */
/* Responsive                                           */
/* ================================================== */

@media (max-width: 1024px) {
  .sr-hero {
    height: 75vh;
    height: 75svh;
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .sr-hero {
    height: 75vh;
    height: 75svh;
    min-height: 520px;
  }

  .sr-hero__content {
    padding: 0 22px;
  }

  .sr-hero__subhead {
    font-size: 15px;
  }

  .sr-hero__actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .sr-hero__btn-secondary {
    width: 100%;
    max-width: 264px;
  }

  .sr-hero__arrow {
    display: none;
  }

  .sr-hero__dots {
    bottom: 24px;
    gap: 8px;
  }
}

/* ================================================== */
/* Reduced motion                                       */
/* ================================================== */

@media (prefers-reduced-motion: reduce) {
  .sr-hero__slide {
    transition-duration: 0.01ms !important;
  }

  .sr-hero__img {
    animation: none !important;
  }

  .sr-hero__title,
  .sr-hero__subhead,
  .sr-hero__actions {
    transition-duration: 0.01ms !important;
  }

  .sr-hero__dot,
  .sr-hero__arrow {
    transition-duration: 0.01ms !important;
  }
}
