/* ============================================================
   ТРИМЕТРИЯ — студия визуализации
   Тонкая монолинейная эстетика, тёмный кинематографический фон
   ============================================================ */

:root {
  --bg: #0a0c0e;
  --bg-2: #101317;
  --bg-3: #151a1f;
  --ink: #f1f4f2;
  --muted: #97a09c;
  --faint: #5c6462;
  --line: rgba(235, 240, 236, 0.14);
  --line-soft: rgba(235, 240, 236, 0.07);
  --accent: #c8f542;
  --accent-dim: rgba(200, 245, 66, 0.16);
  --font-display: "Jost", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #0a0c0e; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, video { display: block; max-width: 100%; }

/* ---------- Прогресс скролла ---------- */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: var(--accent);
  z-index: 200;
}

/* ---------- Курсор ---------- */
.cursor {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 300;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cursor-dot {
  width: 6px; height: 6px;
  background: var(--accent);
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(241, 244, 242, 0.35);
  transition: width .35s var(--ease-out), height .35s var(--ease-out),
              border-color .3s, background-color .3s;
}
body.cursor-hover .cursor-ring {
  width: 58px; height: 58px;
  border-color: var(--accent);
  background: var(--accent-dim);
}
body.has-touch .cursor, body.reduced .cursor { display: none; }

/* ---------- Зерно ---------- */
.grain {
  position: fixed; inset: -100%;
  z-index: 150;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(6) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-2%, 2%); }
  40% { transform: translate(2%, -1%); }
  60% { transform: translate(-1%, -2%); }
  80% { transform: translate(1%, 2%); }
}

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 18px 4vw;
  height: var(--header-h);
  transition: background-color .4s, border-color .4s, padding .4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10, 12, 14, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
  padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: flex; align-items: center; gap: 16px;
  min-width: 0;
}
.brand img { height: 26px; width: auto; }
.brand-sub {
  display: flex; flex-direction: column;
  line-height: 1.25;
  border-left: 1px solid var(--line);
  padding-left: 16px;
  max-width: 160px;
}
.brand-sub b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand-sub i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}
.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color .3s;
}
.nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  border: 1px solid var(--line);
  padding: 9px 20px !important;
  border-radius: 999px;
  color: var(--ink) !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { border-color: var(--accent); }

.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span {
  position: absolute; left: 10px; right: 10px; height: 1.5px;
  background: var(--ink);
  transition: transform .4s var(--ease-out), top .4s;
}
.burger span:nth-child(1) { top: 18px; }
.burger span:nth-child(2) { top: 26px; }
.burger.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.burger.open span:nth-child(2) { top: 22px; transform: rotate(-45deg); }

/* ---------- Герой ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  will-change: transform;
}
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,14,.66) 0%, rgba(10,12,14,.22) 34%, rgba(10,12,14,.30) 62%, rgba(10,12,14,.94) 100%),
    radial-gradient(120% 90% at 12% 78%, rgba(10,12,14,.62) 0%, rgba(10,12,14,0) 55%);
}
.hero-inner {
  width: min(1240px, 92vw);
  margin: 0 auto;
  padding: calc(var(--header-h) + 40px) 0 12vh;
}
.hero-overline {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 34px;
}
.tick {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent);
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 6.4vw, 90px);
  line-height: 1.02;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 0.17em;
}
/* Стеклянные плашки под строки заголовка.
   Ширина плашки = длине текста (width: max-content), все отступы в em —
   можно менять текст, плашка подстроится сама. */
.hero-line {
  display: flex; align-items: baseline; gap: 0.35em;
  width: max-content;
  max-width: 100%;
  padding: 0.14em 0.26em 0.14em 0.2em;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 0.14em;
  background: linear-gradient(115deg,
    rgba(255, 255, 255, 0.11) 0%,
    rgba(255, 255, 255, 0.03) 34%,
    rgba(255, 255, 255, 0.02) 55%,
    rgba(255, 255, 255, 0.09) 100%);
  -webkit-backdrop-filter: blur(9px) saturate(150%);
  backdrop-filter: blur(9px) saturate(150%);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}
.hero-line em {
  font-style: normal;
  font-size: 0.18em;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--accent);
  transform: translateY(-0.9em);
}
.hero-line i {
  flex: 0 1 0.9em;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
  margin-left: 0.3em;
  align-self: center;
  opacity: .7;
}
.hero-copy {
  margin-top: 38px;
  max-width: 520px;
  color: #c6cecb;
  font-size: 16.5px;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin-top: 42px;
}
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: background-color .35s, color .35s, border-color .35s, transform .35s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--ink); color: #0a0c0e; border-color: var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  margin-top: 54px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

/* Вращающийся штамп */
.stamp {
  position: absolute;
  right: 5vw; bottom: 10vh;
  width: clamp(120px, 13vw, 190px);
  aspect-ratio: 1;
  z-index: 2;
}
.stamp svg { width: 100%; height: 100%; overflow: visible; }
.stamp text {
  font-family: var(--font-display);
  font-size: 13.4px;
  font-weight: 400;
  letter-spacing: 0.26em;
  fill: rgba(241,244,242,0.75);
}
.stamp-ring { fill: none; stroke: var(--line); }
.stamp-play { fill: var(--accent); }
.stamp svg { animation: spin 22s linear infinite; }
.stamp:hover .stamp-play { fill: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Скролл-кью */
.scroll-cue {
  position: absolute;
  left: 4vw; bottom: 26px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--faint);
}
.scroll-cue-line {
  width: 1px; height: 34px;
  background: var(--line);
  position: relative; overflow: hidden;
}
.scroll-cue-line::after {
  content: "";
  position: absolute; left: 0; top: -100%;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: cue 2.2s var(--ease-out) infinite;
}
@keyframes cue {
  0% { top: -100%; }
  55% { top: 0; }
  100% { top: 100%; }
}

/* ---------- Бегущая строка ---------- */
.marquee {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  padding: 22px 0;
  background: var(--bg);
  position: relative;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-group {
  display: flex; align-items: center;
  gap: 44px;
  padding-right: 44px;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 19px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.marquee .ring {
  width: 9px; height: 9px;
  border: 1px solid var(--faint);
  border-radius: 50%;
  flex: none;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Секции ---------- */
.section {
  width: min(1240px, 92vw);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 150px) 0;
}
.section-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 28px;
  margin-bottom: clamp(40px, 7vh, 72px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 26px;
}
.sec-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 10px;
}
.section-title h2 {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(40px, 5.4vw, 74px);
  line-height: 1.0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.section-desc {
  color: var(--muted);
  font-size: 15px;
  max-width: 420px;
  justify-self: center;
  text-align: center;
}
.section-count {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

/* ---------- Карточки проектов ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .6s var(--ease-out), border-color .5s, box-shadow .6s;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(200, 245, 66, 0.45);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8);
}
.card-media {
  position: relative;
  aspect-ratio: 16 / 9.4;
  overflow: hidden;
  background: #000;
}
.card-poster, .card-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), opacity .6s;
}
.card-poster { opacity: 1; }
.card:hover .card-poster, .card.playing .card-poster { opacity: 0; }
.card:hover .card-video, .card.playing .card-video { transform: scale(1.05); }
.card-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,14,.18), transparent 34%, transparent 62%, rgba(10,12,14,.42));
  pointer-events: none;
}
.card-index, .card-dur {
  position: absolute;
  z-index: 3;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(241,244,242,.85);
  background: rgba(10,12,14,.55);
  backdrop-filter: blur(6px);
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
}
.card-index { top: 16px; left: 16px; }
.card-dur { top: 16px; right: 16px; }
.card-foot {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(21,26,31,0.2), rgba(21,26,31,0.75));
}
.card-logo {
  flex: none;
  height: 46px;
  max-width: 170px;
  background: #f4f6f5;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  padding: 7px 12px;
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.9);
  transition: transform .5s var(--ease-out);
}
.card:hover .card-logo { transform: scale(1.05); }
.card-logo img { max-height: 100%; max-width: 100%; object-fit: contain; }
.card-logo-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #101317;
  white-space: nowrap;
}
.card-text { min-width: 0; }
.card-text b {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 15.5px;
  letter-spacing: 0.03em;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-text span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 3px;
}
.card-wide { grid-column: 1 / -1; }
.card-wide .card-media { aspect-ratio: 21 / 8; }

/* ---------- О студии ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.about-statement {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.35;
  letter-spacing: 0.01em;
}
.about-statement mark {
  background: none;
  color: var(--accent);
  font-style: italic;
  border-bottom: 1px solid rgba(200,245,66,.4);
}
.about-text {
  color: var(--muted);
  font-size: 15.5px;
  max-width: 460px;
  margin-bottom: 34px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  overflow: hidden;
}
.stat {
  background: var(--bg-2);
  padding: 22px 20px 18px;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--ink);
}
.stat span {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- Услуги ---------- */
.svc-list { list-style: none; }
.svc {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 30px 10px;
  border-top: 1px solid var(--line);
  position: relative;
  transition: background-color .4s;
}
.svc:last-child { border-bottom: 1px solid var(--line); }
.svc::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s var(--ease-out);
}
.svc:hover { background: var(--bg-2); }
.svc:hover::before { transform: scaleY(1); }
.svc-num {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 300;
  letter-spacing: 0.3em;
  color: var(--faint);
  transition: color .4s;
}
.svc:hover .svc-num { color: var(--accent); }
.svc-body b {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: 0.02em;
  transition: transform .5s var(--ease-out);
}
.svc:hover .svc-body b { transform: translateX(10px); }
.svc-body span {
  display: block;
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
  margin-top: 4px;
}
.svc-arrow {
  font-size: 22px;
  color: var(--faint);
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity .4s, transform .5s var(--ease-out), color .4s;
}
.svc:hover .svc-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent);
}

/* ---------- Контакты ---------- */
.contact { text-align: center; }
.contact-overline {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 30px;
}
.contact-title {
  font-family: var(--font-display);
  font-weight: 200;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.05;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.contact-title span { color: var(--accent); }
.contact-list {
  display: flex; flex-wrap: wrap;
  align-items: stretch; justify-content: center;
  gap: 18px;
  margin-top: 56px;
}
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  min-width: 212px;
  padding: 28px 32px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  transition: transform .5s var(--ease-out), border-color .4s, background-color .4s;
}
.contact-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background-color: var(--accent-dim);
}
.cc-icon {
  width: 26px; height: 26px;
  color: var(--ink);
  transition: color .4s, transform .5s var(--ease-out);
}
.contact-card:hover .cc-icon {
  color: var(--accent);
  transform: scale(1.08);
}
.contact-card b {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  text-transform: uppercase;
}
.contact-card span {
  font-size: 13.5px;
  color: var(--muted);
  transition: color .4s;
}
.contact-card:hover span { color: var(--ink); }
@media (max-width: 560px) {
  .contact-list { flex-direction: column; width: 100%; }
  .contact-card { width: 100%; min-width: 0; }
}
.contact-note {
  margin-top: 44px;
  font-size: 13.5px;
  color: var(--faint);
}

/* ---------- Подвал ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 4vw 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--bg);
}
.footer-logo img { height: 34px; opacity: .9; }
.footer-row {
  display: flex; flex-wrap: wrap; gap: 12px 30px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.footer-row a {
  border-bottom: 1px solid transparent;
  transition: color .3s, border-color .3s;
}
.footer-row a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Лайтбокс ---------- */
.lb {
  position: fixed; inset: 0;
  z-index: 400;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 18px;
  background: rgba(6, 8, 9, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s, visibility .45s;
}
.lb.open { opacity: 1; visibility: visible; }
.lb-stage {
  width: min(1180px, 92vw);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 60px 120px -40px rgba(0,0,0,1);
  transform: scale(0.96);
  transition: transform .55s var(--ease-out);
}
.lb.open .lb-stage { transform: scale(1); }
.lb-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lb-meta { text-align: center; }
.lb-meta b {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 20px;
  letter-spacing: 0.08em;
}
.lb-meta span {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.lb-btn {
  position: absolute;
  width: 52px; height: 52px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--ink);
  background: rgba(10,12,14,.5);
  transition: border-color .3s, background-color .3s, transform .3s var(--ease-out);
}
.lb-btn:hover { border-color: var(--accent); transform: scale(1.06); }
.lb-close { top: 26px; right: 4vw; }
.lb-prev { left: 4vw; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4vw; top: 50%; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(-50%) scale(1.06); }
.lb-next:hover { transform: translateY(-50%) scale(1.06); }
.lb-nav-hidden { display: none !important; }

/* ---------- Появление ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 600px) {
  /* Заголовок: минимум меньше, чтобы стеклянные плашки влезали в 390px */
  .hero-title { font-size: clamp(25px, 7.3vw, 36px); }
}
@media (max-width: 1000px) {
  .section-head { grid-template-columns: 1fr; align-items: start; }
  .section-desc { justify-self: start; text-align: left; }
  .section-count { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .stamp { bottom: 14vh; right: 4vw; }
}
@media (max-width: 820px) {
  .cards { grid-template-columns: 1fr; }
  .card-wide .card-media { aspect-ratio: 16 / 9.4; }
  .brand-sub { display: none; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    background: rgba(10,12,14,.96);
    backdrop-filter: blur(16px);
    padding: 22px 6vw 28px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-16px);
    opacity: 0;
    visibility: hidden;
    transition: transform .45s var(--ease-out), opacity .35s, visibility .45s;
  }
  .nav.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav a { font-size: 16px; width: 100%; padding: 10px 0; }
  .burger { display: block; }
  .hero-inner { padding-bottom: 16vh; }
  .stamp { display: none; }
  .scroll-cue { display: none; }
  .svc { grid-template-columns: 54px 1fr; }
  .svc-arrow { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .lb-prev, .lb-next { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grain { display: none; }
  .reveal { opacity: 1; transform: none; }
}
