/* Aroken — «Нейросети для разработчиков»: первый экран «Промпт → сайт».
   Только ai.html. Тёмно-фиолетовая сцена во всю ширину контейнера (1440 / 1680 / 2080 — от .hero__inner),
   по центру заголовок и поле ввода, ниже нейросеть собирает превью сайта. Логика — js/hero-ai.js. */

/* ---------- Сцена ---------- */
.hero.aih { padding: clamp(20px, 5.6vh, 48px) 0 80px; } /* как у главной и флагмана: 48 сверху, 80 снизу; на низких экранах сверху меньше — демо в первом кадре */
.aih .aih__inner { display: block; }

.aih__stage {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  padding: clamp(26px, 4vh, 60px) 40px clamp(32px, 4.4vh, 56px);
  border-radius: 32px;
  border: 1px solid rgba(184, 163, 255, .16);
  background:
    radial-gradient(58% 40% at 50% 0%, rgba(184, 163, 255, .2), rgba(184, 163, 255, 0) 72%),
    radial-gradient(44% 34% at 50% 64%, rgba(117, 87, 255, .26), rgba(117, 87, 255, 0) 72%),
    radial-gradient(34% 44% at 0% 100%, rgba(115, 214, 255, .07), rgba(115, 214, 255, 0) 70%),
    linear-gradient(180deg, #1A1433 0%, #140F28 46%, #100C20 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -50px rgba(0, 0, 0, .9);
}
/* точечная сетка — только в центре сцены, к краям растворяется */
.aih__stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(214, 204, 255, .16) 1px, rgba(214, 204, 255, 0) 1.4px);
  background-size: 26px 26px; background-position: 13px 13px;
  -webkit-mask-image: radial-gradient(64% 58% at 50% 46%, #000 10%, rgba(0, 0, 0, 0) 78%);
  mask-image: radial-gradient(64% 58% at 50% 46%, #000 10%, rgba(0, 0, 0, 0) 78%);
}

/* Ширина колонки демо и размер 3D-плиток считаются от ширины сцены (cqw): плитки живут в полях по бокам от поля ввода */
.aih__body {
  position: relative;
  --demo-w: clamp(600px, 100cqw - 340px, 860px);
  --gut: calc((100cqw - var(--demo-w)) / 2);
  --ts: clamp(64px, var(--gut) * .6, 172px);
}

/* ---------- Заголовок, лид, заявка ---------- */
.aih__head { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.aih__status { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 20px; }
.aih__badge { height: 34px; padding: 0 16px; gap: 9px; font-size: 14px; color: #fff; background: rgba(184, 163, 255, .1); border: 1px solid rgba(184, 163, 255, .3); }
.aih__badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(184, 163, 255, .18), 0 0 12px rgba(184, 163, 255, .9); }
.aih__start { font-size: 14px; color: rgba(226, 220, 255, .62); }
.aih__title { margin-top: clamp(14px, 2.2vh, 24px); font-size: clamp(36px, min(3.9vw, 7vh), 64px); line-height: 1.04; font-weight: 700; letter-spacing: -.026em; text-wrap: balance; }
.aih__spark { display: inline-block; color: var(--violet); font-size: .5em; font-weight: 600; vertical-align: .42em; }
.aih__lead { margin-top: clamp(10px, 1.6vh, 18px); max-width: 620px; font-size: 18px; line-height: 27px; color: rgba(232, 227, 255, .72); text-wrap: balance; }
.aih__cta { margin-top: clamp(18px, 3vh, 30px); display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 22px; }
.aih__proof { text-align: left; }
.aih__proof .avatars img { border-color: #1B1535; }
.aih__proof .hero__proof-text { color: #fff; }

/* ---------- Демо: поле ввода ---------- */
.aih__demo { position: relative; width: min(100%, var(--demo-w)); margin: clamp(26px, 4.2vh, 48px) auto 0; }
.aih__prompt {
  position: relative; z-index: 1;
  padding: 16px 12px 12px 20px;
  border-radius: 22px;
  border: 1px solid rgba(184, 163, 255, .3);
  background: linear-gradient(180deg, rgba(46, 37, 80, .94), rgba(29, 23, 52, .96));
  box-shadow: 0 0 0 6px rgba(184, 163, 255, .06), 0 30px 70px -30px rgba(98, 64, 230, .75), inset 0 1px 0 rgba(255, 255, 255, .09);
  transition: border-color .25s, box-shadow .25s;
}
.aih__prompt:focus-within { border-color: rgba(184, 163, 255, .64); box-shadow: 0 0 0 6px rgba(184, 163, 255, .13), 0 30px 70px -30px rgba(98, 64, 230, .85), inset 0 1px 0 rgba(255, 255, 255, .1); }
.aih__prompt.is-shake { animation: aih-shake .42s var(--ease); }
.aih__field { position: relative; }
.aih__input, .aih__ghost { font: 500 18px/27px var(--font); letter-spacing: -.01em; padding: 0 8px 0 0; white-space: pre-wrap; overflow-wrap: break-word; text-align: left; }
.aih__input { display: block; width: 100%; min-height: 27px; max-height: 108px; margin: 0; border: 0; border-radius: 0; outline: 0; resize: none; overflow-y: auto; background: transparent; color: #fff; caret-color: var(--violet); scrollbar-width: thin; }
.aih__input::placeholder { color: rgba(226, 220, 255, .42); }
.aih__input:focus-visible { outline: none; }
.aih__ghost { position: absolute; inset: 0; display: none; color: #fff; pointer-events: none; }
.aih.is-ghost .aih__ghost { display: block; }
.aih.is-ghost .aih__input { color: transparent; }
.aih.is-ghost .aih__input::placeholder { color: transparent; }
.aih__caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -.16em; border-radius: 1px; background: var(--violet); animation: aih-blink 1s steps(1) infinite; }
.aih__bar { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.aih__hint { min-width: 0; font-size: 13.5px; line-height: 18px; color: rgba(226, 220, 255, .56); text-align: left; }
.aih__send {
  position: relative; flex: none; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--violet); color: #150F2B; cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(184, 163, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .55);
  transition: transform .3s var(--spring), background .2s, box-shadow .2s;
}
.aih__send:hover { background: #CBBCFF; transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(184, 163, 255, .95), inset 0 1px 0 rgba(255, 255, 255, .55); }
.aih__send:active, .aih__send.is-press { transform: scale(.88); }
.aih__send:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 50%; }
.aih__send-arrow { transition: opacity .2s, transform .3s var(--spring); }
.aih__send:hover .aih__send-arrow { transform: translateY(-1px); }
.aih__send-spin { position: absolute; inset: 12px; border-radius: 50%; border: 2px solid rgba(21, 15, 43, .22); border-top-color: #150F2B; opacity: 0; transition: opacity .2s; }
.aih.is-busy .aih__send { cursor: progress; }
.aih.is-busy .aih__send-arrow { opacity: 0; }
.aih.is-busy .aih__send-spin { opacity: 1; animation: aih-spin .8s linear infinite; }

/* ---------- Ответ модели: статус ---------- */
.aih__log { display: flex; align-items: center; gap: 10px; min-height: 22px; margin: 14px 0 0 20px; font: 400 13px/20px var(--mono); color: rgba(226, 220, 255, .74); text-align: left; transition: opacity .3s, visibility .3s; }
.aih__log-ico { flex: none; display: inline-block; color: var(--violet); font: 600 15px/1 var(--font); }
.aih.is-busy .aih__log-ico { animation: aih-spin 2.4s linear infinite; }
.aih.is-busy .aih__log-text {
  background: linear-gradient(90deg, rgba(226, 220, 255, .5) 0%, #fff 30%, rgba(226, 220, 255, .5) 60%) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: aih-shimmer 1.4s linear infinite;
}

/* ---------- Превью сайта ---------- */
.aih__preview { container-type: inline-size; margin-top: 12px; border-radius: 16px; overflow: hidden; text-align: left; background: #110D20; border: 1px solid rgba(184, 163, 255, .2); box-shadow: 0 36px 80px -36px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05); }
.aih__chrome { height: 32px; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: rgba(255, 255, 255, .035); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.aih__dots { display: flex; gap: 6px; }
.aih__dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.aih__url { height: 20px; padding: 0 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); font: 400 11px/20px var(--mono); color: rgba(255, 255, 255, .56); white-space: nowrap; }

/* --sa / --sa-soft — акцент превью, ставит js/hero-ai.js под каждую пасхалку */
.aih__site { --sa: #17181C; --sa-soft: rgba(23, 24, 28, .06); position: relative; isolation: isolate; height: 226px; padding: 14px 22px 20px; overflow: hidden; color: #17181C; background: radial-gradient(130% 96% at 92% -14%, var(--sa-soft), transparent 58%), linear-gradient(135deg, #FEFDF9 2%, #F9F6EF 55%, #ECE6DB 96%); }
/* «Сырая» разметка до стилей: белый лист, Times и синие ссылки — «добавляю стили…» снимает этот слой */
.aih__site::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #fff; opacity: 0; transition: opacity .6s var(--ease); }
.aih__site.is-raw::before { opacity: 1; }
.aih__site.is-raw { font-family: "Times New Roman", Times, serif; }

.aih__s-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 30px; }
.aih__brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.aih__logo { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sa, #17181C); color: #FBF7EF; transition: background .5s, color .5s; }
.aih__nav { display: flex; gap: 18px; font-size: 12px; font-weight: 500; color: rgba(23, 24, 28, .62); transition: color .5s; }
.aih__site:not(.is-raw) .aih__nav span:first-child { color: var(--sa, #17181C); font-weight: 600; }
.aih__s-main { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 20px; align-items: center; }
.aih__s-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.aih__s-title { min-height: 2.16em; font-size: 25px; line-height: 1.08; font-weight: 700; letter-spacing: -.03em; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.aih__site.is-long .aih__s-title { font-size: 19px; line-height: 1.12; min-height: 3.36em; }
.aih__s-title.is-typing::after { content: ""; display: inline-block; width: 2px; height: .9em; margin-left: 2px; vertical-align: -.08em; background: currentColor; animation: aih-blink 1s steps(1) infinite; }
.aih__s-addr { margin-top: 10px; display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: rgba(23, 24, 28, .6); }
.aih__s-addr svg { flex: none; color: var(--sa, #17181C); }
.aih__s-btn { margin-top: 16px; display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border-radius: 999px; background: var(--sa, #17181C); color: #FBF7EF; font-size: 12.5px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; box-shadow: 0 10px 20px -12px color-mix(in srgb, var(--sa, #17181C) 78%, transparent); }
.aih__menu { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.aih__card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; padding: 12px; border-radius: 14px; background: rgba(255, 255, 255, .74); border: 1px solid rgba(23, 24, 28, .08); box-shadow: 0 10px 20px -14px rgba(60, 40, 20, .4); }
.aih__card-ico { width: 36px; height: 36px; margin-bottom: 14px; border-radius: 10px; display: grid; place-items: center; background: var(--sa-soft, #F1E6D6); color: var(--sa, #6E4A2E); }
.aih__card b { max-width: 100%; font-size: 13px; line-height: 17px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aih__card small { font-size: 12px; line-height: 16px; color: rgba(23, 24, 28, .56); white-space: nowrap; }
/* до стилей */
.aih__site.is-raw .aih__logo { background: transparent; color: #000; }
.aih__site.is-raw .aih__nav { color: #0000EE; font-size: 13px; }
.aih__site.is-raw .aih__nav span { text-decoration: underline; }
.aih__site.is-raw .aih__s-title { letter-spacing: 0; }
.aih__site.is-raw .aih__s-addr { color: #000; }

/* Дефолтный сгенерированный сайт — в духе Apple: плоский белый лист, чёрный плотный заголовок, тонкая серая навигация,
   синяя pill-кнопка, светло-серые карточки. Класс ставит js/hero-ai.js для темы landing (apple: true); «сырая» фаза не трогается */
.aih__site.is-apple { background: #fff; color: #1D1D1F; }
.aih__site.is-apple:not(.is-raw) .aih__logo { background: #1D1D1F; color: #fff; }
.aih__site.is-apple:not(.is-raw) .aih__nav { gap: 20px; font-size: 12px; font-weight: 400; letter-spacing: -.01em; color: #6E6E73; }
.aih__site.is-apple:not(.is-raw) .aih__nav span:first-child { color: #1D1D1F; font-weight: 500; }
.aih__site.is-apple:not(.is-raw) .aih__s-title { font-weight: 600; letter-spacing: -.04em; color: #1D1D1F; }
.aih__site.is-apple:not(.is-raw) .aih__s-addr { color: #6E6E73; }
.aih__site.is-apple:not(.is-raw) .aih__s-addr svg { color: #0071E3; }
.aih__site.is-apple:not(.is-raw) .aih__s-btn { background: #0071E3; color: #fff; font-weight: 500; letter-spacing: 0; box-shadow: none; }
.aih__site.is-apple .aih__card { background: #F5F5F7; border-color: transparent; box-shadow: none; }
.aih__site.is-apple .aih__card-ico { background: #fff; color: #1D1D1F; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.aih__site.is-apple .aih__card small { color: #6E6E73; }

/* 3D-товар (js/hero-ai-3d.js, three.js) — правая колонка сгенерированного сайта, когда тема просит модель: .is-3d ставит js/hero-ai.js
   только при живом WebGL. Карточки при этом становятся строкой чипов под кнопкой, адрес прячется; без класса — обычная раскладка */
.aih__s-stage { display: none; position: relative; min-width: 0; min-height: 0; }
/* канвас выходит за сцену: сверху до низа навигации, снизу почти до края окна — модель крупная, как на продуктовой странице, но не режется */
.aih__s-canvas { position: absolute; left: -6%; top: -10%; width: 112%; height: 126%; display: block; }
.aih__site.is-3d .aih__s-main { grid-template-rows: auto auto; row-gap: 0; align-items: start; }
.aih__site.is-3d .aih__s-copy { grid-column: 1; grid-row: 1; }
/* высота сцены фиксирована (заголовок + кнопка + строка чипов = 140), а не тянется за рядами: если чипы перенесутся, модель не уедет под низ окна */
.aih__site.is-3d .aih__s-stage { display: block; grid-column: 2; grid-row: 1 / 3; align-self: start; height: 140px; }
.aih__site.is-3d .aih__menu { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.aih__site.is-3d .aih__card { flex-direction: row; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 5px; border-radius: 999px; }
.aih__site.is-3d .aih__card-ico { width: 16px; height: 16px; margin: 0; border-radius: 50%; background: transparent; box-shadow: none; }
.aih__site.is-3d .aih__card-ico svg { width: 13px; height: 13px; }
.aih__site.is-3d .aih__card b { font-size: 11.5px; line-height: 16px; }
.aih__site.is-3d .aih__card small { display: none; }

/* Продуктовый hero в духе страницы ноутбука Apple (.is-mac ставит js/hero-ai.js для темы laptop): небесный градиент, имя продукта над
   заголовком, заголовок градиентом, оранжевая строка про чип, цена в pill с синей кнопкой; чипов и адреса нет — справа большой 3D-ноутбук */
.aih__s-eyebrow, .aih__s-sub, .aih__s-price { display: none; }
.aih__s-eyebrow[hidden], .aih__s-sub[hidden], .aih__s-price[hidden] { display: none !important; }
.aih__s-pill { display: contents; }
.aih__site.is-mac { background: linear-gradient(180deg, #E2EDF8 0%, #F2F7FC 58%, #FFFFFF 100%); }
.aih__site.is-mac .aih__s-eyebrow { display: block; font-size: 13px; line-height: 16px; font-weight: 600; letter-spacing: -.01em; color: #1D1D1F; }
.aih__site.is-mac .aih__s-title { margin-top: 2px; min-height: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.045em; -webkit-line-clamp: 2; }
.aih__site.is-mac:not(.is-raw) .aih__s-title { background: linear-gradient(90deg, #1D1D1F 0%, #2C4E86 55%, #5E93DA 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.aih__site.is-mac:not(.is-raw) .aih__s-title.is-typing::after { background: #1D1D1F; }
.aih__site.is-mac .aih__s-sub { display: block; margin-top: 4px; font-size: 12.5px; line-height: 16px; font-weight: 500; color: #BF4800; }
.aih__site.is-mac .aih__s-pill { display: inline-flex; align-items: center; gap: 12px; margin-top: 12px; padding: 5px 5px 5px 14px; border-radius: 999px; background: rgba(29, 29, 31, .06); }
.aih__site.is-mac .aih__s-price { display: block; font-size: 11.5px; line-height: 14px; white-space: pre-line; color: #1D1D1F; }
.aih__site.is-mac .aih__s-pill .aih__s-btn { margin-top: 0; height: 30px; padding: 0 13px; font-size: 12px; }
.aih__site.is-mac.is-3d .aih__menu { display: none; } /* без WebGL (.is-mac без .is-3d) карточки остаются в правой колонке — окно не пустует */
.aih__site.is-mac .aih__s-canvas { left: -14%; top: -10%; width: 128%; height: 124%; } /* верх крышки в 6 px под строкой навигации, низ — в отступе окна (по 6–7 px запаса с покачиванием) */

/* Шаги сборки: JS добавляет .is-js и показывает блоки по очереди. Если скрипт не загрузился — через 3 с всё видно само */
.aih__site [data-step] { transition: opacity .45s var(--ease), transform .6s var(--spring); }
.aih.is-js .aih__site [data-step]:not(.is-in) { opacity: 0; transform: translateY(10px) scale(.97); }
.aih.is-js .aih__site [data-step="head"]:not(.is-in) { transform: translateY(-8px); }
.aih.is-js .aih__site [data-step="title"]:not(.is-in) { transform: none; }
.aih.is-js.is-idle .aih__log { opacity: 0; visibility: hidden; }
/* Пока задача печатается — пустое окно со скелетом будущей страницы: те же блоки, только без текста */
.aih__url:empty { display: none; }
.aih.is-js.is-idle .aih__site::before { opacity: 1; background: #18132D; }
.aih.is-js.is-idle .aih__site [data-step] { opacity: 1; transform: none; }
.aih.is-js.is-idle .aih__site svg { opacity: 0; }
.aih.is-js.is-idle :is(.aih__logo, [data-aih="brand"], .aih__nav span, .aih__s-title, .aih__s-addr, .aih__s-btn, .aih__card-ico, .aih__card b, .aih__card small) {
  color: transparent; background: rgba(214, 204, 255, .09); border-radius: 6px; box-shadow: none; text-decoration: none;
  animation: aih-pulse 1.4s ease-in-out infinite alternate;
}
.aih.is-js.is-idle .aih__logo { border-radius: 50%; }
.aih.is-js.is-idle .aih__s-btn { border-radius: 999px; }
.aih.is-js.is-idle .aih__card { background: rgba(214, 204, 255, .035); border-color: rgba(214, 204, 255, .08); box-shadow: none; }
@media (scripting: enabled) {
  .aih:not(.is-js) .aih__site [data-step], .aih:not(.is-js) .aih__log { opacity: 0; animation: aih-fallback .3s 3s forwards; }
  .aih:not(.is-js) .aih__input { color: transparent; animation: aih-fallback-text .3s 3s forwards; } /* пример в поле ждёт скрипт — он напечатает его сам */
}

/* ---------- 3D-плитки ---------- */
.aih__tiles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.aih__tile { position: absolute; display: block; width: var(--ts); aspect-ratio: 1; }
.aih__tile.is-off { visibility: hidden; }
.aih__tile-par { display: block; width: 100%; height: 100%; }
.aih__tile img {
  display: block; width: 100%; height: 100%;
  filter: drop-shadow(0 22px 26px rgba(8, 4, 26, .6));
  transform: rotate(var(--r, 0deg));
  animation: aih-tile-in .9s var(--spring) var(--in, .2s) both, aih-float var(--dur, 7s) ease-in-out calc(var(--in, .2s) + .9s) infinite alternate;
}
.aih.is-away .aih__tile img { animation-play-state: paused; }
/* в полях по бокам от поля ввода: ChatGPT слева выше поля, Claude справа на его уровне, Cursor слева у превью */
.aih__tile--gpt { left: calc(var(--gut) / -2 - var(--ts) / 2); top: calc(var(--ts) * -.66); --r: -8deg; --dur: 6.4s; --in: .25s; }
.aih__tile--claude { width: calc(var(--ts) * .9); left: calc(100% + var(--gut) / 2 - var(--ts) * .45); top: calc(var(--ts) * .16); --r: 9deg; --dur: 7.6s; --in: .4s; }
.aih__tile--cursor { width: calc(var(--ts) * .76); left: calc(var(--gut) / -2 - var(--ts) * .38 + var(--gut) * .1); top: calc(190px + var(--ts) * .3); --r: 6deg; --dur: 8.2s; --in: .55s; }

/* ---------- Широкие мониторы ---------- */
@media (min-width: 1800px) {
  .aih__body { --demo-w: clamp(600px, 100cqw - 420px, 920px); --ts: clamp(64px, var(--gut) * .56, 196px); }
  .aih__title { font-size: clamp(56px, min(3.7vw, 7vh), 76px); }
  .aih__lead { max-width: 680px; font-size: 20px; line-height: 30px; }
  .aih__site { height: 244px; padding: 16px 26px 22px; }
  .aih__s-title { font-size: 28px; }
  .aih__site.is-3d .aih__s-stage { height: 156px; }
}
@media (min-width: 2400px) {
  .aih__body { --demo-w: clamp(600px, 100cqw - 520px, 1040px); --ts: clamp(64px, var(--gut) * .5, 230px); }
  .aih__title { font-size: clamp(64px, min(3.4vw, 7vh), 88px); }
  .aih__lead { max-width: 760px; font-size: 22px; line-height: 33px; }
  .aih__input, .aih__ghost { font-size: 20px; line-height: 30px; }
  .aih__input { min-height: 60px; max-height: 120px; }
}

/* ---------- 1024–1279: компактнее, плитки меньше ---------- */
@media (max-width: 1279px) {
  .aih__stage { padding-left: 32px; padding-right: 32px; border-radius: 28px; }
  .aih__lead { font-size: 17px; line-height: 26px; }
}

/* ---------- < 1024: сцена колонкой, плитки мелко по верхним углам ---------- */
@media (max-width: 1023px) {
  .aih__body { --demo-w: 100%; --ts: 60px; }
  .aih__title { max-width: 11.5em; font-size: clamp(34px, 5.4vw, 50px); } /* в две строки: верхние углы сцены остаются плиткам */
  .aih__demo { position: static; } /* плитки отсчитываются от всей сцены, а не от поля */
  .aih__tile--gpt { left: -6px; top: -12px; width: 60px; }
  .aih__tile--claude { left: auto; right: -6px; top: -8px; width: 54px; }
  .aih__tile--cursor { display: none; }
}
@media (max-width: 767px) {
  .hero.aih { padding: 8px 0 40px; }
  .aih__stage { padding: 26px 16px 16px; border-radius: 24px; }
  .aih__stage::before { background-size: 22px 22px; }
  .aih__body { --ts: 46px; }
  .aih__tile--gpt { left: -4px; top: -10px; width: 46px; }
  .aih__tile--claude { right: -4px; top: -8px; width: 42px; }
  .aih__status { flex-direction: column; gap: 8px; }
  .aih__title { margin-top: 16px; font-size: clamp(30px, 9vw, 40px); line-height: 1.06; }
  .aih__lead { font-size: 16px; line-height: 24px; }
  .aih__cta { gap: 16px 18px; }
  .aih__demo { margin-top: 28px; }
  .aih__prompt { padding: 14px 10px 10px 16px; border-radius: 18px; }
  .aih__input, .aih__ghost { font-size: 16px; line-height: 24px; }
  .aih__input { min-height: 48px; max-height: 120px; }
  .aih__hint { font-size: 12px; line-height: 16px; }
  .aih__log { align-items: flex-start; margin-left: 14px; font-size: 12px; line-height: 18px; }
  .aih__log-ico { margin-top: 2px; }
  .aih__preview { border-radius: 14px; }
}
@media (max-width: 379px) {
  .aih__title { font-size: 30px; }
  .aih__hint { line-height: 15px; }
}

/* 541–700 px: карточки меню компактнее, чтобы названия не резались */
@container (min-width: 541px) and (max-width: 700px) {
  .aih__site { padding-left: 18px; padding-right: 18px; }
  .aih__s-main { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 14px; }
  .aih__s-title { font-size: 23px; }
  .aih__menu { gap: 8px; }
  .aih__card { padding: 10px; }
  .aih__card-ico { width: 32px; height: 32px; margin-bottom: 12px; }
  .aih__card b { font-size: 12px; line-height: 16px; }
  .aih__card small { font-size: 11px; }
  /* 3D: левой колонке больше места и чипы плотнее — три чипа в одну строку до 541 px, сцена не растёт и модель не уходит под низ окна */
  .aih__site.is-3d .aih__s-main { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
  .aih__site.is-3d .aih__menu { gap: 5px; }
  .aih__site.is-3d .aih__card { gap: 5px; padding: 0 8px 0 4px; }
  .aih__site.is-3d .aih__card b { font-size: 11px; }
}

/* Превью уже 540 px — сайт колонкой: заголовок, адрес, карточки, кнопка */
@container (max-width: 540px) {
  .aih__site { height: auto; min-height: 292px; padding: 12px 14px 16px; }
  .aih__nav { gap: 10px; font-size: 11px; }
  .aih__s-main { margin-top: 14px; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .aih__s-copy { display: contents; }
  .aih__s-title { order: 1; min-height: 2.16em; font-size: 21px; }
  .aih__site.is-long .aih__s-title { font-size: 17px; min-height: 3.36em; }
  .aih__s-addr { order: 2; margin-top: -8px; font-size: 11.5px; }
  .aih__menu { order: 3; gap: 8px; }
  .aih__s-btn { order: 4; margin-top: 0; justify-self: start; height: 32px; }
  .aih__card { padding: 9px; border-radius: 12px; }
  .aih__card-ico { width: 30px; height: 30px; margin-bottom: 8px; border-radius: 8px; }
  .aih__card-ico svg { width: 17px; height: 17px; }
  .aih__card b { font-size: 12px; line-height: 15px; }
  .aih__card small { font-size: 11px; line-height: 14px; }
  /* 3D в колонке: заголовок → модель → чипы → кнопка */
  .aih__site.is-3d .aih__s-main { grid-template-rows: none; row-gap: 14px; }
  .aih__site.is-3d .aih__s-stage, .aih__site.is-3d .aih__menu { grid-column: auto; grid-row: auto; }
  .aih__site.is-3d .aih__s-stage { order: 2; height: 180px; }
  .aih__site.is-3d .aih__s-canvas { inset: 0; width: 100%; height: 100%; } /* в колонке модель не выходит за сцену — не наезжает на чипы */
  .aih__site.is-3d .aih__menu { order: 3; margin-top: 0; }
  /* Apple-hero в колонке: имя продукта → заголовок → строка про чип → ноутбук → pill с ценой и кнопкой */
  .aih__site.is-mac .aih__s-sub { order: 2; margin-top: -8px; }
  .aih__site.is-mac .aih__s-pill { order: 4; justify-self: start; margin-top: 0; }
}

/* ---------- Анимации ---------- */
@keyframes aih-spin { to { transform: rotate(360deg); } }
@keyframes aih-blink { 50% { opacity: 0; } }
@keyframes aih-shimmer { from { background-position: 110% 0; } to { background-position: -110% 0; } }
@keyframes aih-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@keyframes aih-fallback { to { opacity: 1; transform: none; } }
@keyframes aih-fallback-text { to { color: #fff; } }
@keyframes aih-pulse { from { opacity: .55; } to { opacity: 1; } }
@keyframes aih-tile-in { from { opacity: 0; transform: translateY(18px) scale(.82) rotate(var(--r, 0deg)); } to { opacity: 1; transform: rotate(var(--r, 0deg)); } }
@keyframes aih-float { from { transform: translateY(-7px) rotate(var(--r, 0deg)); } to { transform: translateY(7px) rotate(calc(var(--r, 0deg) + 4deg)); } }

/* Меньше движения: плитки стоят, статус без мерцания, сборка превью мгновенная (js/hero-ai.js) */
@media (prefers-reduced-motion: reduce) {
  .aih__tile img { animation: none; opacity: 1; }
  .aih.is-busy .aih__log-ico, .aih.is-busy .aih__log-text, .aih__caret, .aih.is-js.is-idle .aih__site * { animation: none; }
  .aih.is-busy .aih__log-text { color: rgba(226, 220, 255, .74); background: none; }
}
