/* =============================================================
   DOMWIT AI — лендинг v3.

   Правило палитры: фирменный цвет живёт акцентом, а не заливкой.
   Как только синий закрывает крупную площадь, страница дешевеет.
   Лайм — одна искра на экран, не больше.
   ============================================================= */

@import url("/fonts/onest.css");

:root {
  /* цвета */
  --ink:        #0E1220;
  --ink-2:      #4A5163;
  --ink-3:      #858B9C;
  --blue:       #3B49DF;
  --blue-dark:  #2A35B8;
  --lime:       #C9F24D;
  --bg:         #F5F6F8;
  --surface:    #FFFFFF;
  --line:       rgba(14,18,32,.08);
  --line-2:     rgba(14,18,32,.14);

  /* сетка */
  --wrap: 1240px;
  --gut: clamp(20px, 4vw, 40px);

  /* скругления */
  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* Одна кривая на весь сайт. Разнобой в тайминге читается как
     неаккуратность даже там, где человек не может её назвать. */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box }
html { -webkit-text-size-adjust: 100% }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none }
img { max-width: 100%; display: block }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gut);
}

/* ─── Типографика ────────────────────────────────────────────
   Главный приём: крупный кегль, средний вес, отрицательное
   межбуквенное и межстрочное меньше единицы. Строки встают
   плотным блоком — именно это читается как «дорого». */

.h1 {
  font-size: clamp(36px, 5.6vw, 76px);
  font-weight: 500;
  line-height: .94;
  letter-spacing: -.035em;
  margin: 0;
}

.h2 {
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -.03em;
  margin: 0;
}

.h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
}

.lead {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  max-width: 30ch;
}

.mono {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}

/* ─── Шапка ──────────────────────────────────────────────────
   Плавающая пилюля со стеклом: под ней движутся капли, и
   размытие превращает это в глубину, а не в помеху. */

.nav-wrap {
  position: fixed;
  top: 14px; left: 0; right: 0;
  z-index: 50;
  padding: 0 var(--gut);
  pointer-events: none;
}

.nav {
  max-width: var(--wrap);
  margin: 0 auto;
  height: 64px;
  padding: 0 10px 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 30px -12px rgba(14,18,32,.16);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  pointer-events: auto;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform .9s var(--ease), opacity .6s var(--ease);
}
.nav.in { transform: none; opacity: 1 }

.logo {
  font-size: 19px; font-weight: 700; letter-spacing: -.03em;
  display: flex; align-items: center; gap: 8px;
}
.logo i {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--lime); display: block;
  box-shadow: 0 0 0 4px rgba(201,242,77,.25);
}

.nav-menu { display: flex; gap: 26px; margin-left: 8px }
.nav-menu a {
  font-size: 14.5px; color: var(--ink-2); font-weight: 500;
  position: relative; padding: 4px 0;
  transition: color .3s var(--ease-soft);
}
.nav-menu a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: var(--ink);
  transition: right .4s var(--ease);
}
.nav-menu a:hover { color: var(--ink) }
.nav-menu a:hover::after { right: 0 }

.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 8px }

/* ─── Кнопки ─────────────────────────────────────────────────
   Пилюли. Внутри — светлое пятно, идущее за курсором: оно
   даёт ощущение отклика раньше, чем человек успевает нажать. */

.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 9px;
  height: 48px; padding: 0 24px;
  border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  border: none; cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  will-change: transform;
}
.btn span { position: relative; z-index: 2 }
.btn::before {
  content: ''; position: absolute; z-index: 1;
  width: 160px; height: 160px; border-radius: 50%;
  left: var(--mx, 50%); top: var(--my, 50%);
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%);
  transition: transform .6s var(--ease), opacity .6s var(--ease);
  opacity: 0;
}
.btn:hover::before { transform: translate(-50%, -50%) scale(1); opacity: 1 }

.btn-lime { background: var(--lime); color: var(--ink) }
.btn-lime:hover { box-shadow: 0 14px 34px -12px rgba(201,242,77,.9) }

.btn-ink { background: var(--ink); color: #fff }
.btn-ink:hover { box-shadow: 0 14px 34px -14px rgba(14,18,32,.6) }

.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink) }

.btn-lg { height: 56px; padding: 0 30px; font-size: 16px }

/* ─── Первый экран ───────────────────────────────────────────── */

.hero {
  position: relative;
  min-height: 100svh;
  padding: 118px 0 48px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}

/* Капли живут в фоне, поверх них лежит вся страница */
#goo {
  position: absolute; inset: -10%;
  z-index: 0; pointer-events: none;
  opacity: 1;
  /* Слева стоит заголовок. Капли туда не заходят: цветное пятно
     под текстом убивает читаемость быстрее любого шрифта. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 60%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 34%, #000 60%, #000 100%);
}
.hero .wrap { position: relative; z-index: 2 }

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 40px; align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 15px 0 12px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 500; color: var(--ink-2);
  margin-bottom: 26px;
}
.eyebrow i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 3px rgba(201,242,77,.3);
  animation: pulse 2.6s var(--ease-soft) infinite;
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 3px rgba(201,242,77,.3) }
  50%     { box-shadow: 0 0 0 7px rgba(201,242,77,0) }
}

/* Заголовок собирается по словам. Слово выезжает снизу из-под
   маски и на подлёте теряет размытие — движение читается как
   плавное, а не как рывок. */
/* Маска обрезает всё, что торчит ниже базовой линии — у «р», «у»,
   «д» хвосты уходили под нож. Даём запас снизу и снимаем его
   отрицательным отступом, чтобы строки не разъезжались. */
.reveal { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em }
.reveal > span {
  display: inline-block;
  transform: translateY(105%);
  filter: blur(6px);
  opacity: 0;
  transition: transform 1.05s var(--ease), filter .9s var(--ease), opacity .7s var(--ease);
}
.reveal.in > span { transform: none; filter: none; opacity: 1 }

.hero-lead { margin-top: 20px; max-width: 34ch }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap }

.hero-note {
  display: flex; gap: 22px; margin-top: 26px;
  font-size: 13.5px; color: var(--ink-3); flex-wrap: wrap;
}
.hero-note span { display: flex; align-items: center; gap: 7px }
.hero-note span::before {
  content: ''; width: 4px; height: 4px; border-radius: 50%;
  background: var(--ink-3); opacity: .5;
}

/* Появление всего, что ниже заголовка */
.up { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform 1.05s var(--ease) }
.up.in { opacity: 1; transform: none }

/* ─── Телефон ────────────────────────────────────────────────
   Картинка телефона — только корпус. Переписку рисуем поверх:
   так она оживает, а нейросеть не портит русский текст. */

.phone-stage {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  perspective: 1400px;
}


.scr-ava {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), #5C6BFF);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; color: #fff;
}
.scr-who { font-size: 12.5px; font-weight: 600; color: #fff; line-height: 1.2 }
.scr-sub { font-size: 10.5px; color: rgba(255,255,255,.45) }

.chat { flex: 1; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 8px; justify-content: flex-end }

.bub {
  max-width: 82%;
  padding: 9px 12px;
  font-size: 12.5px; line-height: 1.35;
  border-radius: 14px;
  opacity: 0; transform: translateY(10px) scale(.96);
  transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.bub.in { opacity: 1; transform: none }
.bub.them { align-self: flex-start; background: rgba(255,255,255,.1); color: #fff; border-bottom-left-radius: 5px }
.bub.me { align-self: flex-end; background: var(--lime); color: var(--ink); border-bottom-right-radius: 5px; font-weight: 500 }

.typing { display: flex; gap: 3px; padding: 11px 13px }
.typing i {
  width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.55);
  animation: dot 1.3s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s }
.typing i:nth-child(3) { animation-delay: .36s }
@keyframes dot {
  0%,60%,100% { opacity: .25; transform: translateY(0) }
  30%         { opacity: 1;   transform: translateY(-3px) }
}


/* ─── Пятно за курсором ──────────────────────────────────────
   Едва заметное. Именно оно даёт ощущение живого экрана —
   но стоит его усилить, и страница превращается в дискотеку. */
#spot {
  position: fixed; z-index: 1; pointer-events: none;
  width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,242,77,.16), transparent 66%);
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity .8s var(--ease-soft);
  mix-blend-mode: multiply;
}

/* ─── Планшет и телефон ──────────────────────────────────────── */

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 46px }
  .lead { max-width: none }
  .nav-menu { display: none }
  .hero { padding-top: 120px; min-height: auto }
}

@media (max-width: 560px) {
  .btn { height: 46px; padding: 0 20px; font-size: 14.5px }
  .btn-lg { height: 52px; padding: 0 26px; font-size: 15px }
  .hero-cta .btn { flex: 1 1 auto; justify-content: center }

  /* На 375 логотип, «Войти» и «Попробовать» в пилюлю не помещались —
     кнопка уезжала за правый край. Оставляем одно действие: войти
     можно и с формы регистрации, а обрезанная кнопка выглядит поломкой. */
  .nav { padding: 0 8px 0 18px; gap: 12px; height: 58px }
  .nav-cta .btn-ghost { display: none }
  .nav-cta .btn { height: 40px; padding: 0 16px; font-size: 14px }
}

/* Страховка от зависших переходов.
   Если вкладку открыли в фоне, браузер не проигрывает переходы,
   и блок может остаться в начальном состоянии навсегда. Класс
   ready ставится скриптом при возвращении на вкладку и снимает
   анимацию, оставляя конечный вид. */
body.ready .up { opacity: 1; transform: none; transition: none }
body.ready .reveal > span { opacity: 1; transform: none; filter: none; transition: none }

/* Уважение к настройке «уменьшить движение»: оставляем статику */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition-duration: .01ms !important }
  .reveal > span, .up { opacity: 1 !important; transform: none !important; filter: none !important }
}
