*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:     #0d0d0d;
  --bg2:    #111111;
  --bg3:    #1a1a1a;
  --border: rgba(255,255,255,0.07);
  --white:  #ffffff;
  --gray1:  #999999;
  --gray2:  #3a3a3a;
  --radius: 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ══ КОНТЕЙНЕР ══ */
.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ══ ШТОРЫ ══ */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.curtain__left {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 50%;
  background: #181818;
  transform-origin: left center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.18, 1);
}
.curtain__right {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 50%;
  background: #181818;
  transform-origin: right center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.18, 1);
}
.curtain__label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(18px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  z-index: 1;
  transition: opacity 0.15s;
}
.curtain--open .curtain__label { opacity: 0; }
.curtain--open .curtain__left  { transform: scaleX(0); }
.curtain--open .curtain__right { transform: scaleX(0); }

/* ══ НАВИГАЦИЯ ══ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(13,13,13,0.8);
}
.nav__inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 40px;
}
.nav__logo {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.01em;
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav__links a {
  font-size: 13px;
  color: var(--gray1);
  text-decoration: none;
  transition: color 0.15s;
}
.nav__links a:hover { color: var(--white); }

/* ══ HERO ══ */
.hero {
  min-height: 100vh;
  position: relative;
  padding-top: 60px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Фото — правая половина, до края экрана */
.hero__photo {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 50%;
  pointer-events: none;
}
.hero__photo::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg) 0%, transparent 35%);
  z-index: 1;
}
.hero__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 10%;
  display: block;
}

/* Текст — выравнивается через .wrap */
.hero .wrap {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero__content {
  max-width: 520px;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.hero__title {
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.03em;
}
.hero__sub {
  font-size: 16px;
  color: var(--gray1);
  max-width: 400px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* ══ КНОПКИ ══ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { opacity: 0.82; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--white  { background: var(--white); color: var(--bg); }
.btn--ghost  { background: transparent; border-color: var(--border); color: var(--white); }
.btn--ghost:hover { border-color: rgba(255,255,255,0.22); }
.btn--sm     { padding: 9px 18px; font-size: 13px; }
.btn--full   { width: 100%; justify-content: center; }

/* ══ ОБЩИЕ ══ */
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray1);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 46px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 48px;
}

/* ══ ЦИФРЫ ══ */
.stats-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.stats-bar__inner {
  display: flex;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 32px;
  gap: 0;
}
.stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat__num {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat__label {
  font-size: 12px;
  color: var(--gray1);
}
.stat__divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 40px;
}

/* ══ БЕНТО-УСЛУГИ ══ */
.services {
  padding: 96px 0;
  background: var(--bg);
}
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 2px;
}
.bento__card {
  background: var(--bg2);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background 0.2s;
}
.bento__card:hover { background: var(--bg3); }
.bento__card--wide {
  grid-column: span 2;
}
.bento__card:nth-child(1) { border-radius: var(--radius) 0 0 0; }
.bento__card:nth-child(2) { border-radius: 0 var(--radius) 0 0; }
.bento__card:nth-child(3) { border-radius: 0; }
.bento__card:nth-child(4) { border-radius: 0; }
.bento__card:last-child   { border-radius: 0 0 var(--radius) var(--radius); }

.bento__num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gray2);
}
.bento__card h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.bento__card p {
  font-size: 14px;
  color: var(--gray1);
  line-height: 1.65;
  max-width: 480px;
}

/* ══ ВИДЕО ══ */
.video-section {
  padding: 96px 0;
  background: var(--bg2);
}
.yt-thumb {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
}
.yt-thumb img {
  width: 100%;
  display: block;
  background: var(--bg3);
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.yt-thumb:hover img { transform: scale(1.025); }
.yt-thumb__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.28);
  transition: background 0.2s;
}
.yt-thumb:hover .yt-thumb__overlay { background: rgba(0,0,0,0.12); }
.yt-thumb__play {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: transform 0.2s;
}
.yt-thumb:hover .yt-thumb__play { transform: scale(1.1); }

/* ══ ЗАПИСЬ ══ */
.consult-section {
  padding: 96px 0;
  background: var(--bg);
}
.consult-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.consult-desc {
  font-size: 15px;
  color: var(--gray1);
  margin: 16px 0 28px;
  line-height: 1.7;
}
.form { display: flex; flex-direction: column; gap: 10px; }
.form__input, .form__textarea {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
  resize: vertical;
}
.form__input:focus,
.form__textarea:focus { border-color: rgba(255,255,255,0.25); }
.form__input::placeholder,
.form__textarea::placeholder { color: var(--gray2); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form__status { margin: 4px 0 0; font-size: 13px; min-height: 18px; color: var(--gray2); }
.form__status--ok { color: #4ade80; }
.form__status--err { color: #f87171; }

/* ══ ФУТЕР ══ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer__name { font-size: 13px; font-weight: 600; }
.footer__tg   { font-size: 13px; color: var(--gray1); text-decoration: none; transition: color 0.15s; }
.footer__tg:hover { color: var(--white); }

/* ══ АНИМАЦИИ ══ */
[data-ani] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-ani].ani-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-ani-delay="1"] { transition-delay: 0.1s; }
[data-ani-delay="2"] { transition-delay: 0.2s; }
[data-ani-delay="3"] { transition-delay: 0.3s; }
[data-ani-delay="4"] { transition-delay: 0.4s; }

/* ══ АДАПТИВ — ПЛАНШЕТ ══ */
@media (max-width: 860px) {
  .hero__photo { width: 55%; }
  .hero__content { max-width: 400px; }
  .hero__title { font-size: clamp(36px, 6vw, 52px); }
  .bento { grid-template-columns: 1fr; }
  .bento__card--wide { grid-column: span 1; }
  .bento__card:nth-child(1) { border-radius: var(--radius) var(--radius) 0 0; }
  .bento__card:nth-child(2) { border-radius: 0; }
  .bento__card:last-child   { border-radius: 0 0 var(--radius) var(--radius); }
  .consult-inner { grid-template-columns: 1fr; gap: 48px; }
  .stat__divider { margin: 0 20px; }
  .nav__links { display: none; }
  section { padding: 72px 0; }
}

/* ══ АДАПТИВ — ТЕЛЕФОН ══ */
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  section { padding: 56px 0; }
  .section-title { font-size: 28px; margin-bottom: 32px; }

  /* Hero — фото сверху, текст снизу */
  .hero {
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    overflow: visible;
    padding-top: 60px;
  }
  .hero__photo {
    position: relative;
    right: auto; top: auto; bottom: auto;
    width: 100%;
    height: 78vw;
    overflow: hidden;
    flex-shrink: 0;
  }
  .hero__photo {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero__photo::before { display: none; }

  .hero__photo img {
    width: 100%;
    height: 135%;
    object-position: center 10%;
    will-change: transform;
  }
  .hero .wrap { width: 100%; }
  .hero__content {
    max-width: 100%;
    padding: 16px 0 56px;
    gap: 20px;
  }
  .hero__title {
    font-size: clamp(34px, 9vw, 48px);
    line-height: 1.05;
  }
  .hero__sub { font-size: 15px; }
  .hero__actions { gap: 8px; }
  .hero__actions .btn { flex: 1; justify-content: center; font-size: 13px; padding: 12px 16px; }

  /* Цифры — убираем линию между фото и статами */
  .stats-bar { border-top: none; background: var(--bg); }

  .stats-bar__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }
  .stat__divider { display: none !important; }
  .stat {
    padding: 20px 20px;
    border-bottom: 1px solid var(--border);
  }
  /* в DOM: stat=1, divider=2, stat=3, divider=4, stat=5, divider=6, stat=7 */
  .stats-bar__inner > div:nth-child(1),
  .stats-bar__inner > div:nth-child(5) { border-right: 1px solid var(--border); }
  .stats-bar__inner > div:nth-child(5),
  .stats-bar__inner > div:nth-child(7) { border-bottom: none; }
  .stat__num   { font-size: 24px; }
  .stat__label { font-size: 11px; }

  /* Бенто */
  .bento__card { padding: 24px 20px; }
  .bento__card h3 { font-size: 16px; }

  /* Форма */
  .consult-inner { gap: 36px; }
  .consult-text .btn { width: 100%; justify-content: center; }

  /* Nav */
  .nav__inner { gap: 0; justify-content: space-between; }
  .nav__logo { font-size: 13px; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}
