.hero-media__scene,
.hero-media__scene > img,
.hero-media__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.hero-media__scene {
  display: block;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

.hero-media__scene.is-active {
  opacity: 1;
}

.hero:has([data-hero-media]) .hero__dots {
  align-items: center;
}

.hero-media__scene:not(.hero-media__scene--video) {
  transform: scale(1.035);
  transition: opacity 1.2s ease, transform 6.8s ease;
}

.hero-media__scene:not(.hero-media__scene--video).is-active {
  transform: scale(1);
}

.hero-media__scene[data-scene="waiting"] { object-position: center 48%; }
.hero-media__scene[data-scene="treatment"] { object-position: center 44%; }
.hero-media__scene[data-scene="cadcam"] { object-position: center 50%; }

.hero-media__scene--woman {
  --hero-poster: url("../images/autumn-woman-20261021.jpg");
}

.hero-media__scene--family {
  --hero-poster: url("../images/autumn-family-scenery-20261021.jpg");
}

.hero-media__video {
  opacity: 0;
  transition: opacity .25s ease;
}

.hero-media__scene.is-playing .hero-media__video {
  opacity: 1;
}

.hero-media--reduced .hero-media__video {
  visibility: hidden;
}

.hero-media__control {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 5px;
  margin-left: 2px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 4px;
  background: rgba(16, 38, 58, .28);
  color: #fff;
  cursor: pointer;
}

.hero-media__control svg {
  display: block;
  width: 16px;
  height: 16px;
}

.hero-media__control:hover,
.hero-media__control:focus-visible {
  background: rgba(16, 38, 58, .7);
}

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

@media (max-width: 700px) {
  .hero {
    min-height: 0;
    height: auto;
    padding: 0 20px 20px;
    background: #fff;
  }

  .hero::after {
    height: 380px;
    bottom: auto;
  }

  .hero .hero__visual {
    height: 380px;
    bottom: auto;
  }

  .hero .hero__copy {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    padding-top: 398px;
  }

  .hero .hero__copy > .eyebrow {
    position: absolute;
    top: 274px;
    left: 0;
    max-width: calc(100% - 86px);
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
    letter-spacing: 0;
  }

  .hero .hero__copy h1 {
    position: absolute;
    top: 300px;
    left: 0;
    max-width: calc(100% - 86px);
    margin: 0;
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: 0;
  }

  .hero .hero__lead {
    max-width: calc(100% - 86px);
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
    text-shadow: none;
  }

  .hero .hero__actions {
    max-width: calc(100% - 86px);
    margin-top: 18px;
    gap: 12px;
  }

  .hero .hero__actions .pill--blue {
    min-height: 44px;
    padding: 10px 12px;
    background: var(--blue);
    color: #fff;
    font-size: 14px;
    line-height: 1.5;
  }

  .hero .hero__actions .text-link {
    color: var(--navy);
    font-size: 14px;
    line-height: 1.5;
  }

  .hero-media__scene {
    object-position: center;
  }

  .hero-media__scene--video::before {
    display: none;
  }

  .hero-media__scene--video > img,
  .hero-media__video {
    height: 100%;
    object-position: 54% center;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .hero:has([data-hero-media]) .hero__dots {
    position: relative;
    inset: auto;
    width: calc(100% - 86px);
    margin-top: 16px;
    transform: none;
    gap: 12px;
    align-items: center;
    justify-content: center;
  }

  .hero .hero__dot {
    border-color: var(--blue);
  }

  .hero .hero__dot.is-active {
    background: var(--blue);
  }

  .hero .hero-media__control {
    border-color: rgba(16, 38, 58, .4);
    background: transparent;
    color: var(--navy);
  }

  .hero .hero-media__control:hover,
  .hero .hero-media__control:focus-visible {
    background: #edf4f6;
  }

  .hero .hero-media__control:focus-visible {
    outline-color: var(--blue);
  }
}

@media (max-width: 360px) {
  .hero .hero__copy > .eyebrow {
    font-size: 10px;
  }

  .hero .hero__copy h1 {
    font-size: 24px;
  }
}

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

  .hero-media__scene:not(.hero-media__scene--video) {
    transform: none;
    transition: none;
  }
}
