/* ─────────────────────────────────────────────────────────────
   AI Engineer — визитка. Тёмная · строгая · завораживающая.
   Палитра и принципы: TECH_SPEC.md §6.1.
   v2 «живой фон»: сетка и свечение следуют за курсором.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #0a0e14;
  --bg-soft: #0d121a;
  --panel: #10161f;
  --panel-hover: #121924;
  --line: rgba(148, 163, 184, 0.14);
  --text: #e6edf3;
  --muted: #8b98a9;
  --accent: #45d8c4;
  --accent-ink: #06231e;      /* тёмный текст на акцентной кнопке */
  --accent-soft: rgba(69, 216, 196, 0.12);
  --accent-line: rgba(69, 216, 196, 0.45);
  --indigo: #2b3a8f;          /* только фоновые свечения */
  --danger: #f0716b;
  --radius: 12px;
  --grid-size: 56px;
  --header-h: 64px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

.container {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

h1, h2, h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }

p { margin: 0 0 0.75em; }
p:last-child { margin-bottom: 0; }

dl, ul { margin: 0; padding: 0; }
li { list-style: none; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

section[id], footer[id], body[id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.5rem; left: 0.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible { transform: translateY(0); text-decoration: none; }

/* ── Живой фон: сетка + свечение за курсором ───────────────── */

.fx { display: contents; }

/* Приглушённая сетка на всём сайте — видна там, где фон прозрачен */
.fx-shine {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(69, 216, 196, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(69, 216, 196, 0.22) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(
    320px circle at var(--fx-x, 50%) var(--fx-y, 30%),
    black 0%, rgba(0, 0, 0, 0.5) 45%, transparent 75%);
  mask-image: radial-gradient(
    320px circle at var(--fx-x, 50%) var(--fx-y, 30%),
    black 0%, rgba(0, 0, 0, 0.5) 45%, transparent 75%);
}

/* Мягкое свечение, плывущее за курсором (над контентом, screen-бленд) */
.fx-glow {
  position: fixed;
  top: 0; left: 0;
  width: 640px; height: 640px;
  margin: -320px 0 0 -320px;
  z-index: 70;
  pointer-events: none;
  border-radius: 50%;
  background:
    radial-gradient(closest-side circle, rgba(69, 216, 196, 0.14), rgba(69, 216, 196, 0.05) 45%, transparent 72%),
    radial-gradient(closest-side circle at 70% 65%, rgba(43, 58, 143, 0.10), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0;
  will-change: transform, opacity;
}

.fx-glow.is-on { opacity: 1; transition: opacity 0.6s ease; }

/* Медленное переливание оттенка у курсора — в пределах одной
   бирюзово-зелёной гаммы, без радуги. Только композиторный filter. */
@keyframes iridesce {
  from { filter: hue-rotate(0deg); }
  50%  { filter: hue-rotate(-14deg); }
  to   { filter: hue-rotate(0deg); }
}

.fx-shine { animation: iridesce 7s ease-in-out infinite; }

/* Базовая тихая сетка страницы (без свечения) */
.site-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
}

/* ── Шапка ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark { color: var(--accent); }
.brand:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.site-nav > a:not(.nav-cta) {
  color: var(--muted);
  font-size: 0.95rem;
  position: relative;
}

.site-nav > a:not(.nav-cta):hover { color: var(--text); text-decoration: none; }

/* Тонкая акцентная черта под пунктом навигации */
.site-nav > a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transition: right 0.25s ease;
}

.site-nav > a:not(.nav-cta):hover::after { right: 0; }

.scroll-progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  display: block;
}

#progress-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0.85;
}

/* ── Кнопки ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(69, 216, 196, 0.25);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--accent); }

.btn-wide { width: 100%; }

/* ── Hero ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 780px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(3rem, 9vh, 6rem);
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  will-change: transform;
}

.glow-cyan {
  width: 620px; height: 620px;
  top: -260px; left: -160px;
  background: radial-gradient(circle, rgba(69, 216, 196, 0.16), transparent 65%);
  animation: drift-cyan 26s ease-in-out infinite alternate;
}

.glow-indigo {
  width: 780px; height: 780px;
  bottom: -420px; right: -220px;
  background: radial-gradient(circle, rgba(43, 58, 143, 0.28), transparent 65%);
  animation: drift-indigo 32s ease-in-out infinite alternate;
}

@keyframes drift-cyan {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(120px, 60px, 0) scale(1.15); }
}

@keyframes drift-indigo {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-100px, -70px, 0) scale(1.1); }
}

.eyebrow {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  font-weight: 800;
  max-width: 18ch;
  margin-bottom: 0.4em;
}

.accent {
  color: var(--accent);
  text-shadow: 0 0 32px rgba(69, 216, 196, 0.45);
}

.hero-lead {
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 56ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 3rem;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  max-width: 720px;
}

.hero-facts dt {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.hero-facts dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.98rem;
}

/* ── Секции ───────────────────────────────────────────────── */

.section { padding-block: clamp(3.5rem, 9vw, 6rem); }

.section-alt {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

.section-alt h2, .section-alt .eyebrow { margin-top: 0; }

/* ── Карточки ──────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  background: var(--panel-hover);
  border-color: var(--accent-line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(69, 216, 196, 0.12);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(69, 216, 196, 0.06);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.card:hover .card-icon {
  background: rgba(69, 216, 196, 0.12);
  border-color: var(--accent-line);
}

.card h3 { margin-top: 1rem; }

.card-num {
  position: absolute;
  top: 1.4rem; right: 1.6rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
  letter-spacing: 0.08em;
}

.card-problem, .card-solution { color: var(--muted); }

.card-result {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.card-result strong:first-child { color: var(--accent); }

.card-problem strong, .card-solution strong { color: var(--text); }

/* Сценарии: описание карточки — приглушённым, как в карточках услуг */
.scenarios-grid .card > p { color: var(--muted); }

/* Чипы «что входит» в карточках услуг */
.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.95rem 0 0;
}

.card-chips li {
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ── Процесс: этапы (timeline) ─────────────────────────────── */

.section-lead {
  color: var(--muted);
  max-width: 60ch;
  margin-top: -0.25rem;
}

.steps { margin-top: 2.4rem; }

.step { position: relative; padding: 0 0 1.9rem 3.5rem; }

/* соединительная линия между номерами */
.step::before {
  content: "";
  position: absolute;
  left: 1.17rem;
  top: 2.7rem;
  bottom: 0.2rem;
  width: 1px;
  background: var(--line);
}

.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }

.step-num {
  position: absolute;
  left: 0; top: 0;
  width: 2.35rem; height: 2.35rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step h3 { margin-bottom: 0.35em; }

.step p {
  color: var(--muted);
  max-width: 66ch;
}

/* ── FAQ: аккордеон на <details>, без JS ───────────────────── */

.faq {
  margin-top: 2rem;
  max-width: 820px;
  display: grid;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.25s ease;
}

.faq-item:hover { border-color: var(--accent-line); }
.faq-item[open] { border-color: var(--accent-line); }

.faq-item summary {
  list-style: none;
  position: relative;
  padding: 1.05rem 3.2rem 1.05rem 1.4rem;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 1.55rem;
  top: 50%;
  width: 8px; height: 8px;
  border-right: 1.7px solid var(--accent);
  border-bottom: 1.7px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }

.faq-item > p {
  margin: 0;
  padding: 0.1rem 3.2rem 1.25rem 1.4rem;
  color: var(--muted);
  max-width: 70ch;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item summary::after { transition: none; }
}

/* ── Контакты / форма ──────────────────────────────────────── */

.contact-inner {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr;
}

.contact-lead { color: var(--muted); max-width: 40ch; }

.contact-alt { margin-top: 1.2rem; }

form {
  display: grid;
  gap: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2rem);
}

.field { display: grid; gap: 0.35rem; }

label {
  font-size: 0.88rem;
  font-weight: 600;
}

input, select {
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 0.8rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input[aria-invalid="true"], select[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(240, 113, 107, 0.12);
}

select { appearance: none; }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-color: var(--bg-soft);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

select:focus { border-color: var(--accent); }

.error {
  color: var(--danger);
  font-size: 0.82rem;
  margin: 0;
}

/* Согласие на обработку ПД (152-ФЗ) */
.field-consent .error { margin-top: 0.35rem; }

.consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-weight: 400;
  font-size: 0.88rem;
  line-height: 1.5;
  cursor: pointer;
}

.consent input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  min-height: 0;
  margin-top: 0.2em;
  padding: 0;
  border: none;
  border-radius: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* Страница политики (privacy.html) */
.legal { max-width: 72ch; }
.legal h2 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.15rem;
}
.legal p, .legal li { color: var(--muted); }
.muted { color: var(--muted); font-size: 0.9rem; }

.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.form-note {
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.92rem;
  text-align: center;
}

.form-status.pending { color: var(--muted); }
.form-status.ok    { color: var(--accent); }
.form-status.fail  { color: var(--danger); }

/* ── Ассистент: чат-виджет ─────────────────────────────────── */

.assistant {
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.5rem);
  bottom: clamp(0.9rem, 3vw, 1.5rem);
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

/* Кнопка-пузырь */
.assistant-fab {
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(69, 216, 196, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.assistant-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(69, 216, 196, 0.35);
}

.assistant:has(.assistant-panel:not([hidden])) .assistant-fab {
  display: none;   /* пузырь скрывается, пока открыта панель */
}

/* Панель чата */
.assistant-panel {
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 1.8rem));
  max-height: min(540px, 76vh);
  background: var(--panel);
  border: 1px solid var(--accent-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(69, 216, 196, 0.08);
}

/* Явное скрытие: display:flex панели перебивает атрибут hidden из UA-стиля */
.assistant-panel[hidden] { display: none; }

.assistant-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.assistant-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(69, 216, 196, 0.8);
  flex: none;
}

.assistant-head-text { flex: 1; min-width: 0; }

.assistant-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.assistant-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.assistant-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.assistant-close:hover { color: var(--text); border-color: var(--accent-line); }

/* Лог сообщений */
.assistant-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.9rem;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  scrollbar-width: thin;
}

.msg {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 88%;
  white-space: pre-line;
  overflow-wrap: break-word;
}

.msg-bot {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-start-start-radius: 4px;
  justify-self: start;
}

.msg-bot a { word-break: break-all; }

.msg-user {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text);
  border-start-end-radius: 4px;
  justify-self: end;
}

/* Чипы-подсказки */
.assistant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.1rem 0.9rem 0.6rem;
  border-top: 1px solid var(--line);
  padding-top: 0.6rem;
}

.assistant-chips[hidden] { display: none; }

.chip {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.chip:hover { background: var(--accent-soft); }

/* Поле ввода */
.assistant-compose {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.assistant-compose input {
  flex: 1;
  min-height: 40px;
  padding: 0.4rem 0.7rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.assistant-compose input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

#assistant-send {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  flex: none;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
}

#assistant-send:hover { box-shadow: 0 4px 16px rgba(69, 216, 196, 0.3); }

/* Мобильный: панель во всю ширину снизу */
@media (max-width: 480px) {
  .assistant {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .assistant-panel {
    width: calc(100vw - 1.5rem);
    max-height: min(560px, 72vh);
  }
}

@media (prefers-reduced-motion: reduce) {
  .assistant-fab { transition: none; }
}

/* ── Футер ─────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.2rem;
  background: var(--bg-soft);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-brand { font-weight: 600; }

.footer-note {
  color: var(--muted);
  font-size: 0.85rem;
}

/* ── Появление при загрузке (hero, каскад) ─────────────────── */

.rise {
  opacity: 0;
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: var(--d, 0s);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ── Scroll-reveal ─────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Адаптив ───────────────────────────────────────────────── */

@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr 1.1fr; align-items: start; }
}

@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

/* Бургер-меню на мобильных */
@media (max-width: 759px) {
  .burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
  }

  .burger-box {
    display: grid;
    gap: 4px;
  }

  .burger-box span {
    width: 18px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .burger[aria-expanded="true"] .burger-box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .burger[aria-expanded="true"] .burger-box span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] .burger-box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    padding: 0.6rem 1rem 1rem;
    display: none;
  }

  .site-header.nav-open .site-nav { display: flex; }

  .site-nav > a:not(.nav-cta) {
    padding: 0.7rem 0.4rem;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    font-size: 1rem;
  }

  .nav-cta { margin-top: 0.6rem; }

  .site-header.nav-open {
    background: color-mix(in srgb, var(--bg) 94%, transparent);
  }
}

@media (min-width: 760px) {
  .burger { display: none; }
}

/* ── Курсорные эффекты: доступность и устройства ───────────── */

/* Сетка без JS (пока курсор не двигался) — в Hero уже видно дрейф свечений */
@media (pointer: coarse) {
  .fx-glow { display: none; }
  .fx-shine { display: none; }
}

/* ── Reduced motion ────────────────────────────────────────── */

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

  .glow, .fx-glow, .fx-shine { animation: none; display: none; }
  .site-grid { display: none; }

  .rise {
    opacity: 1;
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover, .card:hover { transform: none; }
  * { scroll-behavior: auto; }
}

/* ── Safe area (iPhone) ────────────────────────────────────── */

@supports (padding: max(0px)) {
  .header-inner { padding-inline: max(1rem, env(safe-area-inset-left)); }
  .container {
    padding-inline: max(clamp(1rem, 4vw, 2rem), env(safe-area-inset-left));
  }
}