/* Home page — rotating hero below site-header */

:root {
  /* 1536x1024 target ratio (3:2) */
  --hero-carousel-ratio: 3 / 2;
}

.hero-carousel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin-top: var(--header-h, 3.25rem);
  aspect-ratio: var(--hero-carousel-ratio);
  height: auto;
  max-height: calc(100vh - var(--header-h, 3.25rem));
  overflow: hidden;
  box-sizing: border-box;
  background: var(--deep-forest, #1a3a2a);
  isolation: isolate;
}

body.portal-layout .portal-content.home-portal-content .main-wrap.home-with-hero {
  padding-top: 0;
}

.hero-carousel__viewport {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: hidden;
}

.hero-carousel__track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-carousel__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease, visibility 0.85s ease;
  z-index: 0;
  overflow: hidden;
}

.hero-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.hero-carousel__link {
  position: absolute;
  inset: 0;
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.hero-carousel__link:focus-visible {
  outline: 3px solid var(--gold, #c9a84e);
  outline-offset: -3px;
}

.hero-carousel__media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep-forest, #1a3a2a);
}

.hero-carousel__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-carousel__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  padding-bottom: clamp(2rem, 5vw, 2.75rem);
  background: linear-gradient(
    180deg,
    rgba(26, 58, 42, 0.05) 0%,
    rgba(26, 58, 42, 0.2) 35%,
    rgba(26, 58, 42, 0.72) 75%,
    rgba(26, 58, 42, 0.88) 100%
  );
  color: var(--warm-cream, #faf8f2);
  pointer-events: none;
}

.hero-carousel__tagline {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-light, #e8d88a);
  margin-bottom: 0.35rem;
}

.hero-carousel__title {
  display: block;
  font-family: var(--font-display, "Lora", Georgia, serif);
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  max-width: 24ch;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.hero-carousel__lead {
  display: block;
  margin-top: 0.45rem;
  font-size: clamp(0.85rem, 2vw, 1rem);
  line-height: 1.45;
  max-width: 42ch;
  opacity: 0.92;
}

.hero-carousel__controls {
  position: absolute;
  bottom: 0.75rem;
  right: clamp(0.75rem, 3vw, 1.5rem);
  z-index: 3;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.hero-carousel__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(250, 248, 242, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-carousel__dot:hover,
.hero-carousel__dot:focus-visible {
  background: var(--gold-light, #e8d88a);
  outline: 2px solid var(--gold, #c9a84e);
  outline-offset: 2px;
}

.hero-carousel__dot.is-active {
  transform: scale(1.25);
  background: var(--warm-cream, #faf8f2);
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel__slide {
    transition: none;
  }
}
