/* ================================================
   RONIN Digital Studio — styles.css
   Дизайн-система: тёмная, воздушная, премиальная
   ================================================ */

/* ── Переменные ── */
:root {
  --bg:      #0A0A0A;
  --text:    #F0EDE6;
  --accent:  #FF4D00;
  --muted:   #8A8782;
  --div:     rgba(240, 237, 230, 0.10);
  --surf:    #111111;

  --fh: 'Unbounded', sans-serif;
  --fb: 'Manrope', sans-serif;
  --fm: 'Courier New', monospace;

  --mw:  1200px;
  --px:  clamp(20px, 5vw, 60px);
  --sec: clamp(120px, 13vw, 180px);
  --gap: clamp(56px, 7vw, 96px);

  --ease:    cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-o:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur:     0.38s;
}

/* ── Сброс ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fb);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1,h2,h3,h4 { font-family: var(--fh); line-height: 0.95; letter-spacing: -0.03em; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: var(--fb); }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

/* ── Noise overlay ── */
.noise-overlay {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 9998; opacity: 0.04;
}

/* ── Контейнер ── */
.container { max-width: var(--mw); margin: 0 auto; padding: 0 var(--px); }

/* ── Акцент ── */
.dot-accent  { color: var(--accent); }
.accent-line { color: var(--accent); }

/* ================================================
   КНОПКИ
   ================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px;
  font-family: var(--fb); font-size: clamp(0.82rem, 1.1vw, 0.9rem);
  font-weight: 600; letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  white-space: nowrap; cursor: pointer; user-select: none;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: transparent; color: var(--accent); }
.btn-ghost   { background: transparent; color: var(--muted); border-color: var(--div); }
.btn-ghost:hover  { color: var(--text); border-color: rgba(240,237,230,.35); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--div); }
.btn-outline:hover { border-color: rgba(240,237,230,.4); }
.btn-full { width: 100%; justify-content: center; }

/* ================================================
   НАВИГАЦИЯ
   ================================================ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 24px 0;
  border-bottom: 1px solid transparent;
  transition: padding var(--dur) var(--ease),
              background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.header.scrolled {
  padding: 15px 0;
  background: rgba(10,10,10,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: var(--div);
}

.nav {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px;
}

.nav-left {
  display: flex; align-items: center; gap: 18px;
  min-width: 0; /* позволяет lang-switch сжаться при нехватке места, а не выталкивать бургер за экран */
}

.nav-logo {
  font-family: var(--fh); font-weight: 900;
  font-size: clamp(.9rem, 1.4vw, 1.1rem);
  letter-spacing: .12em;
  transition: color var(--dur);
  flex-shrink: 0;
}
.nav-logo:hover { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: clamp(20px, 2.5vw, 40px); }
.nav-links a {
  font-size: .8rem; font-weight: 500; color: var(--muted);
  letter-spacing: .06em; transition: color var(--dur);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--div);
  padding: 8px 18px;
  transition: border-color var(--dur) !important;
}
.nav-cta:hover { border-color: rgba(240,237,230,.4) !important; }

/* Переключатель языка */
.lang-switch, .mob-lang {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.lang-btn {
  font-family: var(--fm); font-size: .78rem;
  font-weight: 800; letter-spacing: .12em;
  color: var(--muted);
  transition: color var(--dur);
  padding: 2px 0;
}
.lang-btn.active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.lang-btn:not(.active) { color: rgba(240,237,230,.45); }
.lang-btn:hover:not(.active) { color: var(--text); }
.lang-sep { font-family: var(--fm); font-size: .7rem; color: rgba(240,237,230,.25); }

/* Бургер */
.nav-burger {
  display: none; flex-direction: column; gap: 5px; padding: 6px;
}
.nav-burger span {
  display: block; width: 22px; height: 1px; background: var(--text);
  transition: transform .4s var(--ease), opacity .3s;
}
.nav-burger.open span:first-child { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:last-child  { transform: translateY(-6px) rotate(-45deg); }

/* Мобильное меню */
.mobile-menu {
  position: fixed; inset: 0; background: var(--bg); z-index: 90;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 48px;
  opacity: 0; visibility: hidden;
  transition: opacity .45s var(--ease), visibility .45s;
  overflow-y: auto;
  padding: 90px 0 32px;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mob-close {
  position: absolute; top: 26px; right: var(--px);
  font-size: 1.1rem; color: var(--muted); transition: color var(--dur);
}
.mob-close:hover { color: var(--text); }
.mobile-menu ul  { display: flex; flex-direction: column; gap: 28px; text-align: center; }
.mobile-menu a {
  font-family: var(--fh); font-size: clamp(1.5rem, 6vw, 2.6rem);
  font-weight: 800; letter-spacing: -.03em;
  color: var(--muted); transition: color var(--dur);
}
.mobile-menu a:hover { color: var(--text); }
.mob-lang { justify-content: center; }

/* Контакты в мобильном меню — компактно, под пунктами */
.mob-contacts { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: -10px; }
.mobile-menu .mob-contacts a {
  font-family: var(--fm); font-size: .85rem; font-weight: 400;
  letter-spacing: .05em; color: var(--muted);
}
.mobile-menu .mob-contacts a:hover { color: var(--accent); }

/* ================================================
   ГЕОМЕТРИЧЕСКИЙ ФОН СЕКЦИЙ
   ================================================ */
.geo-shapes {
  position: absolute; inset: 0;
  pointer-events: none; overflow: hidden;
  z-index: 0;
}
.geo-s {
  position: absolute;
  border-radius: 50%;
  border: none;
  animation: geoFloat 11s ease-in-out infinite;
}
.geo-indigo { background: radial-gradient(ellipse at 40% 50%, rgba(99,102,241,.12) 0%, transparent 70%); }
.geo-rose   { background: radial-gradient(ellipse at 40% 50%, rgba(244,63,94,.10)  0%, transparent 70%); }
.geo-violet { background: radial-gradient(ellipse at 40% 50%, rgba(139,92,246,.11) 0%, transparent 70%); }
.geo-amber  { background: radial-gradient(ellipse at 40% 50%, rgba(245,158,11,.09) 0%, transparent 70%); }
.geo-cyan   { background: radial-gradient(ellipse at 40% 50%, rgba(6,182,212,.10)  0%, transparent 70%); }

@keyframes geoFloat {
  0%, 100% { transform: translateY(0)    rotate(var(--r, 0deg)); }
  50%       { transform: translateY(18px) rotate(var(--r, 0deg)); }
}

/* ================================================
   ОБЩИЕ СЕКЦИИ
   ================================================ */
.section {
  padding: var(--sec) 0;
  border-top: 1px solid var(--div);
  position: relative;
  background: linear-gradient(135deg,
    rgba(99,102,241,.028) 0%,
    transparent 55%,
    rgba(244,63,94,.022) 100%);
}
.section > .container { position: relative; z-index: 1; }

/* geo-shapes сами себя клипают через overflow:hidden */

.sec-head {
  display: flex; align-items: baseline; gap: 18px;
  margin-bottom: var(--gap);
}
.sec-num {
  font-family: var(--fm); font-size: .68rem;
  color: var(--accent); letter-spacing: .14em; flex-shrink: 0;
}
.sec-title {
  font-size: clamp(1.9rem, 5vw, 3.6rem); font-weight: 800;
}

/* Clip-path анимации (начальное состояние) */
.lw { display: block; overflow: hidden; }
.li { display: block; }

/* ================================================
   HERO
   ================================================ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  border-top: none; overflow: hidden;
  position: relative;
}

/* Spotlight — следит за курсором */
.hero-spotlight {
  --mouse-x: 30%;
  --mouse-y: 40%;
}
.hero-spotlight::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(700px circle at var(--mouse-x) var(--mouse-y),
    rgba(255,255,255,.055), transparent 45%);
  z-index: 1; pointer-events: none;
  transition: background 0.15s ease;
}

/* 3D — абсолютный фон на весь hero */
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* CSS-фон: виден мгновенно пока Spline грузится */
  background: radial-gradient(ellipse 70% 90% at 70% 50%,
    #161628 0%, #0d0d1a 40%, #0A0A0A 75%);
}
.hero-3d spline-viewer {
  width: 100%; height: 100%;
  --spline-viewer-bg: transparent;
}
/* Скрываем "Built with Spline" watermark */
.hero-3d::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 240px; height: 56px;
  background: linear-gradient(to right, transparent, var(--bg) 40%);
  z-index: 10;
  pointer-events: none;
}

/* Текст поверх 3D — левая сторона */
.hero .container {
  position: relative;
  z-index: 2;
  /* Без явного width flex-колонка (.hero) сжимает и центрирует этот
     блок по контенту вместо честного выравнивания по левому краю —
     из-за этого текст наезжал на робота независимо от его ширины. */
  width: 100%;
}
.hero-body {
  max-width: 56%;
  padding-top:    clamp(100px, 13vw, 150px);
  padding-bottom: clamp(44px, 5.5vw, 72px);
}
/* Затемнение за текстом для читаемости */
.hero-body::before {
  content: '';
  position: absolute;
  inset: 0;
  left: calc(var(--px) * -1);
  background: radial-gradient(ellipse 80% 120% at 10% 50%,
    rgba(10,10,10,.72) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.hero-tag {
  font-family: var(--fm); font-size: .66rem;
  color: var(--muted); letter-spacing: .16em;
  text-transform: uppercase; margin-bottom: 34px;
}
/* Плавающий тег — абсолютно наверху hero, над головой робота */
.hero-tag--float {
  position: absolute;
  top: calc(74px + 28px); /* header + отступ */
  left: var(--px);
  z-index: 3;
  margin-bottom: 0;
  color: rgba(240,237,230,.6);
  background: rgba(10,10,10,.42);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 100px;
  white-space: nowrap;
  max-width: calc(100% - var(--px) * 2);
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-title {
  font-size: clamp(36px, 5vw, 68px);
  font-weight: 900; letter-spacing: -.04em; line-height: .96;
  margin-bottom: 32px; max-width: none;
}
.hero-sub {
  font-size: clamp(.9rem, 1.4vw, 1.05rem);
  color: var(--muted); max-width: 44ch;
  margin-bottom: 40px; line-height: 1.72;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Бегущая строка */
.marquee-wrap {
  border-top: 1px solid var(--div);
  overflow: hidden; padding: 20px 0;
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-content {
  display: inline-flex; align-items: center;
  gap: 18px; padding-right: 18px; white-space: nowrap;
}
.marquee-content span {
  font-family: var(--fh); font-size: .7rem;
  font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.marquee-content .dot { color: var(--accent); font-size: .52rem; }

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

/* ================================================
   УСЛУГИ — компактная сетка карточек
   ================================================ */
.svc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
}

.svc-item {
  border: 1px solid var(--div);
  padding: clamp(20px, 2.6vw, 30px);
  transition: background .4s var(--ease), border-color .4s;
}
.svc-item:hover {
  background: rgba(255,77,0,.03);
  border-color: rgba(255,77,0,.18);
}

.svc-row {
  display: flex; flex-direction: column; gap: 10px;
}
.svc-idx {
  font-family: var(--fm); font-size: .62rem;
  color: var(--accent); letter-spacing: .12em;
}
.svc-name {
  font-size: clamp(.92rem, 1.4vw, 1.05rem);
  font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
}

.svc-body { margin-top: 10px; }
.svc-body p {
  color: var(--muted); font-size: .82rem; line-height: 1.62;
}

/* ================================================
   КЕЙСЫ
   ================================================ */
.cases-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
}

.case-card {
  background: var(--surf);
  padding: clamp(14px, 1.6vw, 20px);
  display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
  transition: background .4s var(--ease);
}
.case-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .55s var(--ease-o);
}
.case-card:hover { background: #161616; }
.case-card:hover::after { transform: scaleX(1); }

.case-vis {
  height: clamp(130px, 14vw, 200px);
  background: #0D0D0D; border: 1px solid var(--div);
  display: flex; align-items: center; justify-content: center;
}
.case-glyph {
  font-size: clamp(2.2rem, 3.5vw, 4rem);
  color: var(--accent); opacity: .22;
  transition: opacity .4s, transform .4s var(--ease-o);
}
.case-card:hover .case-glyph { opacity: .6; transform: scale(1.08); }

.case-meta {
  display: flex; align-items: baseline;
  gap: 8px; flex-wrap: wrap;
}
.case-name-label {
  font-family: var(--fh); font-size: clamp(.82rem, 1vw, .95rem);
  font-weight: 800; letter-spacing: -.02em;
}
.case-tag {
  font-family: var(--fm); font-size: .58rem;
  color: var(--accent); border: 1px solid rgba(255,77,0,.4);
  padding: 2px 7px; letter-spacing: .04em; white-space: nowrap;
}

.case-rows { display: flex; flex-direction: column; gap: 4px; }
.case-row  { display: grid; grid-template-columns: 52px 1fr; gap: 6px; font-size: .68rem; }
.rl { color: var(--muted); font-weight: 600; font-size: .58rem; letter-spacing: .03em; padding-top: 1px; }
.rv { color: var(--text); line-height: 1.32; }
.case-hi { color: var(--accent); font-weight: 700; }

.case-stack {
  font-family: var(--fm); font-size: .52rem;
  color: var(--muted); letter-spacing: .04em;
  padding-top: 8px; border-top: 1px solid var(--div); margin-top: auto;
}

.case-link {
  display: inline-block; align-self: flex-start;
  font-family: var(--fm); font-size: .64rem; font-weight: 600;
  color: var(--accent); text-decoration: none;
  transition: opacity .3s;
}
.case-link:hover { opacity: .7; }


/* ================================================
   КЕЙСЫ — превью-макеты (browser mockup)
   ================================================ */
.case-screen {
  aspect-ratio: 16 / 10; height: auto;
  background: #080808; border: 1px solid var(--div);
  overflow: hidden; display: flex; flex-direction: column;
}
.cs-bar {
  height: 20px; background: #141414;
  border-bottom: 1px solid var(--div);
  display: flex; align-items: center; padding: 0 10px; gap: 5px; flex-shrink: 0;
}
.cs-bar i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.cs-bar i:nth-child(1) { background: #3d2020; }
.cs-bar i:nth-child(2) { background: #2c2c10; }
.cs-bar i:nth-child(3) { background: #0f2c1a; }
.cs-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.cs-nav {
  height: 16px; flex-shrink: 0;
  background: rgba(255,255,255,.035);
  border-bottom: 1px solid rgba(255,255,255,.03);
  position: relative;
}
.cs-nav::before {
  content: ''; position: absolute;
  left: 10px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 5px;
  background: rgba(255,255,255,.18); border-radius: 2px;
}
.cs-nav::after {
  content: ''; position: absolute;
  right: 10px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 5px;
  background: var(--accent); border-radius: 2px; opacity: .55;
}
.cs-hero { padding: 10px 10px 8px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.cs-h1 { height: 10px; border-radius: 2px; background: rgba(255,255,255,.12); }
.cs-h2 { height: 7px; border-radius: 2px; background: rgba(255,255,255,.06); }
.cs-h3 { height: 6px; border-radius: 2px; background: rgba(255,255,255,.04); }
.cs-btn { height: 12px; border-radius: 2px; background: var(--accent); opacity: .6; }
.cs-spacer { flex: 1; min-height: 6px; }
.cs-shop {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 5px; padding: 8px 10px; flex: 1;
}
.cs-product {
  background: rgba(255,255,255,.04); border-radius: 2px;
  min-height: 40px; position: relative; overflow: hidden;
}
.cs-product::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 5px;
  background: rgba(255,255,255,.05);
}
.cs-product:nth-child(2) { background: rgba(255,77,0,.07); }
.cs-dash {
  padding: 8px 10px; display: flex;
  flex-direction: column; gap: 6px; flex: 1; justify-content: center;
}
.cs-drow { display: flex; align-items: center; gap: 6px; }
.cs-dlbl { width: 22px; height: 4px; border-radius: 1px; background: rgba(255,255,255,.06); flex-shrink: 0; }
.cs-dbar { height: 6px; background: rgba(255,77,0,.28); border-radius: 1px; }
.cs-split { display: flex; flex: 1; overflow: hidden; }
.cs-split-l {
  width: 34%; background: rgba(255,255,255,.02);
  border-right: 1px solid rgba(255,255,255,.04);
  padding: 8px 6px; display: flex; flex-direction: column; gap: 5px;
}
.cs-split-r { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.cs-mi { height: 5px; border-radius: 2px; background: rgba(255,255,255,.05); }
.cs-mi.a { background: rgba(255,77,0,.28); }
.cs-prod-hero { display: flex; flex: 1; overflow: hidden; }
.cs-prod-img {
  width: 42%; background: rgba(255,255,255,.02);
  border-right: 1px solid rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center;
}
.cs-prod-img::before {
  content: ''; display: block;
  width: 32px; height: 44px;
  background: rgba(255,77,0,.1); border-radius: 3px;
}
.cs-prod-info { flex: 1; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.cs-t1 .cs-body { background: radial-gradient(ellipse at 80% 30%, #180a2e 0%, #080810 100%); }
.cs-t2 .cs-body { background: radial-gradient(ellipse at 20% 80%, #041808 0%, #080808 100%); }
.cs-t3 .cs-body { background: radial-gradient(ellipse at 50% 20%, #070a1a 0%, #080808 100%); }
.cs-t4 .cs-body { background: radial-gradient(ellipse at 80% 70%, #18080c 0%, #0a0808 100%); }
.cs-t5 .cs-body { background: radial-gradient(ellipse at 30% 60%, #051018 0%, #080808 100%); }
.cs-t6 .cs-body { background: radial-gradient(ellipse at 70% 40%, #060e04 0%, #080808 100%); }
.cs-t7 .cs-body { background: radial-gradient(ellipse at 50% 30%, #2c1204 0%, #080808 100%); }

/* Изображение внутри browser-хрома */
.cs-img {
  width: 100%;
  height: calc(100% - 20px);
  object-fit: cover;
  object-position: top;
  display: block;
  opacity: .88;
}

/* ================================================
   ПРОЦЕСС
   ================================================ */
.proc-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2px;
  list-style: none;
}

.proc-step {
  display: flex; flex-direction: column;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid var(--div);
  transition: background .4s var(--ease), border-color .4s;
}
.proc-step:hover {
  background: rgba(255,77,0,.03);
  border-color: rgba(255,77,0,.18);
}
.proc-num {
  font-family: var(--fm); font-size: .65rem;
  color: var(--accent); letter-spacing: .14em; margin-bottom: 16px;
}
.proc-body { display: flex; flex-direction: column; flex-grow: 1; }
.proc-day {
  font-family: var(--fm); font-size: .6rem;
  color: var(--muted); letter-spacing: .1em;
  text-transform: uppercase; display: block; margin-bottom: 8px;
}
.proc-title {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px;
}
.proc-desc {
  color: var(--muted); font-size: .82rem;
  line-height: 1.62; margin-bottom: 16px; flex-grow: 1;
}
.proc-out {
  font-family: var(--fm); font-size: .72rem;
  color: var(--accent); letter-spacing: .03em;
  padding-top: 12px; border-top: 1px solid var(--div);
  align-self: flex-start;
}

/* ================================================
   ПОЧЕМУ МЫ
   ================================================ */
.why-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px;
}
.why-card {
  padding: clamp(28px, 4vw, 54px); border: 1px solid var(--div);
  transition: background .4s var(--ease), border-color .4s;
}
.why-card:hover {
  background: rgba(255,77,0,.03);
  border-color: rgba(255,77,0,.18);
}
.why-icon {
  font-family: var(--fm); font-size: 1.3rem;
  color: var(--accent); margin-bottom: 26px; display: block;
}
.why-title {
  font-size: clamp(1rem, 1.8vw, 1.3rem); font-weight: 800;
  letter-spacing: -.02em; line-height: 1.2; margin-bottom: 12px;
}
.why-desc {
  color: var(--muted); font-size: .84rem; line-height: 1.76;
}

/* ================================================
   ОТЗЫВЫ
   ================================================ */
.rev-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
}
.rev-card {
  padding: clamp(16px, 2vw, 26px); border: 1px solid var(--div);
  display: flex; flex-direction: column;
  justify-content: space-between; gap: 24px; min-height: 280px;
  transition: background .4s, border-color .4s;
}
.rev-card:hover {
  background: rgba(255,255,255,.015);
  border-color: rgba(240,237,230,.18);
}
.rev-text {
  font-style: italic; color: var(--muted);
  font-size: .78rem; line-height: 1.65; flex-grow: 1;
}
.rev-foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--div);
}

/* CSS-аватар с инициалами */
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,77,0,.12);
  border: 1px solid rgba(255,77,0,.25);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--fh); font-size: .62rem;
  font-weight: 800; letter-spacing: .05em;
  color: var(--accent);
}
.avatar::before { content: attr(data-initials); }

.rev-who { display: flex; flex-direction: column; gap: 3px; }
.rev-name { font-weight: 700; font-size: .78rem; }
.rev-proj { font-family: var(--fm); font-size: .68rem; color: var(--accent); letter-spacing: .05em; }

/* ================================================
   ТАРИФЫ
   ================================================ */
.plan-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
}
.plan-card {
  padding: clamp(26px, 3.5vw, 44px); border: 1px solid var(--div);
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  transition: background .4s;
}
.plan-card:hover { background: rgba(255,255,255,.015); }

.plan-hot {
  background: rgba(255,77,0,.04);
  border-color: rgba(255,77,0,.22);
}

.plan-badge {
  position: absolute; top: -1px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-family: var(--fm); font-size: .55rem;
  font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; padding: 4px 14px; white-space: nowrap;
}

.plan-top { display: flex; flex-direction: column; gap: 3px; }
.plan-tier {
  font-family: var(--fm); font-size: .62rem;
  color: var(--muted); letter-spacing: .14em; text-transform: uppercase;
}
.plan-price {
  font-family: var(--fh); font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 800; letter-spacing: -.025em;
}
.plan-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.plan-desc { color: var(--muted); font-size: .82rem; line-height: 1.6; }

.plan-feats {
  display: flex; flex-direction: column; gap: 9px; flex-grow: 1;
  padding: 16px 0;
  border-top: 1px solid var(--div); border-bottom: 1px solid var(--div);
}
.plan-feats li {
  font-size: .82rem; color: var(--muted);
  padding-left: 16px; position: relative; line-height: 1.4;
}
.plan-feats li::before {
  content: '—'; position: absolute; left: 0;
  color: var(--accent); font-size: .62rem; top: 2px;
}

/* ================================================
   FAQ
   ================================================ */
.faq-list { display: flex; flex-direction: column; max-width: 820px; }
.faq-item { border-bottom: 1px solid var(--div); }
.faq-list > .faq-item:first-child { border-top: 1px solid var(--div); }

.faq-q {
  width: 100%; display: flex; justify-content: space-between;
  align-items: center; padding: 24px 0;
  font-family: var(--fh);
  font-size: clamp(.82rem, 1.5vw, 1rem);
  font-weight: 700; letter-spacing: -.01em;
  color: var(--text); text-align: left; gap: 18px;
  transition: color var(--dur);
}
.faq-q:hover { color: var(--accent); }

.faq-icon {
  font-size: 1.25rem; color: var(--accent); flex-shrink: 0; line-height: 1;
  transition: transform .4s var(--ease);
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-a { max-height: 0; overflow: hidden; transition: max-height .5s var(--ease); }
.faq-item.open .faq-a { max-height: 300px; }
.faq-a p { color: var(--muted); font-size: .88rem; line-height: 1.76; padding-bottom: 24px; }

/* ================================================
   КОНТАКТ
   ================================================ */
.contact-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(44px, 8vw, 110px); align-items: start;
}
.contact-left {
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 96px;
}
.contact-title {
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 900; letter-spacing: -.04em; line-height: .9;
}
.contact-sub { color: var(--muted); font-size: .92rem; max-width: 38ch; line-height: 1.68; }
.tg-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .92rem;
  border-bottom: 1px solid var(--div); padding-bottom: 2px;
  transition: color var(--dur), border-color var(--dur); width: fit-content;
}
.tg-btn:hover { color: var(--accent); border-color: var(--accent); }

/* Контакты в секции #contact — email + телефон под кнопкой Telegram */
.contact-info { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.contact-info a {
  font-family: var(--fm); font-size: .85rem; color: var(--muted);
  letter-spacing: .04em; width: fit-content;
  transition: color var(--dur);
}
.contact-info a:hover { color: var(--accent); }

/* Форма */
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-family: var(--fm); font-size: .62rem;
  color: var(--muted); letter-spacing: .14em; text-transform: uppercase;
}
.field input, .field textarea {
  background: transparent; border: 1px solid var(--div);
  padding: 12px 15px; color: var(--text);
  font-family: var(--fb); font-size: .9rem;
  outline: none; resize: none; width: 100%;
  border-radius: 0; -webkit-appearance: none;
  transition: border-color var(--dur);
}
.field input::placeholder, .field textarea::placeholder {
  color: var(--muted); opacity: .5;
}
.field input:focus, .field textarea:focus {
  border-color: rgba(255,77,0,.55);
}

/* ================================================
   ФУТЕР
   ================================================ */
.footer { padding: 34px 0; border-top: 1px solid var(--div); }
.footer-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-logo {
  font-family: var(--fh); font-weight: 900;
  font-size: .92rem; letter-spacing: .12em;
}
.footer-tag {
  font-family: var(--fm); font-size: .58rem;
  color: var(--muted); letter-spacing: .1em;
}
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-size: .8rem; color: var(--muted); transition: color var(--dur); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-family: var(--fm); font-size: .58rem; color: var(--muted); letter-spacing: .1em; }

/* ================================================
   АДАПТИВНОСТЬ
   ================================================ */

/* Ноутбук ≤ 1280px — тарифы в 2 колонки */
@media (max-width: 1280px) {
  .plan-grid      { grid-template-columns: repeat(2, 1fr); }
}

/* Планшет ≤ 1024px */
@media (max-width: 1024px) {
  .plan-grid      { grid-template-columns: 1fr; max-width: 480px; }
  .rev-grid       { grid-template-columns: repeat(2, 1fr); }
  .cases-grid     { grid-template-columns: repeat(2, 1fr); }
  .contact-layout { grid-template-columns: 1fr; }
  .contact-left   { position: static; }
}

/* Планшет — уточнения ≤ 768px */
@media (max-width: 768px) {
  .nav-links   { display: none; }

  /* Переключатель языка — рядом с лого RONIN, слева */
  .lang-switch { gap: 2px; flex-shrink: 1; min-width: 0; }
  .lang-switch .lang-btn {
    min-width: 36px; min-height: 36px;
    font-size: .68rem; padding: 0 6px;
  }

  .nav-burger  {
    display: flex;
    min-width: 44px; min-height: 44px;
    align-items: center; justify-content: center;
    padding: 0;
  }

  /* Закрывающая кнопка мобильного меню — зона 44px */
  .mob-close {
    min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
    padding: 0; font-size: 1.15rem;
  }

  /* Пункты меню — чуть больший padding для удобного тапа */
  .mobile-menu a { padding: 6px 24px; }

  /* Кнопки языка в мобильном меню — зона 44px */
  .mob-lang .lang-btn {
    min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
  }

  /* Hero — на мобильном: 3D фон на весь экран, текст поверх */
  .hero-body  { max-width: 100% !important; }
  .hero-title { max-width: none; font-size: clamp(26px, 8.5vw, 38px); }

  /* Плавающий тег на мобильном — в поток, над заголовком (иначе наезжает на H1) */
  .hero-tag--float {
    position: static;
    margin: 0 var(--px) 14px;
    width: fit-content;
    max-width: calc(100% - var(--px) * 2);
    font-size: .58rem;
  }

  .cases-grid { grid-template-columns: 1fr; }
  .why-grid   { grid-template-columns: 1fr; }
  .proc-list  { grid-template-columns: 1fr; }

  /* Отзывы — горизонтальный скролл на мобильных */
  .rev-grid {
    grid-template-columns: repeat(6, 72vw);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
  }
  .rev-card {
    scroll-snap-align: start;
    min-width: 0;
  }
  .rev-grid::-webkit-scrollbar { display: none; }
  .rev-grid { -ms-overflow-style: none; scrollbar-width: none; }

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

  .sec-head   { flex-direction: column; gap: 6px; }

  .footer-row   { flex-direction: column; align-items: flex-start; gap: 14px; }
  .footer-links { flex-direction: column; gap: 10px; }
}

/* Маленький мобильный ≤ 480px */
@media (max-width: 480px) {
  .hero-title { font-size: clamp(22px, 7.5vw, 30px); }
  .hero-btns  { flex-direction: column; align-items: flex-start; }
  .btn        { padding: 13px 22px; min-height: 44px; }
  .case-row   { grid-template-columns: 58px 1fr; }
  /* FAQ-кнопки — достаточная зона тапа */
  .faq-q      { min-height: 44px; }
  .lang-switch { gap: 1px; }
  .lang-switch .lang-btn { min-width: 30px; font-size: .62rem; padding: 0 3px; }
}

/* Очень маленький экран ≤ 360px */
@media (max-width: 360px) {
  .hero-title { font-size: 22px; }
  .plan-card  { padding: 22px 18px; }
  .rev-card   { padding: 14px 14px; }
  .why-card   { padding: 24px 18px; }
}

/* Reduced motion — CSS */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration:  .01ms !important;
    animation-iteration-count: 1 !important;
  }
  .marquee-track { animation: none; }
}

/* ================================================
   КЕЙСЫ — увеличение превью (наведение / тап)
   ================================================ */
.case-screen { cursor: zoom-in; transition: border-color .2s ease, transform .2s ease; }
.case-card:hover .case-screen { border-color: var(--accent, #c0392b); }
.case-screen:hover .cs-img { opacity: 1; }

.shot-pop {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 24px;
  background: rgba(0, 0, 0, .88);
  opacity: 0; pointer-events: none;
  transition: opacity .18s ease;
}
.shot-pop.on { opacity: 1; }
.shot-pop.pinned { pointer-events: auto; cursor: zoom-out; }

.shot-pop img {
  max-width: min(1200px, 94vw);
  max-height: 84vh;
  width: auto; height: auto;
  display: block;
  border: 1px solid var(--div);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
.shot-pop .shot-cap {
  font-family: var(--mono, monospace);
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.shot-pop .shot-hint { font-size: 11px; color: var(--muted); opacity: .6; }

@media (max-width: 720px) {
  .shot-pop img { max-width: 96vw; max-height: 76vh; }
}

/* ================================================
   КОНТАКТЫ — четыре равнозначных канала связи
   ================================================ */
.contact-ways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.way {
  --ch: var(--muted);
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px 14px;
  border: 1px solid var(--div);
  background: rgba(255, 255, 255, .012);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.way::before {
  content: ''; position: absolute; left: -1px; top: -1px; bottom: -1px;
  width: 2px; background: var(--ch);
  opacity: .55; transition: opacity .18s ease;
}
.way:hover {
  border-color: var(--ch);
  background: rgba(255, 255, 255, .04);
  transform: translateY(-2px);
}
.way:hover::before { opacity: 1; }

.way-ch {
  font-family: var(--mono, monospace);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ch);
}
.way-val {
  font-size: 15px; color: var(--text, #f0f0f0);
  word-break: break-word; line-height: 1.35;
}
.way-act {
  font-family: var(--mono, monospace);
  font-size: 11px; letter-spacing: .06em;
  color: var(--muted); opacity: .75;
}
.way:hover .way-act { color: var(--ch); opacity: 1; }

.way-tg   { --ch: #2ea6da; }
.way-wa   { --ch: #25d366; }
.way-mail { --ch: #e0913a; }
.way-tel  { --ch: #b8b8b8; }

@media (max-width: 720px) {
  .contact-ways { grid-template-columns: 1fr; gap: 10px; margin-top: 22px; }
  .way { padding: 14px 16px 12px; }
  .way-val { font-size: 14px; }
}

/* ================================================
   ГЕРОЙ — развести текст и робота (только десктоп,
   мобильная раскладка ниже 1100px не затрагивается)
   ================================================ */
@media (min-width: 1100px) {
  /* Сцена сдвигается вправо, чтобы рука робота ушла из-под заголовка */
  .hero-3d spline-viewer {
    transform: translateX(16%) scale(.94);
    transform-origin: center center;
  }
  /* Текстовая колонка чуть уже, заголовок чуть спокойнее —
     латышский длиннее русского и упирался в робота */
  .hero-body  { max-width: 50%; }
  .hero-title { font-size: clamp(36px, 4.4vw, 60px); }
  /* Подложка под текстом: сплошная слева, растворяется до робота */
  .hero-body::before {
    left: calc(var(--px) * -1);
    right: -10%;
    background: linear-gradient(to right,
      rgba(10, 10, 10, .93) 0%,
      rgba(10, 10, 10, .88) 38%,
      rgba(10, 10, 10, .58) 64%,
      rgba(10, 10, 10, 0)   92%);
  }
}
