/* styles\hero.css */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: clamp(4rem, 10vh, 6rem);
  overflow: hidden;
  background-color: transparent;
}

.hero__content {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 8vw, 6rem);
  align-items: center;
  z-index: 2;
  position: relative;
}

.hero__left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero.animate-in .hero__left {
  opacity: 1;
  transform: translateX(0);
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.0625rem); /* 65px */
  font-weight: 600; /* SemiBold */
  line-height: 1.1;
  color: var(--color-light);
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
  font-family: 'Gilroy', sans-serif;
  animation: titleBreathing 4s ease-in-out infinite;
  will-change: transform;
}

/* Живое дыхание заголовка */
@keyframes titleBreathing {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

.hero__title-accent {
  background: linear-gradient(90deg, #82A7DA 0%, #7EE2E2 50%, #FFFFFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.hero__description {
  font-size: clamp(1rem, 2.5vw, 1.125rem); /* 18px */
  font-weight: 400; /* Regular */
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  max-width: 90%;
  animation: subtleFloat 6s ease-in-out infinite;
  animation-delay: 1s;
  will-change: transform;
}

/* Тонкое плавание описания */
@keyframes subtleFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-2px);
  }
}

.hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: clamp(2rem, 5vw, 3rem);
  align-items: center;
}

.hero__tag {
  font-size: 16px; /* 16px */
  font-weight: 400;
  color: #FFFFFFB2;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  transition: all 0.4s ease;
  cursor: default;
  white-space: nowrap;
  position: relative;
  animation: tagPulse 5s ease-in-out infinite;
  will-change: transform, color;
}

/* Пульсация тегов с задержками */
@keyframes tagPulse {
  0%, 100% {
    transform: translateY(0px) scale(1);
    color: #FFFFFFB2;
  }
  50% {
    transform: translateY(-1px) scale(1.02);
    color: #FFFFFF;
  }
}

.hero__tag:nth-child(1) { animation-delay: 0s; }
.hero__tag:nth-child(2) { animation-delay: 0.3s; }
.hero__tag:nth-child(3) { animation-delay: 0.6s; }
.hero__tag:nth-child(4) { animation-delay: 0.9s; }
.hero__tag:nth-child(5) { animation-delay: 1.2s; }
.hero__tag:nth-child(6) { animation-delay: 1.5s; }
.hero__tag:nth-child(7) { animation-delay: 1.8s; }
.hero__tag:nth-child(8) { animation-delay: 2.1s; }

.hero__tag:not(:last-child)::after {
  content: '|';
  color: #FFFFFF33;
  margin: 0 12px;
  font-weight: 200;
  animation: separatorGlow 3s ease-in-out infinite;
  will-change: color;
}

/* Свечение разделителей */
@keyframes separatorGlow {
  0%, 100% {
    color: #FFFFFF33;
  }
  50% {
    color: #FFFFFF66;
  }
}

.hero__tag:hover {
  color: #04dbd6;
  background: none;
  border: none;
  transform: scale(1.05) translateY(-2px);
  text-shadow: 0 0 8px rgba(4, 219, 214, 0.5);
}

.hero__button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1rem, 2.5vw, 1.125rem);
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1.5rem, 4vw, 2rem);
  border-radius: 2rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 150px 10px 150px rgba(20, 97, 204, 0.58);
  position: relative;
  z-index: 1000;
  animation: buttonPulse 4s ease-in-out infinite;
  will-change: transform;
}

/* Пульсация кнопки */
@keyframes buttonPulse {
  0%, 100% {
    transform: translateY(0px) scale(1);
  }
  50% {
    transform: translateY(-1px) scale(1.01);
  }
}

.hero__button:hover {
  box-shadow: 150px 25px 200px rgba(20, 97, 204, 0.7);
}

.hero__button-arrow {
  transition: transform 0.3s ease;
  animation: arrowFloat 3s ease-in-out infinite;
  will-change: transform;
}

/* Плавание стрелки */
@keyframes arrowFloat {
  0%, 100% {
    transform: translateX(0px);
  }
  50% {
    transform: translateX(2px);
  }
}

.hero__button:hover .hero__button-arrow {
  transform: translateX(4px);
  animation: none;
}

.hero__right {
  position: relative;
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease-out 0.3s, transform 0.8s ease-out 0.3s;
}

.hero.animate-in .hero__right {
  opacity: 1;
  transform: translateX(0);
}

.hero__image-container {
  position: relative;
  width: 100%;
  height: auto;
  animation: imageFloat 8s ease-in-out infinite;
  will-change: transform;
}

/* Плавание изображения */
@keyframes imageFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(0.5deg);
  }
  50% {
    transform: translateY(-5px) rotate(0deg);
  }
  75% {
    transform: translateY(-12px) rotate(-0.5deg);
  }
}

.hero__image {
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(4, 219, 214, 0.1));
  position: relative;
}

.hero__image-container::after {
  content: '';
  position: absolute;
  top: 5%;
  right: 5%;
  width: 200px;
  height: 150px;
  background: rgba(20, 97, 204, 0.2);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

/* Декоративные элементы */
.hero__decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero__decoration {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(45deg, #1461cc, #04dbd6);
  transform: rotate(45deg);
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
  will-change: transform, opacity;
}

.hero__decoration--1 {
  top: 20%;
  right: 15%;
  animation-delay: 0s;
  animation: float 6s ease-in-out infinite, colorShift 8s ease-in-out infinite;
}

.hero__decoration--2 {
  top: 60%;
  right: 25%;
  animation-delay: 2s;
  transform: rotate(45deg) scale(1.2);
  animation: float 7s ease-in-out infinite, colorShift 9s ease-in-out infinite;
}

.hero__decoration--3 {
  top: 35%;
  right: 8%;
  animation-delay: 4s;
  transform: rotate(45deg) scale(0.8);
  animation: float 5s ease-in-out infinite, colorShift 7s ease-in-out infinite;
}

.hero__decoration--4 {
  top: 75%;
  right: 12%;
  animation-delay: 1s;
  animation: float 8s ease-in-out infinite, colorShift 10s ease-in-out infinite;
}

/* Добавляем больше декоративных элементов */
.hero__decoration--5 {
  top: 10%;
  right: 30%;
  animation-delay: 3s;
  width: 6px;
  height: 6px;
  animation: float 9s ease-in-out infinite, colorShift 6s ease-in-out infinite;
}

.hero__decoration--6 {
  top: 45%;
  right: 5%;
  animation-delay: 5s;
  width: 10px;
  height: 10px;
  animation: float 4s ease-in-out infinite, colorShift 11s ease-in-out infinite;
}

.hero__decoration--7 {
  top: 85%;
  right: 20%;
  animation-delay: 2.5s;
  width: 7px;
  height: 7px;
  animation: float 6.5s ease-in-out infinite, colorShift 8.5s ease-in-out infinite;
}

.hero__decoration--8 {
  top: 25%;
  right: 35%;
  animation-delay: 4.5s;
  width: 5px;
  height: 5px;
  animation: float 7.5s ease-in-out infinite, colorShift 9.5s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: rotate(45deg) translateY(0px);
    opacity: 0.6;
  }
  50% {
    transform: rotate(45deg) translateY(-15px);
    opacity: 1;
  }
}

/* Цветовые переходы декораций */
@keyframes colorShift {
  0%, 100% {
    background: linear-gradient(45deg, #1461cc, #04dbd6);
  }
  25% {
    background: linear-gradient(45deg, #04dbd6, #82A7DA);
  }
  50% {
    background: linear-gradient(45deg, #82A7DA, #7EE2E2);
  }
  75% {
    background: linear-gradient(45deg, #7EE2E2, #1461cc);
  }
}

/* Адаптивность */

/* Большие экраны и ноутбуки - начинаем оптимизировать */
@media (width <= 1200px) {
  .hero__content {
    gap: clamp(1.5rem, 6vw, 4rem);
  }
  
  .hero__title {
    font-size: clamp(2.2rem, 5.5vw, 3.5rem);
    margin-bottom: clamp(1.2rem, 3.5vw, 1.8rem);
  }
  
  .hero__description {
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    margin-bottom: 18px;
    max-width: 95%;
  }
  
  .hero__tag {
    font-size: 15px;
  }
  
  .hero__tag:not(:last-child)::after {
    margin: 0 10px;
  }
  
  .hero__button {
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    padding: clamp(0.7rem, 1.8vw, 0.9rem) clamp(1.4rem, 3.5vw, 1.8rem);
  }
}

/* Планшеты большие */
@media (width <= 992px) {
  .hero {
    min-height: 90vh;
    padding-bottom: clamp(3rem, 8vh, 5rem);
  }
  
  .hero__content {
    gap: clamp(1.2rem, 5vw, 3rem);
  }
  
  .hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }
  
  .hero__description {
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 16px;
    max-width: 100%;
  }
  
  .hero__tag {
    font-size: 14px;
  }
  
  .hero__tag:not(:last-child)::after {
    margin: 0 8px;
  }
  
  .hero__button {
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: clamp(0.65rem, 1.6vw, 0.8rem) clamp(1.2rem, 3vw, 1.6rem);
  }
  
  .hero__image {
    max-width: 90%;
    margin: 0 auto;
  }
}

/* Планшеты */
@media (width <= 768px) {
  .hero {
    min-height: auto;
    padding-bottom: clamp(2rem, 6vh, 3rem);
    padding-left: 20px;
    padding-right: 20px;
  }
  
  .hero__content {
    grid-template-columns: 1fr;
    gap: clamp(1.5rem, 5vw, 2.5rem);
    text-align: left;
  }
  
  .hero__left {
    order: 1;
  }
  
  .hero__right {
    order: 2;
  }
  
  .hero__title {
    font-size: clamp(2.8rem, 8vw, 3.5rem);
    margin-bottom: clamp(1rem, 3vw, 1.2rem);
  }
  
  .hero__title br {
    display: none;
  }
  
  .hero__description {
    font-size: clamp(1.2rem, 4vw, 1.4rem);
    margin-bottom: 16px;
    max-width: 100%;
  }
  
  .hero__tags {
    justify-content: flex-start;
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
  }
  
  .hero__tag {
    font-size: 18px;
  }
  
  .hero__tag:not(:last-child)::after {
    margin: 0 8px;
  }
  
  .hero__button {
    width: 100%;
    justify-content: center;
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    padding: clamp(0.8rem, 3vw, 1rem) clamp(1.8rem, 5vw, 2.2rem);
  }
  
  .hero__image {
    max-width: 85%;
    margin: 0 auto;
  }
}

/* Мобильные устройства */
@media (width <= 480px) {
  .hero {
    padding-top: clamp(1.5rem, 6vh, 3rem);
    padding-bottom: clamp(1.5rem, 5vh, 2.5rem);
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .hero__content {
    gap: clamp(1.2rem, 4vw, 2rem);
  }
  
  .hero__title {
    font-size: clamp(2.5rem, 9vw, 3.2rem);
    margin-bottom: clamp(0.8rem, 2.5vw, 1rem);
    line-height: 1.2;
  }
  
  .hero__description {
    font-size: clamp(1.1rem, 4.5vw, 1.25rem);
    margin-bottom: 14px;
    line-height: 1.5;
  }
  
  .hero__tags {
    margin-bottom: clamp(1.2rem, 3.5vw, 1.8rem);
  }
  
  .hero__tag {
    font-size: 16px;
  }
  
  .hero__tag:not(:last-child)::after {
    margin: 0 6px;
    font-size: 15px;
  }
  
  .hero__button {
    font-size: clamp(1rem, 4.5vw, 1.2rem);
    padding: clamp(0.7rem, 3vw, 0.9rem) clamp(1.5rem, 6vw, 1.8rem);
    gap: 0.6rem;
  }
  
  .hero__image {
    max-width: 90%;
  }
  
  /* Уменьшаем декоративные элементы */
  .hero__decoration {
    width: 6px;
    height: 6px;
  }
  
  /* Снижаем интенсивность анимаций на мобильных */
  .hero__title {
    animation-duration: 6s;
  }
}

/* Очень маленькие экраны */
@media (width <= 360px) {
  .hero {
    padding-top: clamp(1rem, 5vh, 2rem);
    padding-bottom: clamp(1rem, 4vh, 2rem);
    padding-left: 12px;
    padding-right: 12px;
  }
  
  .hero__title {
    font-size: clamp(2.2rem, 10vw, 2.8rem);
    margin-bottom: 0.8rem;
  }
  
  .hero__description {
    font-size: clamp(1rem, 5vw, 1.15rem);
    margin-bottom: 12px;
  }
  
  .hero__tags {
    margin-bottom: 1.2rem;
  }
  
  .hero__tag {
    font-size: 15px;
  }
  
  .hero__tag:not(:last-child)::after {
    margin: 0 5px;
    font-size: 14px;
  }
  
  .hero__button {
    font-size: clamp(0.95rem, 5vw, 1.1rem);
    padding: clamp(0.7rem, 3vw, 0.8rem) clamp(1.4rem, 6vw, 1.6rem);
    gap: 0.5rem;
  }
  
  .hero__image {
    max-width: 95%;
  }
  
  /* Скрываем некоторые декоративные элементы */
  .hero__decoration--3,
  .hero__decoration--4,
  .hero__decoration--6,
  .hero__decoration--8 {
    display: none;
  }
}

/* Анимация появления тегов */
.hero__tag {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.hero.animate-in .hero__tag {
  opacity: 1;
  transform: translateY(0);
}

.hero.animate-in .hero__tag:nth-child(1) { transition-delay: 0.5s; }
.hero.animate-in .hero__tag:nth-child(2) { transition-delay: 0.6s; }
.hero.animate-in .hero__tag:nth-child(3) { transition-delay: 0.7s; }
.hero.animate-in .hero__tag:nth-child(4) { transition-delay: 0.8s; }
.hero.animate-in .hero__tag:nth-child(5) { transition-delay: 0.9s; }
.hero.animate-in .hero__tag:nth-child(6) { transition-delay: 1.0s; }
.hero.animate-in .hero__tag:nth-child(7) { transition-delay: 1.1s; }
.hero.animate-in .hero__tag:nth-child(8) { transition-delay: 1.2s; }

.hero__button {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 1.3s;
}

.hero.animate-in .hero__button {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion для пользователей с предпочтениями */
@media (prefers-reduced-motion: reduce) {
  .hero__title,
  .hero__title-accent,
  .hero__description,
  .hero__tag,
  .hero__button,
  .hero__button-arrow,
  .hero__image-container,
  .hero__image,
  .hero__image-container::after,
  .hero__decoration,
  .hero::before {
    animation: none !important;
  }
  
  .hero__tag:hover {
    transform: none;
    text-shadow: none;
  }
  
  .hero__button:hover {
    transform: none;
  }
}