/*
 * Стили сайта-портфолио.
 *
 * Правила интерфейса (по MDN Responsive Design, как в прошлых проектах владельца):
 * - ширина страницы --page-max 1180 px, поля --page-gutter 24 px (16 px до 760 px);
 * - отступы только по шагу 4 / 8 / 12 / 16 / 24 / 32 / 48 (--space-1 … --space-7);
 * - кнопки и поля: высота --control-height 40 px (44 px на телефоне), радиус 8 px,
 *   шрифт 14 px; маленькие — --control-height-sm 32 px (40 px на телефоне);
 * - основная кнопка — заливка акцентом, в группе она одна и стоит первой;
 * - на телефоне вкладки — одна горизонтальная прокручиваемая полоса;
 * - горизонтальной прокрутки страницы быть не должно.
 * Все значения берутся из переменных ниже, а не задаются числами в отдельных блоках.
 */

/* ============ Переменные ============ */

:root {
  --page-max: 1180px;
  --page-gutter: 24px;
  --header: 64px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --section-pad: calc(var(--space-7) * 2);

  --control-height: 40px;
  --control-height-sm: 32px;
  --control-radius: 8px;
  --control-font: 14px;
  --card-radius: 16px;

  --bg: #f4f3ef;
  --bg-2: #ebe9e3;
  --surface: #ffffff;
  --ink: #0c0d10;
  --muted: #5c606c;
  --line: rgba(12, 13, 16, 0.09);
  --line-2: rgba(12, 13, 16, 0.16);
  --accent: #3d4bff;
  --accent-ink: #ffffff;
  --accent-2: #ff5e3a;
  --success: #13945a;
  --glow: rgba(61, 75, 255, 0.18);
  --shadow: 0 30px 60px -30px rgba(20, 22, 40, 0.28);

  /* Два шрифта интерфейса (текст и заголовки) и курсивный акцент в крупных заголовках. */
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  --font-accent: 'Instrument Serif', Georgia, serif;

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #0a0b0e;
  --bg-2: #101217;
  --surface: #15171d;
  --ink: #f1f2f5;
  --muted: #9aa0ad;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #6f7bff;
  --accent-ink: #0a0b0e;
  --accent-2: #ff7c5c;
  --success: #2fc985;
  --glow: rgba(111, 123, 255, 0.22);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}

@media (max-width: 760px) {
  :root {
    --page-gutter: 16px;
    --section-pad: calc(var(--space-7) + var(--space-5));
    --control-height: 44px;
    --control-height-sm: 40px;
  }
}

/* ============ Основа ============ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background-color 0.4s ease,
    color 0.4s ease;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

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

/* Контент всех разделов начинается и заканчивается на одной вертикали. */
.wrap {
  width: min(var(--page-max), 100% - var(--page-gutter) * 2);
  margin-inline: auto;
}

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

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

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 var(--page-gutter);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.3s,
    background-color 0.4s;
}

.topbar.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  gap: var(--space-1);
}

.nav a {
  display: inline-flex;
  align-items: center;
  height: var(--control-height-sm);
  padding: 0 var(--space-3);
  border-radius: var(--control-radius);
  font-size: var(--control-font);
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.2s,
    background-color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--ink);
  background: var(--line);
}

.controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.lang {
  display: flex;
  align-items: center;
  height: var(--control-height);
  padding: var(--space-1);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
}

.lang button {
  height: 100%;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: calc(var(--control-radius) - 3px);
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s;
}

.lang button.on {
  background: var(--ink);
  color: var(--bg);
}

.icon-btn {
  width: var(--control-height);
  height: var(--control-height);
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  background: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.icon-btn:hover {
  border-color: var(--ink);
}

.icon-btn svg {
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.icon-btn:hover svg {
  transform: rotate(25deg);
}

.i-moon {
  display: none;
}

[data-theme='dark'] .i-sun {
  display: none;
}

[data-theme='dark'] .i-moon {
  display: block;
}

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

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: var(--control-height);
  padding: 0 var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  font-size: var(--control-font);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s,
    background-color 0.3s,
    border-color 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--small {
  height: var(--control-height-sm);
  padding: 0 var(--space-4);
}

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

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 14px 30px -14px var(--accent);
}

/* Световая полоса пробегает по основной кнопке при наведении. */
.btn--accent::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  transition: transform 0.7s ease;
}

.btn--accent:hover::after {
  transform: translateX(120%);
}

.btn--ghost {
  border-color: var(--line-2);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}

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

.btn--block {
  width: 100%;
}

/* ============ Типографика ============ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0 0 var(--space-4);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 8px transparent;
  }
}

.display {
  margin: 0 0 var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.display--md {
  font-size: clamp(44px, 6.5vw, 96px);
}

.display em,
.h2 em {
  color: var(--accent);
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.h2 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 54ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.4vw, 20px);
}

/* ============ Первый экран и планшет ============ */

/* Высота секции задаёт длину сценария: чем она больше, тем медленнее анимация. */
.sequence {
  position: relative;
  height: 430vh;
}

.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 42% at 50% 72%, var(--glow), transparent 70%),
    radial-gradient(
      ellipse 40% 30% at 85% 15%,
      color-mix(in srgb, var(--accent-2) 12%, transparent),
      transparent 70%
    ),
    var(--bg);
  transition: background-color 0.4s;
}

.stage-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

.stage.is-inspect {
  position: fixed;
  inset: 0;
  z-index: 40;
  cursor: grab;
  touch-action: none;
}

.stage.is-inspect:active {
  cursor: grabbing;
}

.stage.is-inspect .screen {
  pointer-events: none !important;
}

.tablet-layer {
  position: absolute;
  inset: 0;
}

.tablet-layer--dom {
  z-index: 1;
}

/* Холст выше HTML-экрана, но клики пропускает — экран остаётся интерактивным. */
.tablet-layer--gl {
  z-index: 2;
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  z-index: 4;
  top: calc(var(--header) + var(--space-7));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 var(--page-gutter);
  text-align: center;
  will-change: transform, opacity;
}

.hero-copy .lead {
  margin-bottom: var(--space-6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.scroll-hint {
  position: absolute;
  z-index: 4;
  bottom: var(--space-5);
  left: 50%;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.mouse {
  position: relative;
  width: 18px;
  height: 28px;
  border: 1.5px solid currentColor;
  border-radius: 10px;
}

.mouse::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  border-radius: 2px;
  background: currentColor;
  animation: wheel 1.6s infinite;
}

@keyframes wheel {
  to {
    transform: translateY(9px);
    opacity: 0;
  }
}

.hud {
  position: absolute;
  z-index: 5;
  right: var(--page-gutter);
  bottom: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  opacity: 0;
  transition: opacity 0.4s;
}

.hud.show,
.stage.is-inspect .hud {
  opacity: 1;
}

.hud button {
  height: var(--control-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(10px);
  font-size: var(--control-font);
  font-weight: 700;
  cursor: pointer;
}

.hud button:hover {
  border-color: var(--accent);
}

.hud span {
  color: var(--muted);
  font-size: 13px;
}

/* ============ Экран планшета: концепты клиентских сайтов ============ */
/* У концептов свои палитры — это «чужие» сайты, тема портфолио на них не влияет. */

.screen {
  overflow: hidden;
  background: #111111;
  color: #111111;
  font-family: var(--font);
  user-select: text;
}

/* Запасной вид без WebGL: плоская рамка вместо 3D-корпуса. */
.stage.no-webgl .screen {
  position: absolute;
  inset: calc(var(--header) + var(--space-5)) var(--page-gutter) var(--space-5);
  border: 12px solid #1a1c21;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.boot {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  background: #0b0c10;
  color: #e9ebf0;
  text-align: center;
}

.boot-icon {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  width: min(160px, 26vw);
  aspect-ratio: 1;
  margin: 0 auto var(--space-5);
}

.boot-icon i {
  border-radius: 2px;
  background: #6f7bff;
  opacity: 0;
}

.boot h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
}

.bar {
  width: 220px;
  height: 3px;
  margin: var(--space-3) auto;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.bar div {
  width: 0;
  height: 100%;
  background: #6f7bff;
}

.boot small {
  color: #8d93a0;
  font-size: 11px;
  letter-spacing: 0.18em;
}

.inner {
  height: 100%;
  will-change: transform;
}

.scr {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scr-bar {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 24px);
  padding: clamp(12px, 2.2vw, 24px) clamp(16px, 3.4vw, 48px);
  font-size: clamp(10px, 1.1vw, 14px);
}

.scr-bar b {
  margin-right: auto;
  letter-spacing: 0.18em;
}

.scr-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: clamp(12px, 3vw, 48px);
  padding: 0 clamp(16px, 3.4vw, 48px) clamp(16px, 3vw, 48px);
}

.scr-body--col {
  grid-template-columns: 1fr;
  align-content: center;
}

.scr h2 {
  margin: var(--space-2) 0 var(--space-3);
  font-family: var(--font-display);
  font-size: clamp(20px, 4.2vw, 60px);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.scr h2 em {
  font-family: var(--font-accent);
  font-weight: 400;
}

.scr-tag {
  font-size: clamp(9px, 0.9vw, 12px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* Концепт 1: магазин одежды */
.scr--shop {
  background: #efe8dd;
  color: #1b1712;
}

.scr--shop h2 em {
  color: #a8572f;
}

.bag {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1b1712;
  color: #efe8dd;
  font-size: 11px;
  font-style: normal;
}

.scr-pay {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-2);
  border-radius: var(--control-radius);
  background: #ffffff;
  font-size: clamp(10px, 1vw, 13px);
}

.blik {
  padding: var(--space-1) var(--space-2);
  border-radius: 6px;
  background: #111111;
  color: #ffffff;
  font-size: 0.85em;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.4vw, 16px);
}

.products article {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: clamp(9px, 1vw, 13px);
}

.products span {
  opacity: 0.6;
}

.products button {
  margin-top: var(--space-2);
  padding: var(--space-2);
  border: 0;
  border-radius: 6px;
  background: #1b1712;
  color: #efe8dd;
  font-size: 0.9em;
  cursor: pointer;
}

.ph {
  aspect-ratio: 3 / 4;
  margin-bottom: var(--space-2);
  border-radius: 12px;
}

.ph--1 {
  background:
    radial-gradient(circle at 50% 30%, #d9a37f 0 18%, transparent 19%),
    linear-gradient(170deg, #8b5a3c, #3a2618);
}

.ph--2 {
  background:
    radial-gradient(circle at 50% 30%, #f2d7b6 0 18%, transparent 19%),
    linear-gradient(170deg, #c9b8a4, #7b6a58);
}

.ph--3 {
  background:
    radial-gradient(ellipse 34% 24% at 50% 58%, #2a1a10 0 98%, transparent),
    linear-gradient(170deg, #d8c3a6, #a98a66);
}

/* Концепт 2: ресторан */
.scr--food {
  background: radial-gradient(ellipse 60% 70% at 85% 110%, #ff7a2d55, transparent 70%), #141010;
  color: #f6ece0;
}

.booking {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-3);
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  font-size: clamp(10px, 1vw, 13px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chips span {
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
}

.chips .on {
  border-color: #ff7a2d;
  background: #ff7a2d;
  color: #141010;
  font-weight: 700;
}

.guests {
  opacity: 0.7;
}

.booking button {
  padding: var(--space-3);
  border: 0;
  border-radius: 6px;
  background: #f6ece0;
  color: #141010;
  font-weight: 700;
  cursor: pointer;
}

.flame {
  position: absolute;
  right: -6%;
  bottom: -30%;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffb15a 0, #ff5a1f 35%, transparent 68%);
  filter: blur(30px);
  opacity: 0.5;
  animation: flicker 3s ease-in-out infinite alternate;
}

@keyframes flicker {
  to {
    transform: scale(1.12) translateY(-4%);
    opacity: 0.7;
  }
}

/* Концепт 3: SaaS-панель */
.scr--saas {
  background: linear-gradient(160deg, #0d1022, #151a3a);
  color: #e8eaff;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.4vw, 16px);
}

.kpis div,
.chart {
  padding: clamp(8px, 1.6vw, 16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  font-size: clamp(9px, 0.95vw, 12px);
}

.kpis div {
  display: grid;
  gap: 2px;
}

.kpis span,
.chart > span {
  opacity: 0.6;
}

.kpis b {
  font-family: var(--font-display);
  font-size: clamp(14px, 2vw, 28px);
  letter-spacing: -0.02em;
}

.kpis i {
  color: #59e3a7;
  font-style: normal;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  height: clamp(48px, 10vw, 128px);
  margin-top: var(--space-3);
}

.bars i {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #8f98ff, #4d57e8);
}

/* ============ Бегущая строка технологий ============ */

.marquee {
  overflow: hidden;
  padding: var(--space-5) 0;
  border-block: 1px solid var(--line);
  background: var(--bg);
}

.marquee-track {
  display: flex;
  gap: var(--space-7);
  width: max-content;
  animation: marquee 38s linear infinite;
}

.marquee span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-7);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.marquee span::after {
  content: '✦';
  color: var(--accent);
  font-size: 0.5em;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ============ Разделы ============ */

.section {
  position: relative;
  padding: var(--section-pad) 0;
}

.section--alt {
  background: var(--bg-2);
  transition: background-color 0.4s;
}

.section-head {
  margin-bottom: var(--space-7);
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--d, 0s);
}

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

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

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.filters button {
  height: var(--control-height);
  padding: 0 var(--space-4);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  background: none;
  font-size: var(--control-font);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}

.filters button:hover {
  border-color: var(--ink);
}

.filters button.on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.works {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.work {
  transition:
    opacity 0.5s,
    filter 0.5s;
}

/* Сдвиг чётных карточек вниз даёт «журнальную» сетку на компьютере. */
.work:nth-child(even) {
  margin-top: calc(var(--space-7) * 2);
}

.work.is-hidden {
  opacity: 0.12;
  filter: grayscale(1);
  pointer-events: none;
}

.tilt {
  border-radius: var(--card-radius);
  perspective: 1200px;
}

.mock {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Световое пятно идёт за курсором. */
.mock::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.28),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.4s;
}

.work:hover .mock::after {
  opacity: 1;
}

.mock > * {
  transform: translateZ(30px);
}

.m-nav {
  position: absolute;
  top: 6%;
  left: 6%;
  right: 6%;
  height: 4%;
  border-radius: 99px;
  background: currentColor;
  opacity: 0.12;
}

.work-meta {
  padding: var(--space-5) var(--space-1) 0;
}

.work-meta h3 {
  margin: var(--space-2) 0 var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.work-meta p {
  margin: 0 0 var(--space-3);
  color: var(--muted);
}

.badge {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tags span {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  color: var(--muted);
  font-size: 13px;
}

/* Макет 1: модный магазин */
.mock--1 {
  background: #efe8dd;
  color: #1b1712;
}

.mock--1 .m-hero {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 8%;
  height: 58%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4%;
}

.mock--1 .m-hero i {
  border-radius: 14px;
  background: linear-gradient(170deg, #8b5a3c, #3a2618);
}

.mock--1 .m-hero i:nth-child(2) {
  background: linear-gradient(170deg, #c9b8a4, #7b6a58);
  transform: translateY(-12%);
}

.mock--1 .m-hero i:nth-child(3) {
  background: linear-gradient(170deg, #d8c3a6, #a98a66);
}

.mock--1 .m-big {
  position: absolute;
  top: 13%;
  left: 6%;
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 76px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
}

/* Макет 2: ресторан */
.mock--2 {
  background: radial-gradient(ellipse 70% 70% at 80% 100%, #ff6a1f88, transparent 60%), #141010;
  color: #f6ece0;
}

.mock--2 .m-title {
  position: absolute;
  top: 22%;
  left: 7%;
  font-family: var(--font-accent);
  font-size: clamp(38px, 6.4vw, 84px);
  font-style: italic;
  line-height: 0.9;
}

.mock--2 .m-pill {
  position: absolute;
  left: 7%;
  bottom: 12%;
  width: 34%;
  height: 10%;
  border-radius: 8px;
  background: #ff7a2d;
}

.mock--2 .m-sun {
  position: absolute;
  top: 24%;
  right: 10%;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ffd27a, #ff5a1f 60%, transparent 62%);
  animation: flicker 3s ease-in-out infinite alternate;
}

/* Макет 3: SaaS */
.mock--3 {
  background: linear-gradient(160deg, #0d1022, #1b2150);
  color: #e8eaff;
}

.mock--3 .m-side {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 16%;
  background: rgba(255, 255, 255, 0.05);
}

.mock--3 .m-cards {
  position: absolute;
  top: 12%;
  left: 22%;
  right: 6%;
  height: 22%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4%;
}

.mock--3 .m-cards i {
  border-top: 3px solid #59e3a7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.mock--3 .m-chart {
  position: absolute;
  left: 22%;
  right: 6%;
  bottom: 10%;
  height: 44%;
  display: flex;
  align-items: flex-end;
  gap: 3%;
}

.mock--3 .m-chart i {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #8f98ff, #4d57e8);
}

.mock--3 .m-chart i:nth-child(1) {
  height: 30%;
}

.mock--3 .m-chart i:nth-child(2) {
  height: 48%;
}

.mock--3 .m-chart i:nth-child(3) {
  height: 40%;
}

.mock--3 .m-chart i:nth-child(4) {
  height: 62%;
}

.mock--3 .m-chart i:nth-child(5) {
  height: 55%;
}

.mock--3 .m-chart i:nth-child(6) {
  height: 76%;
}

.mock--3 .m-chart i:nth-child(7) {
  height: 70%;
}

.mock--3 .m-chart i:nth-child(8) {
  height: 94%;
}

/* Макет 4: архитектурное бюро */
.mock--4 {
  background: #e4e2dc;
  color: #121212;
}

.mock--4 .m-arch {
  position: absolute;
  inset: 22% 6% 8% 40%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
}

.mock--4 .m-arch i {
  background: linear-gradient(135deg, #6c6a64, #2a2926);
}

.mock--4 .m-arch i:first-child {
  grid-row: span 2;
  background: linear-gradient(200deg, #b7b2a6 0 40%, #3a3935 40% 100%);
}

.mock--4 .m-arch i:last-child {
  background: #121212;
}

.mock--4 .m-word {
  position: absolute;
  left: 6%;
  bottom: 8%;
  font-family: var(--font-display);
  font-size: clamp(26px, 4.6vw, 60px);
  font-weight: 300;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  transform: translateZ(30px) rotate(180deg);
}

/* Макет 5: клиника */
.mock--5 {
  background: linear-gradient(160deg, #e9f6f3, #cfece6);
  color: #0e4a40;
}

.mock--5 .m-cal {
  position: absolute;
  left: 6%;
  bottom: 10%;
  width: 56%;
  height: 52%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.mock--5 .m-cal i {
  border-radius: 8px;
  background: #ffffff;
}

.mock--5 .m-cal i:nth-child(10) {
  background: #13a38a;
}

.mock--5 .m-cal i:nth-child(4),
.mock--5 .m-cal i:nth-child(12) {
  background: #a6e2d6;
}

.mock--5 .m-cross {
  position: absolute;
  top: 22%;
  right: 8%;
  width: 26%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 28%;
  background: #13a38a;
  color: #ffffff;
  font-size: clamp(40px, 7vw, 96px);
  font-weight: 300;
  line-height: 1;
}

/* Макет 6: электровелосипеды */
.mock--6 {
  background: linear-gradient(160deg, #111111, #262a30);
  color: #d8ff3a;
}

.mock--6 .m-bike {
  position: absolute;
  top: 26%;
  left: 10%;
  right: 10%;
  height: 46%;
}

.mock--6 .m-bike .w1,
.mock--6 .m-bike .w2 {
  position: absolute;
  bottom: 0;
  height: 80%;
  aspect-ratio: 1;
  border: 6px solid #d8ff3a;
  border-top-color: #555555;
  border-radius: 50%;
  animation: spin 4s linear infinite;
}

.mock--6 .m-bike .w1 {
  left: 0;
}

.mock--6 .m-bike .w2 {
  right: 0;
}

.mock--6 .m-bike .fr {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 40%;
  height: 8%;
  border-radius: 4px;
  background: #d8ff3a;
  transform: skewX(-30deg);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.mock--6 .m-swatch {
  position: absolute;
  left: 50%;
  bottom: 8%;
  display: flex;
  gap: var(--space-2);
  transform: translateX(-50%) translateZ(30px);
}

.mock--6 .m-swatch i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d8ff3a;
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.mock--6 .m-swatch i:nth-child(2) {
  background: #ff5e3a;
  outline: 0;
}

.mock--6 .m-swatch i:nth-child(3) {
  background: #8fa3ff;
  outline: 0;
}

/* ============ Отрасли: 3D-сцены ============ */

/* Общий холст лежит под карточками; сцены рисуются в прямоугольники .ind-slot. */
.inds {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.ind-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  pointer-events: none;
}

.ind {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
  transition:
    border-color 0.3s,
    background-color 0.4s,
    opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ind:hover {
  border-color: var(--line-2);
}

.ind--click {
  cursor: pointer;
}

.ind-slot {
  aspect-ratio: 5 / 4;
  background: radial-gradient(ellipse 60% 55% at 50% 60%, var(--glow), transparent 72%);
}

.ind-meta {
  position: relative;
  z-index: 2;
  padding: var(--space-4) var(--space-5) var(--space-5);
}

.ind-meta h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ind-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.ind-hint {
  display: inline-block;
  margin-top: var(--space-3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

/* ============ Услуги ============ */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.tile {
  position: relative;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: var(--space-6) var(--space-5) var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s,
    background-color 0.4s,
    opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile:hover {
  border-color: var(--line-2);
  transform: translateY(-4px);
}

.tile--wide {
  grid-column: span 2;
}

.tile--accent {
  border-color: transparent;
  background: var(--accent);
  color: var(--accent-ink);
}

.tile--accent p {
  color: inherit;
  opacity: 0.8;
}

.tile h3 {
  position: relative;
  max-width: 34ch;
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.tile p {
  position: relative;
  max-width: 34ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.num {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  font-family: var(--font-display);
  font-size: 13px;
  opacity: 0.5;
}

.tile-art {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
}

.art-ui {
  display: grid;
  gap: var(--space-2);
  width: 46%;
}

.art-ui i {
  height: 12px;
  border-radius: 99px;
  background: var(--line-2);
  transform-origin: left;
  animation: grow 3s ease-in-out infinite alternate;
}

.art-ui i:nth-child(1) {
  width: 100%;
  background: var(--accent);
}

.art-ui i:nth-child(2) {
  width: 70%;
  animation-delay: 0.3s;
}

.art-ui i:nth-child(3) {
  width: 85%;
  animation-delay: 0.6s;
}

@keyframes grow {
  from {
    transform: scaleX(0.4);
  }
}

.art-code {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.art-cube {
  top: var(--space-6);
  right: var(--space-7);
  width: 80px;
  height: 80px;
  perspective: 400px;
}

.cube {
  position: relative;
  width: 64px;
  height: 64px;
  transform-style: preserve-3d;
  animation: cube 10s linear infinite;
}

.cube i {
  position: absolute;
  inset: 0;
  border: 1.5px solid currentColor;
  background: rgba(255, 255, 255, 0.08);
}

.cube i:nth-child(1) {
  transform: translateZ(32px);
}

.cube i:nth-child(2) {
  transform: rotateY(180deg) translateZ(32px);
}

.cube i:nth-child(3) {
  transform: rotateY(90deg) translateZ(32px);
}

.cube i:nth-child(4) {
  transform: rotateY(-90deg) translateZ(32px);
}

.cube i:nth-child(5) {
  transform: rotateX(90deg) translateZ(32px);
}

.cube i:nth-child(6) {
  transform: rotateX(-90deg) translateZ(32px);
}

@keyframes cube {
  to {
    transform: rotateX(360deg) rotateY(720deg);
  }
}

.art-pay {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.art-pay span {
  padding: var(--space-1) var(--space-3);
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 800;
}

.art-pay span:nth-child(2) {
  background: var(--accent-2);
  color: #ffffff;
  transform: translateX(-12px);
}

.art-pay span:nth-child(3) {
  background: var(--accent);
  color: var(--accent-ink);
}

.art-gauge {
  width: 110px;
  color: #19b26b;
  text-align: center;
}

.art-gauge b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
}

.gauge {
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
  transition: stroke-dashoffset 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.in .gauge {
  stroke-dashoffset: 0;
}

.art-pulse {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  height: 60px;
}

.art-pulse i {
  width: 6px;
  border-radius: 6px;
  background: var(--accent);
  animation: eq 1.2s ease-in-out infinite alternate;
}

.art-pulse i:nth-child(odd) {
  animation-duration: 0.9s;
}

.art-pulse i:nth-child(3n) {
  background: var(--accent-2);
  animation-duration: 1.5s;
}

@keyframes eq {
  from {
    height: 10%;
  }

  to {
    height: 100%;
  }
}

/* ============ Платежи ============ */

.pay {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-7);
}

/* Без min-width: 0 холст 3D-карты растягивает колонку сетки и ломает ширину страницы. */
.pay > *,
.contact-grid > * {
  min-width: 0;
}

.pay-copy .h2 {
  font-size: clamp(32px, 4vw, 56px);
}

.providers {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-5) 0 var(--space-6);
}

.providers span {
  display: inline-flex;
  align-items: center;
  height: var(--control-height-sm);
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  font-size: var(--control-font);
  font-weight: 600;
}

.checkout {
  max-width: 460px;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: background-color 0.4s;
}

.co-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  font-weight: 700;
}

.co-lock {
  color: var(--success);
  font-size: 12px;
  font-weight: 600;
}

.co-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  font-size: 15px;
}

.co-row > :last-child {
  white-space: nowrap;
}

.co-muted {
  padding-bottom: var(--space-3);
  border-bottom: 1px dashed var(--line-2);
  color: var(--muted);
  font-size: 13px;
}

.co-label {
  margin: var(--space-3) 0 var(--space-2);
  color: var(--muted);
  font-size: 13px;
}

.methods {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.methods button {
  height: var(--control-height);
  padding: 0 var(--space-2);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  background: none;
  font-size: var(--control-font);
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s,
    color 0.2s;
}

.methods button.on {
  border-color: var(--accent);
  background: var(--glow);
  color: var(--accent);
}

.co-pay.is-done {
  background: var(--success);
  box-shadow: 0 14px 30px -14px var(--success);
}

.co-pay .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.co-note {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.pay-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.card-stage {
  position: relative;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 1.25;
  overflow: hidden;
  background: radial-gradient(ellipse 55% 45% at 50% 55%, var(--glow), transparent 70%);
  touch-action: pan-y;
  cursor: grab;
}

.card-stage:active {
  cursor: grabbing;
}

/* Холст вынут из потока, чтобы его пиксельная ширина не влияла на сетку. */
.card-stage canvas {
  position: absolute;
  inset: 0;
  display: block;
}

.covers {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  color: var(--muted);
  font-size: var(--control-font);
}

.swatches {
  display: flex;
  gap: var(--space-3);
}

.swatches button {
  width: var(--control-height-sm);
  height: var(--control-height-sm);
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  outline: 2px solid transparent;
  outline-offset: 3px;
  cursor: pointer;
  transition:
    transform 0.2s,
    outline-color 0.2s;
}

.swatches button:hover {
  transform: scale(1.1);
}

.swatches button.on {
  outline-color: var(--ink);
}

.covers small {
  font-size: 12px;
}

/* ============ Процесс и цифры ============ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding: var(--space-5) var(--space-5) var(--space-5) 0;
  border-top: 2px solid var(--line-2);
}

/* Акцентная линия «дорисовывается» при появлении шага. */
.step::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) var(--d, 0s);
}

.step.in::before {
  width: 100%;
}

.step-n {
  display: block;
  margin-bottom: var(--space-4);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.step h3 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0 0 var(--space-3);
  color: var(--muted);
  font-size: 15px;
}

.step-m {
  display: inline-flex;
  align-items: center;
  height: var(--control-height-sm);
  padding: 0 var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
}

.numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: calc(var(--space-7) * 2);
}

.numbers div {
  display: grid;
  gap: var(--space-2);
}

.numbers b {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.numbers div > span {
  color: var(--muted);
  font-size: 15px;
}

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

.contact {
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  top: -10%;
  left: -20vw;
  width: 70vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 65%);
  pointer-events: none;
}

.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: var(--space-7);
}

.form {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: background-color 0.4s;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form label {
  display: grid;
  gap: var(--space-2);
  font-size: var(--control-font);
  font-weight: 600;
}

/* Поля той же высоты, что и кнопки рядом. */
.form input,
.form textarea {
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  resize: vertical;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 4px var(--glow);
}

.form .invalid {
  border-color: var(--accent-2);
}

.budget {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
}

.budget legend {
  margin-bottom: var(--space-2);
  font-size: var(--control-font);
  font-weight: 600;
}

.budget label {
  display: block;
  cursor: pointer;
}

.budget input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.budget span {
  display: flex;
  align-items: center;
  height: var(--control-height-sm);
  padding: 0 var(--space-3);
  border: 1px solid var(--line-2);
  border-radius: var(--control-radius);
  font-weight: 500;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.budget input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.budget input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--glow);
}

.form-ok {
  margin: 0;
  padding: var(--space-3);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--success) 14%, transparent);
  color: var(--success);
  font-weight: 600;
  text-align: center;
}

/* ============ Подвал ============ */

.footer {
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--control-font);
}

.footer-in {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
}

/* ============ Адаптивность ============ */

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

@media (max-width: 980px) {
  .nav {
    display: none;
  }

  .inds {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps,
  .numbers {
    grid-template-columns: repeat(2, 1fr);
  }

  .pay,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .checkout {
    max-width: none;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .topbar {
    justify-content: flex-end;
  }

  .controls .btn {
    display: none;
  }

  /* Вкладки фильтра на телефоне — одна прокручиваемая полоса без переноса. */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--page-gutter) * -1);
    padding-inline: var(--page-gutter);
    scrollbar-width: none;
  }

  .filters::-webkit-scrollbar {
    display: none;
  }

  .works,
  .inds,
  .bento,
  .steps,
  .row2 {
    grid-template-columns: 1fr;
  }

  .work:nth-child(even) {
    margin-top: 0;
  }

  .tile--wide {
    grid-column: auto;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1;
  }

  .methods {
    grid-template-columns: repeat(2, 1fr);
  }

  .hud span {
    display: none;
  }

  .form {
    padding: var(--space-5) var(--space-4);
  }

  .scr-body {
    grid-template-columns: 1fr;
    align-content: center;
  }

  .scr-bar span {
    display: none;
  }

  .products {
    grid-template-columns: repeat(2, 1fr);
  }

  .products article:nth-child(3) {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }

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