/* app/assets/page_styles/services_dark.css
   Тёмная премиум-тема для дверных лендингов /services-ai и /services-automation
   (общий партиал app/views/services/_dark_landing.html.erb). Живёт в page_styles,
   а не в stylesheets — require_tree в application.css затянул бы generic-селекторы
   (.btn/.nav/.wrap) в общий бандл и поломал другие страницы. Подключается
   отдельным stylesheet_link_tag ПОСЛЕ application.css — same-specificity
   переопределения классов партиалов (.ref__*) выигрывают каскадом. */

/* ════════ /services-ai — премиум тёмный лендинг (импорт дизайн-проекта) ════════ */
:root,
body.ref-page,
.ai-root {
  --bg: #06070c;
  --bg-2: #0a0d15;
  --panel: rgb(255 255 255 / 3.8%);
  --panel-2: rgb(255 255 255 / 6%);
  --stroke: rgb(255 255 255 / 9%);
  --stroke-2: rgb(255 255 255 / 16%);
  --text: #f3f6fc;
  --muted: #9aa4b4;
  --muted-2: #6a7383;
  --green: #5ce35c;
  --green-2: #31c46a;
  --green-deep: #1f8a3f;
  --glow: rgb(92 227 92 / 30%);
  --glow-soft: rgb(92 227 92 / 12%);
  --ink: #04140a;
  --f-disp: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Manrope", system-ui, sans-serif;
  --edge: clamp(20px, 5vw, 80px);
  --maxw: 1240px;
  --r: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.16, 0.72, 0.29, 1);
}

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

html {
  scroll-behavior: smooth;
}

body.ref-page {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.ai-root h1,
.ai-root h2,
.ai-root h3,
.ai-root h4 {
  font-family: var(--f-disp);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.03;
  margin: 0;
}

.ai-root p {
  margin: 0;
}

.ai-root a {
  color: inherit;
  text-decoration: none;
}

.ai-root img {
  display: block;
  max-width: 100%;
}

.ai-root :focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

::selection {
  background: rgb(92 227 92 / 28%);
  color: #fff;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--edge);
}

[id] {
  scroll-margin-top: 96px;
}

/* ── ambient background: layered glows + faint grid ── */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-fx::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 12% 0%, rgb(92 227 92 / 16%), transparent 60%),
    radial-gradient(55% 45% at 100% 8%, rgb(35 180 200 / 12%), transparent 62%),
    radial-gradient(60% 60% at 80% 100%, rgb(49 196 106 / 10%), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2) 40%, var(--bg));
}

.bg-fx::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(rgb(255 255 255 / 3%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 3%) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 20%, #000, transparent 90%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  animation: drift 22s var(--ease) infinite alternate;
}

.orb.a {
  width: 520px;
  height: 520px;
  left: -120px;
  top: -140px;
  background: radial-gradient(circle, rgb(92 227 92 / 50%), transparent 65%);
}

.orb.b {
  width: 480px;
  height: 480px;
  right: -140px;
  top: 120px;
  background: radial-gradient(circle, rgb(35 190 205 / 42%), transparent 65%);
  animation-delay: -8s;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(40px, 60px, 0) scale(1.12);
  }
}

/* ── nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(16px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--stroke);
}

.nav-in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px var(--edge);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand .pulse {
  width: 24px;
  height: 24px;
  color: var(--green);
  filter: drop-shadow(0 0 6px var(--glow));
}

.nav-links {
  display: flex;
  gap: 26px;
}

.nav-links a {
  font-size: 15px;
  color: var(--muted);
  position: relative;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--green);
  box-shadow: 0 0 8px var(--glow);
  transition: right 0.28s var(--ease);
}

.nav-links a:hover::after {
  right: 0;
}

@media (width <= 860px) {
  .nav-links {
    display: none;
  }
}

/* ── buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.25s,
    background 0.2s,
    border-color 0.2s;
  white-space: nowrap;
}

.btn .i {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, #6bef63, var(--green-2));
  color: var(--ink);
  box-shadow:
    0 8px 28px -8px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 35%);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 16px 40px -10px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 35%);
}

.btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--stroke-2);
}

.btn-ghost:hover {
  background: var(--panel-2);
  border-color: var(--green);
  transform: translateY(-3px) scale(1.02);
}

/* ── section rhythm ── */
.section {
  padding: clamp(64px, 9vw, 132px) 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--green);
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  border: 1px solid rgb(92 227 92 / 28%);
  background: rgb(92 227 92 / 7%);
  white-space: nowrap;
}

.eyebrow:hover {
  border-color: var(--green);
  box-shadow: 0 0 24px -8px var(--glow);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.35;
  }
}

.sec-h {
  font-size: clamp(30px, 4.2vw, 52px);
}

.sec-sub {
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  max-width: 56ch;
  margin-top: 18px;
}

.kick {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

/* ── HERO ── */
.hero {
  padding: clamp(48px, 7vw, 90px) 0 clamp(56px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(400px, 468px);
  gap: clamp(36px, 4.5vw, 72px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(44px, 6.6vw, 88px);
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin-top: 26px;
}

.hero h1 .w {
  display: inline-block;
  background: linear-gradient(118deg, #f3f6fc 34%, #7bf074 72%, #2fd0b0 98%);
  background-clip: text;
  color: transparent;
}

.hero .sub {
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  max-width: 44ch;
  margin-top: 28px;
}

.hero .blurb {
  color: var(--muted-2);
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 48ch;
  margin-top: 16px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--stroke);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.hero-proof span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--glow);
}

/* hero-nav partial (два линка /services + /refer) → ghost-пилюли */
.ai-root .ref__hero-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.ai-root .ref__hero-nav .ref__about-link--btn {
  margin: 0;
  min-width: 0;
}

.ai-root .ref__hero-nav .ref__about-link--btn a {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  transition:
    transform 0.18s var(--ease),
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

.ai-root .ref__hero-nav .ref__about-link--btn a:hover {
  color: var(--text);
  border-color: var(--green);
  background: var(--panel-2);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ── FORM card (centrepiece) ── */
.form-card {
  position: relative;
  border-radius: 24px;
  padding: 2px;
  background: var(--panel);
  isolation: isolate;
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  z-index: -1;
  background: conic-gradient(
    from var(--ang, 0deg),
    transparent 0 55%,
    var(--green) 72%,
    #2fd0b0 82%,
    transparent 92%
  );
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  /* `xor` — вебкитовский синоним `exclude`, и БЕЗ префикса это невалидное
     значение: браузер его выбрасывал, а рамка держалась на строке ниже.
     Префикс нужен как фолбэк для старых WebKit/Blink, поэтому правило
     «без вендорных префиксов» здесь выключено точечно — иначе `--fix`
     срежет префикс и вернёт невалидное объявление. */
  /* stylelint-disable-next-line property-no-vendor-prefix */
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: spin 6s linear infinite;
}

@keyframes spin {
  to {
    --ang: 360deg;
  }
}

@property --ang {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.form-inner {
  background: linear-gradient(180deg, rgb(16 20 28 / 96%), rgb(9 12 18 / 98%));
  border-radius: 22px;
  border: 1px solid var(--stroke);
  padding: clamp(24px, 2.6vw, 34px);
  box-shadow:
    0 40px 80px -30px rgb(0 0 0 / 80%),
    0 0 60px -20px var(--glow-soft);
}

.form-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 14px;
}

.form-badge .sq {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.form-inner h2 {
  font-size: 27px;
  letter-spacing: -0.02em;
}

.form-inner .form-sub {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin-top: 10px;
}

/* реальная форма (services/_lead_form) в тёмной теме */
.form-inner form.ref__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 24px 0 0;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  max-width: none;
}

.form-inner .ref__field {
  display: block;
  margin: 0;
}

.form-inner .ref__field > span {
  display: block;
  font-family: var(--f-disp);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-inner .ref__req {
  color: var(--green);
  font-style: normal;
}

/* Все текстовые поля карточки, а не только type="text": телефон (type="tel")
   мимо этого правила проваливался на светлые токены и рендерился белым
   прямоугольником посреди тёмной формы. Чекбокс согласия исключён — у него
   свой блок ниже. */
.form-inner .ref__field input:not([type="checkbox"]) {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-sm);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.form-inner .ref__field input:not([type="checkbox"])::placeholder {
  color: var(--muted-2);
}

.form-inner .ref__field input:not([type="checkbox"]):hover {
  border-color: rgb(255 255 255 / 26%);
}

.form-inner .ref__field input:not([type="checkbox"]):focus {
  outline: none;
  border-color: var(--green);
  background: rgb(92 227 92 / 5%);
  box-shadow: 0 0 0 4px rgb(92 227 92 / 14%);
}

.form-inner .ref__field small {
  display: block;
  font-size: 12.5px;
  line-height: 1.45;
  margin-top: 8px;
  color: var(--muted-2);
}

.form-inner .field-error {
  display: block;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 8px;
  color: #ff9c88;
}

.form-inner .ref__alert {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgb(255 120 90 / 50%);
  background: rgb(255 90 60 / 12%);
  border-radius: var(--r-sm);
  color: #ffb4a4;
  font-size: 14px;
}

.form-inner .ref__q.ref__consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
}

.form-inner .ref__consent input[type="checkbox"] {
  appearance: none;
  width: 21px;
  height: 21px;
  flex: none;
  margin: 1px 0 0;
  border: 1px solid var(--stroke-2);
  border-radius: 6px;
  background: rgb(255 255 255 / 4%);
  cursor: pointer;
  position: relative;
  transition: 0.15s;
}

.form-inner .ref__consent input[type="checkbox"]:checked {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 12px var(--glow);
}

.form-inner .ref__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.form-inner .ref__consent a {
  color: var(--green);
  font-weight: 600;
}

.form-inner .bot-gate__captcha {
  margin-top: 2px;
}

/* SmartCaptcha не умеет тёмную тему (см. доку виджета) — инвертируем ТОЛЬКО
   слайдер-виджет; challenge-модалка и щиток живут в <body> (проверено в DOM)
   и остаются нетронутыми, так что картинки-задания не искажаются. */
.form-inner .bot-gate__captcha .smart-captcha {
  filter: invert(0.94) hue-rotate(180deg) saturate(0.8);
  border-radius: var(--r-sm);
  overflow: hidden;
}

.form-inner .bot-gate__error {
  color: #ff9c88;
  font-size: 13px;
  margin-top: 8px;
}

.form-inner .ref__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
  padding: 17px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #6bef63, var(--green-2));
  color: var(--ink);
  box-shadow:
    0 8px 28px -8px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 35%);
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.25s,
    opacity 0.2s;
}

.form-inner .ref__submit:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px -10px var(--glow);
}

.form-inner .ref__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* quick contacts (referrals/_quick_contacts) внутри карточки → «или напишите напрямую» */
.form-inner .ref__contacts {
  margin: 26px 0 0;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.form-inner .ref__contacts .ref__section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-family: var(--f-disp);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.form-inner .ref__contacts .ref__section-title::before,
.form-inner .ref__contacts .ref__section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--stroke);
}

.form-inner .ref__contacts-hint {
  display: none;
}

.form-inner .ref__contacts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.form-inner .ref__contacts-savehint {
  display: block;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted-2);
  min-height: 1.2em;
}

/* общий вид msg-кнопок (.ref__contact живёт и в карточке, и в exit-модалке) */
.ai-root .ref__contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1 1 120px;
  padding: 13px 14px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / 3%);
  color: var(--text);
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.25s;
}

.ai-root .ref__contact:hover {
  border-color: var(--green);
  background: rgb(92 227 92 / 7%);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px var(--glow);
  text-decoration: none;
  color: var(--text);
}

/* анимированная бегущая рамка msg-кнопок (дизайн v2, msg-btn): conic-градиент
   крутится под кнопкой (::before), непрозрачная подложка (::after, inset 1.6px)
   оставляет от него видимой только кромку. Собственная рамка гасится — контур
   теперь рисует конус. transform-анимация; reduced-motion её выключает.
   Только Telegram и MAX: «Сохранить страницу» (--save) остаётся тихой, а
   «Вернуться к заявке» (--back) залита сплошным акцентом — конус бы с ней
   спорил. */
.ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back),
.ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back):hover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: transparent;
}

.ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back)::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 440px;
  height: 440px;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 0deg, transparent 0 58%, var(--green) 76%, #2fd0b0 87%, transparent 97%);
  transform: translate(-50%, -50%) rotate(0deg);
  animation: mbspin 3.6s linear infinite;
}

.ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back)::after {
  content: "";
  position: absolute;
  inset: 1.6px;
  z-index: -1;
  border-radius: calc(var(--r-sm) - 1px);
  background: #0d1119;
  pointer-events: none;
  transition: background 0.2s;
}

.ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back):hover::after {
  background: #111a13;
}

@keyframes mbspin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-root .ref__contact::before {
    animation: none;
  }
}

/* «Вернуться к заявке» — главное действие горячего состояния exit-модалки.
   Сплошная заливка тем же зелёным, что у submit формы: рядом с обведённой
   MAX-кнопкой видно, куда вести взгляд. */
.ai-root .ref__contact--back {
  background: linear-gradient(180deg, var(--green), #2fae3a);
  border-color: transparent;
  color: #04140a;
  font-weight: 700;
}

.ai-root .ref__contact--back:hover {
  background: linear-gradient(180deg, #6ef06e, var(--green));
  border-color: transparent;
  color: #04140a;
}

/* рассинхрон периодов/фаз — чтобы чипы не мигали хором */
.ai-root .ref__contact:nth-child(1)::before {
  animation-duration: 3.6s;
  animation-delay: -1.1s;
}

.ai-root .ref__contact:nth-child(2)::before {
  animation-duration: 4.7s;
  animation-delay: -2.6s;
}

/* ── generic card ── */
.card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 26px;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}

/* `.card` встречается и на статичных карточках (svc/proj/review), и на
   карточках-ссылках «другие форматы» (link_to class:'card') — pointer
   только для ссылочной формы, чтобы указатель не появлялся на статике. */
a.card {
  cursor: pointer;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--stroke-2);
  background: var(--panel-2);
  box-shadow:
    0 30px 60px -30px rgb(0 0 0 / 85%),
    0 0 40px -18px var(--glow);
}

/* ── TRUST + GUARANTEE + REVIEWS + SPEED (партиалы referrals/_trust + shared/_reviews) ── */
#trust {
  padding: clamp(24px, 4vw, 44px) 0 0;
}

#trust section {
  margin: 0 0 clamp(44px, 6vw, 72px);
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
  max-width: none;
}

#trust .ref__section-title {
  font-family: var(--f-disp);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: clamp(26px, 3.4vw, 40px);
  margin: 0;
  color: var(--text);
}

#trust .ref__trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

#trust .ref__trust-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 24px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text);
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}

#trust .ref__trust-card:hover {
  transform: translateY(-6px);
  border-color: rgb(92 227 92 / 50%);
  background: var(--panel-2);
  box-shadow:
    0 30px 60px -30px rgb(0 0 0 / 85%),
    0 0 40px -18px var(--glow);
}

#trust .ref__trust-tick {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgb(92 227 92 / 10%);
  border: 1px solid rgb(92 227 92 / 28%);
  color: var(--green);
  font-size: 17px;
  font-weight: 700;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

#trust .ref__trust-card:hover .ref__trust-tick {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 0 0 24px -6px var(--glow);
}

#trust .ref__guarantee {
  margin-top: 16px;
  border-radius: var(--r);
  padding: clamp(28px, 3.4vw, 44px);
  background: linear-gradient(120deg, rgb(92 227 92 / 10%), rgb(35 190 205 / 5%));
  border: 1px solid rgb(92 227 92 / 30%);
  display: grid;
  gap: 16px 48px;
  align-items: center;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr);
  grid-template-areas: "t l" "s l";
  box-shadow: inset 0 0 60px -30px var(--glow);
}

#trust .ref__guarantee-title {
  grid-area: t;
  font-family: var(--f-disp);
  font-weight: 700;
  margin: 0;
  align-self: end;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  color: var(--text);
}

#trust .ref__guarantee-list {
  grid-area: l;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#trust .ref__guarantee-list li {
  display: flex;
  gap: 12px;
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text);
}

#trust .ref__guarantee-list li::before {
  content: "✓";
  color: var(--green);
  font-weight: 700;
  flex: none;
}

#trust .ref__guarantee-slogan {
  grid-area: s;
  margin: 0;
  align-self: start;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 19px;
  color: var(--green);
}

#trust .reviews__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 34px;
}

#trust .reviews__card {
  margin: 0;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 26px;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    background 0.25s,
    box-shadow 0.25s;
}

#trust .reviews__card:hover {
  transform: translateY(-8px);
  border-color: var(--stroke-2);
  background: var(--panel-2);
  box-shadow:
    0 30px 60px -30px rgb(0 0 0 / 85%),
    0 0 40px -18px var(--glow);
}

#trust .reviews__head {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 16px;
}

#trust .reviews__avatar {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  background: linear-gradient(135deg, #6bef63, var(--green-2));
  box-shadow: 0 0 20px -6px var(--glow);
  transition: transform 0.3s var(--ease);
}

#trust .reviews__card:hover .reviews__avatar {
  transform: scale(1.08) rotate(-3deg);
}

#trust .reviews__name {
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
}

#trust .reviews__role {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted-2);
  margin-top: 3px;
}

#trust .reviews__stars {
  display: inline-block;
  margin-top: 6px;
  color: var(--green);
  font-size: 12px;
  letter-spacing: 3px;
  filter: drop-shadow(0 0 6px var(--glow-soft));
}

#trust .reviews__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
}

#trust [data-test-id="speed-claim"] {
  margin-bottom: 0;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--panel);
  padding: clamp(28px, 3.4vw, 48px);
}

#trust [data-test-id="speed-claim"] .ref__section-title {
  font-size: clamp(22px, 2.4vw, 30px);
}

#trust .reviews__sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 60ch;
  margin: 12px 0 0;
}

@media (width <= 860px) {
  #trust .ref__trust-grid,
  #trust .reviews__grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 760px) {
  #trust .ref__guarantee {
    grid-template-columns: 1fr;
    grid-template-areas: "t" "s" "l";
  }
}

/* ── STORY ── */
.story-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 16px;
  margin-top: 46px;
}

.story-panel {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  overflow: hidden;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    box-shadow 0.25s;
}

.story-panel:hover {
  transform: translateY(-8px);
  border-color: rgb(92 227 92 / 40%);
  box-shadow:
    0 30px 60px -30px rgb(0 0 0 / 85%),
    0 0 40px -18px var(--glow);
}

.story-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, rgb(92 227 92 / 9%), rgb(255 255 255 / 2%));
}

.story-step {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgb(6 7 12 / 72%);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(92 227 92 / 30%);
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--green);
  white-space: nowrap;
}

.story-step .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.story-txt {
  padding: 20px 22px 24px;
}

.story-txt h3 {
  font-size: 19px;
  margin-bottom: 9px;
}

.story-txt p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.story-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
}

.story-arrow .i {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 8px var(--glow-soft));
}

@media (width <= 820px) {
  .story-grid {
    grid-template-columns: 1fr;
  }

  .story-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }
}

/* ── OVERVIEW / FAST media ── */
.overview {
  padding: clamp(24px, 4vw, 44px) 0 clamp(44px, 6vw, 76px);
}

.ov-cap {
  margin-top: 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 72ch;
}

.ov-media,
.fast-media {
  position: relative;
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: radial-gradient(120% 140% at 50% 0%, rgb(92 227 92 / 10%), rgb(255 255 255 / 2%));
}

.ov-media {
  aspect-ratio: 2.6/1;
}

.fast-media {
  aspect-ratio: 16/5;
  margin-top: 36px;
}

.slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.ov-media:hover .slot-img,
.fast-media:hover .slot-img,
.cell:hover .slot-img,
.story-panel:hover .slot-img {
  transform: scale(1.07);
}

@media (width <= 640px) {
  .ov-media {
    aspect-ratio: 3/2;
  }

  .fast-media {
    aspect-ratio: 16/9;
  }
}

/* ── CAPABILITIES bento ── */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 46px;
}

.cell {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 14px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition:
    transform 0.25s var(--ease),
    border-color 0.25s,
    box-shadow 0.25s;
}

.cell:hover {
  transform: translateY(-8px);
  border-color: rgb(92 227 92 / 50%);
  box-shadow:
    0 30px 60px -30px rgb(0 0 0 / 85%),
    0 0 40px -18px var(--glow),
    inset 0 0 50px -30px var(--glow);
}

.c-media {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, rgb(92 227 92 / 9%), rgb(255 255 255 / 2%));
}

.cell.big .c-media,
.cell.wide .c-media {
  aspect-ratio: 16/7;
}

.cell.s2 .c-media,
.cell.s3 .c-media {
  aspect-ratio: 16/10;
}

.c-ico {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgb(6 7 12 / 66%);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(92 227 92 / 32%);
  color: var(--green);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.cell:hover .c-ico {
  transform: scale(1.12);
  box-shadow: 0 0 22px -6px var(--glow);
}

.c-ico .i {
  width: 20px;
  height: 20px;
}

.c-txt {
  padding: 0 8px;
}

.cell h3 {
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.cell p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 8px;
}

.cell.big {
  grid-column: span 4;
}

.cell.wide {
  grid-column: span 4;
}

.cell.s2 {
  grid-column: span 2;
}

.cell.s3 {
  grid-column: span 3;
}

.cell.big h3 {
  font-size: clamp(22px, 2vw, 27px);
}

@media (width <= 900px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }

  .cell.big,
  .cell.wide,
  .cell.s2,
  .cell.s3 {
    grid-column: span 1;
  }
}

@media (width <= 560px) {
  .bento {
    grid-template-columns: 1fr;
  }
}

/* ── AI-in-action console ── */
.console {
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgb(14 18 26 / 90%), rgb(8 11 17 / 95%));
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / 80%);
}

.console .bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
  background: rgb(255 255 255 / 2%);
}

.console .bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--stroke-2);
}

.console .bar .title {
  margin-left: 8px;
  font-family: var(--f-disp);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.console .bar .title .i {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.console .chat {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.console .bubble {
  max-width: 78%;
  padding: 14px 17px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
}

.console .bubble.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
}

.console .bubble.user {
  align-self: flex-end;
  background: rgb(255 255 255 / 6%);
  border: 1px solid var(--stroke-2);
  border-bottom-right-radius: 5px;
}

.console .bubble.bot {
  align-self: flex-start;
  background: linear-gradient(135deg, rgb(92 227 92 / 16%), rgb(35 190 205 / 10%));
  border: 1px solid rgb(92 227 92 / 30%);
  border-bottom-left-radius: 5px;
  color: #eafff0;
}

.console .bubble .who {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-disp);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 7px;
}

.console .bubble .who .i {
  width: 14px;
  height: 14px;
}

/* ── FAST ── */
.fast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 44px;
}

.fast-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px 24px;
  border-radius: var(--r-sm);
  background: var(--panel);
  border: 1px solid var(--stroke);
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 17px;
  transition: 0.25s var(--ease);
}

.fast-item:hover {
  border-color: rgb(92 227 92 / 40%);
  transform: translateX(6px) scale(1.01);
  box-shadow: 0 20px 40px -26px rgb(0 0 0 / 80%);
}

.fast-item .n {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: rgb(92 227 92 / 12%);
  border: 1px solid rgb(92 227 92 / 30%);
  color: var(--green);
}

@media (width <= 640px) {
  .fast-grid {
    grid-template-columns: 1fr;
  }
}

/* ── TECH tags ── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.chip {
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  transition:
    transform 0.25s var(--ease),
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    box-shadow 0.25s;
}

.chip:hover {
  transform: translateY(-4px) scale(1.05);
  background: rgb(92 227 92 / 12%);
  color: var(--green);
  border-color: var(--green);
  box-shadow: 0 12px 30px -10px var(--glow);
}

/* ── REFERRAL cross-sell ── */
.refer {
  border-radius: 24px;
  padding: clamp(32px, 4vw, 56px);
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, rgb(92 227 92 / 14%), rgb(35 190 205 / 8%));
  border: 1px solid rgb(92 227 92 / 34%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px clamp(28px, 4vw, 64px);
  align-items: center;
  box-shadow: inset 0 0 100px -50px var(--glow);
}

.refer h2 {
  font-size: clamp(26px, 3.2vw, 42px);
}

.refer p {
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.55;
  margin-top: 16px;
  max-width: 56ch;
}

@media (width <= 760px) {
  .refer {
    grid-template-columns: 1fr;
  }
}

/* ── CROSS-LINKS ── */
.cross-list {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.cross {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 30px;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
  background: var(--panel);
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: clamp(17px, 1.8vw, 22px);
  transition: 0.25s var(--ease);
  cursor: pointer;
}

.cross:hover {
  border-color: rgb(92 227 92 / 40%);
  background: var(--panel-2);
  transform: translateY(-4px) scale(1.005);
  box-shadow:
    0 24px 50px -28px rgb(0 0 0 / 80%),
    0 0 34px -16px var(--glow);
}

.cross .i {
  width: 24px;
  height: 24px;
  color: var(--green);
  flex: none;
  transition: transform 0.25s;
}

.cross:hover .i {
  transform: translateX(6px);
}

/* ── FINAL CTA ── */
.final {
  position: relative;
  text-align: center;
  padding: clamp(80px, 12vw, 160px) 0;
  overflow: hidden;
}

.final::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(900px, 90vw);
  height: 520px;
  background: radial-gradient(circle, var(--glow), transparent 66%);
  filter: blur(30px);
  opacity: 0.5;
  z-index: -1;
}

.final h2 {
  font-size: clamp(38px, 6.4vw, 86px);
  letter-spacing: -0.04em;
  line-height: 0.98;
  max-width: 16ch;
  margin: 0 auto;
}

.final .fine {
  color: var(--muted);
  font-size: 17px;
  margin-top: 24px;
}

.final .row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 40px;
}

/* ── FOOTER ── */
.ai-foot {
  border-top: 1px solid var(--stroke);
  padding: 56px 0;
  background: var(--bg-2);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  align-items: flex-start;
}

.foot .brand {
  margin-right: 0;
}

.ai-foot .ref__contacts-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  font-size: 15px;
  margin: 10px 0 0;
  padding: 0;
  text-align: left;
}

.ai-foot .ref__contacts-line a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
}

.ai-foot .ref__contacts-line a:hover {
  color: var(--green);
  text-decoration: none;
}

.ai-foot .ref__contacts-line a + a {
  margin-left: 0;
}

.ai-foot .ref__contacts-line a + a::before {
  content: "";
  margin: 0;
}

.foot-legal {
  max-width: 46ch;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.foot-legal a {
  color: var(--green);
}

/* ── EXIT MODAL (referrals/_exit_modal) ── */
.ai-root .ref-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 22px;
}

.ai-root .ref-modal[hidden] {
  display: none;
}

.ai-root .ref-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgb(3 5 9 / 70%);
  backdrop-filter: blur(6px);

  /* подложка кликабельна — закрывает модалку (data-action exit-intent#close) */
  cursor: pointer;
}

.ai-root .ref-modal__box {
  position: relative;
  width: min(460px, 100%);
  border-radius: 20px;
  background: linear-gradient(180deg, rgb(16 20 28 / 98%), rgb(9 12 18 / 99%));
  border: 1px solid var(--stroke);
  padding: clamp(26px, 3vw, 36px);
  animation: pop 0.22s var(--ease);
  box-shadow: 0 40px 90px -30px rgb(0 0 0 / 80%);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

body:not(.admin-body) .ai-root .ref-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgb(255 255 255 / 5%);
  color: var(--muted);
  cursor: pointer;
  transition: 0.2s;
}

body:not(.admin-body) .ai-root .ref-modal__close:hover {
  background: rgb(255 255 255 / 10%);
  color: var(--text);
}

.ai-root .ref-modal__title {
  font-family: var(--f-disp);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.02em;
  margin: 6px 0 0;
  color: var(--text);
}

.ai-root .ref-modal__body {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 12px 0 0;
}

.ai-root .ref-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ai-root .ref-modal__actions .ref__contact {
  flex: 1 1 150px;
}

.ai-root .ref-modal__hint {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted-2);
  min-height: 1.2em;
}

.ai-root .ref-modal__dismiss {
  display: block;
  margin: 18px auto 0;
  background: none;
  border: 0;
  color: var(--muted-2);
  font-size: 13.5px;
  text-decoration: underline;
  cursor: pointer;
}

.ai-root .ref-modal__dismiss:hover {
  color: var(--text);
}

/* ── icons ── */
.i {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ── reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(52px) scale(0.955);
  filter: blur(6px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.9s var(--ease),
    filter 0.8s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

[data-stagger] > * {
  opacity: 0;
  transform: translateY(52px) scale(0.955);
  filter: blur(6px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.8s var(--ease),
    filter 0.7s var(--ease);
}

[data-stagger].in > * {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.hero h1 .w {
  opacity: 0;
  transform: translateY(40%);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}

.hero h1.lit .w {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orb,
  .form-card::before,
  .eyebrow .dot {
    animation: none !important;
  }

  .reveal,
  [data-stagger] > *,
  .hero h1 .w,
  .console .bubble {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .slot-img {
    transition: none;
  }
}

/* ── responsive hero ── */
@media (width <= 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .form-card {
    order: 2;
    max-width: 520px;
  }
}

/* ── HARD overrides: application.css уже содержит свои .btn / .ref__* /
      заголовки с большей специфичностью — здесь добиваем их selector-weight'ом
      (body.ref-page .ai-root …), полностью дублируя нужные правила. ── */
body.ref-page .ai-root h1,
body.ref-page .ai-root h2,
body.ref-page .ai-root h3,
body.ref-page .ai-root h4 {
  color: var(--text);
  font-family: var(--f-disp);
}

body.ref-page .ai-root .btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.25s,
    background 0.2s,
    border-color 0.2s;
}

body.ref-page .ai-root .btn-primary {
  background: linear-gradient(135deg, #6bef63, var(--green-2));
  color: var(--ink);
  box-shadow:
    0 8px 28px -8px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 35%);
}

body.ref-page .ai-root .btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  color: var(--ink);
  background: linear-gradient(135deg, #6bef63, var(--green-2));
  box-shadow:
    0 16px 40px -10px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 35%);
  text-decoration: none;
}

body.ref-page .ai-root .btn-ghost {
  background: var(--panel);
  color: var(--text);
  border-color: var(--stroke-2);
}

body.ref-page .ai-root .btn-ghost:hover {
  background: var(--panel-2);
  border-color: var(--green);
  color: var(--text);
  transform: translateY(-3px) scale(1.02);
  text-decoration: none;
}

body.ref-page .ai-root .form-inner .ref__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
  padding: 17px;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #6bef63, var(--green-2));
  color: var(--ink);
  box-shadow:
    0 8px 28px -8px var(--glow),
    inset 0 1px 0 rgb(255 255 255 / 35%);
  transition:
    transform 0.18s var(--ease),
    box-shadow 0.25s,
    opacity 0.2s;
}

body.ref-page .ai-root .form-inner .ref__submit:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px -10px var(--glow);
}

body.ref-page .ai-root .form-inner .ref__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

body.ref-page .ai-root .ref__contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1 1 120px;
  padding: 13px 14px;
  border: 1px solid var(--stroke-2);
  border-radius: var(--r-sm);
  background: rgb(255 255 255 / 3%);
  color: var(--text);
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.25s;
}

body.ref-page .ai-root .ref__contact:hover {
  border-color: var(--green);
  background: rgb(92 227 92 / 7%);
  color: var(--text);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px var(--glow);
  text-decoration: none;
}

/* бегущая conic-рамка (см. блок msg-кнопок выше): собственный бордер гасится и
   здесь — этот hard-override иначе перебивает transparent своей специфичностью.
   «Сохранить страницу» (--save) не анимируется и остаётся с обычной рамкой,
   «Вернуться к заявке» (--back) залита сплошным акцентом ниже. */
body.ref-page .ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back),
body.ref-page .ai-root .ref__contact:not(.ref__contact--save, .ref__contact--back):hover {
  border-color: transparent;
}

/* Дубль акцентной кнопки exit-модалки: без него hard-override .ref__contact
   выше перебивает заливку своей специфичностью и кнопка «Вернуться к заявке»
   выходит такой же серой, как соседняя. */
body.ref-page .ai-root .ref__contact--back {
  background: linear-gradient(180deg, var(--green), #2fae3a);
  border-color: transparent;
  color: #04140a;
  font-weight: 700;
}

body.ref-page .ai-root .ref__contact--back:hover {
  background: linear-gradient(180deg, #6ef06e, var(--green));
  border-color: transparent;
  color: #04140a;
}

body.ref-page .ai-root .ref__hero-nav .ref__about-link--btn a {
  display: inline-flex;
  align-items: center;
  font-family: var(--f-disp);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  transition:
    transform 0.18s var(--ease),
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
}

body.ref-page .ai-root .ref__hero-nav .ref__about-link--btn a:hover {
  color: var(--text);
  border-color: var(--green);
  background: var(--panel-2);
  transform: translateY(-2px);
  text-decoration: none;
}

body.ref-page .ai-root .brand {
  color: var(--text);
}

body.ref-page .ai-root .ref__section-title {
  color: var(--text);
}

body.ref-page .ai-root .ref__contacts .ref__section-title {
  color: var(--muted-2);
}
