/* =========================
  Базовая тема и типографика
========================= */
:root {
  /* Шрифтовые переменные для глобальной смены гарнитур */
  --primary-font-family: "Sansation-Light";
  --secondary-font-family: "Sansation-Regular";

  /* Готовые стековые значения шрифтов */
  --primary-font: var(--primary-font-family), sans-serif;
  --secondary-font: var(--secondary-font-family);
  /* Путь к основному файлу шрифта для @font-face */
  --primary-font-url: url("./assets/fonts/Sansation-Light.ttf");

  --bg-page: #121214; /* сплошной темно-серый фон сайта */
  --bg-1: #0a0a0b;
  --bg-2: #17171a;
  --text: #ffffff;
  --muted: #c9c9d1;

  --primary-1: #6a11cb; /* основной фиолетовый оттенок */
  --primary-2: #b086f9; /* дополнительный сиреневый оттенок */

  --card: rgba(255,255,255,0.06);
  --card-border: rgba(255,255,255,0.12);
  /* Непрозрачный аналог --card-border для текстовых заливок */
  --card-border-solid: #1f1f1f;
  --radius-sm: 10px;

  --container: 1160px;
  --gap: 24px;
  --z-hero: 1;
  --z-overlay: 2;
  --z-header: 10;
  --z-arrows: 5;
  --header-h: 72px;
}

@media (max-width: 768px) {
  :root {
    --gap: 18px;
    --header-h: 64px;
  }
}

@media (max-width: 480px) {
  :root {
    --gap: 14px;
  }
}

@media (min-width: 1600px) {
  :root {
    --container: 1360px;
    --gap: 32px;
    --header-h: 84px;
  }

  body {
    font-size: 18px;
  }

  h1 {
    font-size: clamp(56px, 4.5vw, 96px);
  }

  h2 {
    font-size: clamp(40px, 3.6vw, 72px);
  }

  h3 {
    font-size: clamp(24px, 2.4vw, 36px);
  }

  .logo {
    font-size: 2.6rem;
  }

  .btn {
    height: 52px;
    padding: 0 26px;
    font-size: 17px;
  }

  .header-nav a {
    height: 52px;
    font-size: 17px;
  }

  .lang-switcher__toggle {
    height: 44px;
    padding: 0 52px 0 20px;
    font-size: 14px;
  }

  .hero .cta-row {
    gap: 18px;
  }

  .cards {
    gap: 22px;
  }

  .card {
    padding: 26px;
  }

  .packages {
    gap: 18px;
  }

  .pkg-body {
    padding: 22px;
  }
}

/* Подключаем основной шрифт Sansation-Light */
@font-face {
  font-family: "Sansation-Light";
  src: url("./assets/fonts/Sansation-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Подключаем вторичный шрифт Sansation-Regular */
@font-face {
  font-family: "Sansation-Regular";
  src: url("./assets/fonts/Sansation-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

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

html {
  overflow-x: hidden; /* убираем горизонтальный скролл и пустое пространство справа */
  scroll-behavior: smooth;
  /* Используем ровный темный фон вместо градиента */
  background: var(--bg-page);
}

body {
  margin: 0;
  color: var(--text);
  font: 400 16px/1.55 var(--secondary-font);
  overflow-x: hidden;
  width: 100%;
  /* Смягчаем вертикальный скролл, отключая snap по умолчанию */
  scroll-snap-type: none;
  padding-top: var(--header-h); /* оставляем место под фиксированный хедер */
}

/* Включаем плавный snap только на больших экранах */
@media (min-width: 1200px) {
  body { scroll-snap-type: y proximity; }
  .section { scroll-snap-align: start; }
  /* Гарантируем остановку якоря на секции Services, а не выше */
  #services { scroll-snap-stop: always; }
}

a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gap));
  margin: 0 auto;
  padding: 0 var(--gap);
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }
}

h1, h2, h3 {
  font-family: var(--primary-font);
  letter-spacing: 0.03em;
  margin: 0 0 12px;
  line-height: 1.1;
}

h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(18px, 2.2vw, 22px); }

p { color: var(--muted); margin: 0 0 12px; }

/* Кнопки */
/* === Сброс стилей кнопок, убираем артефакт слева === */
.btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  line-height: 1;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  border: 0; /* убираем светящийся ореол от border */
  outline: none;
  background: none; /* фон задается в конкретных модификаторах */
  overflow: hidden; /* обрезаем субпиксельные артефакты */
  transition: transform .2s ease, box-shadow .3s ease, opacity .2s ease, background-color .2s ease;
  -webkit-tap-highlight-color: transparent;
  backface-visibility: hidden;
  transform: translateZ(0); /* устраняем артефакты сглаживания */
  -webkit-font-smoothing: antialiased;
  background-clip: padding-box;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  box-shadow: 0 8px 24px rgba(138, 88, 255, .35);
  transition: background 0.2s;
}
.btn-primary:hover {
  /* Убираем зеркалирование цветов, делаем фон чуть светлее */
  background: linear-gradient(135deg, #7a21db, #c096f9);
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(138,88,255,.32), 0 8px 24px rgba(138, 88, 255, .35);
}

/* Делаем кнопку-призрак плотнее, чтобы не было ореола на размытом фоне */
.btn-ghost {
  color: #fff;
  background-color: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background-color: rgba(255,255,255,.10); border-color: rgba(255,255,255,.28); }
.btn-ghost:focus-visible { box-shadow: 0 0 0 3px rgba(138,88,255,.25); }

/* Элементы шапки тянутся по высоте кнопки без артефактов */
.header-nav a.btn { height: 44px; padding: 0 18px; }

/* =========================
  Шапка
========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: rgba(10,10,11,.55);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  font-family: var(--primary-font); /* подключаем основной шрифт для шапки */
  transition: transform .24s ease;
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  font-family: var(--primary-font); /* используем основной шрифт в логотипе */
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  height: 100%; /* выравниваем по высоте с остальными элементами шапки */
  margin-top: -2px; /* легкая коррекция для визуального выравнивания */
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
/* Выравниваем ссылки навигации по центру кнопок */
.header-nav a {
  display: inline-flex;
  align-items: center;
  height: 44px; /* та же высота, что и у кнопок */
  margin: 0 5px; /* добавляем промежуток между кнопками */
}
.header-nav a, .header-nav .btn { line-height: 1; }
.header-nav a { align-items: center; }
.header-nav a { opacity: .9; }
.header-nav a:hover { opacity: 1; }
/* Стили активной ссылки в шапке */
.header-nav a.active {
  transform: scale(1.15) translateY(-2px); /* небольшой подъем и масштаб */
  transform-origin: center; /* масштабируем относительно центра */
  color: white; /* активный пункт всегда белый */
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Кнопка-гамбургер: скрыта на десктопе */
.menu-toggle {
  display: none;
  width: 44px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(38,38,44,.92), rgba(62,62,70,.9));
  color: #fff;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column; /* Полоски в столбик */
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease;
}
/* При открытом меню полоски не меняются */

/* Подсветка кнопки бургера при открытом меню (фиолетовая, как у переключателя языка) */
.menu-open #menu-toggle {
  border-color: rgba(176,134,249,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 3px rgba(138,88,255,.32), 0 14px 34px rgba(0,0,0,.55);
}

/* Стеклянный стиль для кнопки «Контакты» в шапке */
.header-nav a[href="#contact"].btn,
.header-nav a[href="#contact"].btn-primary {
  color: #fff;
  background: linear-gradient(135deg, rgba(107, 17, 203, 0.721), rgba(176, 134, 249, 0.523));
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(138, 88, 255, .28);
}
.header-nav a[href="#contact"].btn:hover,
.header-nav a[href="#contact"].btn-primary:hover {
  background: linear-gradient(135deg, rgba(123, 33, 219, 0.762), rgba(191, 150, 249, 0.507));
  border-color: rgba(255,255,255,.28);
}
.header-nav a[href="#contact"].btn:focus-visible,
.header-nav a[href="#contact"].btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(138,88,255,.25), 0 8px 24px rgba(138, 88, 255, .28);
}

.lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  min-width: 0;
}

.lang-switcher__toggle {
  appearance: none;
  -webkit-appearance: none;
  height: 38px;
  padding: 0 44px 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(38,38,44,.92), rgba(62,62,70,.9));
  color: #f5f6ff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 28px rgba(0,0,0,.45);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease, background .25s ease;
  position: relative;
  font-family: var(--primary-font);
  -webkit-tap-highlight-color: transparent;
}

.lang-switcher__toggle:hover {
  border-color: rgba(255,255,255,.26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 14px 34px rgba(0,0,0,.55);
}

.lang-switcher__toggle:focus-visible {
  border-color: rgba(176,134,249,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 3px rgba(138,88,255,.32), 0 14px 34px rgba(0,0,0,.55);
}

.lang-switcher[data-open="true"] .lang-switcher__toggle {
  border-color: rgba(176,134,249,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 16px 40px rgba(0,0,0,.6);
}

.lang-switcher__value {
  pointer-events: none;
}

.lang-switcher__chevron {
  position: absolute;
  right: 18px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255,255,255,.72);
  border-bottom: 2px solid rgba(255,255,255,.72);
  transform: translateY(-50%) rotate(45deg);
  transition: transform .22s ease, border-color .22s ease;
  pointer-events: none;
}

.lang-switcher[data-open="true"] .lang-switcher__chevron {
  transform: translateY(-50%) rotate(-135deg);
  border-color: #fff;
}

.lang-switcher__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 100%;
  min-width: 100%;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(24,24,28,.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 42px rgba(0,0,0,.55);
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  z-index: 32;
  will-change: opacity, transform;
}

.lang-switcher[data-open="true"] .lang-switcher__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-switcher__option {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(240,241,255,.92);
  cursor: pointer;
  transition: background .22s ease, color .22s ease, transform .22s ease;
  outline: none;
}

.lang-switcher__option:hover {
  background: rgba(255,255,255,.08);
  color: #ffffff;
  transform: translateX(-2px);
}

.lang-switcher__option:focus-visible {
  background: rgba(176,134,249,.18);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(176,134,249,.45);
}

.lang-switcher__option.is-active {
  background: linear-gradient(135deg, rgba(110,90,220,.25), rgba(176,134,249,.32));
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(176,134,249,.45);
}

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 12px;
  }

  /* Мобильное меню: скрываем список, показываем гамбургер */
  .header-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    height: calc(100vh - var(--header-h));
    background: rgba(18,18,20,.96);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.08);
    display: grid;
    grid-auto-rows: min-content;
    align-content: start;
    gap: 8px;
    padding: var(--gap);
    padding-right: calc(var(--gap) + env(safe-area-inset-right));
    padding-left: calc(var(--gap) + env(safe-area-inset-left));
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease;
  }
  .menu-open .header-nav {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-nav a {
    display: flex;
    justify-content: center;
    height: 48px;
    font-size: 16px;
    background: transparent; /* убираем серый фон у ссылок */
    border: none; /* убираем рамку у ссылок */
    border-radius: 12px;
    margin: 0;
  }
  .header-nav a.btn {
    height: 52px;
  }

  /* Переключатель языка теперь внутри меню */
  .lang-switcher {
    position: relative;
    right: auto;
    top: auto;
    z-index: auto;
    order: 0;
    width: auto;
    margin-top: 16px;
    display: inline-flex;
    justify-content: center;
    padding: 0;
    justify-self: center;
  }

  .lang-switcher__toggle {
    width: auto;
    max-width: none;
    justify-content: center;
  }

  .lang-switcher__menu {
    left: 50%;
    right: auto;
    transform: translate(-50%, -6px);
  }
  .lang-switcher[data-open="true"] .lang-switcher__menu {
    transform: translate(-50%, 0);
  }

  /* Показываем кнопку меню на мобильных */
  .menu-toggle {
    display: inline-flex;
    position: fixed;
    right: calc(var(--gap) + env(safe-area-inset-right));
    top: calc((var(--header-h) - 38px) / 2);
    z-index: 12;
  }
  /* Отступы справа у меню и переключателя языка совпадают с var(--gap) */
  .lang-switcher { margin-right: 0; }
}

@media (max-width: 520px) {
  .logo {
    font-size: 1.4rem;
  }
}

/* Отступ для якорей учитывает фиксированную шапку */
section { scroll-margin-top: calc(var(--header-h) + 12px); }
@media (max-width: 768px) {
  /* На мобильных учитываем возможное смещение из‑за UI браузера */
  section { scroll-margin-top: calc(var(--header-h) + 16px); }
}


/* =========================
  Герой (баннер)
========================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  overflow: hidden;
  scroll-snap-align: start;
}

@media (max-width: 768px) {
  .hero {
    min-height: 520px;
  }

  .hero-content {
    padding: 56px 0 72px;
  }

  .hero .cta-row {
    justify-content: center;
  }
}
.hero-media {
  position: absolute; inset: 0;
  background: center / cover no-repeat;
  background-image: url("https://images.unsplash.com/photo-1515378791036-0648a3ef77b2?q=80&w=2070&auto=format&fit=crop");
  filter: saturate(0.8) contrast(1.05) brightness(.6);
  z-index: 0;
  transform: scale(1.03);
}
.hero-overlay { /* Круглый фиолетовый градиент на баннере */
  position: absolute; inset: 0;
  background: radial-gradient(900px 600px at 15% 20%, var(--primary-2), transparent 70%), linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.5));
  z-index: 1;
  will-change: opacity, transform;
}

/* На мобильных уменьшаем размер фиолетового свечения в 2 раза */
@media (max-width: 768px) {
  .hero-overlay {
    background: radial-gradient(450px 300px at 15% 20%, var(--primary-2), transparent 70%), linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.5));
  }
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 72px 0;
}
.hero-content h1 {
  position: relative;
  display: inline-block; /* область подсветки совпадает с глифами текста */
  color: transparent; /* текст заливаем фоновым градиентом */
  line-height: 1.28; /* даем запас высоты без внешних отступов */
  background-image:
    radial-gradient(
      100rem 100rem at var(--x, 50%) var(--y, 50%),
      rgb(255 255 255 / calc(var(--spot-o, 0) * 0.60)) 0%,
      rgb(255 255 255 / calc(var(--spot-o, 0) * 0.60)) 28%,
      rgb(255 255 255 / calc(var(--spot-o, 0) * 0.28)) 41%,
      rgb(255 255 255 / 0) 54%,
      rgb(255 255 255 / 0) 100%
    ),
  linear-gradient(var(--muted), var(--muted)); /* базовый спокойный цвет текста */
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-image .2s ease;
}
.hero .cta-row {
  margin-top: 22px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero .btn-primary {
  /* Сохраняем фиолетовый, но добавляем стеклянный эффект как у ghost-кнопки */
  background: linear-gradient(135deg, rgba(107, 17, 203, 0.721), rgba(176, 134, 249, 0.523));
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(138, 88, 255, .28);
}
.hero .btn-primary:hover {
  background: linear-gradient(135deg, rgba(123, 33, 219, 0.762), rgba(191, 150, 249, 0.507));
  border-color: rgba(255,255,255,.28);
}
.hero .btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(138,88,255,.25), 0 8px 24px rgba(138, 88, 255, .28);
}

/* Кнопка отправки формы: такой же стеклянный фиолетовый как в герое */
.contact-form .btn.full.btn-primary,
.contact-form .btn-primary.full {
  color: #fff;
  background: linear-gradient(135deg, rgba(107, 17, 203, 0.721), rgba(176, 134, 249, 0.523));
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(138, 88, 255, .28);
}
.contact-form .btn.full.btn-primary:hover,
.contact-form .btn-primary.full:hover {
  background: linear-gradient(135deg, rgba(123, 33, 219, 0.762), rgba(191, 150, 249, 0.507));
  border-color: rgba(255,255,255,.28);
}
.contact-form .btn.full.btn-primary:focus-visible,
.contact-form .btn-primary.full:focus-visible {
  box-shadow: 0 0 0 3px rgba(138,88,255,.25), 0 8px 24px rgba(138, 88, 255, .28);
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: saturate(0.9) contrast(1.05) brightness(.7);
  will-change: transform;
}

/* =========================
  Общие секции
========================= */
.section {
  position: relative;
  padding: clamp(64px, 8vw, 120px) 0;
  /* по умолчанию snap выключен, включается на широкой версии */
  scroll-snap-align: none;
  overflow-x: visible;
}

/* Анимация появления при прокрутке */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.reveal-left { transform: translateX(-30px); }
.reveal.reveal-right { transform: translateX(30px); }
/* Допускаем классы, которые добавляет скрипт */
.reveal.in-view,
.reveal.visible,
.reveal.show,
.reveal.active { opacity: 1; transform: none; }

/* Двухколоночная сетка */
.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(20px, 4vw, 48px);
  align-items: center;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.media {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,.25));
  pointer-events: none;
}
.media img {
  width: 100%; height: auto; display: block;
  transform: scale(1);
  transition: transform 1s cubic-bezier(.2,.6,.2,1);
}
.media:hover img { transform: scale(1.05); }

.content .bullets { padding: 0; margin: 18px 0 0; list-style: none; }
.content .bullets li {
  padding-left: 28px; position: relative; margin: 10px 0; color: var(--muted);
}
.content .bullets li::before {
  content: "•"; position: absolute; left: 8px; color: var(--primary-2);
}

/* Карточки услуг */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 16px;
  align-items: start; /* соседи не растягиваются по высоте строки */
}

.cards h3 {
  font-size: clamp(14px, 1.4vw, 17px);
  margin: 0;
}

/* Анимация «нажатия с bounce» запускается с диагональной волной */
@keyframes press-bounce {
  /* стартуем из исходного состояния */
  0%   { transform: translateY(0) scale(1); }
  /* небольшое отдаление (уменьшение) в начале */
  12%  { transform: translateY(1px) scale(0.985); }
  /* затем лёгкое приближение */
  42%  { transform: translateY(-1px) scale(1.03); }
  /* плавное возвращение близко к исходному */
  72%  { transform: translateY(0) scale(0.997); }
  /* финал — ровно исходное положение */
  100% { transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  #services .cards .card[data-wave-ready="true"] {
    animation: press-bounce 1000ms cubic-bezier(.22,.7,.18,1) 1 both;
    animation-delay: var(--wave-delay, 0.26s);
    animation-play-state: paused;
    will-change: transform;
  }

  #services.in-view .cards .card[data-wave-ready="true"] {
    animation-play-state: running;
  }
}
@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0,1fr));
    align-items: stretch; /* на мобилке карточки держим одной высоты */
  }

  .cards .card {
    height: 100%;
  }

  /* Раскрытая карточка занимает всю ширину (две колонки) и сдвигает остальные вниз */
  .cards .card.is-open {
    grid-column: 1 / -1;
    height: auto;
  }
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  position: relative;
  overflow: hidden; /* сохраняем подсветку внутри карточки */
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}
.card:hover,
.card:focus-within {
  transform: translateY(-2px) scale(1.04); /* чуть сильнее увеличение при ховере */
  box-shadow: 0 10px 24px rgba(0,0,0,.28); /* лёгкая тень при ховере */
  border-color: rgba(255, 255, 255, 0.2); /* оставляем светлый бордер */
}
.card {
  position: relative;
  z-index: 0; /* базовый слой карточки */
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(138, 88, 255, 0.5); /* цвет круговой подсветки */
  mask: radial-gradient(25rem 25rem at var(--x) var(--y), #000 1%, transparent 50%);
  -webkit-mask: radial-gradient(25rem 25rem at var(--x) var(--y), #000 1%, transparent 50%);
  opacity: var(--opacity);
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: -1; /* подсветка лежит под контентом */
}

.card * {
  position: relative;
  z-index: 1; /* контент поверх подсветки */
}

/* Скрываем описание по умолчанию и раскрываем вниз, увеличивая высоту карточки */
.cards .card p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  transition: max-height .28s ease, opacity .22s ease, margin-top .22s ease;
}
/* На всех устройствах раскрываем по классу .is-open */
.cards .card.is-open p {
  max-height: 200px; /* достаточно для пары строк текста */
  opacity: 1;
  margin-top: 8px;
  margin-bottom: 0;
}

.cards .card.is-open {
  justify-content: flex-start; /* при раскрытии выравниваем контент к началу */
}

@media (min-width: 901px) {
  .cards h3 {
    font-size: 20px;
  }

  .cards .card {
    min-height: 124px;
  }
}

@media (max-width: 600px) {
  .cards h3 {
    font-size: 12px;
  }

  .cards .card p {
    font-size: 12px;
  }
}

/* Анимация по ховеру и фокусу только на устройствах с мышью */
@media (hover: hover) and (pointer: fine) {
  .cards .card:hover p,
  .cards .card:focus-within p {
    max-height: 200px;
    opacity: 1;
    margin-top: 8px;
  }
}

/* =========================
  Работы: лента как в Instagram
========================= */
.ig-slider {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  max-width: calc(240px * 5 + 64px); /* даем видимой области чуть большей ширины */
  margin: 0 auto; /* центрируем слайдер */
}

@media (max-width: 1024px) {
  .ig-slider {
    max-width: 100%;
  }

  .ig-arrow.prev {
    left: -56px;
  }

  .ig-arrow.next {
    right: -56px;
  }
}

@media (max-width: 768px) {
  .ig-arrow {
    display: none;
  }

  .ig-slider {
    padding-inline: 0;
  }
}

.ig-slider::before,
.ig-slider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px; /* ширина зоны затемнения */
  z-index: 3;
  pointer-events: none;
}

.ig-slider::before {
  left: 0; /* прижимаем затемнение к левой стрелке */
  background: linear-gradient(90deg, var(--bg-page), rgba(18, 18, 20, 0));
}

.ig-slider::after {
  right: 0; /* прижимаем затемнение к правой стрелке */
  background: linear-gradient(-90deg, var(--bg-page), rgba(18, 18, 20, 0));
}

/* Выносим стрелки вне внутреннего контейнера */
#works > div {
  position: relative;
}

@media (max-width: 768px) {
  #works > div {
    overflow: hidden; /* прячем лишнее пространство ленты на мобильных */
  }
}

.ig-arrow {
  position: absolute;
  top: 50%; /* вертикальное центрирование */
  transform: translateY(-50%) translateY(40px); /* смещаем чуть ниже центра */
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(20,20,22,.6);
  backdrop-filter: blur(6px);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .2s ease, color .2s ease;
  z-index: 4; /* стрелки выше затемнений */
  font-size: 2em; /* увеличенные иконки стрелок */
}

.ig-arrow:hover {
  border-color: #fff; /* белая обводка */
  color: #fff; /* белая пиктограмма */
}

.ig-arrow:active {
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2)); /* фирменный фиолетовый градиент */
  border-color: var(--primary-1);
  color: #fff;
}

.ig-arrow.prev {
  left: -80px; /* сдвигаем левую стрелку за контейнер */
}

.ig-arrow.next {
  right: -80px; /* сдвигаем правую стрелку за контейнер */
}

/* Настраиваем контейнер под горизонтальный скролл */
.ig-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto; /* включаем горизонтальную прокрутку */
  overflow-y: hidden;
  padding: 18px 32px 28px;
  scroll-snap-type: x proximity; /* мягкое прилипающее поведение */
  scroll-padding: 0 24px;
  -webkit-overflow-scrolling: touch; /* плавный скролл на тач-устройствах */
  scrollbar-width: none; /* прячем стандартный скроллбар */
  max-width: 100%;
  margin: 0 auto;
  cursor: grab;
  user-select: none;
  will-change: scroll-position;
}
.ig-strip::-webkit-scrollbar { display: none; }

@media (max-width: 900px) {
  .ig-strip {
    padding: 16px 24px 24px;
    scroll-padding: 0 18px;
  }
}

@media (max-width: 768px) {
  .ig-strip {
    padding: 14px 16px 24px;
    scroll-padding: 0 14px;
  }

  .ig-item {
    width: clamp(160px, 48vw, 220px);
  }
}

.ig-strip[data-dragging="true"] {
  cursor: grabbing;
}

/* Скрываем элементы после 10-го, чтобы лента оставалась компактной */
.ig-strip > .ig-item:nth-child(n+11) {
  display: none;
}

.ig-item {
  position: relative;
  flex: 0 0 auto;
  width: clamp(180px, 22vw, 240px);
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  scroll-snap-align: center; /* карточки прилипают центру */
  background: #111;
  border: 1px solid rgba(255,255,255,.08);
  transition: transform .2s ease, border-color .2s ease;
}
.ig-item:hover {
  transform: translateY(-6px); /* усиливаем подъем при наведении */
  border-color: rgba(255,255,255,.18);
  box-shadow: 16px 16px 48px rgb(0, 0, 0), 8px 8px 30px rgb(0, 0, 0); /* удлиненный черный подсвет */
}
.ig-item video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.ig-item .play {
  position: absolute;
  bottom: 8px; right: 10px;
  font-size: 14px;
  background: rgba(0,0,0,.45);
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  line-height: 1;
}

/* Увеличиваем размер подписи к видео */
.ig-item .video-title {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-size: 16px; /* дополнительное увеличение размера шрифта */
  color: white;
  background: rgba(0, 0, 0, 0.5); /* полупрозрачный фон */
  padding: 2px 6px;
  border-radius: 16px; /* повторяем радиус обводки карточки */
  pointer-events: none;
  opacity: 0.8;
  z-index: 1; /* текст держим поверх видео */
}

/* Отключаем snap, когда лентой управляет скрипт */
.ig-strip.no-snap { scroll-snap-type: none; }

/* =========================
  Партнеры: бегущая строка логотипов
========================= */
.marquee {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  padding: 14px 0;
  margin-top: 16px;
}

.track {
  display: grid;
  grid-template-rows: repeat(2, auto); /* две строки с логотипами */
  grid-auto-flow: column;
  gap: 36px;
  justify-content: center;
  align-items: center;
  padding-inline: 24px;
}

.track img {
  height: 150px; /* увеличено на 10% от базового размера */
  will-change: transform;
  width: auto;
  transition: transform 0.3s ease;
}

.track img:hover {
  transform: scale(1.1); /* слегка увеличиваем при наведении */
}

/* =========================
  Форма контактов и тарифы
========================= */
.contact-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px; /* сужаем расстояние между колонками */
}
.contact-left {
  display: grid;
  gap: 12px;
}
.contact-right {
  display: grid;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* Выравниваем три поля слева по высоте правого блока на десктопе */
@media (min-width: 900px) {
  .contact-grid { align-items: stretch; }
  .contact-left {
    height: 100%;
    grid-template-rows: repeat(3, 1fr);
  }
  .contact-left input {
    height: 100%;
  min-height: 56px; /* оставляем комфортную высоту для тач */
  }
  /* Правый textarea растягиваем до суммарной высоты трех полей слева (3*56px + два интервала по 12px = 192px) */
  .contact-right textarea {
    min-height: calc(56px * 3 + 12px * 2);
    height: calc(56px * 3 + 12px * 2);
  align-self: stretch; /* растягиваем по высоте области грида */
  }
}

@media (max-width: 600px) {
  .contact-form {
    gap: 18px;
  }

  .contact-grid {
    gap: 16px;
  }

  .contact-form .btn.full {
    width: 100%;
  }

  /* Укорачиваем поле сообщения на мобилке — высота как у двух верхних полей вместе */
  .contact-right textarea {
    min-height: calc(46px * 2 + 16px); /* 46px высота инпута, 16px промежуток между полями */
    height: calc(46px * 2 + 16px);
  }
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 700px) {
  .form-row { grid-template-columns: 1fr; }
}
input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  height: 46px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: #fff;
  outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
textarea {
  min-height: 240px;
  resize: none; /* запрет вертикального изменения размера */
  line-height: 1.45;
  overflow-y: auto; /* скроллим длинные сообщения */
}
input::placeholder, textarea::placeholder { color: rgba(255,255,255,.55); }
input:focus, textarea:focus {
  border-color: rgba(255,255,255,.28);
  box-shadow: 0 0 0 4px rgba(138, 88, 255,.15);
  background: rgba(255,255,255,.07);
}

.packages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 1023px) {
  .packages { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .packages { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .packages { grid-template-columns: 1fr; }
}

.pkg { display: block; cursor: pointer; }
.pkg input { display: none; }

.pkg-body {
  height: 100%;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
  position: relative;
  overflow: hidden;
  will-change: transform;
}
.pkg-body .price.custom {
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pkg:hover .pkg-body {
  box-shadow: 0 0 20px rgba(138, 88, 255, 0.5); /* добавляем светящийся контур при ховере */
  transform: translateY(-2px);
}
.pkg input:checked + .pkg-body {
  border-color: rgba(176,134,249, .65);
  box-shadow: none; /* убираем свечение у выбранного тарифа */
  background: linear-gradient(180deg, rgba(176,134,249,.10), rgba(255,255,255,0));
}
.pkg input:checked + .pkg-body:hover {
  box-shadow: 0 0 20px rgba(138, 88, 255, 0.5); /* возвращаем свечение при ховере на выбранном тарифе */
  transform: translateY(-2px);
}

.pkg-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.pkg-top h3 {
  margin: 0;
}

.pkg-top .price {
  margin-left: auto;
  text-align: right;
  font-weight: 600;
}

/* Эффект прожектора при наведении на карточку тарифа */
.pkg-body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5); /* белое пятно подсветки */
  mask: radial-gradient(25rem 25rem at var(--x, 50%) var(--y, 50%), #000 1%, transparent 50%);
  -webkit-mask: radial-gradient(25rem 25rem at var(--x, 50%) var(--y, 50%), #000 1%, transparent 50%);
  opacity: var(--opacity, 0);
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: -1; /* подсветка уходит под контент */
}

@media (hover: none) and (pointer: coarse) {
  .pkg-body::before {
    content: none;
  }
}

.pkg-body * {
  position: relative;
  z-index: 1; /* контент всегда выше подсветки */
}

.pkg-body ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.pkg-body ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
}

.pkg-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
  transform: translateY(-50%);
}

/* =========================
  Подвал
========================= */
.site-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  background: #000; /* плотный черный фон */
  color: var(--muted); /* приглушенный цвет текста в подвале */
  padding: 40px 0; /* оставляем увеличенные отступы */
  font-family: var(--secondary-font);
  padding-bottom: 72px; /* дополнительный нижний отступ, чтобы текст не прилипал к краю */
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* левый | центр | правый блоки */
  align-items: center;
  gap: 20px;
}

.footer-left { justify-self: start; color: var(--muted); }
.footer-center { justify-self: center; }
.footer-center a { color: #fff; text-decoration: none; }
.footer-center a:hover { color: var(--primary-1); }
.footer-right { justify-self: end; display: flex; gap: 16px; }
.footer-right a { color: #fff; text-decoration: none; }
.footer-right a:hover { color: var(--primary-1); }

.site-footer .footer-hours,
.site-footer .footer-email {
  margin: 0;
  font-size: 16px; /* немного увеличенный размер текста */
  color: var(--muted);
}

.site-footer .footer-social {
  display: flex;
  gap: 20px; /* широкий промежуток между иконками */
  margin-top: 16px;
}

.site-footer .footer-social a {
  color: #fff;
  font-size: 24px; /* крупный размер иконок */
  transition: color 0.3s ease;
}

.site-footer .footer-social a:hover {
  color: var(--primary-1); /* фиолетовый цвет при наведении */
}

@media (max-width: 700px) {
  .site-footer {
    padding: 36px 0 56px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
  }

  .footer-left,
  .footer-right,
  .footer-center {
    justify-self: center;
  }

  .site-footer .footer-social {
    justify-content: center;
  }
}

/* =========================
  Утилиты
========================= */
.hidden { display: none !important; }
.center { text-align: center; }
.section { overflow-x: visible; }

/* Запрет горизонтального скролла, когда меню открыто */
.menu-open,
.menu-open body {
  overflow: hidden;
}

/* =========================
  Блок «Кто мы»
========================= */


#about .media.reveal.in-view img {
  transform: scale(1.2); /* Zoom in by 20% when revealed */
}

.hero-content p[data-i18n="hero.subtitle"] {
  max-width: 580px; /* Default desktop width */
  margin: 0 auto; /* Center under the title */
  text-align: center;
}

@media (max-width: 768px) {
  .hero-content p[data-i18n="hero.subtitle"] {
    max-width: 300px; /* Mobile version width */
  }
}

@media (min-width: 769px) {
  .hero-content p[data-i18n="hero.subtitle"] {
    max-width: 550px; /* Desktop version width */
  }
}

