/* Hero — photo showcase */

.slide--hero {
  overflow: visible;
}

#hero .slide__inner {
  display: flex;
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  max-width: none;
  width: 100%;
  overflow: visible;
  --hero-text-inset: max(0px, calc((100% - 1200px) / 2));
  padding-left: var(--hero-text-inset);
}

#hero .hero__content {
  flex: 0 0 clamp(400px, 42vw, 520px);
  max-width: 520px;
  position: relative;
  z-index: 2;
}

#hero .hero__title {
  margin: 0 0 1.25rem;
  font-size: clamp(2.15rem, 4.6vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-shadow: 0 0 60px rgb(58 209 102 / 0.12);
}

#hero .hero__title-line {
  display: block;
  white-space: nowrap;
}

#hero .hero__title .gradient-text {
  filter: drop-shadow(0 0 24px rgb(58 209 102 / 0.25));
}

#hero .hero__lead {
  max-width: 100%;
}

#hero .hero__offer {
  width: fit-content;
  max-width: min(100%, 18rem);
  padding: 0.75rem 1rem;
}

#hero .hero__offer small {
  flex-basis: auto;
  line-height: 1.45;
}

#hero .hero__visual {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  min-height: clamp(480px, 78vh, 880px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: visible;
  margin-left: calc(-1 * var(--hero-text-inset));
  margin-right: calc(-1 * var(--slide-pad));
  z-index: 1;
  container-type: inline-size;
}

#hero .hero-showcase {
  position: relative;
  flex-shrink: 0;
  width: auto;
  max-width: none;
  margin: 0 calc(-1 * var(--slide-pad) - clamp(3vw, 8vw, 140px)) 0 0;
  padding: 0;
}

#hero .hero-showcase__glow {
  position: absolute;
  inset: 18% -8% -6% 8%;
  background:
    radial-gradient(ellipse 85% 55% at 58% 88%, rgb(58 209 102 / 0.32), transparent 68%),
    radial-gradient(ellipse 60% 50% at 70% 35%, rgb(58 209 102 / 0.14), transparent 65%),
    radial-gradient(ellipse 40% 45% at 92% 70%, rgb(96 165 250 / 0.07), transparent 60%);
  filter: blur(36px);
  pointer-events: none;
  z-index: 0;
  animation: visual-ambient-pulse 5.5s ease-in-out infinite;
}

#hero .hero-showcase::after {
  content: "";
  position: absolute;
  left: 62%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(88%, 640px);
  height: clamp(56px, 14vh, 140px);
  border-radius: 50%;
  background: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    rgb(58 209 102 / 0.42) 0%,
    rgb(58 209 102 / 0.16) 45%,
    transparent 74%
  );
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
  animation: visual-floor-pulse 5s ease-in-out infinite;
}

#hero .hero-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: min(88vh, 920px);
  max-width: calc(100cqi + var(--slide-pad) + clamp(3vw, 8vw, 140px));
  margin: 0;
  object-fit: contain;
  object-position: right center;
  filter: drop-shadow(0 20px 48px rgb(0 0 0 / 0.35));
  pointer-events: none;
  user-select: none;
}

#hero .hero__glow {
  inset: auto;
  left: 8%;
  right: -18%;
  top: 22%;
  bottom: -10%;
  opacity: 0.85;
}

@media (max-width: 1024px) {
  #hero .slide__inner {
    flex-direction: column;
    gap: 1.5rem;
    --hero-text-inset: 0px;
    padding-left: 0;
  }

  #hero .hero__content {
    flex: none;
    max-width: none;
    width: 100%;
  }

  #hero .hero__title-line {
    white-space: normal;
  }

  #hero .hero__visual {
    width: 100%;
    min-height: auto;
    margin-left: 0;
    margin-right: 0;
    justify-content: stretch;
    container-type: normal;
  }

  #hero .hero-showcase {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #hero .hero-photo {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    object-position: center top;
    border-radius: 14px;
  }
}

.slide.is-visible #hero .hero-photo {
  animation: hero-reveal-photo 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hero-reveal-photo {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* —— Свечение под визуалом — слайд 7 —— */
#scheme .scheme-visual {
  overflow: visible;
}

#scheme .scheme-visual__glow {
  inset: 12% -6% -8% -6%;
  background:
    radial-gradient(ellipse 80% 52% at 50% 92%, rgb(58 209 102 / 0.34), transparent 68%),
    radial-gradient(ellipse 55% 48% at 48% 40%, rgb(58 209 102 / 0.12), transparent 62%);
  filter: blur(34px);
  z-index: 0;
  animation: visual-ambient-pulse 5.5s ease-in-out infinite;
}

#scheme .scheme-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2%;
  transform: translateX(-50%);
  width: min(92%, 480px);
  height: clamp(52px, 13vh, 128px);
  border-radius: 50%;
  background: radial-gradient(
    ellipse 100% 100% at 50% 50%,
    rgb(58 209 102 / 0.4) 0%,
    rgb(58 209 102 / 0.15) 44%,
    transparent 74%
  );
  filter: blur(24px);
  pointer-events: none;
  z-index: 0;
  animation: visual-floor-pulse 5s ease-in-out infinite;
}

@keyframes visual-floor-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.07);
  }
}

@keyframes visual-ambient-pulse {
  0%,
  100% {
    opacity: 0.82;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  #hero .hero-showcase__glow,
  #hero .hero-showcase::after,
  #scheme .scheme-visual__glow,
  #scheme .scheme-visual::after {
    animation: none;
  }
}
