/**
 * Homepage hero image carousel + statistics cards.
 */

.home-landing .home-hero-carousel-wrap {
  --hhc-radius: 16px;
  --hhc-aspect: 16 / 9;
  --hhc-min-h: clamp(220px, 42vw, 520px);
  --hhc-max-h: min(72vh, 640px);
  --hhc-fade-duration: 1.35s;
  --hhc-fade-ease: cubic-bezier(0.45, 0.05, 0.15, 1);
  --hhc-overlay: linear-gradient(
    to top,
    rgba(8, 20, 12, 0.88) 0%,
    rgba(8, 20, 12, 0.55) 38%,
    rgba(8, 20, 12, 0.2) 68%,
    rgba(8, 20, 12, 0.08) 100%
  );
  padding: clamp(0.75rem, 2vw, 1.25rem) clamp(0.75rem, 2.5vw, 1.5rem) 0;
}

/* ----- Carousel shell ----- */
.home-landing .home-hero-carousel {
  position: relative;
  max-width: var(--hl-max, 1200px);
  margin: 0 auto;
  border-radius: var(--hhc-radius);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(13, 40, 16, 0.18);
  outline: none;
}

.home-landing .home-hero-carousel:focus-visible {
  box-shadow:
    0 16px 48px rgba(13, 40, 16, 0.18),
    0 0 0 3px #fff,
    0 0 0 5px var(--hl-primary, #1b5e20);
}

.home-landing .home-hero-carousel__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: var(--hhc-aspect);
  min-height: var(--hhc-min-h);
  max-height: var(--hhc-max-h);
  background: #0d2810;
}

/* ----- Slides — crossfade stack ----- */
.home-landing .home-hero-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  transition: opacity var(--hhc-fade-duration) var(--hhc-fade-ease);
  will-change: opacity;
}

.home-landing .home-hero-carousel__slide.is-active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.home-landing .home-hero-carousel.is-transitioning .home-hero-carousel__slide.is-active {
  z-index: 3;
}

@media (prefers-reduced-motion: reduce) {
  .home-landing .home-hero-carousel-wrap {
    --hhc-fade-duration: 0.01ms;
  }

  .home-landing .home-hero-carousel__slide {
    transition: none;
    will-change: auto;
  }
}

.home-landing .home-hero-carousel__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.home-landing .home-hero-carousel__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1);
  transform-origin: center center;
}

.home-landing .home-hero-carousel__slide.is-active .home-hero-carousel__img {
  animation: homeHeroKenBurns 5.5s var(--hhc-fade-ease) forwards;
}

@keyframes homeHeroKenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.07);
  }
}

.home-landing .home-hero-carousel__overlay {
  position: absolute;
  inset: 0;
  background: var(--hhc-overlay);
  z-index: 1;
  pointer-events: none;
  opacity: 0.92;
  transition: opacity var(--hhc-fade-duration) var(--hhc-fade-ease);
}

.home-landing .home-hero-carousel__slide.is-active .home-hero-carousel__overlay {
  opacity: 1;
}

.home-landing .home-hero-carousel__content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 3.5rem);
  text-align: center;
  color: #fff;
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .home-landing .home-hero-carousel__slide.is-active .home-hero-carousel__img {
    animation: none;
  }

  .home-landing .home-hero-carousel__overlay {
    opacity: 1;
    transition: none;
  }
}

.home-landing .home-hero-carousel__heading {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3.8vw, 2.35rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
  text-wrap: balance;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s var(--hhc-fade-ease) 0.35s,
    transform 0.65s var(--hhc-fade-ease) 0.35s;
}

.home-landing .home-hero-carousel__slide.is-active .home-hero-carousel__heading {
  opacity: 1;
  transform: translateY(0);
}

.home-landing .home-hero-carousel__punchline {
  margin: 0 auto 1.15rem;
  max-width: 42rem;
  font-size: clamp(0.9rem, 2.1vw, 1.1rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
  text-wrap: pretty;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s var(--hhc-fade-ease) 0.5s,
    transform 0.65s var(--hhc-fade-ease) 0.5s;
}

.home-landing .home-hero-carousel__slide.is-active .home-hero-carousel__punchline {
  opacity: 1;
  transform: translateY(0);
}

.home-landing .home-hero-carousel__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1rem);
  border-radius: 999px;
  background: #fff;
  color: var(--hl-primary-dark, #0d3d12);
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.65s var(--hhc-fade-ease) 0.65s,
    transform 0.65s var(--hhc-fade-ease) 0.65s,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.home-landing .home-hero-carousel__slide.is-active .home-hero-carousel__cta {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home-landing .home-hero-carousel__heading,
  .home-landing .home-hero-carousel__punchline,
  .home-landing .home-hero-carousel__cta {
    opacity: 1;
    transform: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
  }
}

.home-landing .home-hero-carousel__cta:hover,
.home-landing .home-hero-carousel__cta:focus-visible {
  background: #f1f5f9;
  color: var(--hl-primary-dark, #0d3d12);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.home-landing .home-hero-carousel__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ----- Controls ----- */
.home-landing .home-hero-carousel__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--hl-primary-dark, #0d3d12);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
}

.home-landing .home-hero-carousel__control:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.home-landing .home-hero-carousel__control:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.home-landing .home-hero-carousel__control--prev {
  left: clamp(0.5rem, 2vw, 1rem);
}

.home-landing .home-hero-carousel__control--next {
  right: clamp(0.5rem, 2vw, 1rem);
}

/* ----- Indicators ----- */
.home-landing .home-hero-carousel__indicators {
  position: absolute;
  bottom: clamp(0.65rem, 2vw, 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: calc(100% - 2rem);
  padding: 0.25rem 0.5rem;
}

.home-landing .home-hero-carousel__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.home-landing .home-hero-carousel__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.home-landing .home-hero-carousel__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ----- Statistics cards ----- */
.home-landing .home-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2.5vw, 1.25rem);
  max-width: var(--hl-max, 1200px);
  margin: clamp(1rem, 3vw, 1.75rem) auto clamp(1.25rem, 3vw, 2rem);
  padding: 0 clamp(0.25rem, 1vw, 0.5rem);
}

.home-landing .home-hero-stats__card {
  background: var(--hl-surface, #fff);
  border-radius: var(--hl-radius-sm, 12px);
  box-shadow: var(--hl-shadow-sm, 0 4px 16px rgba(27, 94, 32, 0.06));
  border: 1px solid var(--hl-border, rgba(27, 94, 32, 0.15));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.home-landing .home-hero-stats__card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hl-shadow, 0 10px 40px rgba(27, 94, 32, 0.08));
}

.home-landing .home-hero-stats__link,
.home-landing .home-hero-stats__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1rem, 3vw, 1.5rem) clamp(0.75rem, 2vw, 1rem);
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.home-landing .home-hero-stats__label {
  display: block;
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hl-muted, #5f6368);
  margin-bottom: 0.35rem;
}

.home-landing .home-hero-stats__value {
  display: block;
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  font-weight: 800;
  color: var(--hl-primary, #1b5e20);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.home-landing .home-hero-stats__link:focus-visible {
  outline: 2px solid var(--hl-primary, #1b5e20);
  outline-offset: -2px;
}

/* ----- Responsive breakpoints ----- */
@media (max-width: 767.98px) {
  .home-landing .home-hero-carousel-wrap {
    --hhc-aspect: 4 / 3;
    --hhc-min-h: clamp(200px, 56vw, 360px);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .home-landing .home-hero-carousel__control {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .home-landing .home-hero-carousel__content {
    padding-bottom: clamp(2.75rem, 8vw, 3.25rem);
  }

  .home-landing .home-hero-stats {
    grid-template-columns: 1fr;
    max-width: 22rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .home-landing .home-hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 359.98px) {
  .home-landing .home-hero-carousel__heading {
    font-size: 1.2rem;
  }

  .home-landing .home-hero-carousel__punchline {
    font-size: 0.85rem;
    margin-bottom: 0.85rem;
  }

  .home-landing .home-hero-carousel__dot {
    width: 8px;
    height: 8px;
  }
}

@media (min-width: 1400px) {
  .home-landing .home-hero-carousel-wrap {
    --hhc-max-h: 680px;
  }
}
