/* ============================================================
   ПЕРСА — стили
   Тёмная тема · зелёный акцент · стекло · свечения
   ============================================================ */

:root {
  --bg: #08090c;
  --bg-2: #0d0f14;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f4f5f7;
  --muted: #98a0ad;
  --accent: #4ade80;
  --accent-2: #16a34a;
  --accent-soft: rgba(74, 222, 128, 0.14);
  --radius: 18px;
  --radius-lg: 26px;
  --container: 1200px;
  --font-display: "Unbounded", "Arial Black", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-open { overflow: hidden; }

::selection { background: var(--accent); color: #111; }

/* ---------- Скроллбар ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 8px;
  border: 2px solid var(--bg);
}

.container {
  width: min(var(--container), 100% - 48px);
  margin: 0 auto;
}

/* ============================================================
   ФОН: canvas, сетка, свечения, шум, курсор
   ============================================================ */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  display: block;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

.bg-glow {
  position: fixed;
  z-index: -2;
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
}

.bg-glow--1 {
  width: 640px; height: 640px;
  top: -220px; left: -180px;
  background: radial-gradient(circle, rgba(22, 163, 74, 0.5), transparent 65%);
}

.bg-glow--2 {
  width: 560px; height: 560px;
  top: 30%; right: -220px;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.32), transparent 65%);
}

.noise {
  position: fixed;
  inset: -10%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Тёплая дымка над «горизонтом» — CSS-слой вместо canvas */
.bg-haze {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(90% 60% at 50% 100%, rgba(74, 222, 128, 0.05), transparent 70%);
}

[data-theme="light"] .bg-haze {
  background: radial-gradient(90% 60% at 50% 100%, rgba(15, 157, 88, 0.05), transparent 70%);
}

.cursor-spot {
  position: fixed;
  top: 0; left: 0;
  z-index: 0;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.09), transparent 60%);
  transform: translate3d(var(--sx, -1000px), var(--sy, -1000px), 0) translate(-50%, -50%);
  transition: opacity 0.4s;
  will-change: transform;
}

@media (hover: none) { .cursor-spot { display: none; } }

/* ---------- Прогресс скролла ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100;
  background: transparent;
}

#scroll-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.7);
}

/* ============================================================
   Шапка
   ============================================================ */

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #06130b;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  padding: 18px 0;
  transition: padding 0.35s var(--ease), background 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  padding: 10px 0;
  background: rgba(8, 9, 12, 0.9);
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.06em;
}

.logo__mark {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  color: #111;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 24px rgba(74, 222, 128, 0.4);
}

.logo__mark svg { width: 22px; height: 22px; }

.logo__text em {
  font-style: normal;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__link {
  position: relative;
  padding: 10px 16px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-radius: 100px;
  transition: color 0.25s, background 0.25s;
}

.nav__link:hover { color: var(--text); background: var(--panel-strong); }

.nav__link--cta {
  margin-left: 10px;
  color: #131313;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 20px rgba(74, 222, 128, 0.35);
}

.nav__link--cta:hover {
  color: #131313;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: brightness(1.08);
}

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 20px; height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding: 190px 0 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(13, 15, 20, 0.55);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 34px;
}

.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 9.5vw, 124px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.hero__title .line { display: block; }

.hero__title .line--accent {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 55%, #a7f3c0 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shine 6s linear infinite;
}

@keyframes shine {
  to { background-position: 200% center; }
}

.hero__bottom {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 72px;
}

.hero__text {
  max-width: 480px;
  color: var(--muted);
  font-size: 17px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s, filter 0.3s, border-color 0.3s, background 0.3s;
}

.btn svg { width: 20px; height: 20px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(0.97); }

.btn--primary {
  color: #131313;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 32px rgba(74, 222, 128, 0.35);
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.7s var(--ease);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 44px rgba(74, 222, 128, 0.5);
  filter: brightness(1.05);
}

.btn--primary:hover::after { transform: translateX(110%); }

.btn--ghost {
  color: var(--text);
  background: rgba(13, 15, 20, 0.55);
  border: 1px solid var(--line);
}

.btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 222, 128, 0.5);
  background: var(--panel-strong);
}

.btn--full { width: 100%; justify-content: center; }

/* ---------- Статистика ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.stat {
  padding: 30px 24px 34px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat:last-child { border-right: none; }

.stat__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.stat__prefix {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.stat__suffix--plus {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  color: var(--accent);
  margin-left: 0;
  transform: scale(1.35);
  transform-origin: center center;
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.stat__suffix {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.stat__label { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* ---------- Бегущая строка ---------- */

.marquee {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(74, 222, 128, 0.045);
  overflow: hidden;
  padding: 18px 0;
  transform: rotate(-1.2deg) scale(1.03);
}

.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 28s linear infinite;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.14em;
  color: var(--muted);
  white-space: nowrap;
}

/* Отступ внутри элементов (а не flex-gap): ширина каждой копии
   строки учитывает хвостовой интервал — цикл замыкается бесшовно */
.marquee__track > * {
  flex-shrink: 0;
  padding-right: 36px;
}

.marquee__track i {
  font-style: normal;
  color: var(--accent);
  font-size: 10px;
}

@keyframes marquee {
  /* JS подставляет точный сдвиг; -50% — фолбэк, если JS отключён */
  to { transform: translateX(var(--marquee-shift, -50%)); }
}

/* ============================================================
   Секции
   ============================================================ */

.section { padding: 120px 0; scroll-margin-top: 80px; }

.section__head { margin-bottom: 64px; }

.section__tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  max-width: 900px;
  overflow-wrap: break-word;
}

.section__title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ============================================================
   Карточки услуг
   ============================================================ */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  --x: 50%;
  --y: 50%;
  position: relative;
  padding: 34px 30px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--x) var(--y), rgba(74, 222, 128, 0.1), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 222, 128, 0.35);
  background: var(--panel-strong);
}

.card:hover::before { opacity: 1; }

.card__icon {
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  margin-bottom: 26px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(74, 222, 128, 0.25);
  transition: transform 0.4s var(--ease), background 0.4s, color 0.4s;
}

.card__icon svg { width: 26px; height: 26px; }

.card:hover .card__icon {
  transform: scale(1.08) rotate(-4deg);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #131313;
}

.card__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  overflow-wrap: break-word;
}

.card__text { color: var(--muted); font-size: 15px; }

.card__num {
  position: absolute;
  top: 22px; right: 26px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.14);
  transition: color 0.4s;
}

.card:hover .card__num { color: var(--accent); }

/* ============================================================
   Проекты
   ============================================================ */

.projects {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.project {
  position: relative;
  display: block;
  height: 380px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.5s var(--ease), border-color 0.5s;
}

.project:hover { transform: translateY(-6px); border-color: rgba(74, 222, 128, 0.4); }

.project__art {
  position: absolute;
  inset: 0;
  transition: transform 0.7s var(--ease);
}

.project:hover .project__art { transform: scale(1.05); }

.project--1 .project__art {
  background:
    linear-gradient(180deg, transparent 40%, rgba(8, 9, 12, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 88px),
    linear-gradient(135deg, #121c17, #16311f 60%, #1f4a2b);
}

.project--2 .project__art {
  background:
    linear-gradient(180deg, transparent 40%, rgba(8, 9, 12, 0.92)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 2px, transparent 2px 42px),
    linear-gradient(160deg, #121c22, #22303a 55%, #31424e);
}

.project--3 .project__art {
  background:
    linear-gradient(180deg, transparent 40%, rgba(8, 9, 12, 0.92)),
    repeating-linear-gradient(90deg, rgba(74, 222, 128, 0.09) 0 1px, transparent 1px 34px),
    linear-gradient(120deg, #131d17, #1a2b20 50%, #203a28);
}

.project--4 .project__art {
  background:
    linear-gradient(180deg, transparent 40%, rgba(8, 9, 12, 0.92)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.035) 0 2px, transparent 2px 26px),
    linear-gradient(150deg, #1d1d22, #2c2b33 55%, #333a34);
}

.project__art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, rgba(8, 9, 12, 0) 38%, rgba(8, 9, 12, 0.88) 100%);
}

.project__info {
  position: absolute;
  left: 30px; right: 30px; bottom: 26px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project__meta {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.project__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.01em;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.project__more { color: var(--muted); font-size: 14.5px; }

.project::after {
  content: "→";
  position: absolute;
  top: 24px; right: 24px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  font-size: 20px;
  color: #131313;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: translate(-8px, 8px) rotate(-45deg);
  transition: opacity 0.4s, transform 0.4s var(--ease);
}

.project:hover::after { opacity: 1; transform: translate(0, 0) rotate(0); }

/* ============================================================
   Процесс
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.step {
  position: relative;
  padding: 32px 26px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}

.step:hover {
  transform: translateY(-6px);
  border-color: rgba(74, 222, 128, 0.35);
  background: var(--panel-strong);
}

.step__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.9), rgba(22, 163, 74, 0.25));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17.5px;
  margin-bottom: 10px;
}

.step__text { color: var(--muted); font-size: 14.5px; }

/* ============================================================
   О компании
   ============================================================ */

.about {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}

.about > * { min-width: 0; }

.about__text {
  color: var(--muted);
  font-size: 16.5px;
  margin: 26px 0 30px;
  max-width: 520px;
}

.about__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 38px;
}

.about__list li {
  display: flex;
  gap: 12px;
  font-size: 15.5px;
  color: var(--text);
}

.about__list i {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  font-style: normal;
  font-size: 13px;
  color: #131313;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-top: 2px;
}

.about__right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(74, 222, 128, 0.3);
  background: var(--panel-strong);
}

.tile--big {
  grid-row: span 2;
  justify-content: center;
}

.tile--big .tile__num,
.tile--big .tile__suffix {
  font-size: clamp(46px, 5vw, 68px);
}

.tile__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.tile__suffix {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  color: var(--text);
}

.tile__label { color: var(--muted); font-size: 14px; margin-top: 8px; }

.tile--accent {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.12), rgba(22, 163, 74, 0.06));
  border-color: rgba(74, 222, 128, 0.3);
}

.tile__quote {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
}

.tile__author { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* ============================================================
   Контакты
   ============================================================ */

.section--contact { padding-bottom: 140px; }

.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.contact__text {
  color: var(--muted);
  font-size: 16.5px;
  margin: 22px 0 40px;
  max-width: 460px;
}

.contact__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact__link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

a.contact__link:hover {
  border-color: rgba(74, 222, 128, 0.4);
  background: var(--panel-strong);
  transform: translateX(6px);
}

.contact__link-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.contact__link-value { font-size: 16.5px; font-weight: 600; }

/* ---------- Форма ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 36px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(13, 15, 20, 0.72);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  outline: none;
  resize: vertical;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.field input::placeholder,
.field textarea::placeholder { color: rgba(152, 160, 173, 0.78); }

.field input:focus,
.field textarea:focus {
  border-color: rgba(74, 222, 128, 0.6);
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.12);
  background: rgba(0, 0, 0, 0.5);
}

.form__note { font-size: 12.5px; color: rgba(152, 160, 173, 0.7); text-align: center; }

/* ---------- Согласие на обработку ПДн ---------- */

.consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
  transition: color 0.25s;
}

.consent__input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.consent__box {
  position: relative;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.consent__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #06130b;
  border-bottom: 2px solid #06130b;
  transform: rotate(42deg) scale(0.4);
  opacity: 0;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

.consent:hover .consent__box { border-color: rgba(74, 222, 128, 0.5); }

.consent__input:checked + .consent__box {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px rgba(74, 222, 128, 0.35);
}

.consent__input:checked + .consent__box::after {
  transform: rotate(42deg) scale(1);
  opacity: 1;
}

.consent__input:focus-visible + .consent__box {
  outline: 2px solid rgba(74, 222, 128, 0.85);
  outline-offset: 3px;
}

.consent__text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent__text a:hover { color: var(--accent-2); }

.consent.is-error .consent__box {
  border-color: rgba(255, 96, 96, 0.85);
  background: rgba(255, 96, 96, 0.08);
}

.consent.is-error .consent__text { color: #ff9b9b; }

[data-theme="light"] .consent__box::after { border-color: #ffffff; }
[data-theme="light"] .consent.is-error .consent__text { color: #c43c3c; }

.form__success {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(120, 220, 140, 0.35);
  background: rgba(120, 220, 140, 0.1);
  color: #9fe6b0;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  animation: fadeUp 0.5s var(--ease);
}

.form__error {
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 110, 110, 0.4);
  background: rgba(255, 110, 110, 0.08);
  color: #ffb4b4;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.form__error a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="light"] .form__error {
  color: #a32a22;
  border-color: rgba(180, 45, 35, 0.35);
  background: rgba(180, 45, 35, 0.06);
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* ============================================================
   Футер
   ============================================================ */

.footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.92);
  padding: 34px 0 92px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__copy { color: var(--muted); font-size: 14px; }

.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }

.footer__links a,
.footer__link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: inherit;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s;
}

.footer__links a:hover,
.footer__link-btn:hover { color: var(--accent); }

.footer__legal {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  opacity: 0.8;
}

/* ============================================================
   Анимации появления
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.reveal.is-visible { opacity: 1; transform: translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

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

@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .about, .contact { grid-template-columns: 1fr; gap: 48px; }
  .hero__bottom { grid-template-columns: 1fr; gap: 28px; }
  .hero__actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .container { width: min(var(--container), 100% - 36px); }

  .hero { padding-top: 150px; }
  .hero__title { margin-bottom: 34px; }

  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100svh;
    width: min(320px, 86vw);
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 110px 26px 40px;
    background: rgba(10, 11, 15, 0.98);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    transition: transform 0.45s var(--ease), visibility 0s linear 0.45s;
    z-index: 95;
  }

  .nav.is-open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.45s var(--ease);
  }

  .nav__link { font-size: 18px; padding: 14px 18px; }
  .nav__link--cta { margin-left: 0; margin-top: 14px; text-align: center; }

  .burger { display: flex; position: relative; z-index: 96; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 24px 18px 28px; min-width: 0; }
  .stat__value { flex-wrap: wrap; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .stat:nth-child(3) { grid-column: span 2; border-right: none; }

  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .project { height: 320px; }

  .form__row { grid-template-columns: 1fr; }
  .form { padding: 26px 22px; }

  .about__right { grid-template-columns: 1fr 1fr; }
  .tile--big { grid-row: span 1; grid-column: span 2; }
  .tile--accent { grid-column: span 2; }

  .section { padding: 84px 0; }

  .footer { padding: 34px 0 calc(96px + env(safe-area-inset-bottom, 0px)); }
  .footer__inner { flex-direction: column; text-align: center; gap: 18px; }
  .footer__copy { font-size: 13.5px; }
  .footer__links { flex-wrap: wrap; justify-content: center; gap: 10px 20px; }
  .footer__links a { font-size: 14px; }
}

/* ============================================================
   Прелоадер
   ============================================================ */

body.is-loading { overflow: hidden; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: #08090c;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
  /* Страховка: даже если скрипты не загрузились, экран не останется заблокированным */
  animation: preloader-failsafe 0.6s ease 6s forwards;
}

@keyframes preloader-failsafe {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader__logo { width: 64px; height: 64px; color: var(--accent); }

.preloader__logo path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: draw 1.3s var(--ease) forwards;
}

.preloader__logo path:last-child { animation-delay: 0.35s; }

@keyframes draw { to { stroke-dashoffset: 0; } }

.preloader__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.22em;
}

.preloader__name em { font-style: normal; color: var(--accent); }

.preloader__bar {
  width: 180px;
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.preloader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.3s ease;
}

/* ============================================================
   Кастомный курсор
   ============================================================ */

.cursor {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  display: none;
}

.cursor__dot,
.cursor__ring {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform;
}

.cursor__dot { transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0) translate(-50%, -50%); }
.cursor__ring { transform: translate3d(var(--rx, -100px), var(--ry, -100px), 0) translate(-50%, -50%); }

.cursor__dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.9);
  transition: transform 0.25s var(--ease), opacity 0.3s;
}

.cursor__ring {
  width: 38px;
  height: 38px;
  border: 1.5px solid rgba(74, 222, 128, 0.5);
  transition: width 0.3s var(--ease), height 0.3s var(--ease),
              background-color 0.3s, border-color 0.3s, opacity 0.3s;
}

.cursor.is-hover .cursor__ring {
  width: 62px;
  height: 62px;
  border-color: rgba(74, 222, 128, 0.95);
  background: rgba(74, 222, 128, 0.12);
}

.cursor.is-down .cursor__dot { transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0) translate(-50%, -50%) scale(0.55); }

.cursor.is-hidden .cursor__dot,
.cursor.is-hidden .cursor__ring { opacity: 0; }

/* Над полями ввода кастомный курсор уступает системному I-beam */
.cursor.is-native .cursor__dot,
.cursor.is-native .cursor__ring { opacity: 0; }

@media (hover: hover) and (pointer: fine) {
  /* Прячем системный курсор везде, включая ссылки и кнопки —
     их cursor: pointer перебивает наследство от body,
     поэтому перечисляем элементы напрямую */
  .has-custom-cursor body,
  .has-custom-cursor a,
  .has-custom-cursor button,
  .has-custom-cursor label,
  .has-custom-cursor .btn { cursor: none; }

  /* В полях ввода оставляем системный I-beam — им удобнее целиться */
  .has-custom-cursor input,
  .has-custom-cursor textarea,
  .has-custom-cursor select { cursor: auto; }

  .has-custom-cursor .cursor { display: block; }
}

/* ============================================================
   Модальное окно
   ============================================================ */

body.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s, visibility 0.35s;
}

.modal.is-open { visibility: visible; opacity: 1; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 7, 0.82);
}

.modal__dialog {
  position: relative;
  width: min(520px, 100%);
  max-height: 92svh;
  overflow-y: auto;
  padding: 40px 36px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(21, 23, 29, 0.98), rgba(10, 11, 15, 0.98));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(74, 222, 128, 0.05) inset;
  transform: translateY(26px) scale(0.97);
  transition: transform 0.45s var(--ease);
}

.modal.is-open .modal__dialog { transform: none; }

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.modal__close:hover {
  color: var(--text);
  border-color: rgba(74, 222, 128, 0.5);
  background: var(--panel-strong);
}

.modal__tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.modal__text {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 26px;
}

.form--modal {
  padding: 0;
  border: none;
  background: none;
  backdrop-filter: none;
  gap: 14px;
}

/* ============================================================
   FAQ
   ============================================================ */

.faq {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
}

.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.35s, background 0.35s;
}

.faq__item:hover { border-color: rgba(74, 222, 128, 0.3); }

.faq__item.is-open {
  border-color: rgba(74, 222, 128, 0.45);
  background: var(--panel-strong);
}

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.faq__icon {
  position: relative;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.35s var(--ease);
}

.faq__icon::before { width: 14px; height: 2px; }
.faq__icon::after { width: 2px; height: 14px; }

.faq__item.is-open .faq__icon::after { transform: rotate(90deg); }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.faq__item.is-open .faq__a { grid-template-rows: 1fr; }

.faq__a-inner { overflow: hidden; }

.faq__a p {
  padding: 0 26px 24px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 72ch;
}

/* ============================================================
   Кнопка «Наверх»
   ============================================================ */

.to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 80;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(13, 15, 20, 0.94);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.4s, transform 0.4s var(--ease), visibility 0.4s,
              border-color 0.3s, background-color 0.3s;
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

.to-top:hover {
  border-color: rgba(74, 222, 128, 0.55);
  background: rgba(24, 21, 12, 0.92);
}

.to-top__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.to-top__track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
}

.to-top__progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.to-top__arrow { position: relative; width: 20px; height: 20px; }

/* ============================================================
   Фото в карточках проектов
   ============================================================ */

.project__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

/* ============================================================
   Фокус с клавиатуры
   ============================================================ */

:focus-visible {
  outline: 2px solid rgba(74, 222, 128, 0.85);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 760px) {
  .modal { padding: 14px; }
  .modal__dialog { padding: 30px 22px 26px; }
  .to-top { right: 18px; bottom: 18px; width: 50px; height: 50px; }
  .faq__q { font-size: 15.5px; padding: 18px 20px; }
  .faq__a p { padding: 0 20px 20px; }
}

/* ============================================================
   Светлая тема
   ============================================================ */

body { transition: background-color 0.4s ease, color 0.4s ease; }

[data-theme="light"] {
  --bg: #f3f7f2;
  --bg-2: #e9efe8;
  --panel: rgba(22, 24, 29, 0.045);
  --panel-strong: rgba(22, 24, 29, 0.08);
  --line: rgba(22, 24, 29, 0.14);
  --text: #16181d;
  --muted: #5c6470;
  --accent: #0f9d58;
  --accent-2: #0b7d45;
  --accent-soft: rgba(15, 157, 88, 0.12);
}

[data-theme="light"] .header.is-scrolled { background: rgba(243, 247, 242, 0.94); }
[data-theme="light"] .hero__tag { background: rgba(255, 255, 255, 0.72); }
[data-theme="light"] .btn--ghost { background: rgba(255, 255, 255, 0.72); }
[data-theme="light"] .form { background: rgba(255, 255, 255, 0.86); }
[data-theme="light"] .cookie { background: rgba(255, 255, 255, 0.97); }
[data-theme="light"] .to-top { background: rgba(255, 255, 255, 0.94); }
[data-theme="light"] .nav { background: rgba(244, 248, 243, 0.97); }

[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(22, 24, 29, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 24, 29, 0.05) 1px, transparent 1px);
}

[data-theme="light"] .bg-glow { opacity: 0.3; }
[data-theme="light"] .noise { opacity: 0.035; }

[data-theme="light"] .hero__title .line--accent {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 55%, #0b7d45 90%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .btn--primary,
[data-theme="light"] .nav__link--cta,
[data-theme="light"] .about__list i,
[data-theme="light"] .card:hover .card__icon,
[data-theme="light"] .logo__mark,
[data-theme="light"] .project::after { color: #fff; }

/* Карточки проектов — «тёмный остров» в обеих темах: светлый текст на арте */
[data-theme="light"] .project { color: #f4f5f7; }
[data-theme="light"] .project__meta { color: #4ade80; }
[data-theme="light"] .project__more { color: #98a0ad; }

[data-theme="light"] .marquee { background: rgba(15, 157, 88, 0.06); }
[data-theme="light"] .card__num { color: rgba(22, 24, 29, 0.18); }

[data-theme="light"] .field input,
[data-theme="light"] .field textarea { background: rgba(255, 255, 255, 0.72); }

[data-theme="light"] .field input:focus,
[data-theme="light"] .field textarea:focus { background: #ffffff; }

[data-theme="light"] .modal__dialog {
  background: linear-gradient(160deg, #ffffff, #f2f7f2);
  box-shadow: 0 30px 90px rgba(16, 40, 26, 0.28);
}

[data-theme="light"] .preloader { background: var(--bg); }
[data-theme="light"] .preloader__bar { background: rgba(22, 24, 29, 0.1); }
[data-theme="light"] .to-top { background: rgba(255, 255, 255, 0.85); }
[data-theme="light"] .to-top:hover { background: #ffffff; }
[data-theme="light"] .to-top__track { stroke: rgba(22, 24, 29, 0.15); }
[data-theme="light"] .footer { background: rgba(243, 247, 242, 0.95); }

[data-theme="light"] .tile--accent {
  background: linear-gradient(135deg, rgba(15, 157, 88, 0.12), rgba(11, 125, 69, 0.05));
  border-color: rgba(15, 157, 88, 0.35);
}

[data-theme="light"] .step__num {
  background: linear-gradient(180deg, rgba(15, 157, 88, 0.95), rgba(11, 125, 69, 0.35));
  -webkit-background-clip: text;
  background-clip: text;
}


/* ============================================================
   Шапка: действия + переключатель темы
   ============================================================ */

.header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

.theme-toggle:hover {
  border-color: rgba(74, 222, 128, 0.5);
  transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle:hover { border-color: rgba(15, 157, 88, 0.55); }

.theme-toggle svg { width: 20px; height: 20px; }

.theme-toggle__moon { display: none; }
[data-theme="light"] .theme-toggle__sun { display: none; }
[data-theme="light"] .theme-toggle__moon { display: block; }

.perf-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

.perf-toggle:hover {
  border-color: rgba(74, 222, 128, 0.5);
  transform: translateY(-1px);
}

.perf-toggle svg { width: 20px; height: 20px; }

.perf-toggle.is-on {
  color: #06130b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

[data-theme="light"] .perf-toggle.is-on { color: #ffffff; }

/* ============================================================
   Кейс проекта (модалка)
   ============================================================ */

.modal__dialog--case { padding: 0 0 30px; }

.case__art {
  height: 210px;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.case__art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.case__content { padding: 24px 34px 0; }

.case__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.case__chip {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.case__desc {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
  margin-bottom: 24px;
}

/* ============================================================
   Брусчатка — собственное производство
   ============================================================ */

.paving__lead {
  max-width: 820px;
  margin: -6px 0 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.paving__lead strong { color: var(--text); font-weight: 600; }

.paving__advantages {
  max-width: 980px;
  margin: 0 0 32px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.paving__advantages-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.paving__advantages-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 30px;
  align-items: start;
}

.paving__advantages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.paving__advantages-list li { position: relative; padding-left: 22px; }

.paving__advantages-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 760px) {
  .paving__advantages { padding: 18px 18px; }
  .paving__advantages-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   Фотогалерея производства
   ============================================================ */

.production-gallery { margin: 0 0 32px; }

.production-gallery__head,
.production-strip__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.production-gallery__title,
.production-strip__title {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.production-gallery__all,
.production-strip__all {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}

.production-gallery__all:hover,
.production-strip__all:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.production-gallery__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: repeat(2, 200px);
  gap: 12px;
}

.production-gallery__base {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.production-gallery__base .production-card {
  height: auto;
  aspect-ratio: 16 / 9;
}

.production-card {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0b0d10;
  color: #fff;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
}

.production-card--main { grid-row: span 2; }

.production-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.production-card:hover img { transform: scale(1.035); }

.production-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.production-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px 14px 12px;
  background: linear-gradient(transparent, rgba(5, 7, 9, 0.8));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.production-strip { margin: 0 0 32px; }

.production-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}

.production-strip .production-card {
  height: auto;
  aspect-ratio: 4 / 3;
}

/* ===== Лайтбокс ===== */

.modal__dialog--photo {
  width: min(1080px, 100%);
  padding: 18px;
  background: #0b0d10;
  border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .modal__dialog--photo {
  background: #0b0d10;
  border-color: rgba(255, 255, 255, 0.14);
}

.modal--photo .modal__close {
  z-index: 2;
  color: #e8ebef;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.modal--photo .modal__close:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.14);
}

.photo-view { margin: 0; }

.photo-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72svh;
  object-fit: contain;
  border-radius: 12px;
  background: #000;
}

.photo-view figcaption {
  margin-top: 10px;
  padding-right: 52px;
  color: #dfe3e8;
  font-size: 14px;
  line-height: 1.5;
}

.photo-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.photo-nav__btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s;
}

.photo-nav__btn:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}

.photo-nav__count {
  min-width: 44px;
  color: #98a0ad;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-align: center;
}

@media (max-width: 980px) {
  .production-strip__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .production-strip .production-card { aspect-ratio: 16 / 9; }
}

@media (max-width: 760px) {
  .production-gallery__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .production-gallery__base { grid-template-columns: 1fr; }

  .production-card,
  .production-card--main {
    grid-row: auto;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .production-strip__grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .production-strip .production-card {
    flex: 0 0 78%;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
  }

  .photo-view figcaption { padding-right: 42px; }
}

@media (max-width: 560px) {
  .modal__dialog--photo { padding: 12px; }
  .photo-nav { gap: 12px; }
  .production-card__caption { padding: 24px 12px 10px; font-size: 12.5px; }
}

.paving__teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
}

.paving__facts {
  flex: 1 1 520px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 26px;
}

.paving__fact { display: flex; flex-direction: column; gap: 4px; }

.paving__fact-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  line-height: 1.1;
  color: var(--accent);
}

.paving__fact-num--brand {
  font-size: clamp(13px, 1.35vw, 17px);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.paving__fact-label { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.paving__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.paving__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.paving-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}

.paving-card:hover {
  border-color: rgba(74, 222, 128, 0.4);
  background: var(--panel-strong);
  transform: translateY(-4px);
}

.paving-card__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.paving-card__size { color: var(--muted); font-size: 13.5px; }

.paving-card__colors {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.paving-card__colors i {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.paving-card__price {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.1;
  color: var(--accent);
}

.paving-card__price span {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 3px;
}

.paving__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}

.paving__note {
  max-width: 660px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .paving__facts { grid-template-columns: repeat(2, 1fr); }
  .paving__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .paving__facts { grid-template-columns: 1fr; }
  .paving__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Каталог брусчатки — таблица
   ============================================================ */

.price-scroll-hint {
  display: none;
  margin: 0 0 10px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.price-order-hint {
  display: none;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.row-order {
  position: fixed;
  z-index: 80;
  width: 38px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0 14px 14px 0;
  background: var(--accent);
  color: #06130b;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.38em;
  line-height: 1;
  text-align: center;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  cursor: pointer;
  box-shadow: 6px 0 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-3px);
  transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.row-order.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.row-order:hover { background: var(--accent-2); color: #fff; }

.row-order:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1280px) {
  .price-order-hint { display: block; }
}

@media (hover: none), (max-width: 1279px) {
  .row-order { display: none !important; }
}

.price-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  -webkit-overflow-scrolling: touch;
}

.price-table {
  width: 100%;
  min-width: 1110px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.price-table--border { min-width: 860px; }

.price-table th {
  padding: 13px 11px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.price-table td {
  padding: 14px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--muted);
}

.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover td { background: rgba(74, 222, 128, 0.03); }

.price-table__model { width: 136px; vertical-align: middle; }

.price-model {
  display: block;
  width: 128px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto;
  filter: drop-shadow(0 5px 6px rgba(16, 24, 18, 0.18));
}

.price-table__name {
  min-width: 150px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
}

.price-table__colors {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 14px;
  min-width: 304px;
}

.price-table__color {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  white-space: nowrap;
}

.price-table__color i {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
}

.price-table__color i.price-table__color-multi {
  background: conic-gradient(#b23a32, #d9a521, #3f8f4a, #2f5fa8, #1c1c1f, #b23a32);
}

.price-table__color b {
  margin-left: auto;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.price-table__dash { color: rgba(152, 160, 173, 0.55); }

@media (max-width: 1240px) {
  .price-scroll-hint { display: block; }
}

@media (max-width: 760px) {
  .price-table { min-width: 980px; }
  .price-table--border { min-width: 760px; }
  .price-model { width: 104px; height: 82px; }
}

/* ============================================================
   Уведомление о cookie
   ============================================================ */

.cookie {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(640px, calc(100% - 48px));
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(13, 15, 20, 0.97);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  animation: cookieIn 0.55s var(--ease);
}

@keyframes cookieIn {
  from { opacity: 0; transform: translate(-50%, 22px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.cookie.is-hidden {
  opacity: 0;
  transform: translate(-50%, 22px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie__text { font-size: 13px; line-height: 1.5; color: var(--muted); }

.cookie__text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie__text a:hover { color: var(--accent-2); }

.cookie__actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.cookie__btn {
  flex: 0 0 auto;
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background-color 0.25s;
}
.cookie__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

[data-theme="light"] .cookie {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 50px rgba(16, 40, 26, 0.18);
}

@media (max-width: 760px) {
  .cookie {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    bottom: 16px;
    padding: 16px 18px;
  }
  .cookie__actions { width: 100%; }
  .cookie__btn { flex: 1 1 0; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie { animation: none; }
}

/* ---------- Режим для слабых устройств ---------- */
.perf-lite .noise { animation: none; }

.perf-lite .bg-grid,
.perf-lite .bg-glow { animation: none; }

.perf-lite .bg-glow { filter: none; }

.perf-lite .hero__title .line--accent,
.perf-lite .dot { animation: none; }

.perf-lite * { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }

/* В lite-режиме — обычный системный курсор */
.perf-lite .cursor,
.perf-lite .cursor-spot { display: none !important; }

.perf-lite.has-custom-cursor body,
.perf-lite.has-custom-cursor a,
.perf-lite.has-custom-cursor button,
.perf-lite.has-custom-cursor label,
.perf-lite.has-custom-cursor .btn,
.perf-lite.has-custom-cursor .card,
.perf-lite.has-custom-cursor .project,
.perf-lite.has-custom-cursor .faq__q { cursor: auto; }

.perf-lite .header.is-scrolled { background: rgba(8, 9, 12, 0.95); }
[data-theme="light"].perf-lite .header.is-scrolled { background: rgba(243, 247, 242, 0.97); }

/* ============================================================
   Совсем узкие экраны: компактная шапка и переносы
   ============================================================ */

@media (max-width: 380px) {
  .header__inner { gap: 12px; }
  .logo { gap: 8px; font-size: 15px; }
  .logo__mark { width: 36px; height: 36px; border-radius: 10px; }
  .logo__mark svg { width: 20px; height: 20px; }
  .header__actions { gap: 5px; }
  .theme-toggle, .perf-toggle, .burger { width: 40px; height: 40px; }
  .burger span { width: 18px; }

  .about__right { grid-template-columns: 1fr; }
  .tile--big { grid-row: span 1; }
  .tile--big, .tile--accent { grid-column: span 1; }

  .card { padding: 30px 22px 36px; }
  .card__title { font-size: 18px; }
}

@media (max-width: 350px) {
  .hero__title { font-size: 38px; }
  .project__name { font-size: 20px; }
  .project__info { left: 22px; right: 22px; bottom: 22px; }
  .card { padding: 26px 16px 30px; }
  .card__title { font-size: 17px; }
}

@media (max-width: 310px) {
  .hero__title { font-size: 35px; }
  .hero { padding-top: 136px; }
}

@media (max-width: 370px) {
  .about__left .section__title { font-size: 26px; }
}

@media (max-width: 335px) {
  .about__left .section__title { font-size: 24px; }
}

/* ============================================================
   Новогоднее оформление: 1 декабря — 10 января
   Класс .ny ставит newyear.js, поэтому вне этих дат ничего нет
   ============================================================ */

.ny-garland {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
  z-index: 89;
  pointer-events: none;
  background-image:
    radial-gradient(circle 3px at 7px 5px, #ffd76a 98%, transparent 100%),
    radial-gradient(circle 3px at 33px 5px, #7ce7a8 98%, transparent 100%),
    radial-gradient(circle 3px at 59px 5px, #ff9b8a 98%, transparent 100%),
    radial-gradient(circle 3px at 85px 5px, #8fd3ff 98%, transparent 100%);
  background-size: 104px 10px;
  background-repeat: repeat-x;
  filter: drop-shadow(0 0 5px rgba(255, 215, 106, 0.55));
  opacity: 0.85;
  animation: ny-glow 3.2s ease-in-out infinite alternate;
}

[data-theme="light"] .ny-garland {
  filter: drop-shadow(0 0 4px rgba(224, 169, 47, 0.45));
  opacity: 0.9;
}

@keyframes ny-glow {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.ny-frost {
  position: fixed;
  inset: 0;
  z-index: 88;
  pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(120, 220, 180, 0.16), transparent 65%),
    radial-gradient(600px 320px at 100% 2%, rgba(120, 180, 255, 0.12), transparent 70%);
}

[data-theme="light"] .ny-frost {
  background:
    radial-gradient(900px 420px at 50% -8%, rgba(255, 255, 255, 0.65), transparent 65%),
    radial-gradient(600px 320px at 100% 2%, rgba(170, 220, 255, 0.4), transparent 70%);
}

.ny-snow {
  position: fixed;
  inset: 0;
  z-index: 89;
  pointer-events: none;
}

.ny-bokeh {
  position: fixed;
  inset: 0;
  z-index: 86;
  pointer-events: none;
}

.ny .section__tag { color: #d8a53a; }
.ny .section__tag::before { background: #d8a53a; }

[data-theme="light"] .ny .section__tag { color: #c08a1e; }
[data-theme="light"] .ny .section__tag::before { background: #c08a1e; }

.ny .logo__mark {
  position: relative;
  overflow: visible;
}

.ny .header { padding-top: 32px; }
.ny .header.is-scrolled { padding-top: 24px; }
.ny .logo { gap: 36px; }

.ny .logo__mark::after {
  content: "";
  position: absolute;
  left: -3.125%;
  top: -57.97%;
  width: 172.03%;
  height: 172.03%;
  background: url("logo-newyear.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .ny-garland { animation: none; }
}
