/* Базовые переменные темы */
:root {
  --bg: radial-gradient(1200px 600px at 80% -20%, rgba(50,150,255,.20), transparent 60%), #071326;
  --card: rgba(7,19,38,.66);
  --text: #e9f3ff;
  --muted: #a3b4d1;
  --primary: #7a24ff; /* фиолетовый как в заголовках */
  --primary-600: #5d18d1;
  --accent: #00eaff; /* неоново-голубой */
  --danger: #ff6b6b;
  --footer: #050a16;
  --header-bg: #0b1220; /* сплошной цвет хедера в тёмной теме */
  --pattern: url('../img/patterns/pattern-dark.svg');
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  color-scheme: dark;
  --fs-h1: clamp(32px, 6vw, 56px);
  --fs-h2: clamp(22px, 3.5vw, 32px);
  --fs-h3: clamp(18px, 2.2vw, 22px);
  --fab-size: 52px;
  --fab-size-sm: 40px;
  --fab-gap: 12px;
}

/* Светлая тема = фирменный бренд (тёплые золото/бронза) */
:root[data-theme="light"] {
  /* Чуть затемнённый тёплый фон */
  --bg: #f8f2e6;
  /* Карточки белые с лёгкой тёплой тенью */
  --card: #ffffff;
  /* Тексты — делаем чуть темнее для лучшей читаемости */
  --text: #0f0f10;
  --muted: #5f5545;
  /* Основной бренд: золотисто‑бронзовый градиент */
  --primary: #d48a1c;       /* светло‑оранжевый бренд */
  --primary-600: #a36212;   /* тёмно‑оранжевый бренд */
  /* Акцент — светлое золото для обводок/ховеров */
  --accent: #f1c45c;
  /* Поверхности для чередования секций (увеличен контраст) */
  --surface-odd: #f3e8d4;
  --surface-even: #ead9bb;
  /* Тени (elevation) для светлой темы */
  --elev-1: 0 4px 10px rgba(0,0,0,.06);
  --elev-2: 0 8px 18px rgba(0,0,0,.10);
  --elev-3: 0 12px 28px rgba(0,0,0,.14);
  --danger: #c0392b;
  /* Светлый футер */
  --footer: #f1ede6;
  /* Сплошной цвет хедера в светлой теме */
  --header-bg: #ffffff;
  /* Паттерн для светлой темы */
  --pattern: url('../img/patterns/pattern-light.svg');
  /* Вспомогательные бренд‑тени и бордеры */
  --brand-shadow: rgba(199,147,43,.30);
  --brand-border: rgba(154,114,32,.38);
  --brand-border-strong: rgba(154,114,32,.56);
  --brand-grad: linear-gradient(180deg, #d4a44b, #a8771f);
  /* Цвета «чистых» линий (нейтральные) */
  --line-strong: rgba(18,14,8,.18);
  --line-soft: rgba(18,14,8,.08);
  --line-highlight: rgba(255,255,255,1);
  color-scheme: light;
}

/* Сброс и базовая типографика */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { overflow-x: hidden; }
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, var(--accent), var(--primary)); z-index: 1000; }
.preloader { position: fixed; inset: 0; display: grid; place-items: center; background: var(--footer); z-index: 1200; transition: opacity .5s ease, visibility .5s ease; }
.preloader[hidden] { opacity: 0; visibility: hidden; }
.preloader-inner { position: relative; width: 160px; height: 160px; display: grid; place-items: center; }
.pl-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(0,234,255,.0) 0%, rgba(0,234,255,.35) 35%, rgba(122,36,255,.55) 55%, rgba(0,234,255,.0) 85%); -webkit-mask: radial-gradient(circle 62px at 50% 50%, transparent 58px, #000 59px), radial-gradient(circle 80px at 50% 50%, #000 79px, transparent 80px); mask: radial-gradient(circle 62px at 50% 50%, transparent 58px, #000 59px), radial-gradient(circle 80px at 50% 50%, #000 79px, transparent 80px); -webkit-mask-composite: xor; mask-composite: exclude; animation: ringSpin 1.6s linear infinite; filter: drop-shadow(0 0 18px rgba(0,234,255,.35)) drop-shadow(0 0 28px rgba(122,36,255,.25)); }
.pl-orb { position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(60% 60% at 30% 30%, rgba(122,36,255,.55), rgba(0,234,255,.42) 48%, transparent 60%); filter: blur(12px); animation: orbPulse 2.2s ease-in-out infinite; }
.pl-title { position: relative; font: 700 22px/1 Inter, system-ui, sans-serif; letter-spacing: .6px; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.pl-title span { color: var(--accent); }
/* орбитальные точки */
.pl-dots { position: absolute; inset: 0; display: contents; }
.pl-dots span { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(0,234,255,.8); }
.pl-dots span:nth-child(1) { transform-origin: -54px 0; animation: orbit1 1.8s linear infinite; background: #00eaff; }
.pl-dots span:nth-child(2) { transform-origin: -34px 0; animation: orbit2 1.4s linear infinite; background: #7a24ff; }
.pl-dots span:nth-child(3) { transform-origin: -74px 0; animation: orbit3 2.2s linear infinite; background: #ffd36b; box-shadow: 0 0 10px rgba(255,211,107,.8); }
@keyframes orbPulse { 0%, 100% { transform: scale(.92) rotate(0deg); opacity: .85; } 50% { transform: scale(1.06) rotate(12deg); opacity: 1; } }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes orbit1 { to { transform: rotate(360deg); } }
@keyframes orbit2 { to { transform: rotate(-360deg); } }
@keyframes orbit3 { to { transform: rotate(360deg); } }
.container h1 { font-size: var(--fs-h1); line-height: 1.15; letter-spacing: -0.02em; font-family: 'Unbounded', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.container h2 { font-size: var(--fs-h2); line-height: 1.2; font-family: 'Unbounded', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.container h3 { font-size: var(--fs-h3); line-height: 1.25; font-family: 'Unbounded', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; }

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Хедер */
.site-header { position: sticky; top: 0; backdrop-filter: none; background: var(--header-bg); z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { font-family: 'Russo One', Inter, system-ui, sans-serif; font-weight: 700; letter-spacing: .6px; font-size: 24px; }
.logo span { color: var(--primary); }

.nav-toggle { display: none; }
.nav-list { display: flex; gap: 20px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-list a { opacity: .9; }
.nav-list .btn { margin-left: 4px; }
.menu-open { display: none; }

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  color: var(--text);
  transition: transform .1s ease, background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.3); }
.btn:active { transform: translateY(0); }

:root:not([data-theme="light"]) .btn-primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); border: none; box-shadow: 0 10px 20px rgba(122,36,255,.25); }
/* В светлой теме — более насыщенный золотой градиент */
:root[data-theme="light"] .btn-primary { background: linear-gradient(180deg, #f7cc77, #d48a1c); border: none; box-shadow: 0 10px 20px rgba(212,138,28,.28); color: #fff; }
/* Светлая тема — выразительные кнопки */
:root[data-theme="light"] .btn-primary { box-shadow: 0 10px 20px rgba(199,147,43,.28); }
:root[data-theme="light"] .btn-primary:hover { box-shadow: 0 12px 28px rgba(199,147,43,.35); filter: saturate(110%); transform: translateY(-2px); }
:root[data-theme="light"] .btn-primary:active { transform: translateY(0); box-shadow: 0 6px 14px rgba(199,147,43,.25); }

/* Вторичные кнопки с градиентной рамкой и мягкой заливкой на ховере */
:root[data-theme="light"] .btn-ghost { color: var(--primary-600); background: linear-gradient(#fff,#fff) padding-box, var(--brand-grad) border-box; border: 1px solid transparent; }
:root[data-theme="light"] .btn-ghost:hover { background: linear-gradient(180deg, rgba(215,168,79,.09), rgba(255,255,255,0)) padding-box, var(--brand-grad) border-box; color: var(--primary-600); box-shadow: 0 8px 18px rgba(215,168,79,.22); transform: translateY(-1px); }
:root[data-theme="light"] .btn-ghost:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(215,168,79,.16); }

/* Переключатель темы — плавающая кнопка (справа снизу) */
#theme-toggle { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom) + (var(--fab-size) + var(--fab-gap)) * 1); width: var(--fab-size); height: var(--fab-size); border-radius: 50%; display: grid; place-items: center; z-index: 910; line-height: 1; cursor: pointer; }
#theme-toggle:hover { transform: translateY(-2px); }
:root:not([data-theme="light"]) #theme-toggle { background: linear-gradient(180deg, var(--accent), var(--primary)); border: none; color: #071326; box-shadow: 0 10px 20px rgba(0,0,0,.35); }
:root[data-theme="light"] #theme-toggle { background: linear-gradient(180deg, #d8a74f, #9a7220); border: 1px solid rgba(154,114,32,.45); color: #231a0c; box-shadow: 0 10px 20px rgba(199,147,43,.28); }

/* Подсказка рядом с переключателем темы */
.theme-toast { position: fixed; right: calc(76px + env(safe-area-inset-right)); bottom: calc(92px + env(safe-area-inset-bottom)); padding: 8px 12px; border-radius: 10px; font-size: 14px; line-height: 1.2; pointer-events: none; opacity: 0; transform: translateY(6px); z-index: 905; animation: toastIn .25s ease forwards, toastOut .4s ease 4.2s forwards; }
:root[data-theme="light"] .theme-toast { background: #fff; border: 1px solid var(--brand-border-strong); color: #3a2b12; box-shadow: 0 8px 18px rgba(199,147,43,.24); }
:root:not([data-theme="light"]) .theme-toast { background: var(--card); border: 1px solid rgba(255,255,255,.12); color: var(--text); box-shadow: 0 8px 18px rgba(0,0,0,.35); }
@keyframes toastIn { to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* Иконка внутри переключателя темы */
#theme-toggle svg { width: 24px; height: 24px; display: block; }

/* Подсказка у чат‑кнопки при достижении блока заявки */
.chat-toast { position: fixed; right: calc(76px + env(safe-area-inset-right)); bottom: calc(22px + env(safe-area-inset-bottom)); padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.3; pointer-events: none; opacity: 0; transform: translateY(6px); z-index: 905; }
:root[data-theme="light"] .chat-toast { background: #fff; border: 1px solid var(--brand-border-strong); color: #3a2b12; box-shadow: 0 8px 18px rgba(199,147,43,.24); }
:root:not([data-theme="light"]) .chat-toast { background: var(--card); border: 1px solid rgba(255,255,255,.12); color: var(--text); box-shadow: 0 8px 18px rgba(0,0,0,.35); }
.chat-toast.show { animation: toastIn .25s ease forwards, toastOut .4s ease 4.2s forwards; }

/* Контактная форма: кнопки с явным контрастом, чтобы не сливались с фоном */
:root[data-theme="light"] #contact .form-actions { gap: 14px; }
:root[data-theme="light"] #contact .btn-primary {
  background: linear-gradient(180deg, #cc8e21, #8f6512);
  border: 1px solid #8f6512;
  color: #fff;
  box-shadow: 0 12px 24px rgba(143,101,18,.35);
}
:root[data-theme="light"] #contact .btn-primary:hover { box-shadow: 0 14px 28px rgba(143,101,18,.42); filter: saturate(112%); }
:root[data-theme="light"] #contact .btn-ghost {
  background: #ffffff;
  border: 2px solid #c7932b;
  color: #8f6512;
  box-shadow: 0 8px 18px rgba(199,147,43,.18);
}
:root[data-theme="light"] #contact .btn-ghost:hover { background: #fff9ef; }
.btn-ghost { background: transparent; }

/* Hero */
.hero { position: relative; min-height: 100vh; padding: 72px 0 34px; }
.hero-inner { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.subtitle { color: var(--muted); margin-top: 8px; }
.cta-row { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.hero-bullets { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); }
.hero-bullets li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; }
.hero-bullets li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: .55em; background: linear-gradient(180deg, var(--accent), var(--primary)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }
.hero-art { position: absolute; inset: 0; height: 100%; border-radius: 0; background: none; overflow: hidden; z-index: 0; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(90deg, rgba(122,36,255,.46) 0%, rgba(122,36,255,.30) 28%, rgba(122,36,255,.12) 52%, rgba(0,0,0,0) 72%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(90deg, rgba(0,0,0,.44) 0%, rgba(0,0,0,.28) 26%, rgba(0,0,0,0) 62%); backdrop-filter: blur(1.2px) saturate(110%); }
.glow { position: absolute; inset: -20%; background: radial-gradient(480px 280px at 30% 30%, rgba(124,92,255,.55), transparent 60%), radial-gradient(420px 240px at 70% 70%, rgba(0,209,178,.45), transparent 60%); filter: blur(30px); }
/* Тёмная тема — убираем фиолетовый оттенок с фото: нейтральная тень вместо цвета */
:root:not([data-theme="light"]) .glow { background: radial-gradient(480px 280px at 30% 30%, rgba(0,0,0,.22), transparent 60%), radial-gradient(420px 240px at 70% 70%, rgba(0,0,0,.16), transparent 60%); }

/* Светлая тема — убираем фиолетовую подсветку hero */
:root[data-theme="light"] .glow { display: none; }
/* Светлая тема — тёплый оранжевый градиент и подсветка контраста под текст */
:root[data-theme="light"] .hero::before { background: linear-gradient(90deg, rgba(212,138,28,.42) 0%, rgba(212,138,28,.26) 28%, rgba(212,138,28,.10) 52%, rgba(255,255,255,0) 72%); }
:root[data-theme="light"] .hero::after { background: linear-gradient(90deg, rgba(255,255,255,.76) 0%, rgba(255,255,255,.48) 28%, rgba(255,255,255,0) 65%); backdrop-filter: blur(1.2px) saturate(105%); }
/* Светлая тема — тёплый оранжевый градиент слева */
:root[data-theme="light"] .hero::before { background: linear-gradient(90deg, rgba(212,138,28,.42) 0%, rgba(212,138,28,.26) 28%, rgba(212,138,28,.10) 52%, rgba(255,255,255,0) 72%); }
/* Возвращаем исходный стиль текста */
:root[data-theme="light"] .hero-img { opacity: .75; filter: saturate(105%) contrast(105%); }
:root[data-theme="light"] .hero-copy::before { content: none; }
/* Акцент снова градиентный */
:root[data-theme="light"] .headline-accent { background: linear-gradient(90deg, #c7932b, #9a7220); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Доп. стили hero */
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: .75; filter: saturate(105%) contrast(105%); transform: translateY(0); will-change: transform; }
.hero-copy { position: relative; z-index: 2; max-width: 680px; }
.hero h1 { margin-top: 8vh; }
.hero .subtitle { max-width: 640px; }
.headline-accent { background: linear-gradient(90deg, #ffffff, #b8b2ff 55%, var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; text-transform: uppercase; letter-spacing: .5px; }
/* Тёмная тема — лёгкая окантовка текста для читаемости */
:root:not([data-theme="light"])
 .hero h1,
:root:not([data-theme="light"]) .hero .subtitle { text-shadow: 0 2px 10px rgba(0,0,0,.45); }
/* Светлая тема — мягкая белая подложка-тень вокруг текста для контраста на фото */
:root[data-theme="light"] .hero h1,
:root[data-theme="light"] .hero .subtitle { text-shadow: 0 1px 0 rgba(255,255,255,.9), 0 8px 20px rgba(0,0,0,.08); }
/* Темная тема — используем другое изображение для hero */
:root:not([data-theme="light"]) .hero-img { content: url('../img/avatar.jpeg'); }

/* Метрики под буллетами */
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-top: 16px; max-width: 560px; }
.hero-stats .stat { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); border: 1px solid rgba(0,234,255,.16); border-radius: 12px; padding: 10px 12px; }
:root[data-theme="light"] .hero-stats .stat { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-1); }
.hero-stats .value { font-size: 22px; font-weight: 800; line-height: 1; }
.hero-stats .label { color: var(--muted); font-size: 12px; }

/* Брендированные акценты в светлой теме — хедер одного цвета */
:root[data-theme="light"] .site-header { background: var(--header-bg); box-shadow: 0 1px 0 rgba(154,114,32,.24); transition: background .25s ease, box-shadow .25s ease; }
:root[data-theme="light"] .site-header.header-solid,
:root[data-theme="light"] .site-header.header-contrast { background: var(--header-bg); box-shadow: 0 1px 0 rgba(154,114,32,.24); }
:root[data-theme="light"] .headline-accent { background: none; -webkit-background-clip: initial; background-clip: initial; color: #0f0f10; }
:root[data-theme="light"] .btn { border-color: var(--brand-border); }
:root[data-theme="light"] .btn-ghost { background: transparent; border-color: rgba(154,114,32,.32); }
:root[data-theme="light"] .service-tab { border-color: rgba(154,114,32,.36); }
:root[data-theme="light"] .service-tab.active { background: linear-gradient(180deg, #d8a74f, #9a7220); color: #fff; border-color: transparent; }
:root[data-theme="light"] .case .tag { background: rgba(199,147,43,.14); border-color: rgba(154,114,32,.28); color: #6b5d46; }
:root[data-theme="light"] .faq-question { border-color: rgba(154,114,32,.24); }
:root[data-theme="light"] .faq-question:hover { border-color: rgba(199,147,43,.55); }
:root[data-theme="light"] .price .num { color: var(--primary-600); }
:root[data-theme="light"] .form-status { background: rgba(199,147,43,.08); border-color: rgba(199,147,43,.25); }
:root[data-theme="light"] .back-to-top { background: linear-gradient(180deg, var(--primary), var(--primary-600)); }
:root[data-theme="light"] .chat-fab { background: linear-gradient(180deg, var(--accent), var(--primary)); color: #231a0c; }
:root[data-theme="light"] .social:hover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(226,178,90,.15), 0 0 14px rgba(199,147,43,.32); }

/* Формы в светлой теме: светлые поля и контрастный фокус */
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid var(--brand-border);
  box-shadow: 0 2px 0 rgba(0,0,0,.02);
}
:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder { color: #8a7f6a; opacity: .8; }
:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus { outline: none; border-color: var(--brand-border-strong); box-shadow: 0 0 0 3px rgba(215,168,79,.22); }
:root[data-theme="light"] input[type="checkbox"] { accent-color: var(--primary-600); }

/* Ссылки и навигация в светлой теме */
:root[data-theme="light"] a { color: var(--primary-600); }
/* Меню — делаем темным для лучшей читаемости на светлом фоне */
:root[data-theme="light"] .nav-list a { color: var(--text); opacity: .96; }
:root[data-theme="light"] .nav-list a:hover { color: var(--primary-600); }

/* Tabs / Services в светлой теме — нейтральный стиль */
:root[data-theme="light"] .services-tabs { border: 1px solid var(--line-strong); background: linear-gradient(180deg, #fff, rgba(0,0,0,.02)); box-shadow: inset 0 1px 0 var(--line-highlight); }
:root[data-theme="light"] .service-tab { color: #2a2a2a; border-color: var(--line-soft); }
:root[data-theme="light"] .service-tab.active { background: #fff; border-color: var(--line-strong); box-shadow: 0 2px 8px rgba(0,0,0,.06); color: #000; }

/* Светлая тема — контрастная кнопка в хедере, чтобы не сливалась */
:root[data-theme="light"] .site-header .btn-primary {
  background: linear-gradient(180deg, #f0b23f, #a36212);
  border: 1px solid rgba(163,98,18,.85);
  color: #fff;
  box-shadow: 0 8px 18px rgba(133,92,20,.35), 0 0 0 2px rgba(255,255,255,.9);
}
:root[data-theme="light"] .site-header .btn-primary:hover {
  filter: saturate(112%);
  box-shadow: 0 10px 22px rgba(133,92,20,.42), 0 0 0 2px rgba(255,255,255,1);
}

/* Секции в светлой теме: явное чередование (без слияния) */
:root[data-theme="light"] .section::before { background: none; }
:root[data-theme="light"] main > section:nth-of-type(odd) { background: var(--surface-odd); box-shadow: inset 0 1px 0 var(--line-highlight); }
:root[data-theme="light"] main > section:nth-of-type(even) { background: var(--surface-even); box-shadow: inset 0 1px 0 var(--line-highlight); }

/* Карточки с тёплой рамкой и тенью */
:root[data-theme="light"] .card,
:root[data-theme="light"] .catalog-card,
:root[data-theme="light"] .price,
:root[data-theme="light"] .case { border-color: var(--line-strong); box-shadow: var(--elev-1); }
:root[data-theme="light"] .card { background: #fff; }
:root[data-theme="light"] .card:hover,
:root[data-theme="light"] .catalog-card:hover,
:root[data-theme="light"] .case:hover { border-color: var(--line-strong); box-shadow: var(--elev-2); }

/* Hero картинка с мягкой рамкой в светлой теме */
:root[data-theme="light"] .hero-art { border: 1px solid rgba(154,114,32,.22); }

/* Выделение текста в фирменном цвете */
::selection { background: rgba(199,147,43,.28); color: #1a1a1a; }

/* Больше бренда на контролах: бордер‑градиент у вторичных кнопок */
:root[data-theme="light"] .btn-ghost { color: var(--primary-600); background: linear-gradient(#fff,#fff) padding-box, linear-gradient(180deg, #f7cc77, #d48a1c) border-box; border: 1px solid transparent; }
:root[data-theme="light"] .btn-ghost:hover { background: linear-gradient(180deg, rgba(247,204,119,.16), rgba(255,255,255,0)) padding-box, linear-gradient(180deg, #f7cc77, #d48a1c) border-box; }

/* FAQ элементы и границы более читабельные */
:root[data-theme="light"] .faq-question { background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(255,255,255,0)); border: 1px solid var(--line-strong); box-shadow: inset 0 1px 0 var(--line-highlight); }
:root[data-theme="light"] .faq-answer { border-left-color: var(--primary-600); }

/* Разделители и маркиз в бренде */
:root[data-theme="light"] .section-divider.wave { background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(255,255,255,0)); opacity: .95; box-shadow: inset 0 1px 0 rgba(255,255,255,.95); }
:root[data-theme="light"] .marquee { background: linear-gradient(180deg, rgba(0,0,0,.03), rgba(255,255,255,0)); border-block: none; position: relative; }
:root[data-theme="light"] .marquee::before,
:root[data-theme="light"] .marquee::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: linear-gradient(180deg, var(--line-highlight), var(--line-soft)); }
:root[data-theme="light"] .marquee::before { top: 0; }
:root[data-theme="light"] .marquee::after { bottom: 0; transform: scaleY(-1); }
:root[data-theme="light"] .marquee-track { color: #7a4c10; }

/* Секции */
.section { padding: 56px 0; position: relative; }
.section::before { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(600px 220px at 8% 0%, rgba(122,36,255,.12), transparent 60%),
  radial-gradient(600px 220px at 92% 0%, rgba(0,234,255,.10), transparent 60%);
}
/* Узор поверх секций — тонкий и ненавязчивый */
.section::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: var(--pattern), repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 24px), repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 24px); background-repeat: repeat, repeat, repeat; background-size: 120px 120px, 24px 24px, 24px 24px; opacity: .10; mix-blend-mode: soft-light; z-index: 0; }
/* Темы: в светлой — делаем заметнее и с overlay, чтобы узор читался */
:root[data-theme="light"] .section::after { opacity: .18; mix-blend-mode: multiply; background-size: 160px 160px, 28px 28px, 28px 28px; background-image: var(--pattern), repeating-linear-gradient(0deg, rgba(154,114,32,.10) 0 1px, transparent 1px 28px), repeating-linear-gradient(90deg, rgba(154,114,32,.10) 0 1px, transparent 1px 28px); }
:root:not([data-theme="light"]) .section::after { opacity: .12; mix-blend-mode: screen; }
/* В светлой теме — без фиолетовых акцентов в общих секциях */
:root[data-theme="light"] .section::before { background: radial-gradient(600px 220px at 8% 0%, rgba(215,168,79,.10), transparent 60%), radial-gradient(600px 220px at 92% 0%, rgba(154,114,32,.08), transparent 60%); }
.section-accent { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); }
main > section:nth-of-type(odd) { background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)); }
main > section:nth-of-type(even) { background: linear-gradient(180deg, rgba(0,234,255,.035), rgba(122,36,255,.035)); }
.section.v1::before { background: radial-gradient(640px 240px at 8% 0%, rgba(122,36,255,.18), transparent 60%); }
.section.v2::before { background: radial-gradient(640px 240px at 92% 0%, rgba(0,234,255,.16), transparent 60%); }
.section.v3::before { background: radial-gradient(900px 320px at 50% 0%, rgba(0,234,255,.12), transparent 65%); }
.section.v4::before { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); }
.section.v5::before { background: linear-gradient(135deg, rgba(122,36,255,.14), transparent 60%), linear-gradient(225deg, rgba(0,234,255,.12), transparent 60%); }
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)); border: 1px solid rgba(0,234,255,.18); border-radius: var(--radius); padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.card:hover { border-color: rgba(0,234,255,.3); box-shadow: 0 14px 36px rgba(0,0,0,.38); }
.card, .price, .catalog-card, .testimonial, .steps li, .case .case-media {
  position: relative; z-index: 1; /* контент и карточки выше узора */
}
.benefit { position: relative; overflow: hidden; }
.benefit::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 1px; background: linear-gradient(90deg, rgba(0,234,255,.6), rgba(122,36,255,.6)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .6; pointer-events: none; }
.benefit { backdrop-filter: blur(6px); }
/* Выровнять высоту карточек в блоке преимуществ */
#benefits .cards-grid { align-items: stretch; }
#benefits .benefit { display: flex; flex-direction: column; height: 100%; }
/* Выровнять текст: фиксируем высоту заголовка и прижимаем описание вниз */
#benefits .benefit h3 { min-height: calc(1.25em * 2); hyphens: auto; overflow-wrap: anywhere; word-break: break-word; }
#benefits .benefit p { margin-top: auto; }

/* Логотипы доверия */
.logos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; align-items: center; }
.logo-badge { border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 14px 16px; text-align: center; color: var(--muted); font-weight: 700; letter-spacing: .5px; background: rgba(255,255,255,.02); }
:root[data-theme="light"] .logo-badge { background: #fff; border: 1px solid var(--line-strong); color: #6a6a6a; box-shadow: 0 4px 10px rgba(0,0,0,.05); }

/* Блок доверия под hero */
.trusted-brands { margin-top: -4px; padding-bottom: 8px; }

.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); }
.services-tabs { display: inline-flex; gap: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)); margin-bottom: 16px; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.service-tab { height: 36px; padding: 0 12px; border-radius: 8px; background: transparent; color: var(--text); border: 1px solid transparent; cursor: pointer; }
.service-tab:hover { background: rgba(255,255,255,.06); border-color: rgba(0,234,255,.22); }
.service-tab.active { background: rgba(255,255,255,.09); border-color: rgba(0,234,255,.22); }
.services-group { margin-top: 8px; }
.services-cta { display: flex; justify-content: center; margin-top: 16px; }
.hidden { display: none; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Блок «Услуги»: делаем заголовок заметно крупнее, чем заголовки карточек */
#services { --fs-h2: clamp(32px, 5vw, 46px); --fs-h3: clamp(15px, 1.6vw, 18px); }
#services h2 { margin: 0 0 16px; font-weight: 800; display: block; }
#services .service h3 { font-size: clamp(15px, 1.6vw, 18px); font-weight: 700; margin: 0 0 6px; }
#services .service p { color: var(--muted); }
#services .services-tabs { margin-top: 4px; }
.about-lead { color: var(--muted); margin: 8px 0 14px; max-width: 820px; }
.card ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); }

/* О нас — более выразительный стиль */
#about { position: relative; }
#about::before { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(600px 260px at 8% 0%, rgba(122,36,255,.18), transparent 60%),
  radial-gradient(600px 260px at 92% 0%, rgba(0,234,255,.14), transparent 60%);
}
#about .cards-grid { gap: 18px; }
#about .card { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)); border: 1px solid rgba(0,234,255,.14); backdrop-filter: blur(6px); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
#about .card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,.35); border-color: rgba(0,234,255,.3); }
#about .card h3 { position: relative; padding-left: 22px; }
#about .card h3 { line-height: 1.2; }
#about .card h3::before { content: ""; position: absolute; left: 0; top: 0.65em; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(180deg, var(--accent), var(--primary)); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
#about .cards-grid article:nth-child(2) h3::before { background: linear-gradient(180deg, #7a24ff, #00eaff); }
#about .cards-grid article:nth-child(3) h3::before { background: linear-gradient(180deg, #00eaff, #7a24ff); }
#about .card ul { list-style: none; padding-left: 0; }
#about .card ul li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; margin: 10px 0; line-height: 1.5; }
#about .card ul li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: .55em; background: linear-gradient(180deg, var(--accent), var(--primary)); box-shadow: inset 0 0 0 2px rgba(255,255,255,.06); }

/* Светлая тема — золотые маркеры и точки в блоке "О нас" */
:root[data-theme="light"] #about::before { background: none; }
:root[data-theme="light"] #about .card { background: #fff; border: 1px solid var(--brand-border-strong); box-shadow: 0 10px 24px rgba(199,147,43,.14); backdrop-filter: none; }
:root[data-theme="light"] #about .card:hover { box-shadow: 0 14px 32px rgba(199,147,43,.22); border-color: var(--brand-border-strong); }
:root[data-theme="light"] #about .card h3 { padding-left: 0; margin: 0 0 8px; }
:root[data-theme="light"] #about .card h3::before { display: none; }
:root[data-theme="light"] #about .card ul { list-style: none; padding-left: 0; }
:root[data-theme="light"] #about .card ul li { display: grid; grid-template-columns: 12px 1fr; gap: 10px; align-items: start; }
:root[data-theme="light"] #about .card ul li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-top: .55em; background: linear-gradient(180deg, #f7cc77, #d48a1c); box-shadow: 0 0 0 2px #fff; }
:root[data-theme="light"] #about .card ul li + li { border-top: 1px dashed var(--line-soft); padding-top: 8px; margin-top: 8px; }
/* Тонкая акцентная линия сверху каждой карточки */
:root[data-theme="light"] #about .card { position: relative; }
:root[data-theme="light"] #about .card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-grad); border-top-left-radius: var(--radius); border-top-right-radius: var(--radius); }
/* Чуть увеличиваем межстрочный интервал и отступы для читаемости */
#about .card { padding-bottom: 12px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 0; margin: 18px 0 0; }
.steps li { background: var(--card); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 14px; }
:root[data-theme="light"] .steps li { background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 6px 14px rgba(0,0,0,.06); }
:root[data-theme="light"] .step-title { color: #0f0f10; }
:root[data-theme="light"] .step-text { color: #5e5e5e; }
.step-title { display: block; font-weight: 700; }
.step-text { color: var(--muted); }

/* Табы процесса */
.tabs { display: inline-flex; gap: 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px; background: rgba(255,255,255,.02); }
.tab { height: 36px; padding: 0 12px; border-radius: 8px; background: transparent; color: var(--text); border: 1px solid transparent; }
.tab.active { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.tab-panel { margin-top: 12px; }
.hidden { display: none; }

.case { position: relative; }
.case h3 { margin-bottom: 6px; }
.case .tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; margin-right: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.case .case-media { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; margin-bottom: 10px; border: 1px solid rgba(255,255,255,.08); }
:root[data-theme="light"] .case .case-media { border-color: var(--line-strong); box-shadow: 0 6px 12px rgba(0,0,0,.06); }
.case .case-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.case:hover .case-media img { transform: scale(1.04); }
.case a.case-overlay-link { position: absolute; inset: 0; z-index: 5; border-radius: var(--radius); }

/* Ровная сетка кейсов: 3 колонки на десктопе */
#cases .cards-grid { grid-template-columns: repeat(3, 1fr); }

/* Фильтры кейсов — чипы */
.case-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; }
.chip:hover { border-color: rgba(0,234,255,.28); }
.chip.active { background: linear-gradient(180deg, var(--accent), var(--primary)); border: none; color: #071326; }
:root[data-theme="light"] .chip { background: #fff; border: 1px solid var(--line-strong); color: #3a2b12; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
:root[data-theme="light"] .chip.active { background: linear-gradient(180deg, #f7cc77, #d48a1c); color: #fff; border: none; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.price { background: var(--card); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
:root[data-theme="light"] .price { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-2); }
:root[data-theme="light"] .price .num { color: #000; }
:root[data-theme="light"] .hint { color: #6a6a6a; }
.price .num { font-size: 24px; font-weight: 800; margin: 10px 0; color: #fff; }
.hint { color: var(--muted); margin-top: 10px; }

/* Каталог услуг */
.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 10px 0 20px; }
.catalog-card { background: var(--card); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 16px; transition: transform .25s ease, box-shadow .25s ease; }
:root[data-theme="light"] .catalog-card { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-1); }
:root[data-theme="light"] .catalog-card:hover { box-shadow: var(--elev-2); }
.catalog-card:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(0,0,0,.35); }
.catalog-card .desc { color: var(--muted); margin: 4px 0 6px; }
.catalog-card .num { font-size: 20px; font-weight: 800; margin: 6px 0; color: #fff; }
.catalog-card .host { color: var(--muted); font-size: 14px; }
:root[data-theme="light"] .catalog-card { background: linear-gradient(180deg, rgba(215,168,79,.06), rgba(255,255,255,0)) , #fff; border: 1px solid var(--brand-border-strong); box-shadow: 0 10px 24px rgba(0,0,0,.06); }
:root[data-theme="light"] .catalog-card:hover { box-shadow: 0 14px 28px rgba(215,168,79,.24); }
:root[data-theme="light"] .catalog-card .num { color: #1a1a1a; }

/* Форма */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.span-2 { grid-column: span 2; }
label span { display: inline-block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
input, select, textarea {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  color: var(--text);
  background: #12142b;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
}
textarea { height: auto; resize: vertical; min-height: 100px; }
.consent { display: flex; align-items: center; gap: 10px; }
.consent input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.form-hint { color: var(--muted); font-size: 14px; }
.invalid { border-color: var(--danger) !important; }
.error-text { color: var(--danger); margin-top: -6px; margin-bottom: 6px; display: block; }
.error-text[hidden] { display: none !important; }
.form-status { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(0,234,255,.06); border: 1px solid rgba(0,234,255,.2); color: var(--text); display: none; }

/* Футер */
.site-footer { padding: 28px 0 40px; margin-top: 24px; background: radial-gradient(700px 240px at 10% -10%, rgba(122,36,255,.22), transparent 60%), radial-gradient(700px 240px at 90% -10%, rgba(0,234,255,.18), transparent 60%), var(--footer); border-top: 1px solid rgba(0,234,255,.25); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }

/* Светлая тема — выразительный разделитель под контентом, чтобы сайт не «сливался» с подвалом */
:root[data-theme="light"] .site-footer { background: linear-gradient(180deg, rgba(215,168,79,.14), rgba(241,237,230,1)); border-top: 1px solid var(--brand-border-strong); box-shadow: inset 0 1px 0 rgba(154,114,32,.28); }
:root[data-theme="light"] .site-footer { color: #3a2b12; }
:root[data-theme="light"] .site-footer a { color: #3a2b12; }
:root[data-theme="light"] .site-footer a:hover { color: var(--primary-600); }
:root[data-theme="light"] .footer-col h4 { color: var(--primary-600); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.footer-contacts { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-copy { color: var(--muted); font-size: 14px; grid-column: 1 / -1; }

/* Переработанный футер */
.footer-inner.redesigned { grid-template-columns: 2fr 1fr; align-items: start; gap: 20px; }
.footer-col h4 { margin: 0 0 8px; font-size: 16px; color: #fff; }
.footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.socials { display: flex; gap: 12px; margin-top: 8px; }
.social { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; border: 1px solid rgba(255,255,255,.16); background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); color: var(--text); transition: transform .12s ease, box-shadow .2s ease, border-color .2s ease; cursor: pointer; }
.social:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0,234,255,.06), 0 0 14px rgba(0,234,255,.28); }
.svg-icon { width: 26px; height: 26px; display: block; filter: drop-shadow(0 1px 0 rgba(0,0,0,.25)); }

/* Светлая тема — кнопки соцсетей в подвале тоже брендовые */
:root[data-theme="light"] .social { border: 1px solid var(--brand-border); background: linear-gradient(180deg, #fff, #fff); color: var(--primary-600); box-shadow: 0 6px 12px rgba(199,147,43,.18); }
:root[data-theme="light"] .social:hover { border-color: var(--primary-600); box-shadow: 0 8px 18px rgba(199,147,43,.24); }

/* Переход-оверлей */
.page-overlay { position: fixed; inset: 0; background: #0b0d1f; pointer-events: none; opacity: 0; transition: opacity .6s ease; z-index: 999; }
.page-overlay.active { opacity: 1; animation: overlayFadeOut .9s .2s forwards; }
@keyframes overlayFadeOut { to { opacity: 0; } }

/* Overlay меню */
.nav-modal.hidden { display: none; }
.nav-modal { position: fixed; inset: 0; z-index: 1000; }
.nav-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; }
.nav-panel { position: relative; margin: 8vh auto; width: min(720px, 92vw); background: var(--card); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; opacity: 0; transform: translateY(20px); padding: 16px; }
.nav-close { position: absolute; top: 8px; right: 8px; height: 36px; width: 36px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.14); }
.nav-overlay-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq-question { width: 100%; text-align: left; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(0,234,255,.14); background: rgba(255,255,255,.04); color: var(--text); transition: border-color .2s ease, background .2s ease; }
.faq-question:hover { border-color: rgba(0,234,255,.28); background: rgba(255,255,255,.06); }
.faq-answer { padding: 8px 12px; color: var(--muted); border-left: 2px solid var(--primary); }

/* Панель управления FAQ */
.faq-controls { display: flex; align-items: center; gap: 8px; margin: 6px 0 12px; }
.faq-controls .spacer { flex: 1; }
.faq-controls input[type="search"] { flex: 1; max-width: 420px; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: #12142b; color: var(--text); padding: 0 10px; }
:root[data-theme="light"] .faq-controls input[type="search"] { background: #fff; border: 1px solid var(--line-strong); color: #1a1a1a; box-shadow: 0 2px 0 rgba(0,0,0,.02); }

/* Back to top */
.back-to-top { position: fixed; right: calc(16px + env(safe-area-inset-right) + (var(--fab-size) - var(--fab-size-sm))/2); bottom: calc(16px + env(safe-area-inset-bottom) + (var(--fab-size) + var(--fab-gap)) * 2); width: var(--fab-size-sm); height: var(--fab-size-sm); border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--primary), var(--primary-600)); color: #fff; border: none; box-shadow: 0 10px 20px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .25s ease; z-index: 900; }
.back-to-top.show { opacity: 1; pointer-events: auto; }

/* Чат */
.chat-fab { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); width: var(--fab-size); height: var(--fab-size); border-radius: 50%; display: grid; place-items: center; background: linear-gradient(180deg, var(--accent), var(--primary)); color: #071326; font-weight: 800; border: none; box-shadow: 0 10px 20px rgba(0,0,0,.35); z-index: 900; font-size: 28px; }
.chat-window.hidden { display: none; }
.chat-window { position: fixed; right: calc(16px + env(safe-area-inset-right)); bottom: calc(132px + env(safe-area-inset-bottom)); width: min(360px, 92vw); background: var(--card); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; z-index: 950; }
.chat-window { backdrop-filter: blur(6px); }
:root[data-theme="light"] .chat-window { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-3); }
:root[data-theme="light"] .chat-header { border-bottom: 1px solid var(--line-strong); }
:root[data-theme="light"] .chat-form { border-top: 1px solid var(--line-strong); }
.chat-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.12); }
.chat-sub { color: var(--muted); font-size: 12px; }
.chat-close { height: 32px; width: 32px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.14); }
.chat-messages { max-height: 50vh; overflow: auto; padding: 10px; display: grid; gap: 8px; }
.msg { display: inline-block; padding: 8px 10px; border-radius: 12px; max-width: 80%; }
.msg.user { background: rgba(0,234,255,.12); border: 1px solid rgba(0,234,255,.3); justify-self: end; }
.msg.bot { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); justify-self: start; }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.chat-form input { flex: 1; height: 40px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: #12142b; color: var(--text); padding: 0 10px; }

/* Модалка шоурила */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; border: 0; padding: 0; white-space: nowrap; clip-path: inset(100%); clip: rect(0 0 0 0); overflow: hidden; }
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 1000; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0; }
.modal-dialog { position: relative; width: min(960px, 92vw); margin: 8vh auto; background: var(--card); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; transform: translateY(20px); opacity: 0; box-shadow: var(--shadow); }
:root[data-theme="light"] .modal-dialog { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-3); }
.modal-close { position: absolute; top: 8px; right: 8px; height: 36px; width: 36px; border-radius: 8px; background: rgba(255,255,255,.06); color: var(--text); border: 1px solid rgba(255,255,255,.14); }
.modal-body { padding: 12px; }
.video { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.modal .form-hint { margin-top: 10px; }

/* Горизонтальная лента работ */
.works-horizontal { position: relative; overflow: hidden; }
.works-track { position: relative; display: block; height: clamp(320px, 60vh, 560px); padding: 10px 20px 6px; min-width: 100%; }
.work-card { position: absolute; inset: 0; width: auto; height: auto; border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: #0f1226; opacity: 0; }
.work-media { aspect-ratio: 16/9; }
.work-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(105%); }
.work-overlay { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); }
.work-overlay p { color: var(--muted); margin: 4px 0 0; }

/* Липкий заголовок Works */
.works-head { position: sticky; top: 56px; z-index: 5; backdrop-filter: blur(6px); }
#works-title { margin: 0; }
#works-title-dynamic { background: linear-gradient(90deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Маркиз бренда */
.marquee { overflow: hidden; border-block: 1px solid rgba(255,255,255,.08); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015)); }
.marquee-track { display: inline-flex; gap: 28px; padding: 12px 0; white-space: nowrap; animation: marquee 24s linear infinite; font-weight: 800; letter-spacing: 2px; color: rgba(255,255,255,.6); }

/* Светлая тема — маркиз и линии без фиолетового (усилен контраст) */
:root[data-theme="light"] .marquee { background: linear-gradient(180deg, rgba(215,168,79,.08), rgba(255,255,255,0)); border-block-color: rgba(154,114,32,.34); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(154,114,32,.16); }
:root[data-theme="light"] .marquee-track { color: rgba(154,114,32,.82); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Разделители между секциями */
.section-divider { height: 34px; position: relative; }
.section-divider.wave { background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)); mask-image: radial-gradient(120% 180% at 50% 0%, #000 35%, transparent 36%); -webkit-mask-image: radial-gradient(120% 180% at 50% 0%, #000 35%, transparent 36%); opacity: .8; }
.section-divider::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(255,255,255,.5); }
/* Чистая двуслойная линия в светлой теме */
:root[data-theme="light"] .section-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(180deg, var(--line-highlight), var(--line-soft)); opacity: .95; }
:root[data-theme="light"] .section-divider::after { height: 0; }
.section-divider.angle-left { height: 22px; background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)); transform: skewY(-2deg); transform-origin: left top; opacity: .8; }
.section-divider.angle-right { height: 22px; background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)); transform: skewY(2deg); transform-origin: right top; opacity: .8; }

/* Светлая тема — разделители чуть более заметны и в бренде */
:root[data-theme="light"] .section-divider.angle-left,
:root[data-theme="light"] .section-divider.angle-right { background: linear-gradient(180deg, rgba(215,168,79,.22), rgba(255,255,255,0)); box-shadow: inset 0 1px 0 rgba(255,255,255,.95); }
:root[data-theme="light"] .section-divider { border-top: none; }
:root[data-theme="light"] .section-divider::after { background: rgba(255,255,255,.85); }

/* Заголовки секций — без подчёркивания, с аккуратным letter-spacing */
.section h2 { position: relative; display: inline-block; }
/* Убираем псевдоэлементы подчёркивания */
:root:not([data-theme="light"]) .section h2::after,
:root[data-theme="light"] .section h2::after { content: none; }

/* Кнопки в светлой теме — базовая контрастность на любых фонах секций */
:root[data-theme="light"] .btn-primary { color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.18); }
:root[data-theme="light"] .btn { color: #3a2b12; }

/* Планы (подписки) */
.plans .plan { display: flex; flex-direction: column; gap: 12px; }
.plan .plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.plan .badge { align-self: flex-start; font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(124,92,255,.18); }
.plans .popular { box-shadow: 0 14px 36px rgba(122,36,255,.22); border-color: rgba(122,36,255,.45); }
.plans .plan ul { color: var(--muted); }
.plans .plan .btn { margin-top: auto; }

/* Пакеты — сетка и «полосатые» карточки */
.plans { margin: 10px 0 16px; }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: var(--card); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 16px; position: relative; overflow: hidden; }
.plan::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient( 0deg, rgba(255,255,255,.04) 0 2px, transparent 2px 18px ); opacity: .35; }
:root[data-theme="light"] .plan { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-1); }
:root[data-theme="light"] .plan::after { background: repeating-linear-gradient( 0deg, rgba(154,114,32,.08) 0 2px, transparent 2px 18px ); opacity: .45; }
.plan .price-line { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.plan .num { font-size: 22px; font-weight: 800; }
.plans .popular { border: 1px solid rgba(122,36,255,.45); }
:root[data-theme="light"] .plans .popular { box-shadow: 0 14px 32px rgba(199,147,43,.24); border-color: var(--brand-border-strong); }
.plans .popular .badge { background: linear-gradient(180deg, var(--accent), var(--primary)); border: none; color: #071326; }

@media (max-width: 960px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .plans-grid { grid-template-columns: 1fr; }
}

/* Отзывы */
.testimonials-horizontal { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.testimonials-track { display: inline-flex; gap: 16px; padding: 10px 20px; }
.testimonial { width: clamp(280px, 42vw, 560px); flex: 0 0 auto; border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.025)); border: 1px solid rgba(0,234,255,.16); padding: 18px; position: relative; overflow: hidden; }
:root[data-theme="light"] .testimonial { background: #fff; border: 1px solid var(--line-strong); box-shadow: var(--elev-1); }
:root[data-theme="light"] .testimonial::before { color: rgba(0,0,0,.04); }
.rating-summary { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.rating-score strong { font-size: 22px; }
.rating-stars { color: #ffd36b; letter-spacing: 2px; font-size: 18px; }
.rating-count { color: var(--muted); }
.test-nav { margin-left: auto; display: flex; gap: 6px; }
.test-nav .btn { height: 32px; padding: 0 10px; border-radius: 8px; }
.testimonial::before { content: "\201C"; position: absolute; top: -20px; right: 14px; font-size: 120px; line-height: 1; color: rgba(255,255,255,.06); font-family: Georgia, serif; pointer-events: none; }
.testimonial .t-head { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.testimonial .avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); object-fit: cover; clip-path: inset(6% 0 6% 0 round 50%); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.testimonial .avatar.initials { background: linear-gradient(180deg, var(--accent), var(--primary)); color: #071326; border: none; clip-path: none; }
.testimonial .avatar.empty { border: 0; background: transparent; }
.testimonial .meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.testimonial .stars { color: #ffd36b; font-size: 16px; letter-spacing: 1px; }
.testimonial .quote { font-size: 18px; }

/* Респонсив */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-img { object-position: 50% 50%; }
  .header-inner { padding: 12px 0; }
  .hero { padding: 56px 0 28px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .logos { grid-template-columns: repeat(3, 1fr); }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-toggle { display: none; }
  .menu-open { display: inline-flex; height: 36px; padding: 0 12px; border-radius: 8px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,.18); }
  .nav-list { display: none; }
  .hero-inner { gap: 16px; }
  .hero-art { height: 100%; margin-top: 0; }
  .hero .glow { display: none; }
  .cta-row { flex-direction: column; gap: 10px; }
  .cta-row .btn { width: 100%; }
  .hero-img { object-position: 50% 50%; }
  .hero { padding: 46px 0 24px; }
  .cta-row .btn { height: 42px; padding: 0 16px; }
  .cards-grid, .services-grid, .pricing-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .logos { grid-template-columns: repeat(2, 1fr); }
  .catalog-grid { grid-template-columns: 1fr; }
  .services-tabs { margin-bottom: 10px; }
  .chat-window { width: min(420px, 96vw); }
}

@media (min-width: 960px) {
  .logo { font-size: 28px; }
}


