/* ============================================================
   GLYPHRAY — studio site
   Верстка 1:1 по макету Figma «glyphray-portfolio» (1440)
   + тёмная/светлая тема, панель параметров, i18n, звук,
     глитч, глянцевое свечение, кастомный курсор и шлейф.
   ============================================================ */

/* ---------- Токены ---------- */
:root {
  --bg-dark: #0a0a0b;
  --bg-window: #111112;
  --bg-light: #f5f5f7;
  --white: #f5f5f7;
  --muted: #919195;
  --muted-light: #66666b;
  --red: #f22920;
  --line-dark: rgba(255, 255, 255, 0.102);
  --line-light: rgba(0, 0, 0, 0.082);
  --grad: linear-gradient(47deg, #ed2325 5%, #fdc469 35%, #ee82ff 70%, #8c1813 100%);
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.25);
  --shadow-card-hover: 0 34px 64px rgba(0, 0, 0, 0.5);
  --case-ink: #0a0a0b;

  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Fragment Mono", "Roboto Mono", ui-monospace, "Cascadia Mono", monospace;

  --nav-h: 100px;
  --ease-out: cubic-bezier(0.16, 0.84, 0.28, 1);
}

/* Светлая тема: тёмные и светлые поверхности меняются местами */
[data-theme="light"] {
  --bg-dark: #f5f5f7;
  --bg-window: #ffffff;
  --bg-light: #0a0a0b;
  --white: #0a0a0b;
  --muted: #66666b;
  --muted-light: #919195;
  --line-dark: rgba(10, 10, 11, 0.12);
  --line-light: rgba(255, 255, 255, 0.12);
  --shadow-card: 0 20px 40px rgba(10, 10, 11, 0.1);
  --shadow-card-hover: 0 34px 64px rgba(10, 10, 11, 0.18);
}

/* ---------- База ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: #3a3a3f var(--bg-dark);
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--white);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; }
a { color: inherit; }

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

.mono { font-family: var(--font-mono); }

.grad-text {
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

::selection { background: rgba(238, 130, 255, 0.35); }

.wrap {
  width: min(1280px, 100% - 160px);
  margin-inline: auto;
}

/* ============================================================
   ГЛЯНЦЕВОЕ СВЕЧЕНИЕ (кнопки и плашки)
   ============================================================ */
:is(.btn, .tag, .social, .segmented__btn, .stripes, .burger, .settings__close, .switch, .langs button) {
  position: relative;
}

:is(.btn, .tag, .social, .segmented__btn, .stripes, .burger, .settings__close, .switch, .langs button)::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(
    from var(--ga, 0deg),
    rgba(255, 255, 255, 0) 0deg,
    rgba(255, 255, 255, 0.92) 34deg,
    rgba(255, 255, 255, 0.25) 70deg,
    rgba(255, 255, 255, 0) 110deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

:is(.btn, .tag, .social, .segmented__btn, .stripes, .burger, .settings__close, .switch, .langs button)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    120px 70px at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.34),
    rgba(255, 255, 255, 0.08) 45%,
    transparent 72%
  );
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

:is(.btn, .tag, .social, .segmented__btn, .stripes, .burger, .settings__close, .switch, .langs button):hover::before,
:is(.btn, .tag, .social, .segmented__btn, .stripes, .burger, .settings__close, .switch, .langs button):hover::after {
  opacity: 1;
}

:is(.btn, .tag, .social, .segmented__btn, .stripes, .burger, .settings__close, .switch, .langs button):hover {
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.14), 0 0 44px rgba(238, 130, 255, 0.1);
}

/* ============================================================
   ШАПКА (липкая)
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  pointer-events: none;

  /* наверху страницы шапка всегда «тёмное стекло» поверх фото */
  --hdr-fg: #f5f5f7;
  --hdr-bg: rgba(0, 0, 0, 0.012);
  --hdr-border: rgba(255, 255, 255, 0.102);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.site-header.is-scrolled .scroll-progress { opacity: 0.85; }

.nav {
  position: relative;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: height 0.45s var(--ease-out);
  pointer-events: none;
}

/* Стеклянная плашка — отдельный fixed-слой (вне fixed-шапки, иначе Chromium
   не применяет backdrop-filter к содержимому страницы) */
.nav-glass {
  position: fixed;
  top: 17px;
  left: 0;
  right: 0;
  z-index: 59;
  width: calc(min(1280px, 100% - 160px) + 42px);
  margin-inline: auto;
  height: 66px;
  border-radius: 33px;
  border: 1px solid rgba(255, 255, 255, 0.102);
  background: rgba(0, 0, 0, 0.012);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  pointer-events: none;
  transition: top 0.45s var(--ease-out), height 0.45s var(--ease-out),
    width 0.45s var(--ease-out), border-radius 0.45s var(--ease-out),
    background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.45s ease,
    backdrop-filter 0.35s ease, -webkit-backdrop-filter 0.35s ease;
}

.nav-glass.is-scrolled {
  top: 10px;
  height: 56px;
  border-radius: 28px;
  background: rgba(10, 10, 11, 0.2);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(26px) saturate(1.9) brightness(1.06);
  -webkit-backdrop-filter: blur(26px) saturate(1.9) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 40px rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .nav-glass.is-scrolled {
  background: rgba(245, 245, 247, 0.24);
  border-color: rgba(10, 10, 11, 0.12);
}

.site-header.is-scrolled {
  --hdr-fg: var(--white);
}

.site-header.is-scrolled .nav { --nav-h: 76px; }

/* Две полосочки (параметры) */
.stripes {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  transition: box-shadow 0.35s ease;
}

.stripes__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--hdr-fg);
}

.stripes__bar--short { width: 13px; }

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
  text-decoration: none;
  pointer-events: auto;
}

/* Живой градиент кружка: #ed2325 → #fdc469 → #ee82ff → #8c1813 → #ed2325
   Два повтора цикла внутри фона + сдвиг ровно на один период → шва нет.
   Перелив идёт снизу-слева вверх-вправо, плавно и без рывка. */
.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-image: linear-gradient(
    45deg,
    #ed2325, #fdc469, #ee82ff, #8c1813,
    #ed2325, #fdc469, #ee82ff, #8c1813,
    #ed2325
  );
  background-size: 200% 200%;
  background-repeat: no-repeat;
  background-position: 100% 0%;
  animation: dot-flow 4.5s linear infinite;
}

@keyframes dot-flow {
  from { background-position: 100% 0%; }
  to { background-position: 0% 100%; }
}

.brand-word {
  font: 800 22px/27px var(--font-display);
  color: var(--hdr-fg);
}

.nav-links {
  position: absolute;
  left: 596px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 40px;
}

.nav-links a {
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 14px;
  text-transform: uppercase;
  color: var(--hdr-fg);
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-links a:hover::after { transform: scaleX(1); }

.burger {
  margin-left: auto;
  width: 32px;
  height: 10px;
  padding: 0;
  border: 0;
  background: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  pointer-events: auto;
}

.burger-line {
  display: block;
  width: 32px;
  height: 2px;
  border-radius: 99px;
  background: var(--hdr-fg);
  transition: transform 0.25s ease, width 0.25s ease, background-color 0.35s ease;
}

.burger-line--short { width: 20px; }
.burger:hover .burger-line--short { width: 32px; }

/* ============================================================
   ПАНЕЛЬ ПАРАМЕТРОВ
   ============================================================ */
.settings {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.settings[hidden] { display: none; }

.settings__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 7, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.35s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.settings__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(430px, 100%);
  padding: 28px 32px 40px;
  overflow-y: auto;
  background: rgba(12, 12, 14, 0.92);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #f5f5f7;
  animation: panel-in 0.45s var(--ease-out);
}

[data-theme="light"] .settings__panel {
  background: rgba(250, 250, 252, 0.94);
  border-left-color: rgba(10, 10, 11, 0.1);
  color: #0a0a0b;
}

@keyframes panel-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.settings__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .settings__head { border-bottom-color: rgba(10, 10, 11, 0.1); }

.settings__title {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.75;
}

.settings__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
}

[data-theme="light"] .settings__close { border-color: rgba(10, 10, 11, 0.16); }
.settings__close:hover { transform: rotate(90deg); }

.settings__nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .settings__nav { border-bottom-color: rgba(10, 10, 11, 0.1); }

.settings__nav a {
  font: 600 24px/34px var(--font-display);
  letter-spacing: -1px;
  text-decoration: none;
  padding: 6px 0;
  transition: opacity 0.25s ease, transform 0.4s var(--ease-out);
}

.settings__nav a:hover { opacity: 0.7; transform: translateX(6px); }

.settings__block { padding-top: 26px; }

.settings__label {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 14px;
}

/* Сегментированный переключатель темы */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .segmented {
  border-color: rgba(10, 10, 11, 0.12);
  background: rgba(10, 10, 11, 0.04);
}

.segmented__btn {
  position: relative;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: inherit;
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease, background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.35s ease;
}

.segmented__btn:hover { opacity: 0.9; }

.segmented__btn[aria-checked="true"] {
  opacity: 1;
  background: linear-gradient(135deg, #ed2325, #fdc469 35%, #ee82ff 70%, #8c1813);
  color: #fff;
  box-shadow: 0 8px 24px rgba(238, 130, 255, 0.25);
}

/* Языки */
.langs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.langs button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease,
    transform 0.4s var(--ease-out), color 0.3s ease, opacity 0.3s ease;
}

[data-theme="light"] .langs button {
  border-color: rgba(10, 10, 11, 0.12);
  background: rgba(10, 10, 11, 0.03);
}

.langs button:hover { transform: translateX(4px); }
.langs button[aria-checked="true"] { border-color: rgba(255, 255, 255, 0.55); }

[data-theme="light"] .langs button[aria-checked="true"] { border-color: rgba(10, 10, 11, 0.6); }

.langs button span[data-code] {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.5;
}

.langs button[aria-checked="true"] span[data-code] { opacity: 1; }

/* Звук */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

[data-theme="light"] .switch {
  border-color: rgba(10, 10, 11, 0.12);
  background: rgba(10, 10, 11, 0.03);
}

.switch__track {
  position: relative;
  width: 46px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background-color 0.35s ease;
}

[data-theme="light"] .switch__track { background: rgba(10, 10, 11, 0.14); }

.switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f5f5f7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.4s var(--ease-out), background-image 0.35s ease;
}

[data-theme="light"] .switch__thumb { background: #fff; }

.switch[aria-checked="true"] .switch__track {
  background-image: var(--grad);
  background-size: 200% 200%;
}

.switch[aria-checked="true"] .switch__thumb { transform: translateX(22px); }

.switch__state { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: 0.8; }

/* Заметка о приватности + сброс настроек */
.settings__block--foot {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

[data-theme="light"] .settings__block--foot { border-top-color: rgba(10, 10, 11, 0.1); }

.settings__note {
  font-size: 11px;
  line-height: 17px;
  opacity: 0.55;
  max-width: 330px;
}

.settings__reset {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: none;
  color: inherit;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.25s ease, border-color 0.25s ease, transform 0.4s var(--ease-out);
}

.settings__reset:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateY(-2px);
}

[data-theme="light"] .settings__reset { border-color: rgba(10, 10, 11, 0.16); }
[data-theme="light"] .settings__reset:hover { border-color: rgba(10, 10, 11, 0.42); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 980px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0a0a0b;
  color: #f5f5f7;

  /* хиро всегда тёмный — фиксируем токены локально */
  --white: #f5f5f7;
  --muted: #919195;
  --line-dark: rgba(255, 255, 255, 0.102);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(10, 10, 11, 0.6), rgba(10, 10, 11, 0.6)),
    url("images/hero-bg.webp") center / cover no-repeat;
}

.hero-trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero > .wrap { position: relative; z-index: 2; }

.hero-body {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-top: 343px;
}

.hero-statement { width: 720px; max-width: 100%; }

.hero-label {
  font-size: 12px;
  line-height: 14px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ---------- Глитч (чёрно-белый, размытый, «лагающий») ---------- */
[data-glitch] { position: relative; }

[data-glitch]::before,
[data-glitch]::after {
  content: attr(data-glitch-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  white-space: inherit;
  color: rgba(245, 245, 247, 0.5);
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
  will-change: transform, opacity;
}

[data-glitch].is-glitching::before {
  opacity: 0.8;
  clip-path: polygon(0 3%, 100% 3%, 100% 41%, 0 41%);
  animation: glitch-a 0.16s steps(2, end) infinite;
}

[data-glitch].is-glitching::after {
  opacity: 0.5;
  filter: blur(4px);
  clip-path: polygon(0 57%, 100% 57%, 100% 100%, 0 100%);
  animation: glitch-b 0.2s steps(2, end) infinite;
}

[data-glitch].is-glitching {
  animation: glitch-lag 0.22s steps(3, end) infinite;
  text-shadow: 0 0 22px rgba(245, 245, 247, 0.3);
}

[data-glitch].is-settled { animation: glitch-snap 0.3s var(--ease-out); }

@keyframes glitch-a {
  0% { transform: translate(-3px, -1px); }
  50% { transform: translate(3px, 1px); }
  100% { transform: translate(-1px, 2px); }
}

@keyframes glitch-b {
  0% { transform: translate(3px, 1px); }
  50% { transform: translate(-4px, -2px); }
  100% { transform: translate(2px, 1px); }
}

@keyframes glitch-lag {
  0% { transform: translate(0, 0) skewX(0deg); }
  25% { transform: translate(-2px, 1px) skewX(-0.4deg); }
  50% { transform: translate(2px, -1px) skewX(0.5deg); }
  75% { transform: translate(-1px, -1px) skewX(0); }
  100% { transform: translate(0, 0) skewX(0deg); }
}

@keyframes glitch-snap {
  0% { transform: none; filter: none; }
  25% { transform: translateX(-5px) skewX(-5deg); filter: brightness(1.5) blur(0.5px); }
  60% { transform: translateX(3px) skewX(2deg); filter: brightness(1.15); }
  100% { transform: none; filter: none; }
}

.hero-title {
  margin-top: 12px;
  font: 800 90px/81px var(--font-display);
  color: #f5f5f7;
  white-space: nowrap;
}

.title-slashes {
  position: relative;
  display: inline-block;
  vertical-align: top;
  width: 77px;
  height: 81px;
  margin-left: -8.2px;
  margin-right: -3.8px;
}

/* Слэши: те же цвета, что у кружка логотипа, и тот же бесшовный перелив */
.slash {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
    45deg,
    #ed2325, #fdc469, #ee82ff, #8c1813,
    #ed2325, #fdc469, #ee82ff, #8c1813,
    #ed2325
  );
  background-size: 200% 200%;
  background-repeat: no-repeat;
  background-position: 100% 0%;
  animation: slash-flow 4.5s linear infinite;
}

.slash--1 { clip-path: polygon(44.68% 0, 63.5% 0, 26.6% 100%, 7.8% 100%); }
.slash--2 { clip-path: polygon(78.4% 0, 97.3% 0, 60.4% 100%, 41.6% 100%); }

@keyframes slash-flow {
  from { background-position: 100% 0%; }
  to { background-position: 0% 100%; }
}

.hero-subtitle {
  margin-top: 12px;
  font: 600 40px/44px var(--font-display);
}

/* «Печатная машинка»: курсор как в редакторе кода */
.typer-caret {
  display: inline-block;
  width: 2px;
  height: 0.8em;
  margin-left: 7px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.7;
  transform: translateY(0.04em);
  animation: caret-blink 1.1s steps(1, end) infinite;
}

@keyframes caret-blink {
  0%, 45% { opacity: 0.75; }
  50%, 100% { opacity: 0; }
}

/* пока печатает/стирает — курсор горит ровно */
.hero-subtitle.is-typing .typer-caret {
  animation: none;
  opacity: 0.9;
}

.hero-lead {
  margin-top: 40px;
  font: 400 18px/27px var(--font-body);
  color: var(--muted);
  max-width: 720px;
}

.scroll-cue {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #f5f5f7;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.scroll-cue:hover { opacity: 0.75; }
.scroll-cue__icon { display: block; animation: cue-bounce 2.6s ease-in-out infinite; }

@keyframes cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

.hero-info {
  flex: 0 0 400px;
  width: 400px;
  margin-top: -32px;
}

.hero-number {
  position: relative;
  width: 290px;
  height: 128px;
  margin-left: 110px;
}

.hero-number__value {
  display: block;
  width: 252px;
  font: 900 160px/128px var(--font-display);
}

.hero-number__plus {
  position: absolute;
  left: 261px;
  top: 0;
  font: 900 48px/60px var(--font-display);
}

.hero-tags {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tag {
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 20px;
  border: 1px solid var(--line-dark);
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.012);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 0.5px;
  color: #f5f5f7;
  transition: border-color 0.35s ease, transform 0.45s var(--ease-out), background-color 0.35s ease;
}

.tag:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(6px);
}

.hero-footer {
  margin-top: auto;
  height: 80px;
  border-top: 1px solid var(--line-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hero-location {
  font-size: 11px;
  line-height: 13px;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 29px;
  padding: 0 16px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  font-size: 11px;
  line-height: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #f5f5f7;
}

.hero-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #89f220;
  animation: pulse-dot 2.6s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(137, 242, 32, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(137, 242, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(137, 242, 32, 0); }
}

/* ============================================================
   ОБЩЕЕ: заголовок секции
   ============================================================ */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.accent-bar {
  flex: 0 0 24px;
  width: 24px;
  height: 3px;
  background: var(--red);
  transition: width 0.5s var(--ease-out);
}

.section-title {
  font: 700 32px/40px var(--font-display);
}

.section-idx {
  font-size: 14px;
  line-height: 17px;
  color: var(--red);
  text-transform: uppercase;
  white-space: nowrap;
}

.section-head--inline {
  justify-content: flex-start;
  align-items: center;
}

.section-head--inline .section-idx {
  align-self: flex-end;
  margin-left: 12px;
}

/* ============================================================
   МАНИФЕСТ
   ============================================================ */
.manifesto {
  background: var(--bg-light);
  color: var(--bg-dark);
  padding: 140px 0;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.manifesto-content {
  display: flex;
  align-items: flex-start;
}

.manifesto-index {
  flex: 0 0 380px;
  width: 380px;
}

.manifesto-text {
  width: 900px;
  max-width: 100%;
  margin-left: auto;
  text-align: right;
}

.manifesto-statement {
  font: 700 48px/58px var(--font-body);
  color: var(--bg-dark);
}

.manifesto-paragraph {
  margin-top: 40px;
  font: 400 18px/29px var(--font-body);
  color: var(--muted-light);
}

.studio-stats {
  margin-top: 96px;
  padding-top: 64px;
  border-top: 1px solid var(--line-light);
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.stat { width: 165px; }

.stat-label {
  font-size: 11px;
  line-height: 13px;
  letter-spacing: 1px;
  color: var(--muted-light);
  text-transform: uppercase;
}

.stat-value {
  margin-top: 12px;
  font: 800 40px/50px var(--font-display);
  color: var(--bg-dark);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   ПРОЕКТЫ
   ============================================================ */
.projects {
  background: var(--bg-dark);
  color: var(--white);
  padding: 140px 0;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.projects-grid {
  margin-top: 88px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  row-gap: 64px;
}

.project-window {
  background: var(--bg-window);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.55s var(--ease-out), border-color 0.4s ease,
    box-shadow 0.55s ease, background-color 0.5s ease;
}

.project-card:hover .project-window {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow-card-hover);
}

[data-theme="light"] .project-card:hover .project-window { border-color: rgba(10, 10, 11, 0.22); }

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 24px;
  margin: 14px 14px 0;
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

.window-controls { letter-spacing: 2px; }

.artwork {
  margin: 0 14px 14px;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 592 / 428;
  background: #0d0d0f;
}

.artwork img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}

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

.project-caption {
  height: 45px;
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.project-title {
  font: 600 20px/25px var(--font-display);
  color: var(--white);
}

.project-client {
  margin-top: 6px;
  font-size: 12px;
  line-height: 14px;
  color: var(--muted);
  max-width: 500px;
}

.project-year {
  font-size: 12px;
  line-height: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   КЕЙС
   ============================================================ */
.case {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none' viewBox='0 0 1440 1431'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='1229' x2='1004.4' y2='-90.4' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='.0466' stop-color='%23ed2325'/%3E%3Cstop offset='.3486' stop-color='%23fdc469'/%3E%3Cstop offset='.6985' stop-color='%23ee82ff'/%3E%3Cstop offset='1' stop-color='%238c1813'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='1440' height='1431' fill='url(%23g)'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  color: var(--case-ink);
}

.case-intro { padding-top: 120px; }

.case-label {
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--case-ink);
}

.case-head {
  margin-top: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.case-copy { max-width: 760px; }

.case-sub {
  font-size: 14px;
  line-height: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--case-ink);
}

.case-title {
  margin-top: 24px;
  font: 800 64px/64px var(--font-display);
  color: var(--case-ink);
}

.case-image { margin-top: 80px; }

.case-image img {
  display: block;
  width: 100%;
  height: auto;
}

.case-results {
  margin-top: 0;
  background: var(--bg-dark);
  padding: 80px 0;
  transition: background-color 0.5s ease;
}

.case-results__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.result {
  border-top: 1px solid var(--line-dark);
  padding-top: 24px;
}

.result-value {
  font: 800 48px/60px var(--font-display);
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

.result-label {
  margin-top: 8px;
  font-size: 12px;
  line-height: 14px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ============================================================
   НАПРАВЛЕНИЯ
   ============================================================ */
.capabilities {
  background: var(--bg-light);
  color: var(--bg-dark);
  padding: 140px 0;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.services-grid {
  margin-top: 88px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 48px;
}

.service {
  position: relative;
  border-top: 1px solid var(--line-light);
  padding: 32px 0;
  display: flex;
  gap: 32px;
  transition: border-color 0.45s ease;
}

.service::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s var(--ease-out);
}

.service:hover::after { transform: scaleX(1); }

.service-num {
  flex: 0 0 60px;
  font-size: 14px;
  line-height: 17px;
  color: var(--red);
  transition: transform 0.5s var(--ease-out);
}

.service:hover .service-num { transform: translateX(4px); }

.service-body h3 {
  font: 700 22px/27px var(--font-display);
  color: var(--bg-dark);
}

.service-body p {
  margin-top: 12px;
  font: 400 15px/22.5px var(--font-body);
  color: var(--muted-light);
}

/* ============================================================
   ПРОЦЕСС
   ============================================================ */
.process {
  background: var(--bg-dark);
  color: var(--white);
  padding: 140px 0;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.steps {
  margin-top: 88px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.step {
  flex: 0 0 240px;
  background: var(--bg-window);
  border: 1px solid var(--line-dark);
  border-radius: 16px;
  padding: 32px;
  transition: transform 0.6s var(--ease-out), border-color 0.45s ease,
    background-color 0.5s ease, box-shadow 0.5s ease;
}

.step:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .step:hover {
  border-color: rgba(10, 10, 11, 0.2);
  box-shadow: 0 18px 40px rgba(10, 10, 11, 0.12);
}

.step-num {
  font-size: 14px;
  line-height: 17px;
  color: var(--red);
}

.step h3 {
  margin-top: 20px;
  font: 700 22px/27px var(--font-display);
  color: var(--white);
}

.step p {
  margin-top: 12px;
  font: 400 14px/21px var(--font-body);
  color: var(--muted);
}

/* ============================================================
   КОНТАКТЫ
   ============================================================ */
.cta {
  background: var(--red);
  padding: 160px 0;
  text-align: center;
}

.cta-title {
  font: 800 56px/61.6px var(--font-display);
  text-transform: uppercase;
  color: #0a0a0b;
}

.cta-actions {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 19px;
  text-decoration: none;
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s ease,
    background-color 0.35s ease, color 0.35s ease;
}

.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(0.985); }

.btn--dark {
  background: #0a0a0b;
  color: #fff;
  padding: 20px 40px;
}

.btn--outline {
  border: 1px solid #0a0a0b;
  color: #0a0a0b;
  padding: 19px 40px;
}

.btn--outline:hover { background: rgba(10, 10, 11, 0.06); }

.btn--white {
  background: #fff;
  color: #000;
  padding: 18px 32px;
  font-size: 14px;
  line-height: 17px;
  white-space: nowrap;
}

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.footer {
  background: var(--bg-window);
  color: var(--white);
  padding: 73px 0 48px;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  padding-top: 47px;
  max-width: 340px;
}

.footer-logo {
  font: 800 40px/50px var(--font-display);
}

.footer-caption {
  margin-top: 16px;
  font: 400 14px/21px var(--font-body);
  color: var(--muted);
}

.footer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.footer-label {
  font-size: 11px;
  line-height: 13px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
}

.footer-contact { text-align: right; }

.footer-email {
  display: inline-block;
  margin-top: 20px;
  font-size: 16px;
  line-height: 19px;
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  transition: opacity 0.25s ease;
}

.footer-email:hover { opacity: 0.75; }

.footer-socials {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.social-rows {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.social-row {
  display: flex;
  gap: 16px;
}

.social {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 14px;
  color: var(--white);
  text-decoration: none;
  transition: opacity 0.3s ease, transform 0.45s var(--ease-out);
}

.social:hover { transform: translateY(-3px); }

.social-arrow {
  position: absolute;
  left: 8.5px;
  bottom: 6.5px;
  color: currentColor;
  opacity: 0.8;
}

.footer-base {
  margin-top: 65px;
  border-top: 1px solid var(--line-dark);
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 12px;
  line-height: 14px;
  color: var(--muted);
}

/* ============================================================
   КУРСОР (только первый экран)
   ============================================================ */
.cursor-on,
.cursor-on a,
.cursor-on button,
.cursor-on .tag { cursor: none; }

.cursor {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cursor.is-active { opacity: 1; }

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

.cursor__ring,
.cursor__dot { mix-blend-mode: difference; }

/* мягкое белое свечение вокруг курсора — ч/б, без цвета */
.cursor__aura {
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  background: radial-gradient(circle, rgba(245, 245, 247, 0.4) 0%, rgba(245, 245, 247, 0.16) 46%, transparent 70%);
  filter: blur(10px);
  mix-blend-mode: screen;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.cursor.is-hover .cursor__aura { opacity: 0.85; }

.cursor__ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid rgba(245, 245, 247, 0.9);
  box-shadow: inset 0 0 8px rgba(245, 245, 247, 0.18);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
    margin 0.3s var(--ease-out), border-color 0.3s ease, opacity 0.3s ease;
}

.cursor__dot {
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  background: rgba(245, 245, 247, 0.98);
}

.cursor.is-hover .cursor__ring {
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border-color: rgba(245, 245, 247, 0.65);
  box-shadow: inset 0 0 12px rgba(245, 245, 247, 0.22);
}

.cursor.is-down .cursor__ring {
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
}

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

/* ============================================================
   БАННЕР СОГЛАСИЯ НА КУКИ
   ============================================================ */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  padding: 16px 24px 22px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  animation: consent-in 0.6s var(--ease-out);
}

.consent[hidden] { display: none; }

@keyframes consent-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.consent__inner {
  pointer-events: auto;
  width: min(880px, 100%);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(10, 10, 11, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  color: #f5f5f7;
}

[data-theme="light"] .consent__inner {
  border-color: rgba(10, 10, 11, 0.12);
  background: rgba(250, 250, 252, 0.88);
  color: #0a0a0b;
  box-shadow: 0 20px 50px rgba(10, 10, 11, 0.18);
}

.consent__text {
  flex: 1 1 auto;
  font-size: 11.5px;
  line-height: 18px;
  opacity: 0.85;
}

.consent__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}

.consent__btn {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: none;
  color: inherit;
  font-size: 12px;
  line-height: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out), background-color 0.3s ease,
    border-color 0.3s ease, opacity 0.3s ease;
}

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

.consent__btn--accept {
  background-image: var(--grad);
  border-color: transparent;
  color: #fff;
}

.consent__btn--decline { opacity: 0.75; }
.consent__btn--decline:hover { opacity: 1; }

@media (max-width: 820px) {
  .consent { padding: 12px 16px 16px; }
  .consent__inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .consent__actions { justify-content: flex-end; }
}

/* ============================================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transition: opacity 0.95s var(--ease-out), transform 0.95s var(--ease-out);
  transition-delay: var(--rd, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal="up"] { transform: translateY(34px); }
.js [data-reveal="right"] { transform: translateX(-24px); }
.js [data-reveal="soft"] {
  transform: translateY(16px) scale(0.988);
  transition-duration: 1.15s;
}
.js [data-reveal="zoom"] { transform: scale(0.972); }

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.js .hero [data-hero] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.05s var(--ease-out), transform 1.05s var(--ease-out);
}

.js.is-loaded .hero [data-hero] { opacity: 1; transform: none; }
.js.is-loaded .hero [data-hero="1"] { transition-delay: 0.05s; }
.js.is-loaded .hero [data-hero="2"] { transition-delay: 0.13s; }
.js.is-loaded .hero [data-hero="3"] { transition-delay: 0.22s; }
.js.is-loaded .hero [data-hero="4"] { transition-delay: 0.31s; }
.js.is-loaded .hero [data-hero="5"] { transition-delay: 0.4s; }
.js.is-loaded .hero [data-hero="6"] { transition-delay: 0.28s; }
.js.is-loaded .hero [data-hero="7"] { transition-delay: 0.5s; }

/* Если JS не успел — показываем всё */
.anim-fallback [data-reveal],
.anim-fallback .hero [data-hero] {
  opacity: 1 !important;
  transform: none !important;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 1440px) {
  .wrap { width: calc(100% - 160px); }
  .nav-glass { width: calc(100% - 118px); }
}

@media (max-width: 1280px) {
  .nav-links {
    position: static;
    transform: none;
    margin-left: auto;
  }

  .burger { margin-left: 40px; }

  .hero-title { font-size: 72px; line-height: 66px; }
  .title-slashes { width: 62px; height: 65px; }
  .case-title { font-size: 52px; line-height: 54px; }
  .cta-title { font-size: 46px; line-height: 52px; }
  .hero-number__value { font-size: 128px; line-height: 104px; }
  .manifesto-statement { font-size: 40px; line-height: 48px; }
}

@media (max-width: 1060px) {
  .wrap { width: calc(100% - 96px); }

  .nav-links { display: none; }
  .settings__nav { display: flex; }

  .hero { min-height: 0; }
  .hero-body { margin-top: 190px; }
  .hero-info { margin-top: 0; }

  .steps { flex-wrap: wrap; }
  .step { flex: 1 1 220px; }

  .case-results__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
}

@media (max-width: 820px) {
  .wrap { width: calc(100% - 48px); }
  .nav-glass { width: calc(100% - 6px); }

  .nav { --nav-h: 84px; }
  .nav-glass { top: 12px; height: 60px; border-radius: 30px; }
  .site-header.is-scrolled .nav { --nav-h: 68px; }
  .nav-glass.is-scrolled { top: 8px; height: 52px; border-radius: 26px; }

  .brand { margin-left: 14px; }

  .settings__panel { width: 100%; padding: 22px 22px 32px; }
  .langs { grid-template-columns: 1fr; }

  .hero-body {
    flex-direction: column;
    gap: 56px;
    margin-top: 124px;
  }

  .hero-statement { width: 100%; }

  .hero-title {
    font-size: clamp(38px, 10.6vw, 60px);
    line-height: 1.02;
    white-space: nowrap;
  }

  .title-slashes { width: clamp(32px, 9vw, 52px); height: clamp(34px, 9.5vw, 55px); }

  .hero-subtitle { font-size: 30px; line-height: 34px; }

  .hero-info { flex: 1 1 auto; width: 100%; }
  .hero-number { margin-left: 0; height: 90px; }
  .hero-number__value { font-size: 112px; line-height: 90px; width: 178px; }
  .hero-number__plus { left: 186px; font-size: 34px; line-height: 42px; }

  .hero-footer {
    margin-top: 72px;
    height: auto;
    padding: 20px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .manifesto { padding: 72px 0; }

  .manifesto-content { flex-direction: column; gap: 40px; }
  .manifesto-index { flex: 1 1 auto; width: 100%; }
  .manifesto-text { width: 100%; text-align: left; }

  .manifesto-statement { font-size: 30px; line-height: 37px; }
  .manifesto-paragraph { font-size: 16px; line-height: 26px; }

  .studio-stats {
    flex-wrap: wrap;
    gap: 40px 24px;
    margin-top: 64px;
    padding-top: 40px;
  }

  .stat { width: calc(50% - 12px); }
  .stat-value { font-size: 32px; line-height: 40px; }

  .section-title { font-size: 24px; line-height: 30px; }
  .section-idx { font-size: 12px; line-height: 15px; }

  .projects,
  .capabilities,
  .process { padding: 72px 0; }

  .projects-grid {
    margin-top: 56px;
    grid-template-columns: 1fr;
    row-gap: 48px;
  }

  .project-title { font-size: 18px; line-height: 23px; }
  .project-caption { height: auto; }

  .case-intro { padding-top: 72px; }
  .case-head { flex-direction: column; align-items: flex-start; gap: 32px; }
  .case-title { font-size: 34px; line-height: 37px; }
  .case-image { margin-top: 48px; }
  .case-results { padding: 56px 0; }

  .services-grid {
    margin-top: 56px;
    grid-template-columns: 1fr;
  }

  .service-body h3 { font-size: 18px; line-height: 23px; }

  .steps { margin-top: 56px; }
  .step { flex: 1 1 100%; }

  .cta { padding: 88px 0; }
  .cta-title { font-size: clamp(26px, 7.4vw, 40px); line-height: 1.15; }
  .cta-actions { margin-top: 36px; }

  .footer { padding: 56px 0 32px; }
  .footer-main { flex-direction: column; gap: 48px; }
  .footer-brand { padding-top: 0; }
  .footer-side { align-items: flex-start; width: 100%; }
  .footer-contact { text-align: left; }
  .footer-socials { align-items: flex-start; }
  .social-rows { align-items: flex-start; }
  .social-row { flex-wrap: wrap; }
  .footer-base { flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 40px; }
}

@media (max-width: 520px) {
  .case-results__grid { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { width: 100%; }
  .hero-tags { gap: 12px; }
  .tag { font-size: 11px; }
}

/* ============================================================
   Уважение к настройкам пользователя
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js [data-reveal],
  .js .hero [data-hero] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .brand-dot,
  .scroll-cue__icon,
  .hero-status__dot { animation: none !important; }

  .typer-caret { animation: none !important; opacity: 0.7; }

  .cursor { display: none; }
  [data-glitch]::before,
  [data-glitch]::after { display: none; }
}

/* ============================================================
   ФОРМА ЗАКАЗА
   ============================================================ */
.order {
  position: fixed;
  inset: 0;
  z-index: 92;
}

.order[hidden] { display: none; }

.order__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 6, 7, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in 0.35s ease;
}

.order__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(560px, 100%);
  padding: 26px 30px 40px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(12, 12, 14, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  color: #f5f5f7;
  animation: panel-in 0.45s var(--ease-out);
}

[data-theme="light"] .order__panel {
  background: rgba(250, 250, 252, 0.96);
  border-left-color: rgba(10, 10, 11, 0.1);
  color: #0a0a0b;
}

.order__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .order__head { border-bottom-color: rgba(10, 10, 11, 0.1); }

.order__title {
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  opacity: 0.75;
}

.order__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease;
}

[data-theme="light"] .order__close { border-color: rgba(10, 10, 11, 0.16); }
.order__close:hover { transform: rotate(90deg); }

.order__form { padding-top: 22px; }

.field { display: block; margin-bottom: 22px; border: 0; padding: 0; }

.field__label {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.62;
}

.field__input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 16px;          /* 16px — чтобы iOS не зумил при фокусе */
  line-height: 22px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  -webkit-appearance: none;
  appearance: none;
}

[data-theme="light"] .field__input {
  border-color: rgba(10, 10, 11, 0.14);
  background: rgba(10, 10, 11, 0.03);
}

.field__input:focus { outline: none; border-color: rgba(255, 255, 255, 0.45); }
[data-theme="light"] .field__input:focus { border-color: rgba(10, 10, 11, 0.45); }

.field__input--area { min-height: 120px; resize: vertical; line-height: 24px; }
.field__input.is-error { border-color: #f22920; }
.field__err { display: none; margin-top: 7px; font-size: 11px; color: #ff6a5e; }
.field__err.is-shown { display: block; }

.order__other { margin-top: 10px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.35s var(--ease-out);
}

[data-theme="light"] .chip {
  border-color: rgba(10, 10, 11, 0.14);
  background: rgba(10, 10, 11, 0.03);
}

.chip:hover { transform: translateY(-2px); }
.chip[aria-pressed="true"] {
  border-color: transparent;
  background-image: var(--grad);
  color: #fff;
}
.chip--warn[aria-pressed="true"] { background-image: linear-gradient(135deg, #f22920, #ff8a2b); }

.order__note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 138, 43, 0.35);
  background: rgba(242, 41, 32, 0.12);
  font-size: 11.5px;
  line-height: 17px;
}

.order__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

[data-theme="light"] .order__total {
  border-color: rgba(10, 10, 11, 0.12);
  background: rgba(10, 10, 11, 0.03);
}

.order__total strong { font-size: 16px; letter-spacing: 0.5px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 18px;
  opacity: 0.85;
  cursor: pointer;
}

.check input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #f22920;
}

.check a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

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

.order__submit {
  width: 100%;
  margin-top: 18px;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  background-image: var(--grad);
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}

.order__submit:hover { transform: translateY(-2px); }
.order__submit:disabled { opacity: 0.5; cursor: default; transform: none; }

.order__status {
  margin-top: 14px;
  font-size: 12px;
  line-height: 18px;
  color: #ff8a5e;
}

.order__done { padding-top: 26px; text-align: center; }

.order__done-num {
  font-size: 22px;
  letter-spacing: 1px;
  margin-bottom: 14px;
  background-image: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.order__done-text { font-size: 15px; line-height: 24px; margin-bottom: 16px; }

.order__done-warn {
  padding: 14px 16px;
  border: 1px solid rgba(242, 41, 32, 0.4);
  border-radius: 14px;
  background: rgba(242, 41, 32, 0.1);
  font-size: 11.5px;
  line-height: 18px;
  text-align: left;
}

/* ссылки на юридические документы в подвале */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  font-size: 12px;
  line-height: 14px;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-legal a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* юридические страницы */
.legal-page { max-width: 900px; margin: 0 auto; padding: 150px 0 100px; }
.legal-page h1 { font: 700 34px/42px var(--font-display); margin-bottom: 10px; }
.legal-page .legal-date { font-size: 12px; color: var(--muted); margin-bottom: 34px; }
.legal-page h2 { font: 700 20px/28px var(--font-display); margin: 34px 0 12px; }
.legal-page h3 { font: 600 16px/24px var(--font-display); margin: 22px 0 8px; }
.legal-page p, .legal-page li { font: 400 15px/25px var(--font-body); color: var(--muted); margin-bottom: 10px; }
.legal-page strong { color: inherit; }
.legal-page ul, .legal-page ol { padding-left: 22px; margin-bottom: 14px; }
.legal-page a { color: inherit; }
.legal-back { display: inline-block; margin-bottom: 26px; font-size: 12px; color: var(--muted); text-decoration: none; }
.legal-back:hover { color: inherit; text-decoration: underline; }

@media (max-width: 820px) {
  .order__panel { width: 100%; padding: 20px 18px 34px; }
  .legal-page { padding: 110px 0 70px; }
  .legal-page h1 { font-size: 24px; line-height: 30px; }
}

/* таблицы в юридических документах */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
  font-size: 14px;
}

.legal-table th,
.legal-table td {
  padding: 10px 12px 10px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-dark);
  vertical-align: top;
}

.legal-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

/* ============================================================
   КРОСС-УСТРОЙСТВА: тач, iOS, планшеты, низкие экраны
   ============================================================ */

/* iOS: не раздувать текст при повороте, убрать подсветку тапа */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-tap-highlight-color: transparent;
}

/* Планшеты и узкие ноутбуки: хиро в одну колонку, чтобы ничего не сжималось */
@media (max-width: 1180px) {
  .hero-body {
    flex-direction: column;
    gap: 56px;
    margin-top: 200px;
  }

  .hero-statement { width: 100%; }
  .hero-info { flex: 1 1 auto; width: 100%; margin-top: 0; }

  .manifesto-content { flex-direction: column; gap: 36px; }
  .manifesto-index { flex: 1 1 auto; width: 100%; }
  .manifesto-text { width: 100%; max-width: 760px; text-align: left; }

  .case-head { gap: 28px; }
  .case-copy { max-width: 100%; }
}

/* Планшеты в портрете и телефоны: подтягиваем типографику */
@media (max-width: 900px) {
  .hero-title { font-size: clamp(40px, 9vw, 72px); line-height: 1.02; }
  .section-title { font-size: 26px; line-height: 32px; }
  .case-title { font-size: 38px; line-height: 42px; }
}

/* Низкие экраны (ландшафт телефонов, старые ноутбуки 1366×768) */
@media (max-height: 820px) and (min-width: 1061px) {
  .hero { min-height: 100svh; }
  .hero-body { margin-top: clamp(120px, 24vh, 343px); }
  .hero-tags { margin-top: 40px; }
}

/* Телефоны: высота по реальному вьюпорту (без «прыжков» адресной строки) */
@media (max-width: 820px) {
  .hero { min-height: auto; }
  .nav { --nav-h: 84px; }

  /* безопасные зоны iPhone (вырез, скругления) */
  .wrap {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .consent { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .settings__panel, .order__panel { padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
}

/* Тач-устройства: без «залипающих» hover-эффектов, крупнее зоны нажатия */
@media (hover: none), (pointer: coarse) {
  .project-card:hover .project-window,
  .project-card:hover .artwork img,
  .step:hover,
  .service:hover .service-num,
  .tag:hover,
  .social:hover,
  .btn:hover,
  .chip:hover,
  .consent__btn:hover,
  .order__submit:hover,
  .settings__reset:hover,
  .footer-email:hover { transform: none !important; }

  .project-card:hover .project-window,
  .step:hover { box-shadow: var(--shadow-card); border-color: var(--line-dark); }

  .social { min-height: 40px; padding: 0 18px; }
  .tag { min-height: 40px; }
  .chip { padding: 12px 16px; }
  .nav-links a { padding: 8px 0; }
  .hero-status { min-height: 32px; }
  .footer-legal a { padding: 6px 0; }
  .consent__btn, .order__submit, .settings__reset { min-height: 44px; }

  /* активное состояние вместо hover — визуальный отклик на тап */
  .btn:active, .chip:active, .tag:active, .social:active, .order__submit:active { transform: scale(0.97); }
}

/* Формы на телефонах: крупные поля, без автозума iOS */
@media (max-width: 820px) {
  .field__input { font-size: 16px; padding: 14px 16px; }
  .order__panel, .settings__panel { width: 100%; }
  .legal-table th, .legal-table td { padding: 9px 10px 9px 0; font-size: 13px; }
}

/* Телефоны: более лёгкие картинки (экономия трафика) */
@media (max-width: 820px) {
  .hero::before {
    background:
      linear-gradient(rgba(10, 10, 11, 0.6), rgba(10, 10, 11, 0.6)),
      url("images/hero-bg-sm.webp") center / cover no-repeat;
  }

  .case-image img { content: url("images/case-laptop-sm.webp"); }
}

/* Узкие экраны: заголовки секций и карточки процесса не должны вылезать */
@media (max-width: 1380px) {
  .steps { flex-wrap: wrap; }
  .step { flex: 1 1 220px; }
}

@media (max-width: 760px) {
  .section-head { flex-wrap: wrap; gap: 10px 16px; }
  .section-idx { font-size: 11px; line-height: 14px; }
}

@media (max-width: 430px) {
  .section-title { font-size: 21px; line-height: 26px; }
  .section-title-row { gap: 10px; }
  .accent-bar { flex-basis: 18px; width: 18px; }
  .section-idx { font-size: 10px; }
  .window-bar { font-size: 9px; letter-spacing: 0.5px; }
  .hero-number__value { font-size: 96px; line-height: 78px; width: 152px; }
  .hero-number__plus { left: 160px; font-size: 30px; line-height: 38px; }
}
