/* Home hero slider — Step 2
   Does not change Step 1 header/footer chrome. */

.hero {
  position: relative;
  background: var(--offwhite);
  overflow: hidden;
  outline: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 520px 380px at 92% 12%, rgba(48, 132, 144, 0.12), transparent 70%),
    radial-gradient(ellipse 420px 320px at 6% 88%, rgba(12, 48, 72, 0.05), transparent 70%);
}

.hero-shell {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 2rem;
}

@media (min-width: 640px) {
  .hero-shell {
    padding: 2.75rem 1.5rem 2.25rem;
  }
}

@media (min-width: 1024px) {
  .hero-shell {
    padding: 3.25rem 2rem 2.5rem;
  }
}

.hero-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3.25rem;
    min-height: 32rem;
  }

  .hero-copy {
    min-height: 20rem;
  }

  .hero.is-reversed .hero-copy {
    order: 2;
  }

  .hero.is-reversed .hero-media {
    order: 1;
  }
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(14px);
}

.hero-kicker-bar {
  width: 1.75rem;
  height: 2px;
  border-radius: 99px;
  background: var(--teal);
}

.hero-heading {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.7rem, 3.4vw, 3.05rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.hero-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  margin-right: 0.28em;
}

.hero-word-inner {
  display: inline-block;
  transform: translateY(108%);
  opacity: 0;
}

.hero-text {
  margin: 1.15rem 0 0;
  max-width: 32rem;
  color: var(--corp);
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(16px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.hero-actions .btn-quote,
.hero-btn-secondary {
  opacity: 0;
  transform: translateY(14px);
}

.hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(12, 48, 72, 0.16);
  background: var(--white);
  color: var(--navy);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.hero-btn-secondary:hover {
  background: var(--lightteal);
  border-color: var(--teal);
  color: var(--teal);
  transform: translateY(-1px);
}

.hero-btn-secondary:focus-visible,
.hero .btn-quote:focus-visible,
.hero-arrow:focus-visible,
.hero-dot:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.hero.is-animating .hero-kicker,
.hero.is-animating .hero-word-inner,
.hero.is-animating .hero-text,
.hero.is-animating .hero-actions .btn-quote,
.hero.is-animating .hero-btn-secondary {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.hero.is-in .hero-kicker,
.hero.is-in .hero-word-inner,
.hero.is-in .hero-text,
.hero.is-in .hero-actions .btn-quote,
.hero.is-in .hero-btn-secondary {
  opacity: 1;
  transform: translateY(0);
}

.hero-media {
  position: relative;
}

.hero-frame {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--lightteal);
  box-shadow: 0 22px 50px rgba(12, 48, 72, 0.12);
  aspect-ratio: 4 / 3;
  max-height: 16.5rem;
}

@media (min-width: 640px) {
  .hero-frame {
    max-height: 22rem;
  }
}

@media (min-width: 900px) {
  .hero-frame {
    aspect-ratio: 5 / 4;
    max-height: 34rem;
  }
}

.hero-frame-accent {
  position: absolute;
  inset: auto -0.85rem -0.85rem auto;
  width: 42%;
  height: 42%;
  border-radius: 1.15rem;
  border: 2px solid rgba(48, 132, 144, 0.35);
  z-index: -1;
  pointer-events: none;
}

.hero.is-reversed .hero-frame-accent {
  inset: auto auto -0.85rem -0.85rem;
}

.hero-media {
  z-index: 1;
}

.hero-frame {
  z-index: 1;
}

.hero-photos {
  position: absolute;
  inset: 0;
}

.hero-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(2.15rem);
  will-change: transform, opacity;
  transition: opacity 0.7s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

.hero-photo.is-leave-next {
  opacity: 0;
  transform: translateX(-1.6rem);
}

.hero-photo.is-leave-prev {
  opacity: 0;
  transform: translateX(1.6rem);
}

.hero-photo.is-enter-next {
  transform: translateX(2.15rem);
}

.hero-photo.is-enter-prev {
  transform: translateX(-2.15rem);
}

.hero-photo.is-active {
  opacity: 1;
  transform: translateX(0);
}

.hero-photo.is-active .hero-photo-img {
  animation: heroKen 7.2s ease-out forwards;
}

@keyframes heroKen {
  0% { transform: scale(1.06); }
  100% { transform: scale(1.13); }
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.35rem;
}

.hero-arrows {
  display: flex;
  gap: 0.55rem;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(12, 48, 72, 0.1);
  background: var(--white);
  color: var(--navy);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(12, 48, 72, 0.06);
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.hero-arrow svg {
  width: 18px;
  height: 18px;
}

.hero-arrow:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  transform: translateY(-1px);
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(12, 48, 72, 0.18);
  cursor: pointer;
  transition: width 0.28s ease, background-color 0.28s ease;
}

.hero-dot.is-active {
  width: 1.7rem;
  background: var(--teal);
}

.hero-dot:hover:not(.is-active) {
  background: rgba(48, 132, 144, 0.45);
}

@media (max-width: 899px) {
  .hero-copy {
    max-width: none;
  }

  .hero.is-reversed .hero-copy,
  .hero.is-reversed .hero-media {
    order: initial;
  }

  .hero-copy {
    order: 1;
  }

  .hero-media {
    order: 2;
  }

  .hero-frame-accent {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-photo,
  .hero-photo.is-active,
  .hero-photo-img,
  .hero-photo.is-active .hero-photo-img {
    animation: none;
    transition-duration: 0.2s;
    transform: none;
  }
}
