/* ==========================================================================
   Homepage hero slider (templates/index.html)
   Same palette as the header/footer: ink, brand purple, logo gold.
   ========================================================================== */

.hero {
  --hr-ink: #171b24;
  --hr-muted: #676459;
  --hr-line: #e9e4d8;
  --hr-primary: #1f2a44;
  --hr-primary-hover: #151d31;
  --hr-gold: #d9b66a;

  position: relative;
  padding: 0 !important;
}

.hero-slider {
  position: relative;
  height: min(86vh, 48rem);
  min-height: 34rem;
  overflow: hidden;
  background: var(--hr-ink);
  isolation: isolate;
}

/* ---------- Slides ---------- */

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transition: opacity 1.1s ease, visibility 0s;
}

.hero-slide > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 8s ease-out;
}

/* slow "Ken Burns" zoom-out while a slide is showing */
.hero-slide.is-active > img {
  transform: scale(1);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 14, 23, 0.78) 0%, rgba(10, 14, 23, 0.45) 45%, rgba(10, 14, 23, 0.05) 80%),
    linear-gradient(0deg, rgba(10, 14, 23, 0.55) 0%, rgba(10, 14, 23, 0) 35%);
}

/* style.css removes the container's side padding site-wide; restore it here */
.hero .container {
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  padding-right: calc(var(--bs-gutter-x) * 0.5);
}

.hero-content {
  max-width: 40rem;
  padding-bottom: 2rem;
  color: #fff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  color: var(--hr-gold);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
}

.hero-content h1,
.hero-content h2 {
  margin-bottom: 1.1rem;
  color: #fff;
  font-size: clamp(2.3rem, 1.3rem + 3.8vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-content p {
  max-width: 34rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.7;
}

/* text rises in with the slide */
.hero-slide .hero-content > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active .hero-content > * {
  opacity: 1;
  transform: none;
}

.hero-slide.is-active .hero-content > :nth-child(2) { transition-delay: 0.12s; }
.hero-slide.is-active .hero-content > :nth-child(3) { transition-delay: 0.24s; }
.hero-slide.is-active .hero-content > :nth-child(4) { transition-delay: 0.36s; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero .hero-btn-primary {
  background: var(--hr-primary);
  color: #fff;
  box-shadow: 0 14px 32px -12px rgba(31, 42, 68, 0.9);
}

.hero .hero-btn-primary:hover {
  background: var(--hr-primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

.hero .hero-btn-glass {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
}

.hero .hero-btn-glass:hover {
  border-color: var(--hr-gold);
  color: var(--hr-gold);
}

/* ---------- Controls ---------- */

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.25rem;
  z-index: 2;
}

.hero-controls .container {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.hero-arrows {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.hero-arrows button {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-arrows button:hover {
  border-color: #fff;
  background: #fff;
  color: var(--hr-ink);
}

.hero button:focus-visible,
.hero a:focus-visible {
  outline: 2px solid var(--hr-gold);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 767.98px) {
  .hero-slider {
    height: 82svh;
    min-height: 32rem;
    max-height: 44rem;
  }

  .hero-slide {
    align-items: flex-end;
  }

  .hero-slide::before {
    background: linear-gradient(0deg, rgba(10, 14, 23, 0.88) 0%, rgba(10, 14, 23, 0.45) 55%, rgba(10, 14, 23, 0.15) 100%);
  }

  .hero-content {
    padding-bottom: 5.5rem;
  }

  .hero-content p {
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    flex-wrap: nowrap;
    gap: 0.5rem;
  }

  .hero-actions .hero-btn {
    flex: 1 1 auto;
    padding: 0.8rem 0.9rem;
    font-size: 0.92rem;
  }

  .hero-controls {
    bottom: 1.75rem;
  }

  .hero-arrows {
    display: none; /* swipe instead */
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide > img,
  .hero-slide .hero-content > * {
    transition: none !important;
    transform: none !important;
  }
}
