/* ==========================================================================
   Чёрная Наковальня — тату-студия
   Тёмная брутальная тема: чёрный металл, кровавый красный, кость.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --bg-3: #181818;
  --line: #222222;
  --line-2: #363636;
  --text: #ece9e4;
  --muted: #8c8c8c;
  --red: #c1121f;
  --red-2: #ff3142;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 80px;
  --container: 1240px;
  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* ---------- База ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body.is-loading,
body.is-locked {
  overflow: hidden;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--red);
  color: #fff;
}

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

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

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

.red {
  color: var(--red-2);
}

/* Зернистость поверх всей страницы */
.grain {
  position: fixed;
  inset: -10%;
  z-index: 900;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
  will-change: transform;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, 3%); }
  80%  { transform: translate(3%, -2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Курсор (только для мыши) ---------- */

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--red-2);
}

.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 49, 66, 0.7);
  transition: transform 0.4s var(--ease-out), background-color 0.4s, border-color 0.4s;
}

.cursor-ring.is-hover {
  transform: translate(-50%, -50%) scale(1.7);
  background: rgba(193, 18, 31, 0.18);
  border-color: var(--red-2);
}

body.has-cursor .cursor-dot,
body.has-cursor .cursor-ring {
  display: block;
}

body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor label,
body.has-cursor select {
  cursor: none;
}

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

.loader {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: transform 1s var(--ease-out);
}

.loader.is-done {
  transform: translateY(-100%);
}

.loader-inner {
  width: min(440px, 84%);
}

.loader-label {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}

.loader-count {
  display: flex;
  align-items: flex-start;
  font-family: var(--font-display);
  font-size: clamp(90px, 18vw, 160px);
  line-height: 0.9;
}

.loader-count span:last-child {
  margin: 0.2em 0 0 0.08em;
  font-size: 0.35em;
  color: var(--red-2);
}

.loader-bar {
  height: 3px;
  margin-top: 22px;
  background: var(--line);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red), var(--red-2));
}

/* ---------- Шапка ---------- */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  height: var(--header-h);
  transition: transform 0.6s var(--ease-out), background-color 0.4s, box-shadow 0.4s;
}

.header.is-scrolled {
  background: rgba(10, 10, 10, 0.98);
  box-shadow: 0 1px 0 var(--line);
}

.header.is-hidden {
  transform: translateY(-100%);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  transition: transform 0.5s var(--ease-out);
}

.logo-mark svg {
  width: 26px;
  height: 26px;
  fill: #0a0a0a;
}

.logo:hover .logo-mark {
  transform: rotate(-10deg) scale(1.08);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.logo-text small {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
}

/* Десктопная навигация */
.nav-list {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-mobile-cta {
  display: none;
}

/* Бургер */
.burger {
  display: none;
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-2);
  z-index: 2;
}

.burger span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--text);
  transition: transform 0.5s var(--ease-out), opacity 0.3s, top 0.5s var(--ease-out);
}

.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 30px; }

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

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

.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 58px;
  padding: 0 30px;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateX(-101%);
  transition: transform 0.6s var(--ease-out);
}

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

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-red {
  background: var(--red);
  color: #fff;
}

.btn-red::before {
  background: var(--text);
}

.btn-red:hover {
  color: #0a0a0a;
}

.btn-red:hover::before {
  transform: translateX(0);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 2px var(--line-2);
}

.btn-ghost::before {
  background: var(--red);
}

.btn-ghost:hover {
  color: #fff;
  box-shadow: inset 0 0 0 2px var(--red);
}

.btn-ghost:hover::before {
  transform: translateX(0);
}

.btn-sm {
  height: 46px;
  padding: 0 20px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  cursor: wait;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 130px;
}

.hero-media {
  position: absolute;
  inset: -8% 0;
  z-index: -1;
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform-origin: center;
  animation: kenburns 18s var(--ease) both;
}

@keyframes kenburns {
  from { transform: scale(1.18); }
  to   { transform: scale(1); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.72) 45%, rgba(10, 10, 10, 0.2) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 42%);
}

.hero-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px);
}

.hero-scan::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -140px;
  height: 140px;
  background: linear-gradient(transparent, rgba(255, 49, 66, 0.13), transparent);
  animation: scan 6s linear infinite;
}

@keyframes scan {
  to { top: 100%; }
}

.hero-content {
  position: relative;
}

.hero-tag {
  min-height: 1.6em;
  margin: 0 0 24px;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--red-2);
}

.caret {
  display: inline-block;
  width: 9px;
  height: 1.1em;
  margin-left: 4px;
  vertical-align: -3px;
  background: var(--red-2);
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-title {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 14vw, 200px);
  line-height: 0.9;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.line-inner {
  display: block;
  transform: translateY(105%);
  transition: transform 1.2s var(--ease-out);
}

.line + .line .line-inner {
  transition-delay: 0.12s;
}

body.is-loaded .line-inner {
  transform: none;
}

.outline {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 2px var(--text);
}

/* Редкий глитч-сдвиг обводки */
.outline::before {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  color: var(--red-2);
  -webkit-text-stroke: 0;
  clip-path: inset(0 0 100% 0);
  pointer-events: none;
  animation: glitch 4.5s steps(1, end) infinite;
}

@keyframes glitch {
  0%, 91%, 100% { clip-path: inset(0 0 100% 0); transform: translate(0); }
  92%           { clip-path: inset(18% 0 58% 0); transform: translate(-7px, 0); }
  93%           { clip-path: inset(62% 0 12% 0); transform: translate(7px, 0); }
  94%           { clip-path: inset(38% 0 30% 0); transform: translate(-3px, 0); }
  95%           { clip-path: inset(0 0 100% 0); transform: translate(0); }
}

.hero-lead {
  max-width: 560px;
  margin: 0 0 40px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: #bdbab5;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-2);
  animation: ping 2s infinite;
}

@keyframes ping {
  0%   { box-shadow: 0 0 0 0 rgba(255, 49, 66, 0.6); }
  70%,
  100% { box-shadow: 0 0 0 10px rgba(255, 49, 66, 0); }
}

.scroll-down {
  position: absolute;
  right: 40px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scroll-down span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.scroll-down i {
  position: relative;
  width: 1px;
  height: 70px;
  overflow: hidden;
  background: var(--line-2);
}

.scroll-down i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 40%;
  background: var(--red-2);
  animation: drip 2s var(--ease) infinite;
}

@keyframes drip {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(260%); }
}

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

.marquee {
  position: relative;
  z-index: 3;
  margin: -34px -5% 0;
  padding: 16px 0;
  background: var(--red);
  color: #0a0a0a;
  transform: rotate(-2deg);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-right: 26px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee-group i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.45em;
}

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

/* ---------- Общие секции ---------- */

.section {
  position: relative;
  padding: clamp(90px, 12vw, 160px) 0;
}

/* Крупная контурная цифра-подложка */
.section[data-num]::before {
  content: attr(data-num);
  position: absolute;
  top: 30px;
  right: 3%;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(140px, 24vw, 340px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px rgba(236, 233, 228, 0.05);
  pointer-events: none;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section-slant {
  margin: -56px 0;
  padding-top: calc(clamp(90px, 12vw, 160px) + 56px);
  padding-bottom: calc(clamp(90px, 12vw, 160px) + 56px);
  background: var(--bg-2);
  clip-path: polygon(0 56px, 100% 0, 100% calc(100% - 56px), 0 100%);
}

.section-index {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-2);
}

.section-index::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--red-2);
}

.section-title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 0.95;
  text-transform: uppercase;
}

.section-lead {
  max-width: 560px;
  margin: 0;
  font-size: 17px;
  color: var(--muted);
}

.section-head {
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.section-head--split .section-title {
  margin-bottom: 0;
}

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

.reveal {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity 1s var(--ease-out) var(--d, 0s),
    transform 1.1s var(--ease-out) var(--d, 0s);
}

.reveal--left {
  transform: translate3d(-70px, 0, 0);
}

.reveal--right {
  transform: translate3d(70px, 0, 0);
}

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

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

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

.service-wrap {
  background: var(--bg);
}

.service {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 100%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  padding: 40px 34px 34px;
  background: var(--bg);
  transition: transform 0.35s var(--ease), background-color 0.4s;
  transform-style: preserve-3d;
}

/* Красная заливка снизу при наведении */
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--red);
  transform: translateY(101%);
  transition: transform 0.6s var(--ease-out);
}

/* Световое пятно за курсором */
.service::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 49, 66, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.service:hover::before {
  transform: translateY(0);
}

.service:hover::after {
  opacity: 1;
}

.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 36px;
}

.service-num {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.4s;
}

.service-icon {
  width: 56px;
  height: 56px;
  color: var(--red-2);
  transition: transform 0.6s var(--ease-out), color 0.4s;
}

.service:hover .service-num {
  color: rgba(255, 255, 255, 0.75);
}

.service:hover .service-icon {
  color: #fff;
  transform: rotate(-12deg) scale(1.12);
}

.service h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 36px;
  line-height: 1;
  text-transform: uppercase;
}

.service p {
  margin: 0 0 28px;
  font-size: 15px;
  color: var(--muted);
  transition: color 0.4s;
}

.service:hover p {
  color: rgba(255, 255, 255, 0.92);
}

.service-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line-2);
  font-size: 12px;
  color: var(--muted);
  transition: border-color 0.4s, color 0.4s;
}

.service-meta b {
  font-weight: 500;
  color: var(--text);
}

.service:hover .service-meta {
  border-color: rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
}

.service:hover .service-meta b {
  color: #fff;
}

/* ---------- Галерея ---------- */

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

.gallery-item {
  margin: 0;
  opacity: 0;
}

.gallery-grid.is-in .gallery-item {
  animation: rise 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.97);
    clip-path: inset(0 0 12% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}

.gallery-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-3);
  text-align: left;
}

.gallery-btn img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.6) contrast(1.1);
  transition: transform 1.2s var(--ease-out), filter 0.6s;
}

.gallery-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 0 var(--red-2);
  transition: box-shadow 0.4s;
  pointer-events: none;
}

.gallery-btn:hover img {
  transform: scale(1.08);
  filter: grayscale(0) contrast(1.05);
}

.gallery-btn:hover::after {
  box-shadow: inset 0 0 0 2px var(--red-2);
}

.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 60px 24px 22px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
  transform: translateY(6px);
  transition: transform 0.6s var(--ease-out);
}

.gallery-btn:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-caption b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.gallery-caption small {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #a9a9a9;
}

.gallery-plus {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  transform: rotate(-90deg) scale(0);
  transition: transform 0.5s var(--ease-out);
}

.gallery-btn:hover .gallery-plus {
  transform: rotate(0) scale(1);
}

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

.filter {
  padding: 12px 18px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.filter:hover {
  color: var(--text);
  border-color: var(--text);
}

.filter.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 90px;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.5s, visibility 0.5s;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.96);
}

.lightbox-figure {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 100%;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.6s var(--ease-out);
}

.lightbox.is-open .lightbox-figure {
  transform: none;
}

.lightbox-figure img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  box-shadow: 12px 12px 0 var(--red);
  transition: opacity 0.2s;
}

.lightbox-figure figcaption {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.lb-btn {
  position: absolute;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  transition: background-color 0.3s, border-color 0.3s, transform 0.3s;
}

.lb-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

.lb-close {
  top: 20px;
  right: 20px;
}

.lb-prev,
.lb-next {
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

.lb-prev:hover { transform: translateY(-50%) translateX(-4px); }
.lb-next:hover { transform: translateY(-50%) translateX(4px); }

.lb-counter {
  position: absolute;
  top: 26px;
  left: 20px;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- Преимущества ---------- */

.adv-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  gap: clamp(48px, 6vw, 96px);
  margin-bottom: clamp(70px, 9vw, 120px);
}

.adv-media {
  position: relative;
  padding: 0 24px 24px 0;
}

.adv-media::before {
  content: "";
  position: absolute;
  inset: 24px -24px -24px 24px;
  z-index: 0;
  border: 2px solid var(--red);
}

.adv-frame {
  position: relative;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.adv-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.4) contrast(1.08);
  transition: transform 1.4s var(--ease-out), filter 0.8s;
}

.adv-media:hover .adv-frame img {
  transform: scale(1.05);
  filter: grayscale(0) contrast(1.05);
}

.adv-badge {
  position: absolute;
  left: -20px;
  bottom: 56px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 22px;
  background: var(--red);
  color: #fff;
  box-shadow: 8px 8px 0 #0a0a0a;
}

.adv-badge b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.adv-badge span {
  font-size: 11px;
  letter-spacing: 0.06em;
}

.adv-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 32px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.adv-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.adv-icon {
  flex: 0 0 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-2);
  color: var(--red-2);
  transition: background-color 0.4s, border-color 0.4s, color 0.4s, transform 0.5s var(--ease-out);
}

.adv-icon svg {
  width: 26px;
  height: 26px;
}

.adv-item:hover .adv-icon {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: rotate(-8deg);
}

.adv-item h3 {
  margin: 2px 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

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

/* Статистика */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.stat {
  position: relative;
  padding: 44px 24px 40px;
  border-right: 1px solid var(--line);
}

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

.stat::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-out) var(--d, 0s);
}

.stat.is-in::before {
  transform: scaleX(1);
}

.stat-num {
  display: flex;
  align-items: flex-start;
  font-family: var(--font-display);
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
}

.stat-num em {
  font-style: normal;
  color: var(--red-2);
}

.stat-label {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: start;
  gap: clamp(48px, 6vw, 96px);
}

.info-list {
  margin: 40px 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.info-list li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}

.info-label {
  padding-top: 4px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-list a {
  transition: color 0.3s;
}

.info-list a:hover {
  color: var(--red-2);
}

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

.social {
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}

.social:hover {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  transform: translateY(-3px);
}

/* Карта-схема */
.map {
  position: relative;
  height: 270px;
  margin-top: 40px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.8;
}

.map-road {
  position: absolute;
  left: -10%;
  right: -10%;
  background: #1f1f1f;
  border-top: 1px solid #343434;
  border-bottom: 1px solid #343434;
}

.map-road.r1 { top: 30%; height: 26px; transform: rotate(-9deg); }
.map-road.r2 { top: 72%; height: 18px; transform: rotate(6deg); }
.map-road.r3 { left: 58%; right: auto; top: -10%; bottom: -10%; width: 20px; height: auto; transform: rotate(-14deg); }

.map-street {
  position: absolute;
  left: 18px;
  bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.map-pin {
  position: absolute;
  left: 58%;
  top: 40%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transform: translate(-50%, -50%);
}

.map-pin-dot {
  position: relative;
  width: 18px;
  height: 18px;
  background: var(--red-2);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(255, 49, 66, 0.25);
}

.map-pin-dot::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border-radius: 50%;
  border: 1px solid var(--red-2);
  animation: pulse 2.2s var(--ease-out) infinite;
  transform: rotate(-45deg);
}

@keyframes pulse {
  0%   { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.map-pin b {
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--red-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Форма */
.contact-form {
  position: relative;
  padding: clamp(28px, 4vw, 48px);
  background: var(--bg-2);
  border: 2px solid var(--line-2);
  box-shadow: 14px 14px 0 var(--red);
}

.contact-form.shake {
  animation: shake 0.45s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-8px); }
  40%      { transform: translateX(8px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}

.form-head {
  margin: 0 0 28px;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red-2);
}

.field {
  margin-bottom: 18px;
  flex: 1;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 2px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--line-2);
  border-radius: 0;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.3s;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--red-2) 50%), linear-gradient(135deg, var(--red-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 8px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.field select option {
  background: var(--bg-2);
}

.field input[type="date"] {
  color-scheme: dark;
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #505050;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-bottom-color: var(--red-2);
}

.field input.is-invalid,
.field textarea.is-invalid {
  border-bottom-color: var(--red-2);
  background: rgba(255, 49, 66, 0.05);
}

.error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--red-2);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
}

.checkbox {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

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

.checkbox-box {
  position: relative;
  flex: 0 0 22px;
  height: 22px;
  margin-top: 1px;
  border: 2px solid var(--line-2);
  transition: background-color 0.3s, border-color 0.3s;
}

.checkbox input:checked + .checkbox-box {
  background: var(--red);
  border-color: var(--red);
}

.checkbox input:checked + .checkbox-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox input:focus-visible + .checkbox-box {
  outline: 2px solid var(--red-2);
  outline-offset: 2px;
}

.contact-form .btn {
  margin-top: 24px;
}

.btn-loader {
  display: none;
  width: 22px;
  height: 22px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn.is-loading .btn-text {
  display: none;
}

.btn.is-loading .btn-loader {
  display: block;
}

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

/* Успешная отправка */
.form-success {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  text-align: center;
  background: var(--bg-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}

.form-success.is-show {
  opacity: 1;
  visibility: visible;
}

.form-success h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 44px;
  line-height: 1;
  text-transform: uppercase;
}

.form-success p {
  margin: 0 0 10px;
  color: var(--muted);
}

.check {
  width: 92px;
  height: 92px;
}

.check-circle {
  fill: none;
  stroke: var(--red-2);
  stroke-width: 2;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.check-mark {
  fill: none;
  stroke: #fff;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
}

.form-success.is-show .check-circle {
  animation: draw 0.9s var(--ease-out) forwards;
}

.form-success.is-show .check-mark {
  animation: draw 0.5s var(--ease-out) 0.7s forwards;
}

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

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

.footer {
  position: relative;
  overflow: hidden;
  padding-top: 90px;
  background: #070707;
  border-top: 2px solid var(--red);
}

.footer-giant {
  margin-bottom: 30px;
  font-family: var(--font-display);
  font-size: clamp(56px, 12.5vw, 200px);
  line-height: 0.85;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
  background-image: linear-gradient(100deg, transparent 40%, var(--red-2) 50%, transparent 60%);
  background-size: 250% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 7s linear infinite;
}

@keyframes shine {
  from { background-position: 150% 0; }
  to   { background-position: -50% 0; }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-top: 48px;
  padding-bottom: 60px;
  border-top: 1px solid var(--line);
}

.footer-brand p {
  max-width: 320px;
  margin: 22px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.footer h4 {
  margin: 0 0 18px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red-2);
}

.footer-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  color: #b5b2ad;
}

.footer-links a {
  display: inline-block;
  transition: color 0.3s, transform 0.4s var(--ease-out);
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(6px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom a:hover {
  color: var(--red-2);
}

.demo-note {
  margin: 0;
  padding-bottom: 24px;
  text-align: center;
  font-size: 11px;
  color: #4d4d4d;
}

/* Кнопка «наверх» */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 400;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-size: 22px;
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.5s, visibility 0.5s, transform 0.5s var(--ease-out), background-color 0.3s, color 0.3s;
}

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

.to-top:hover {
  background: var(--text);
  color: var(--bg);
}

/* ---------- Мобильное меню (полноэкранный оверлей) ---------- */

.nav {
  position: fixed;
  inset: 0;
  z-index: 480;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-h);
  background: rgba(10, 10, 10, 0.97);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

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

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

@media (max-width: 1100px) {
  .nav-list {
    gap: 24px;
  }

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

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

  .stat:nth-child(2) {
    border-right: 0;
  }

  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 960px) {
  :root {
    --header-h: 72px;
  }

  .burger {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 26px;
    text-align: center;
  }

  .nav-list li {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
    transition-delay: calc(var(--i) * 70ms + 150ms);
  }

  .nav.is-open .nav-list li {
    opacity: 1;
    transform: none;
  }

  .nav-link {
    padding: 4px 0;
    font-family: var(--font-display);
    font-size: 46px;
    letter-spacing: 0.02em;
    color: var(--text);
  }

  .nav-link::after {
    bottom: 6px;
  }

  .nav-mobile-cta {
    display: block;
    margin-top: 18px;
  }

  .nav-mobile-cta .btn {
    height: 56px;
  }

  .adv-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .adv-media {
    max-width: 560px;
  }

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

  .scroll-down {
    display: none;
  }

  .lightbox {
    padding: 70px 80px 40px;
  }
}

@media (max-width: 640px) {
  .header-actions .btn {
    display: none;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service {
    min-height: 0;
    padding: 32px 26px 28px;
  }

  .gallery-grid {
    gap: 10px;
  }

  .gallery-caption {
    padding: 40px 14px 14px;
  }

  .gallery-caption b {
    font-size: 20px;
  }

  .gallery-caption small {
    font-size: 10px;
  }

  .gallery-plus {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .filters {
    gap: 6px;
  }

  .filter {
    padding: 10px 12px;
    font-size: 12px;
  }

  .adv-list {
    grid-template-columns: 1fr;
  }

  .adv-badge {
    left: 12px;
    bottom: 24px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .info-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .stat {
    padding: 28px 16px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero {
    padding-bottom: 110px;
  }

  .marquee {
    margin-top: -22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .lightbox {
    padding: 70px 14px 80px;
  }

  .lb-close {
    top: 14px;
    right: 14px;
  }

  .lb-counter {
    top: 22px;
    left: 14px;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 14px;
    transform: none;
    width: 48px;
    height: 48px;
  }

  .lb-prev { left: 14px; }
  .lb-next { right: 14px; }

  .lb-prev:hover,
  .lb-next:hover {
    transform: none;
  }

  .map {
    height: 230px;
  }

  .contact-form {
    box-shadow: 8px 8px 0 var(--red);
  }

  .section-slant {
    margin: -30px 0;
    clip-path: polygon(0 30px, 100% 0, 100% calc(100% - 30px), 0 100%);
    padding-top: calc(clamp(90px, 12vw, 160px) + 30px);
    padding-bottom: calc(clamp(90px, 12vw, 160px) + 30px);
  }
}

@media (max-width: 420px) {
  .logo-text {
    font-size: 18px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

  .adv-list {
    gap: 26px;
  }
}

/* ---------- Пользователи с отключёнными анимациями ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .gallery-item {
    opacity: 1;
  }

  .grain {
    display: none;
  }
}
