/* ============================================================
   Ensemble — дизайн-токены, типографика, компоненты, адаптив.
   Чистый ч/б монохром по product.md §8: акцент — только
   контраст, hover — тонкая инверсия.
   ============================================================ */

:root {
  /* Палитра */
  --bg-base: rgb(10, 10, 10);
  --bg-surface: rgb(18, 18, 18);
  --bg-black: rgb(0, 0, 0);
  --text: rgb(255, 255, 255);
  --text-weak: rgb(133, 133, 133);
  --text-stronger: rgb(15, 15, 15);
  --icon: rgb(255, 255, 255);
  --icon-weak: rgba(133, 133, 133, .7);
  --primary: rgb(255, 255, 255);
  --primary-20: rgba(255, 255, 255, .2);
  --border: rgba(255, 255, 255, .16);
  --border-strong: rgba(255, 255, 255, .38);
  --border-raised: rgb(255, 255, 255);

  /* Радиусы */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  /* Type */
  --font-display: "Host Grotesk", sans-serif;
  --font-body: "DM Sans", sans-serif;

  /* Motion */
  --ease-out: cubic-bezier(.12, .23, .17, .99);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar { display: none; }
body {
  background: var(--bg-base);
  color: var(--text);
  font: 400 16px/1.2 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* ---------- Text presets ---------- */
h1 {
  font: 400 56px/1 var(--font-display);
  letter-spacing: -.03em;
  color: var(--text);
}
h2 {
  font: 400 36px/1.1 var(--font-display);
  letter-spacing: -.03em;
  color: var(--text);
  text-wrap: balance;
}
h2 .weak, h1 .weak { color: var(--text-weak); }
.body-lg { font: 400 20px/1.2 var(--font-display); letter-spacing: -.02em; color: var(--text); }
.body-strong { font: 500 16px/1.2 var(--font-body); color: var(--text); }
.body-sm { font: 400 14px/1.3 var(--font-body); color: var(--text-weak); }
.body-strong-sm { font: 500 14px/1.3 var(--font-body); color: var(--text); }
p { color: var(--text-weak); }

.icon-16 { width: 16px; height: 16px; flex-shrink: 0; }
.icon-20 { width: 20px; height: 20px; flex-shrink: 0; }
.icon-24 { width: 24px; height: 24px; flex-shrink: 0; }

/* ---------- Noise overlay ---------- */
.noise {
  position: fixed;
  inset: 0;
  background: url("assets/noise.png") repeat center top;
  opacity: .12;
  pointer-events: none;
  z-index: 50;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  font: 500 16px/1.2 var(--font-body);
  white-space: nowrap;
  transition: background .3s var(--ease-out), box-shadow .3s var(--ease-out),
              color .3s var(--ease-out), border-color .3s var(--ease-out),
              transform .15s var(--ease-out);
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--primary);
  color: var(--text-stronger);
  border: 2px solid var(--primary-20);
  box-shadow: 0 0 0 0 var(--primary-20);
}
.btn-primary:hover {
  background: var(--bg-base);
  color: var(--text);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-20);
}
.btn-secondary { background: transparent; color: var(--primary); }
.btn-secondary:hover { background: var(--primary-20); }
.btn-bordered { border: 1px solid var(--border); }
.btn-sm { height: 32px; padding: 0 8px; }

/* ---------- Ghost badge ---------- */
.ghost-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 12px/1.3 var(--font-body);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-weak);
}
.ghost-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 1.5px;
  background: var(--icon-weak);
}

/* ---------- Pill badge ---------- */
.pill-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-surface);
  font: 500 14px/1.3 var(--font-body);
  color: var(--text);
}

/* ---------- Navbar ---------- */
.navbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 18px clamp(24px, 3.5vw, 48px);
}
.navbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.logo {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 4px;
  font: 400 20px/1.2 var(--font-display);
  letter-spacing: -.02em;
  color: var(--text);
}
.logo .icon-24 { color: var(--icon); }
.nav-right { justify-self: end; display: flex; align-items: center; }
.nav-cta { height: 40px; padding: 0 20px; border: 1px solid var(--border); }
.nav-cta:hover { border-color: var(--border-raised); }
.nav-menu { display: flex; align-items: center; gap: 32px; }
.nav-menu a {
  position: relative;
  font: 400 16px/1.2 var(--font-body);
  color: var(--text-weak);
  transition: color .3s var(--ease-out);
}
.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--ease-out);
}
.nav-menu a:hover { color: var(--text); }
.nav-menu a:hover::after { transform: scaleX(1); }
.hamburger { display: none; padding: 8px; color: var(--icon); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-links { display: flex; flex-direction: column; align-items: center; }
.mobile-menu-links a {
  font: 400 40px/48px var(--font-display);
  letter-spacing: -.03em;
  color: var(--text);
  padding: 4px 0;
}
.mobile-menu-close {
  position: absolute;
  bottom: 64px;
  padding: 8px;
  color: var(--icon);
}

/* ---------- Sections ---------- */
.section {
  max-width: 1128px;
  margin: 0 auto;
  padding: 96px 24px;
  scroll-margin-top: 40px;
}
.section-lg { padding: 128px 24px; }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 580px;
  margin-bottom: 40px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 160px 16px 64px;
  overflow: hidden;
  scroll-margin-top: 40px;
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  /* 540px — чтобы заголовок ложился ровно в две строки: «за четыре подписки» — 507px */
  max-width: 540px;
}
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 16px; }
/* Фирменная разрядка ключевого слова (product.md, §8) */
.hero-kicker {
  font: 500 13px/1 var(--font-body);
  text-transform: uppercase;
  color: var(--text);
  letter-spacing: .14em;
  margin-right: -.14em;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out), letter-spacing 1.6s var(--ease-out),
              margin-right 1.6s var(--ease-out);
}
.hero-kicker.is-in { opacity: 1; letter-spacing: .48em; margin-right: -.48em; }
.hero-title { text-align: center; text-wrap: balance; }
.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(4px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out);
  transition-delay: var(--wd, 0s);
}
.hero-title.is-in .word { opacity: 1; transform: none; filter: none; }
.hero-sub {
  max-width: 380px;
  text-align: center;
  color: var(--text);
  opacity: 0;
  transform: translateY(20px);
  filter: blur(10px);
  transition: opacity .7s var(--ease-out) .3s, transform .7s var(--ease-out) .3s,
              filter .7s var(--ease-out) .3s;
}
.hero-sub.is-in { opacity: 1; transform: none; filter: none; }

/* ---------- Waitlist form ---------- */
.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.waitlist-row { display: flex; gap: 8px; }
.waitlist-row input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font: 400 15px/1 var(--font-body);
  transition: border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.waitlist-row input::placeholder { color: var(--text-weak); }
.waitlist-row input:focus {
  outline: none;
  border-color: var(--border-raised);
  background: rgba(255, 255, 255, .07);
}
.waitlist-form .btn { height: 44px; padding: 0 20px; }
.waitlist-form .form-note { text-align: center; }
.waitlist-form .form-error { color: var(--text); text-align: center; }
.waitlist-form.has-error .waitlist-row input { border-color: var(--border-raised); }
.waitlist-form .form-success { text-align: center; animation: fade-up .5s var(--ease-out); }
.waitlist-form.is-done .waitlist-row,
.waitlist-form.is-done .form-note,
.waitlist-form.is-done .form-error { display: none; }
.hero-form {
  align-items: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out) .45s, transform 1s var(--ease-out) .45s;
}
.hero-form.is-in { opacity: 1; transform: none; }

/* ---------- Hero stats (соц-пруф цифрами) ---------- */
.hero-stats {
  display: flex;
  gap: 32px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s var(--ease-out) .6s, transform 1s var(--ease-out) .6s;
}
.hero-stats.is-in { opacity: 1; transform: none; }
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 120px;
  text-align: center;
}
.hero-stat + .hero-stat { border-left: 1px solid var(--border); padding-left: 32px; }
.hero-stat b {
  font: 400 28px/1 var(--font-display);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* ---------- Screen-reader only ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 70;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.hero-scroll {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 14px/1.3 var(--font-body);
  color: var(--text-weak);
}
.hero-scroll .icon-20 { color: var(--icon-weak); animation: nudge-down 2.2s ease-in-out infinite; }
@keyframes nudge-down { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute;
  inset: -10% 0;
  background: url("assets/hero-bg-gpt.webp") center/cover no-repeat;
  transform: scale(1.05);
  animation: hero-zoom 2s var(--ease-out) forwards;
  will-change: transform;
}
.hero-bg-img.ascii-ready { background-image: none; }
.hero-ascii-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Скрим: без него текст hero падает до 1.1–3.5:1 поверх фото/шейдера (WCAG 1.4.3 требует 4.5:1).
   Сильнее сверху (там светлый туман за заголовком), почти прозрачен у «кратера» внизу. */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 10, 10, .74) 0%,
    rgba(10, 10, 10, .64) 42%,
    rgba(10, 10, 10, .18) 68%,
    rgba(10, 10, 10, .42) 100%);
  pointer-events: none;
}
/* Серые подписи поверх фото — светлее обычного --text-weak, иначе тонут в тумане */
.hero .body-sm, .hero-scroll { color: #a6a6a6; }
@keyframes hero-zoom { to { transform: scale(1); } }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease-out) var(--d, 0s), transform .8s var(--ease-out) var(--d, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Feature cards ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.feature-card { display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.feature-img { height: 320px; overflow: hidden; border-radius: var(--r-sm); }
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
/* Ч/б монохром по product.md — весь визуал без цвета */
.feature-img img,
.usecase-images img,
.usecase-group::before,
.hiw-images img,
.cta-bg { filter: grayscale(1) contrast(1.05); }
.feature-texts { display: flex; flex-direction: column; gap: 4px; }
.feature-texts p { max-width: 80%; }

/* ---------- Use cases ---------- */
.usecases { display: flex; flex-direction: column; gap: 24px; }
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 8px 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font: 400 16px/1.2 var(--font-body);
  color: var(--text-weak);
  transition: color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.tab:hover, .tab.is-active { color: var(--text); border-color: var(--border-raised); }
.tab.is-active { font-weight: 500; }
.usecase-body {
  display: flex;
  align-items: center;
  gap: 48px;
  min-height: 380px;
}
.usecase-images {
  position: relative;
  flex: 1;
  align-self: stretch;
  min-height: 380px;
  overflow: hidden;
  border-radius: var(--r-sm);
}
.usecase-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.usecase-images img.is-active { opacity: 1; }
.usecase-right { flex: 1; display: flex; flex-direction: column; align-items: center; }
.usecase-group {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
  max-width: 400px;
}
.usecase-group.is-active { display: flex; animation: fade-up .5s var(--ease-out); }
@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } }
.usecase-texts { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.carousel-dots { display: none; justify-content: center; gap: 10px; }
.carousel-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--icon);
  opacity: .3;
  transition: opacity .3s;
}
.carousel-dots i.is-active { opacity: 1; }

/* ---------- How it works ---------- */
.hiw { display: flex; align-items: center; gap: 48px; min-height: 400px; }
.hiw-images {
  position: relative;
  flex: 1;
  align-self: stretch;
  min-height: 400px;
  overflow: hidden;
  border-radius: var(--r-sm);
}
.hiw-images img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease-out);
}
.hiw-images img.is-active { opacity: 1; }
.hiw-steps {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  max-width: 400px;
  padding: 8px 0 8px 16px;
  border-left: 2px solid var(--border);
  text-align: left;
  transition: border-color .3s var(--ease-out), background-color .3s var(--ease-out);
}
.step.is-active {
  border-color: var(--border-raised);
  background-color: rgba(255, 255, 255, .04);
}
.step-title { display: flex; align-items: center; gap: 16px; }
.step-title .icon-24 { color: var(--icon); }
.step-text {
  padding-left: 40px;
  font: 400 16px/1.2 var(--font-body);
  color: var(--text-weak);
  text-wrap: balance;
}

/* ---------- Benefits ---------- */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.benefit-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--icon);
}
.benefit-text { display: flex; flex-direction: column; gap: 8px; }
.benefit-text p { text-wrap: balance; }

/* ---------- Реестр моделей: ruled-список, весь состав виден сразу ---------- */
.model-index { border-bottom: 1px solid var(--border); }
.mrow {
  display: grid;
  grid-template-columns: minmax(250px, 5fr) 7fr;
  gap: 16px 48px;
  align-items: center;
  padding: 26px 20px;
  border-top: 1px solid var(--border);
  transition: background .3s var(--ease-out);
}
.mrow:hover { background: rgba(255, 255, 255, .03); }
.mrow-id { display: flex; align-items: center; gap: 20px; }
/* Единственный цвет на странице — фирменные логотипы моделей при hover (product.md §8) */
.mrow-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  filter: grayscale(1) opacity(.55);
  transition: filter .3s var(--ease-out);
}
.mrow:hover .mrow-logo { filter: none; }
.mrow-name { display: flex; flex-direction: column; gap: 4px; }
.mrow-name h3 {
  font: 400 28px/1.1 var(--font-display);
  letter-spacing: -.02em;
  color: var(--text);
}
.mrow-text { max-width: 560px; text-wrap: pretty; }
.mrow-text .weak { color: var(--text-weak); transition: color .3s var(--ease-out); }
.mrow:hover .mrow-text .weak { color: #a9a9a9; }
.mrow-gens { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.mitem {
  display: flex;
  align-items: center;
  gap: 12px;
  filter: grayscale(1) opacity(.55);
  transition: filter .3s var(--ease-out);
}
.mitem:hover { filter: none; }
.mitem svg { height: 26px; width: auto; }
.mmark { position: relative; display: inline-flex; }
.mitem svg.mbadge {
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 15px;
  height: 15px;
}
.mword {
  font: 500 17px/1 var(--font-display);
  letter-spacing: -.01em;
  white-space: nowrap;
  color: var(--text);
}

/* ---------- Pricing ---------- */
.pricing { display: flex; flex-direction: column; gap: 32px; }
.pricing-toggle-row { display: flex; align-items: center; gap: 16px; }
.toggle-label { color: var(--text-weak); transition: color .3s; }
.toggle-label.is-active { color: var(--text); }
.toggle {
  position: relative;
  width: 48px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 48px;
  transition: background .3s var(--ease-out);
}
.toggle i {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
  transition: left .3s var(--ease-out);
}
.toggle[aria-checked="true"] { background: rgba(255, 255, 255, .12); }
.toggle[aria-checked="true"] i { left: 26px; }
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.plan-popular {
  background: var(--bg-surface);
  border-color: var(--border-strong);
}
.plan-popular .pill-badge {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-stronger);
}
.plan-head { display: flex; flex-direction: column; gap: 16px; }
.plan-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 30px;
}
.plan-price-row { display: flex; align-items: flex-end; gap: 4px; }
.plan-price {
  font: 400 36px/1.1 var(--font-display);
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.plan-per { padding-bottom: 2px; }
.plan-desc { max-width: 90%; min-height: 2.6em; }
.plan .btn { align-self: stretch; }
.plan-divider { display: flex; align-items: center; gap: 12px; }
.plan-divider i { flex: 1; height: 1px; background: var(--border); }
.plan-features { display: flex; flex-direction: column; gap: 12px; }
.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 400 14px/1.3 var(--font-body);
  color: var(--text-weak);
}
.plan-features .icon-16 { color: var(--icon); }

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 40px;
  align-items: start;
  counter-reset: faq;
}
.faq-col { display: flex; flex-direction: column; }
.faq-item {
  counter-increment: faq;
  border-top: 1px solid var(--border);
}
.faq-col .faq-item:last-child { border-bottom: 1px solid var(--border); }
.faq-q {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 4px;
  text-align: left;
}
.faq-q::before {
  content: counter(faq, decimal-leading-zero);
  min-width: 24px;
  font: 500 12px/1 var(--font-body);
  letter-spacing: .08em;
  color: var(--text-weak);
}
.faq-q .body-strong { flex: 1; }
.faq-q .icon-16 {
  color: var(--icon-weak);
  transition: transform .3s var(--ease-out), color .3s var(--ease-out);
}
.faq-q:hover .icon-16 { color: var(--icon); }
.faq-item.is-open .faq-q .icon-16 { transform: rotate(45deg); color: var(--icon); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease-out);
}
.faq-a > p {
  overflow: hidden;
  max-width: 85%;
  padding: 0 4px 0 44px;
  opacity: 0;
  transition: opacity .3s var(--ease-out), padding .35s var(--ease-out);
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a > p { opacity: 1; padding: 0 4px 20px 44px; }

/* ---------- Final CTA ---------- */
.section-cta {
  max-width: 1128px;
  margin: 0 auto;
  padding: 48px 24px;
  scroll-margin-top: 40px;
}
.cta-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 360px;
  padding: 48px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.cta-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 440px;
}
.cta-text { display: flex; flex-direction: column; gap: 12px; }
.cta-text p { color: var(--text); }
.cta-content .btn { align-self: flex-start; }
.cta-bg {
  position: absolute;
  inset: 0;
  background: url("assets/cta-bg-gpt.webp") center/cover no-repeat;
  z-index: 1;
}
.cta-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Скрим слева под текстом CTA: без него белый текст на тумане ~3:1 (нужно 4.5:1).
     Справа почти прозрачен — «дверь» на фото остаётся яркой. */
  background:
    linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 52%, rgba(0,0,0,.08) 100%),
    linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,.5) 100%);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 80px 24px 32px;
}
.footer-inner { max-width: 1128px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr .9fr .9fr;
  gap: 48px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.footer-brand p { max-width: 260px; }
.footer-socials { display: flex; gap: 8px; margin-top: 8px; }
.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--icon);
  transition: background .3s var(--ease-out), color .3s var(--ease-out),
              border-color .3s var(--ease-out);
}
.footer-socials a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-stronger);
}
.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.footer-col .ghost-badge { margin-bottom: 6px; }
.footer-col a {
  position: relative;
  width: fit-content;
  font: 400 16px/1.2 var(--font-body);
  color: var(--text-weak);
  transition: color .3s var(--ease-out);
}
.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.footer-col a:hover { color: var(--text); }
.footer-col a:hover::after { transform: scaleX(1); }
.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-weak);
  transition: color .3s var(--ease-out);
}
.footer-top-link svg { transform: rotate(180deg); transition: transform .3s var(--ease-out); }
.footer-top-link:hover { color: var(--text); }
.footer-top-link:hover svg { transform: rotate(180deg) translateY(2px); }
/* ASCII-«ENSEMBLE» — эхо ASCII-шейдера hero, закрывает страницу.
   Ширина арта 91 знак; font-size подобран так, чтобы блок
   заполнял контейнер (91 × ~0.6em ≈ 1128px при 20px). */
.footer-ascii {
  width: fit-content;
  margin: clamp(64px, 9vw, 112px) auto 0;
  font: 400 clamp(5.5px, 1.68vw, 20px)/1.15 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: rgba(255, 255, 255, .3);
  user-select: none;
  transition: color .3s var(--ease-out);
}
.footer-ascii:hover { color: rgba(255, 255, 255, .55); }
.footer-ascii span { display: block; }
/* Reveal: контейнер статичен, строки арта поднимаются каскадом (--d на каждой) */
.footer-ascii.reveal { opacity: 1; transform: none; transition: color .3s var(--ease-out); }
.footer-ascii.reveal span {
  opacity: 0;
  transform: translateY(60%);
  transition: transform .7s var(--ease-out) var(--d, 0s),
              opacity .7s var(--ease-out) var(--d, 0s);
}
.footer-ascii.reveal.is-in span { opacity: 1; transform: none; }

/* ============================================================
   Tablet — 810..1199
   ============================================================ */
@media (max-width: 1199.98px) {
  .nav-menu, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .navbar-inner { display: flex; justify-content: space-between; }

  .feature-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature-img { height: 420px; }

  .usecase-body { flex-direction: column; align-items: stretch; gap: 24px; }
  .usecase-images { min-height: 320px; }
  .usecase-right { align-items: flex-start; }

  .hiw { flex-direction: column; align-items: stretch; gap: 24px; }
  .hiw-images { min-height: 320px; }
  .hiw-steps { align-items: flex-start; }
  .step { max-width: none; }

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

  .mrow { grid-template-columns: minmax(220px, 2fr) 3fr; gap: 16px 32px; }

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

/* ============================================================
   Phone — <=809
   ============================================================ */
@media (max-width: 809.98px) {
  h1 { font-size: 40px; line-height: 48px; }
  h2 { font-size: 32px; line-height: 1.2; }

  .section { padding: 64px 16px; }
  .section-lg { padding: 80px 16px; }
  .hero { padding: 140px 16px 64px; }

  .feature-img { height: 280px; }

  /* Use cases -> carousel */
  .tabs { display: none; }
  .usecase-body {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .usecase-body::-webkit-scrollbar { display: none; }
  .usecase-images { display: none; }
  .usecase-right { flex: none; display: contents; }
  .usecase-group {
    display: flex;
    flex: 0 0 100%;
    scroll-snap-align: center;
    max-width: none;
  }
  .usecase-group::before {
    content: "";
    display: block;
    width: 100%;
    height: 280px;
    background: var(--uc-img) center/cover no-repeat;
    border-radius: var(--r-sm);
    margin-bottom: 0;
  }
  .carousel-dots { display: flex; }

  .hiw-images { min-height: 240px; }

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

  .mrow { grid-template-columns: 1fr; gap: 12px; padding: 22px 8px; }
  .mrow-id { gap: 16px; }
  .mrow-logo { width: 30px; height: 30px; }
  .mrow-name h3 { font-size: 24px; }
  .mrow-gens { gap: 14px 28px; }
  .mitem { gap: 9px; }
  .mitem svg { height: 22px; }
  .mitem svg.mbadge { width: 12px; height: 12px; right: -5px; bottom: -3px; }
  .mword { font-size: 15px; }

  .faq-grid { grid-template-columns: 1fr; gap: 0; }
  .faq-col + .faq-col .faq-item:first-child { border-top: 0; }

  .cta-card { padding: 32px 24px; min-height: 420px; }

  .footer { padding: 64px 16px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 48px;
  }
  .footer-ascii { margin-top: 56px; }

  .hero-stats { gap: 16px; }
  .hero-stat + .hero-stat { padding-left: 16px; }
  .hero-stat b { font-size: 24px; }
}

/* ============================================================
   Small phone — <=480
   ============================================================ */
@media (max-width: 480px) {
  .waitlist-row { flex-direction: column; }
  .waitlist-row input { width: 100%; }
  .waitlist-form .btn { width: 100%; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
