.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-turquoise);
  min-height: max(560px, calc(100svh - var(--header-height)));
  isolation: isolate;
}

/* ---- Media layer: photography + scrim, diagonally clipped at the base ---- */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: var(--z-hero-media);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--hero-cut)), 0 100%);
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--hero-fade, 1100ms) var(--ease-in-out);
}

.hero__slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero__picture,
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__img {
  object-fit: cover;
  object-position: center;
  transform: scale(1);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__slide.is-active .hero__img {
    animation: heroKenBurns 8s var(--ease-out) forwards;
  }
}

@keyframes heroKenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.055);
  }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.22) 45%, rgba(0, 0, 0, 0.78) 100%),
    linear-gradient(100deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.55) 36%, rgba(0, 0, 0, 0.12) 66%, rgba(0, 0, 0, 0) 84%);
}

/* ---- Content ---- */
.hero__content {
  position: relative;
  z-index: var(--z-hero-content);
  height: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  padding-block: calc(var(--space-16) + var(--space-4)) calc(var(--hero-cut) + var(--space-20));
  display: flex;
  align-items: flex-end;
}

@media (min-width: 1024px) {
  .hero__content {
    padding-inline: var(--space-10);
  }
}

.hero__panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  max-width: 46rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-regular);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-turquoise);
}

.hero__eyebrow::before {
  content: "";
  flex: 0 0 auto;
  width: 26px;
  height: 2px;
  background: var(--color-turquoise);
  transform: skewX(-20deg);
}

.hero__title {
  font-size: var(--text-h1);
  font-weight: var(--weight-bold);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.hero__description {
  font-size: var(--text-body);
  font-weight: var(--weight-light);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
  max-width: 42ch;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-1);
}

@media (prefers-reduced-motion: no-preference) {
  .hero__panel.is-animating .hero__eyebrow,
  .hero__panel.is-animating .hero__title,
  .hero__panel.is-animating .hero__description,
  .hero__panel.is-animating .hero__ctas {
    animation: heroReveal var(--dur-slow) var(--ease-out) both;
  }

  .hero__panel.is-animating .hero__eyebrow {
    animation-delay: 0ms;
  }

  .hero__panel.is-animating .hero__title {
    animation-delay: 90ms;
  }

  .hero__panel.is-animating .hero__description {
    animation-delay: 190ms;
  }

  .hero__panel.is-animating .hero__ctas {
    animation-delay: 290ms;
  }
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Controls: slide counter + progress dots ---- */
.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--hero-cut) + var(--space-5));
  z-index: var(--z-hero-controls);
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

@media (min-width: 1024px) {
  .hero__controls {
    padding-inline: var(--space-10);
  }
}

.hero__counter {
  display: flex;
  align-items: baseline;
  gap: 0.3em;
  font-size: var(--text-counter);
  font-weight: var(--weight-regular);
  font-variant-numeric: tabular-nums;
  color: var(--white-70);
}

.hero__counter [data-hero-counter-current] {
  color: var(--color-white);
}

.hero__counter-sep {
  opacity: 0.55;
}

.hero__dots-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.hero__dots {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.hero__playpause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--white-30);
  border-radius: var(--radius-pill);
  color: var(--color-white);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.hero__playpause:hover {
  border-color: var(--color-white);
  background: var(--white-08);
}

.hero__playpause svg {
  width: 14px;
  height: 14px;
}

.hero__playpause .icon-play {
  display: none;
}

.hero__playpause[aria-pressed="true"] .icon-pause {
  display: none;
}

.hero__playpause[aria-pressed="true"] .icon-play {
  display: block;
}

.hero__dot {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.hero__dot-track {
  position: relative;
  width: 30px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--white-30);
  overflow: hidden;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.hero__dot:hover .hero__dot-track {
  background: var(--white-70);
}

.hero__dot-progress {
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--color-turquoise);
}

.hero__dot.is-active .hero__dot-progress {
  animation: heroDotProgress var(--hero-interval) linear forwards;
}

.hero.is-paused .hero__dot.is-active .hero__dot-progress {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .hero__dot.is-active .hero__dot-progress {
    animation: none;
    transform: scaleX(1);
  }
}

@keyframes heroDotProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 560px) {
  .hero__controls {
    bottom: calc(var(--hero-cut) + var(--space-4));
  }

  .hero__dot {
    width: 40px;
  }
}
