/* ═══════════════════════════════════════════
   SVYATKOZLOFF.RU — сайты, которые зарабатывают
   dark editorial · acid accent · mono details
   ═══════════════════════════════════════════ */

:root {
  --bg:       #08080d;
  --bg-2:     #0e0e16;
  --bg-card:  #10101a;
  --fg:       #f4f4ef;
  --fg-60:    rgba(244, 244, 239, 0.6);
  --fg-35:    rgba(244, 244, 239, 0.35);
  --acid:     #c8f542;
  --acid-dim: rgba(200, 245, 66, 0.14);
  --violet:   #8b7cf6;
  --line:     rgba(244, 244, 239, 0.1);
  --display:  'Unbounded', sans-serif;
  --text:     'Manrope', sans-serif;
  --mono:     'JetBrains Mono', monospace;
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

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

@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
  body a, body button, body input, body select, body textarea, body label { cursor: none; }
}

::selection { background: var(--acid); color: var(--bg); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; }

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

/* ═══════════ PRELOADER ═══════════ */
#preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.boot { width: min(560px, 86vw); font-family: var(--mono); font-size: 14px; }
.boot-prompt { color: var(--acid); }
.boot-caret {
  display: inline-block; width: 9px; height: 17px;
  background: var(--fg); vertical-align: -3px;
  animation: blink 0.85s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.boot-log { margin-top: 14px; color: var(--fg-60); min-height: 108px; }
.boot-log div { padding: 2px 0; }
.boot-log .ok::before { content: '✓ '; color: var(--acid); }
.boot-bar {
  margin-top: 18px; height: 2px; background: var(--line);
  border-radius: 2px; overflow: hidden;
}
#boot-fill { display: block; height: 100%; width: 0; background: var(--acid); transition: width 0.25s ease; }

/* ═══════════ FIXED LAYERS ═══════════ */

#scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--acid), var(--violet));
  z-index: 9500;
}

#fx { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

#cursor {
  position: fixed; top: 0; left: 0; z-index: 9800; pointer-events: none;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--acid);
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s, opacity 0.3s;
  display: none;
  align-items: center; justify-content: center;
}
@media (hover: hover) and (pointer: fine) { #cursor { display: flex; } }
#cursor.big {
  width: 72px; height: 72px;
  background: var(--acid);
  mix-blend-mode: normal;
}
#cursor-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--bg); opacity: 0; transition: opacity 0.2s;
  white-space: nowrap;
}
#cursor.big #cursor-label { opacity: 1; }
#cursor.down { transform: translate(-50%, -50%) scale(0.8); }

/* тач-экраны: без зума по двойному тапу — масштаб не «прыгает» во время
   игр и жестов; пинч-зум двумя пальцами при этом остаётся доступен */
html { touch-action: manipulation; }

/* ═══════════ TOAST (ачивки) ═══════════ */
#toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 150%);
  opacity: 0; visibility: hidden;
  background: var(--bg-card); border: 1px solid var(--acid);
  color: var(--fg); padding: 13px 22px; border-radius: 12px;
  font-family: var(--mono); font-size: 13px;
  z-index: 9900;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s, visibility 0.45s;
  box-shadow: 0 8px 40px rgba(200, 245, 66, 0.15);
  max-width: 86vw; text-align: center;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#toast b { color: var(--acid); }

/* ═══════════ NAV ═══════════ */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  display: flex; align-items: center; gap: 34px;
  padding: 18px clamp(20px, 4vw, 56px);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, transform 0.4s;
}
#nav.scrolled {
  background: rgba(8, 8, 13, 0.75);
  backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
#nav.hidden { transform: translateY(-100%); }
.nav-logo { display: flex; align-items: center; gap: 12px; color: var(--fg); }
.nav-logo svg { color: var(--acid); transition: transform 0.4s; }
.nav-logo:hover svg { transform: rotate(-8deg) scale(1.05); }
.nav-name { font-family: var(--mono); font-size: 15px; letter-spacing: -0.02em; }
.nav-name b { color: var(--acid); font-weight: 700; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  font-size: 14px; font-weight: 600; color: var(--fg-60);
  transition: color 0.25s; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -5px;
  width: 100%; height: 1px; background: var(--acid);
  transform: scaleX(0); transform-origin: right; transition: transform 0.35s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  font-size: 13px; font-weight: 700; font-family: var(--mono);
  color: var(--bg); background: var(--acid);
  padding: 10px 20px; border-radius: 100px;
  transition: box-shadow 0.3s;
}
.nav-cta:hover { box-shadow: 0 0 28px rgba(200, 245, 66, 0.4); }

.nav-tools { display: flex; align-items: center; gap: 12px; }
.nav-term {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid rgba(200, 245, 66, 0.45);
  color: var(--acid); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  animation: term-glow 2.6s ease-in-out infinite;
}
@keyframes term-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(200, 245, 66, 0.15); }
  50% { box-shadow: 0 0 20px rgba(200, 245, 66, 0.45); }
}
.nav-term:hover { border-color: var(--acid); transform: translateY(-1px); animation-play-state: paused; box-shadow: 0 0 24px rgba(200, 245, 66, 0.5); }
.nav-term::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg-card); border: 1px solid rgba(200, 245, 66, 0.4);
  color: var(--acid); font-family: var(--mono); font-size: 11px;
  padding: 6px 12px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.nav-term:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.term-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 16px; height: 16px; border-radius: 100px;
  background: var(--acid); color: var(--bg);
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  animation: badge-pulse 1.6s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200, 245, 66, 0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(200, 245, 66, 0); }
}

.lang-widget { position: relative; }
#lang-btn {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--fg-60); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 12px;
  transition: color 0.25s, border-color 0.25s;
}
#lang-btn:hover { color: var(--fg); border-color: rgba(200, 245, 66, 0.4); }
#lang-btn i { font-style: normal; font-size: 9px; opacity: 0.6; }
.lang-list {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; padding: 6px; min-width: 172px;
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  z-index: 50;
}
.lang-widget.open .lang-list { opacity: 1; visibility: visible; transform: none; }
.lang-list button {
  font-family: var(--mono); font-size: 12px; text-align: left;
  color: var(--fg-60); padding: 9px 12px; border-radius: 9px;
  transition: color 0.2s, background 0.2s;
}
.lang-list button:hover { color: var(--fg); background: rgba(200, 245, 66, 0.08); }
.lang-list button.active { color: var(--acid); }

#burger { display: none; flex-direction: column; gap: 6px; padding: 8px; margin-left: auto; }
#burger span { width: 24px; height: 2px; background: var(--fg); transition: transform 0.3s, opacity 0.3s; }
#burger.open span:first-child { transform: translateY(4px) rotate(45deg); }
#burger.open span:last-child { transform: translateY(-4px) rotate(-45deg); }

#mobile-menu {
  position: fixed; inset: 0; z-index: 7900;
  background: rgba(8, 8, 13, 0.96); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 0 32px;
  opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
}
#mobile-menu.open { opacity: 1; visibility: visible; }
#mobile-menu a {
  font-family: var(--display); font-size: clamp(28px, 8vw, 44px);
  font-weight: 600; padding: 10px 0; color: var(--fg);
  transform: translateY(20px); opacity: 0; transition: transform 0.4s, opacity 0.4s;
}
#mobile-menu.open a { transform: none; opacity: 1; }
#mobile-menu a:nth-child(2) { transition-delay: 0.05s; }
#mobile-menu a:nth-child(3) { transition-delay: 0.1s; }
#mobile-menu a:nth-child(4) { transition-delay: 0.15s; }
#mobile-menu a:nth-child(5) { transition-delay: 0.2s; }
#mobile-menu .mm-cta { color: var(--acid); }

/* ═══════════ ОБЩЕЕ ═══════════ */
#content { position: relative; z-index: 1; }

.sec { padding: clamp(90px, 12vw, 160px) clamp(20px, 6vw, 96px); position: relative; }
.sec-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 80px); }
.sec-tag {
  font-size: 12px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--acid); margin-bottom: 18px;
}
.sec-title {
  font-family: var(--display);
  font-size: clamp(30px, 5.4vw, 62px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.sec-title em { font-style: normal; color: var(--acid); }
.sec-sub { color: var(--fg-60); font-size: clamp(16px, 1.4vw, 19px); max-width: 620px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  padding: 16px 34px; border-radius: 100px;
  position: relative; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, color 0.3s, background 0.3s;
}
.btn-solid { background: var(--acid); color: var(--bg); }
.btn-solid:hover { box-shadow: 0 0 44px rgba(200, 245, 66, 0.45); }
.btn-ghost { border: 1px solid var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--acid); color: var(--acid); }

.pulse-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--acid); position: relative; flex: none;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid var(--acid); animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.kbd {
  background: var(--bg-card); border: 1px solid var(--line);
  border-bottom-width: 2px; padding: 2px 8px; border-radius: 6px;
  font-size: 0.85em; color: var(--acid);
}

/* reveal-анимации */
.rv { opacity: 0; transform: translateY(36px); }

/* ═══════════ 01 · HERO ═══════════ */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-top: 120px;
}
.hero-watermark {
  position: absolute; right: -1vw; bottom: -2vw;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(90px, 17vw, 260px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 244, 239, 0.07);
  letter-spacing: 0.02em; line-height: 1;
  pointer-events: none; user-select: none;
  white-space: nowrap;
}
.hero-inner { max-width: 980px; }
.hero-status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  color: var(--fg-60); text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 100px;
  padding: 9px 18px; margin-bottom: 34px;
  background: rgba(14, 14, 22, 0.6); backdrop-filter: blur(6px);
}
.hero-clock { color: var(--fg-35); font-style: normal; font-size: 12px; }
.hero-title {
  font-family: var(--display);
  font-size: clamp(38px, 7.6vw, 96px);
  font-weight: 800; line-height: 1.04; letter-spacing: -0.015em;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .accent .decode { color: var(--acid); }
.hero-sub {
  margin-top: 30px; font-size: clamp(16px, 1.5vw, 20px);
  color: var(--fg-60); max-width: 640px;
}
.hero-cta { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.hero-facts {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  margin-top: 52px; font-size: 13px; color: var(--fg-60);
}
.hero-facts b { color: var(--acid); font-weight: 700; }
.hero-facts .sep { color: var(--fg-35); }
.hero-side {
  position: absolute; right: clamp(16px, 3vw, 44px); bottom: 130px;
  display: flex; flex-direction: column; gap: 22px; align-items: center;
}
.hero-side a {
  writing-mode: vertical-rl; font-size: 12px; letter-spacing: 0.18em;
  color: var(--fg-35); transition: color 0.25s;
}
.hero-side a:hover { color: var(--acid); }
.side-line { width: 1px; height: 60px; background: var(--line); }
.scroll-hint {
  position: absolute; left: clamp(20px, 6vw, 96px); bottom: 34px;
  display: flex; align-items: center; gap: 12px;
  color: var(--fg-35); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
}
.scroll-hint i {
  width: 52px; height: 1px; background: var(--fg-35);
  position: relative; overflow: hidden; display: block;
}
.scroll-hint i::after {
  content: ''; position: absolute; inset: 0; background: var(--acid);
  animation: hintline 2s ease-in-out infinite;
}
@keyframes hintline { 0% { transform: translateX(-100%); } 60%,100% { transform: translateX(100%); } }

/* ═══════════ 02 · MARQUEE ═══════════ */
.marquee-wrap {
  padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden; position: relative; z-index: 1;
}
.marquee { overflow: hidden; white-space: nowrap; }
.marquee + .marquee { margin-top: 14px; }
.marquee-track { display: inline-flex; gap: 0; will-change: transform; }
.marquee-track a {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(15px, 1.7vw, 21px);
  color: var(--fg-35); padding: 0 26px;
  display: inline-flex; align-items: center; gap: 26px;
  transition: color 0.3s;
}
.marquee-track a::after { content: '·'; color: var(--acid); }
.marquee-track a:hover { color: var(--acid); }
.m2 .marquee-track a { color: rgba(244, 244, 239, 0.18); }
.m2 .marquee-track a:hover { color: var(--acid); }

/* ═══════════ 03 · УСЛУГИ ═══════════ */
.cards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px;
}
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: clamp(26px, 3vw, 42px);
  position: relative; overflow: hidden;
  transition: border-color 0.35s, transform 0.35s;
  --mx: 50%; --my: 50%;
}
.card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--acid-dim), transparent 65%);
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.card:hover { border-color: rgba(200, 245, 66, 0.35); }
.card:hover::before { opacity: 1; }
.card-num {
  font-size: 13px; color: var(--acid); margin-bottom: 40px; letter-spacing: 0.1em;
}
.card h3 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(19px, 1.9vw, 25px); line-height: 1.25; margin-bottom: 14px;
}
.card p { color: var(--fg-60); font-size: 15.5px; margin-bottom: 22px; }
.card ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.card li {
  font-size: 12.5px; color: var(--fg-60);
  padding-left: 18px; position: relative;
}
.card li::before { content: '→'; position: absolute; left: 0; color: var(--acid); }
.services-note { margin-top: 34px; font-size: 13px; color: var(--fg-35); }
.services-note a { color: var(--acid); border-bottom: 1px dashed rgba(200, 245, 66, 0.4); }
/* выравнивание ритма: services-note добавляет высоту — компенсируем снизу */
#services { padding-bottom: clamp(50px, 6vw, 80px); }

/* ═══════════ 04 · РАБОТЫ ═══════════ */
.works { display: flex; flex-direction: column; gap: clamp(60px, 8vw, 110px); }
.work {
  display: grid; grid-template-columns: 1.25fr 1fr;
  gap: clamp(26px, 4vw, 64px); align-items: center;
}
.work:nth-child(even) .work-media { order: 2; }
.work:nth-child(even) .work-info { order: 1; }
.work-media {
  display: block; position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-card);
  aspect-ratio: 16 / 10;
}
.work-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s;
  filter: saturate(0.92);
}
.work-media:hover img { transform: scale(1.045); filter: saturate(1.1); }
.work-live {
  position: absolute; top: 14px; left: 14px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(8, 8, 13, 0.8); backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 245, 66, 0.4);
  color: var(--acid); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 100px; z-index: 2;
}
.work-media-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px;
  padding: 8px;
}
.work-media-grid img { border-radius: 10px; height: 100%; }
.work-media-grid img:first-child { grid-row: 1 / 3; }
.work-idx { font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--acid); margin-bottom: 14px; }
.work-info h3 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(24px, 2.6vw, 36px); margin-bottom: 10px;
}
.work-role { font-size: 12.5px; color: var(--fg-35); margin-bottom: 18px; letter-spacing: 0.04em; }
.work-info > p:not(.work-role) { color: var(--fg-60); font-size: 16px; margin-bottom: 22px; }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.work-tags span {
  font-size: 11.5px; color: var(--fg-60);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 13px;
  transition: border-color 0.25s, color 0.25s;
}
.work:hover .work-tags span { border-color: rgba(200, 245, 66, 0.25); }
.work-link {
  font-size: 14px; font-weight: 700; color: var(--acid);
  display: inline-block; position: relative;
}
.work-link::after {
  content: ''; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: var(--acid); transform: scaleX(0); transform-origin: right; transition: transform 0.35s;
}
.work-link:hover::after { transform: scaleX(1); transform-origin: left; }
.work-link-muted { color: var(--fg-35); }
.work-link-muted::after { display: none; }

/* кейс с ИИ-чатом */
.work-media-ai {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(600px circle at 20% 0%, rgba(139, 124, 246, 0.16), transparent 60%),
    radial-gradient(500px circle at 90% 100%, rgba(200, 245, 66, 0.08), transparent 60%),
    var(--bg-card);
  padding: 30px;
}
.ai-chat { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg {
  padding: 14px 18px; border-radius: 16px; font-size: 13px; line-height: 1.55;
}
.ai-user {
  background: var(--bg-2); border: 1px solid var(--line);
  align-self: flex-end; border-bottom-right-radius: 4px; max-width: 85%;
}
.ai-bot {
  background: rgba(139, 124, 246, 0.12); border: 1px solid rgba(139, 124, 246, 0.35);
  align-self: flex-start; border-bottom-left-radius: 4px; max-width: 92%;
}
.ai-bot b { color: var(--violet); }
.ai-caret {
  display: inline-block; width: 7px; height: 13px; background: var(--violet);
  vertical-align: -2px; margin-left: 3px; animation: blink 0.9s steps(1) infinite;
}
.ai-badge { position: absolute; top: 14px; left: 14px; }

/* + ещё 60 проектов */
.more-works { margin-top: clamp(60px, 8vw, 100px); }
.more-works-head { font-size: 14px; color: var(--fg-60); margin-bottom: 22px; }
.more-works-head b { color: var(--acid); font-size: 18px; }
.domains { display: flex; flex-wrap: wrap; gap: 8px; }
.domains a {
  display: inline-block;
  font-size: 12px; color: var(--fg-35);
  border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px;
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.domains a:hover {
  color: var(--acid); border-color: rgba(200, 245, 66, 0.4);
  transform: translateY(-2px);
}
.portfolio-btn { margin-top: 34px; }

/* ═══════════ SEO-КЕЙСЫ ═══════════ */
.seo-cases { background: var(--bg-2); border-top: 1px solid var(--line); }
.seo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.seo-case {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 22px; padding: clamp(24px, 2.6vw, 38px);
  position: relative; overflow: hidden;
  --mx: 50%; --my: 50%;
  transition: border-color 0.35s;
}
.seo-case::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), var(--acid-dim), transparent 65%);
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.seo-case:hover { border-color: rgba(200, 245, 66, 0.35); }
.seo-case:hover::before { opacity: 1; }
.seo-case-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.seo-case-head h3 { font-family: var(--mono); font-size: clamp(17px, 1.7vw, 21px); font-weight: 700; color: var(--acid); }
.seo-case-head .work-live { position: static; }
.seo-case-role { font-size: 12px; color: var(--fg-35); margin-bottom: 22px; }
.seo-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 20px;
}
.seo-stats > div {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px;
  text-align: center;
}
.seo-stats b { display: block; color: var(--acid); font-size: clamp(15px, 1.5vw, 20px); margin-bottom: 6px; white-space: nowrap; }
.seo-stats span { font-size: 10.5px; color: var(--fg-35); line-height: 1.4; display: block; }
.seo-case > p:last-child { color: var(--fg-60); font-size: 14.5px; margin: 0; }

/* ═══════════ 05 · ЦИФРЫ ═══════════ */
.numbers {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding-top: clamp(60px, 7vw, 90px); padding-bottom: clamp(60px, 7vw, 90px);
}
.num-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px;
  max-width: 1200px; margin: 0 auto;
}
.num { text-align: center; }
.num b {
  display: block; font-size: clamp(44px, 5.5vw, 84px); font-weight: 700;
  color: var(--acid); line-height: 1; margin-bottom: 14px;
}
.num span { font-size: 13.5px; color: var(--fg-60); line-height: 1.5; display: block; }

/* ═══════════ 06 · ПРОЦЕСС ═══════════ */
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
  padding-top: 34px;
}
.steps-line {
  position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line);
}
#steps-fill { position: absolute; inset: 0; background: var(--acid); transform-origin: left; transform: scaleX(0); display: block; }
.step { position: relative; }
.step::before {
  content: ''; position: absolute; top: -38px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--acid);
}
.step-num {
  font-size: 13px; color: var(--acid); letter-spacing: 0.2em; margin-bottom: 14px;
}
.step h3 { font-family: var(--display); font-weight: 600; font-size: 20px; margin-bottom: 10px; }
.step p { color: var(--fg-60); font-size: 14.5px; }

/* ═══════════ 07 · ОБО МНЕ ═══════════ */
.about-grid {
  display: grid; grid-template-columns: 400px 1fr;
  gap: clamp(40px, 6vw, 90px); align-items: center;
  max-width: 1200px;
}
.about-card {
  background:
    radial-gradient(500px circle at 0% 0%, rgba(139, 124, 246, 0.14), transparent 55%),
    radial-gradient(400px circle at 100% 100%, rgba(200, 245, 66, 0.1), transparent 55%),
    var(--bg-card);
  border: 1px solid var(--line); border-radius: 24px;
  padding: 34px; position: relative;
  transform-style: preserve-3d; will-change: transform;
}
.dev-card-top {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: 0.2em; color: var(--fg-35); margin-bottom: 40px;
}
.dev-card-name {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(34px, 3.4vw, 46px); line-height: 1.05; margin-bottom: 10px;
}
.dev-card-role { font-size: 12px; color: var(--acid); letter-spacing: 0.08em; margin-bottom: 34px; }
.dev-card-row {
  display: flex; justify-content: space-between; gap: 14px;
  font-size: 12.5px; padding: 11px 0; border-top: 1px solid var(--line);
}
.dev-card-row span { color: var(--fg-35); }
.dev-card-row b { font-weight: 400; text-align: right; }
.dev-card-row .ok { color: var(--acid); }
.dev-card-hint {
  margin-top: 26px; font-size: 10.5px; color: var(--fg-35);
  letter-spacing: 0.12em; text-align: center;
}
.about-text .sec-title { margin-bottom: 26px; }
.about-text p { color: var(--fg-60); margin-bottom: 18px; max-width: 560px; }
.about-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.about-chips span {
  font-size: 12px; color: var(--fg-60);
  border: 1px solid var(--line); border-radius: 100px; padding: 8px 16px;
}

/* ═══════════ 08 · КОНТАКТЫ ═══════════ */
.contact { padding-bottom: clamp(70px, 9vw, 120px); }
.contact-grid {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 90px); align-items: start;
  max-width: 1200px;
}
#form { display: flex; flex-direction: column; gap: 22px; }
.ff { display: flex; flex-direction: column; gap: 9px; }
.ff label { font-size: 13px; font-weight: 600; color: var(--fg-60); }
.ff input, .ff select, .ff textarea {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 18px;
  color: var(--fg); font-family: var(--text); font-size: 15.5px;
  transition: border-color 0.3s, box-shadow 0.3s;
  appearance: none; resize: vertical;
}
.ff input:focus, .ff select:focus, .ff textarea:focus {
  outline: none; border-color: var(--acid);
  box-shadow: 0 0 0 3px rgba(200, 245, 66, 0.12);
}
.ff select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23c8f542' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center;
}
.ff select option { background: var(--bg-2); color: var(--fg); }
#f-hp { position: absolute; left: -6000px; top: -6000px; height: 0; opacity: 0; }
.form-submit { align-self: flex-start; }
.form-submit[disabled] { opacity: 0.55; pointer-events: none; }
.form-note { font-size: 11px; color: var(--fg-35); }
.form-note.err { color: #ff7a6b; }
.form-note.okk { color: var(--acid); }

.contact-links { display: flex; flex-direction: column; gap: 14px; }
.clink {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 16px; padding: 22px 24px;
  transition: border-color 0.3s, transform 0.3s;
}
.clink:hover { border-color: rgba(200, 245, 66, 0.4); }
.clink span { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-35); }
.clink b { font-size: 15.5px; font-weight: 600; word-break: break-all; }
.clink-fact b { color: var(--acid); }

/* ═══════════ FOOTER ═══════════ */
#footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(20px, 6vw, 96px) 28px;
  background: var(--bg-2);
}
.footer-top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px; margin-bottom: 22px;
}
.footer-brand { font-size: 15px; }
.footer-brand b { color: var(--acid); }
.footer-eggs { display: flex; align-items: center; gap: 20px; }
#terminal-open {
  font-family: var(--mono); font-size: 12px; color: var(--fg-60);
  border: 1px dashed var(--line); border-radius: 8px; padding: 8px 16px;
  transition: color 0.25s, border-color 0.25s;
}
#terminal-open:hover { color: var(--acid); border-color: rgba(200, 245, 66, 0.5); }
.eggs-progress { font-size: 12px; color: var(--fg-35); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 11.5px; color: var(--fg-35);
  border-top: 1px solid var(--line); padding-top: 20px;
}

/* ═══════════ ТЕРМИНАЛ · выезжающая панель ═══════════ */
#terminal {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 9700;
  width: min(440px, 92vw);
  transform: translateX(105%);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
#terminal.open { transform: none; pointer-events: auto; }
.term-win {
  height: 100%; width: 100%;
  background: rgba(8, 8, 14, 0.92); backdrop-filter: blur(14px);
  border-left: 1px solid var(--line);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column; overflow: hidden;
}
@media (max-width: 700px) {
  #terminal {
    top: auto; left: 0; right: 0; bottom: 0;
    width: 100%; min-height: 260px;
    /* 2/4 экрана; dvh — честная высота с учётом панелей браузера и клавиатуры */
    height: 50vh; height: 50dvh;
    transform: translateY(105%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), height 0.3s ease;
  }
  /* активна камера — 3/4 экрана: канвас 4:3 + подсказки */
  #terminal.has-cam { height: 75vh; height: 75dvh; }
  .term-win { border-left: none; border-top: 1px solid var(--line); box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.55); }
  /* 16px: iOS/Android зумят всю страницу при фокусе на инпуте мельче 16px,
     и масштаб потом не возвращается — источник «сайт увеличивается сам».
     селектор с классом — чтобы перебить базовый #term-input, стоящий ниже */
  .term-input-row #term-input { font-size: 16px; }
}
.term-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-size: 12px; color: var(--fg-35);
  flex-shrink: 0; /* шапку с крестиком нельзя выдавливать контентом */
}
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.term-bar i:nth-child(1) { background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin: 0 auto; }
#term-close { color: var(--fg-35); font-size: 14px; padding: 2px 6px; }
#term-close:hover { color: var(--fg); }
.term-body {
  padding: 18px; overflow-y: auto; font-size: 13px; line-height: 1.7;
  flex: 1; color: var(--fg-60);
  min-height: 0; /* без этого flex не даёт телу ужаться и выдавливает строку ввода */
  /* скролл терминала живёт отдельно от страницы: не перетекает на сайт
     (в паре с data-lenis-prevent на #terminal — lenis его не перехватывает) */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.term-body .t-cmd { color: var(--fg); }
.term-body .t-cmd::before { content: '$ '; color: var(--acid); }
.term-body .t-acid { color: var(--acid); }
.term-body .t-vio { color: var(--violet); }
.term-body a { color: var(--acid); text-decoration: underline; }
.term-body pre { font-family: inherit; line-height: 1.35; font-size: 11px; color: var(--acid); overflow-x: auto; }
.term-cam {
  margin: 10px 0; border: 1px solid rgba(200, 245, 66, 0.35);
  border-radius: 10px; overflow: hidden; background: #060609;
  box-shadow: 0 0 24px rgba(200, 245, 66, 0.12) inset;
}
.term-cam canvas { display: block; width: 100%; height: auto; }

.term-input-row {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--line); padding: 13px 18px;
  flex-shrink: 0; /* поле ввода всегда на месте, что бы ни росло в теле */
}
.term-prompt { color: var(--acid); }
#term-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--fg); font-family: var(--mono); font-size: 13px;
}

/* ═══════════ CRT-режим (konami) ═══════════
   фильтр на #content и #nav, НЕ на body: filter на предке
   ломает position:fixed у курсора, терминала и тостов */
body.crt #content, body.crt #nav { filter: contrast(1.1) saturate(1.25) hue-rotate(40deg); }
body.crt::after {
  content: ''; position: fixed; inset: 0; z-index: 9600; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 58%, rgba(0, 0, 0, 0.35) 100%);
  animation: crt-flicker 0.12s steps(2) infinite;
}
@keyframes crt-flicker { 50% { opacity: 0.85; } }

/* matrix rain canvas */
#matrix-fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 9400; pointer-events: none; display: none;
}
body.matrix #matrix-fx { display: block; }

/* footer nav */
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { font-size: 12px; color: var(--fg-60); transition: color 0.25s; }
.footer-nav a:hover { color: var(--acid); }

/* терминал в мобильном меню */
.mm-term {
  align-self: flex-start;
  font-size: 13px; color: var(--acid);
  border: 1px dashed rgba(200, 245, 66, 0.5); border-radius: 10px;
  padding: 10px 18px; margin-top: 18px;
  transform: none !important; opacity: 1 !important;
}
.mm-term::before { content: '>_ '; }

/* мобильные языки в меню */
.mm-langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.mm-langs button {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--fg-60); border: 1px solid var(--line);
  border-radius: 100px; padding: 8px 14px;
}
.mm-langs button.active { color: var(--acid); border-color: rgba(200, 245, 66, 0.5); }

/* ═══════════ АДАПТИВ ═══════════ */
@media (max-width: 1250px) {
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-card { max-width: 440px; }
  .num-grid { grid-template-columns: repeat(2, 1fr); gap: 44px 20px; }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 44px 24px; }
  .steps-line { display: none; }
  .step::before { display: none; }
  .seo-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav-links, .nav-tools { display: none; }
  #burger { display: flex; }
  .cards-3 { grid-template-columns: 1fr; }
  .work, .work:nth-child(even) { grid-template-columns: 1fr; }
  .work:nth-child(even) .work-media { order: 0; }
  .work:nth-child(even) .work-info { order: 1; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-side { display: none; }
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 100px; }
  .hero-facts { gap: 10px; font-size: 12px; }
  .hero-facts .sep { display: none; }
  .hero-facts span { display: block; width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .num-grid { grid-template-columns: 1fr 1fr; }
  .scroll-hint { display: none; }
  .work-media-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .work-media-grid img:not(:first-child) { display: none; }
  .work-media-grid img:first-child { grid-row: auto; }
}

/* ═══════════ СТРАНИЦА ПОРТФОЛИО ═══════════ */
.pf-hero { padding-top: clamp(140px, 16vw, 200px); padding-bottom: 20px; }
.pf-hero .sec-title { max-width: 900px; }
.pf-cat { padding-top: clamp(50px, 6vw, 80px); }
.pf-cat-head {
  display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap;
  margin-bottom: 30px;
}
.pf-cat-head h2 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 2.6vw, 34px);
}
.pf-cat-head .mono { font-size: 12px; color: var(--acid); letter-spacing: 0.2em; text-transform: uppercase; }
.pf-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.pf-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 18px; overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  scroll-margin-top: 100px;
}
.pf-card:hover { border-color: rgba(200, 245, 66, 0.35); transform: translateY(-4px); }
.pf-shot {
  display: block; aspect-ratio: 16 / 10; overflow: hidden; position: relative;
  border-bottom: 1px solid var(--line);
}
.pf-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: top;
  filter: saturate(0.92);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s;
}
.pf-card:hover .pf-shot img { transform: scale(1.05); filter: saturate(1.08); }
.pf-shot .work-live { position: absolute; top: 12px; left: 12px; }
.pf-body { padding: 20px 22px 24px; }
.pf-body h3 { font-family: var(--display); font-weight: 600; font-size: 17px; margin-bottom: 4px; }
.pf-domain { font-size: 12px; color: var(--acid); display: inline-block; margin-bottom: 12px; }
.pf-domain:hover { text-decoration: underline; }
.pf-body p { font-size: 13.5px; color: var(--fg-60); margin-bottom: 14px; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-tags span {
  font-size: 10.5px; color: var(--fg-35);
  border: 1px solid var(--line); border-radius: 100px; padding: 4px 10px;
}
.pf-feats { list-style: none; margin: 0 0 14px; display: flex; flex-direction: column; gap: 5px; }
.pf-feats li { font-size: 12px; color: var(--fg-60); padding-left: 16px; position: relative; }
.pf-feats li::before { content: '→'; position: absolute; left: 0; color: var(--acid); }
.pf-archive {
  margin-top: 26px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pf-archive span {
  font-size: 12px; color: var(--fg-35); font-family: var(--mono);
  border: 1px dashed var(--line); border-radius: 100px; padding: 6px 14px;
}
.pf-note { font-size: 13px; color: var(--fg-35); margin-top: 18px; }
.pf-back { padding: clamp(50px, 7vw, 90px) clamp(20px, 6vw, 96px); text-align: center; }

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

/* ═══════════ БЛОГ ═══════════ */
.blog-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 1000px; }
.blog-card {
  display: block;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px;
  transition: border-color 0.3s, transform 0.3s;
}
.blog-card:hover { border-color: rgba(200, 245, 66, 0.35); transform: translateY(-4px); }
.blog-card .mono { font-size: 11px; color: var(--acid); letter-spacing: 0.15em; text-transform: uppercase; }
.blog-card h2 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 12px 0 10px; line-height: 1.3; }
.blog-card p { font-size: 14px; color: var(--fg-60); }
@media (max-width: 800px) { .blog-list { grid-template-columns: 1fr; } }

.article {
  max-width: 760px; margin: 0 auto;
  padding: clamp(140px, 16vw, 190px) 22px 80px;
}
.article h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(26px, 4vw, 44px); line-height: 1.15; margin-bottom: 18px;
}
.article .art-meta { font-family: var(--mono); font-size: 12px; color: var(--acid); margin-bottom: 34px; }
.article h2 { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.4vw, 27px); margin: 40px 0 14px; }
.article p, .article li { color: var(--fg-60); font-size: 16.5px; line-height: 1.75; margin-bottom: 16px; }
.article ul, .article ol { padding-left: 24px; margin-bottom: 18px; }
.article li { margin-bottom: 8px; }
.article strong { color: var(--fg); }
.article a { color: var(--acid); border-bottom: 1px dashed rgba(200, 245, 66, 0.4); }
/* кнопки внутри статей: не наследуют стиль текстовых ссылок */
.article a.btn { border-bottom: none; white-space: nowrap; }
.article a.btn-solid, .article a.btn-solid span { color: var(--bg); }
.article .art-cta {
  margin-top: 44px; padding: 30px;
  background: var(--bg-card); border: 1px solid rgba(200, 245, 66, 0.3); border-radius: 18px;
}
.article .art-cta p { margin-bottom: 18px; }
.art-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.art-tags span { font-family: var(--mono); font-size: 11px; color: var(--fg-35); border: 1px solid var(--line); border-radius: 100px; padding: 5px 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .rv { opacity: 1; transform: none; }
}
