/* ============================================
   KLING AI VIDEO BOT — ЛЕНДИНГ
   Кинематографичный стиль, тёплая палитра
   ============================================ */

/* --- Переменные --- */
:root {
  --bg:          #0d0c0f;
  --bg-card:     rgba(26, 24, 32, 0.6);
  --text:        #f2efe8;
  --text-muted:  #9a968e;
  --accent:      #e8a838;
  --accent-light:#f0c060;
  --accent-red:  #c44b2f;
  --border:      rgba(242, 239, 232, 0.08);
  --font:        'Inter', sans-serif;
}

/* --- Сброс и базовые стили --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Зернистая текстура на весь экран --- */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Контейнер --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Общий стиль заголовков секций --- */
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3.5rem;
  color: var(--text);
}

/* ============================================
   КНОПКА — с shine-эффектом
   ============================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  border: none;
  border-radius: 60px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--bg);
  box-shadow:
    0 0 30px rgba(232, 168, 56, 0.15),
    0 0 60px rgba(232, 168, 56, 0.05);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 40px rgba(232, 168, 56, 0.3),
    0 0 80px rgba(232, 168, 56, 0.1);
}

.btn__text {
  position: relative;
  z-index: 1;
}

/* Анимированный блик */
.btn__shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: none;
}

.btn:hover .btn__shine {
  animation: shine 0.6s ease forwards;
}

@keyframes shine {
  to { transform: translateX(100%); }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

/* Пульсирующий blob */
.hero__blob {
  position: absolute;
  top: 10%;
  right: -5%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 168, 56, 0.08) 0%,
    rgba(196, 75, 47, 0.04) 50%,
    transparent 70%
  );
  filter: blur(80px);
  animation: blobPulse 8s ease-in-out infinite;
}

@keyframes blobPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* Вращающееся кольцо из точек */
.hero__ring {
  position: absolute;
  top: 15%;
  right: 10%;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  animation: ringRotate 40s linear infinite;
}

/* Точки кольца генерируются через box-shadow */
.hero__ring::before {
  content: '';
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  box-shadow:
    /* 12 точек по кругу (175px радиус) */
     0px   0px 0 0 var(--accent),
    90px  -14px 0 0 rgba(232, 168, 56, 0.7),
    152px  63px 0 0 rgba(232, 168, 56, 0.5),
    152px 193px 0 0 rgba(232, 168, 56, 0.3),
    90px  270px 0 0 rgba(232, 168, 56, 0.5),
    0px   306px 0 0 rgba(232, 168, 56, 0.7),
    -90px 270px 0 0 rgba(232, 168, 56, 0.5),
    -152px 193px 0 0 rgba(232, 168, 56, 0.3),
    -152px 63px 0 0 rgba(232, 168, 56, 0.5),
    -90px -14px 0 0 rgba(232, 168, 56, 0.7),
    -46px -6px 0 0 rgba(232, 168, 56, 0.4),
    46px  -6px 0 0 rgba(232, 168, 56, 0.4);
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  /* Асимметричная компоновка — сдвиг влево */
  margin-left: 5vw;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero__label-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero__title-line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.4s forwards;
}

.hero__title-line--accent {
  color: var(--accent);
  animation-delay: 0.6s;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.8s forwards;
}

.hero__description {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s ease 1s forwards;
}

.hero__cta {
  opacity: 0;
  animation: fadeUp 0.8s ease 1.2s forwards;
}

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

/* Линия-разделитель в конце hero */
.hero__divider {
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border) 20%,
    rgba(232, 168, 56, 0.15) 50%,
    var(--border) 80%,
    transparent
  );
}

/* ============================================
   ФИЧИ — Bento Grid
   ============================================ */
.features {
  padding: 120px 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Большая карточка — занимает 1 колонку, но выше */
.features__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  backdrop-filter: blur(20px);
  transition: border-color 0.4s ease, transform 0.4s ease;
}

.features__card:hover {
  border-color: rgba(232, 168, 56, 0.2);
  transform: translateY(-4px);
}

.features__card--large {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 36px;
}

/* Широкая карточка — занимает 2 колонки */
.features__card--wide {
  grid-column: span 2;
}

.features__card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(232, 168, 56, 0.08);
  color: var(--accent);
  margin-bottom: 20px;
}

.features__card-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.features__card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   ШАГИ — "Как это работает"
   ============================================ */
.steps {
  padding: 100px 0 120px;
}

.steps__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.steps__item {
  position: relative;
}

.steps__number {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(232, 168, 56, 0.25);
  margin-bottom: 20px;
  line-height: 1;
}

/* Горизонтальная линия между шагами */
.steps__line {
  position: absolute;
  top: 2rem;
  right: -20px;
  width: 40px;
  height: 1px;
  background: var(--border);
}

.steps__item:last-child .steps__line {
  display: none;
}

.steps__title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.steps__text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   FAQ — Аккордеон
   ============================================ */
.faq {
  padding: 100px 0 120px;
}

.faq__list {
  max-width: 720px;
}

.faq__item {
  border-top: 1px solid var(--border);
}

.faq__item:last-child {
  border-bottom: 1px solid var(--border);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: color 0.3s ease;
}

.faq__question:hover {
  color: var(--accent);
}

.faq__icon {
  flex-shrink: 0;
  transition: transform 0.4s ease;
}

/* Когда открыт — превращаем + в × (поворот 45°) */
.faq__item.is-open .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq__item.is-open .faq__answer {
  max-height: 300px;
}

.faq__answer p {
  padding-bottom: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.footer__brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.footer__text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   REVEAL-АНИМАЦИЯ (Intersection Observer)
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Задержка для stagger-эффекта */
.reveal[data-delay="1"] { transition-delay: 0.15s; }
.reveal[data-delay="2"] { transition-delay: 0.3s; }
.reveal[data-delay="3"] { transition-delay: 0.45s; }

/* ============================================
   АДАПТИВ
   ============================================ */

/* Планшет */
@media (max-width: 900px) {
  .hero__content {
    margin-left: 0;
  }

  .hero__ring {
    width: 200px;
    height: 200px;
    right: 2%;
    top: 8%;
    opacity: 0.5;
  }

  .hero__blob {
    width: 400px;
    height: 400px;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features__card--large {
    grid-row: span 1;
  }

  .features__card--wide {
    grid-column: span 2;
  }

  .steps__list {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .steps__line {
    display: none;
  }
}

/* Мобильный */
@media (max-width: 600px) {
  .hero {
    padding: 100px 20px 60px;
    min-height: auto;
    padding-bottom: 80px;
  }

  .hero__ring {
    display: none;
  }

  .hero__blob {
    width: 300px;
    height: 300px;
    top: 0;
    right: -20%;
  }

  .features {
    padding: 80px 0;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .features__card--wide {
    grid-column: span 1;
  }

  .section-title {
    margin-bottom: 2.5rem;
  }

  .steps {
    padding: 60px 0 80px;
  }

  .faq {
    padding: 60px 0 80px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn {
    padding: 14px 28px;
    font-size: 0.95rem;
  }
}
