/* ============================================================
   СФЕРА — лендинг. Дизайн-система
   ============================================================ */
:root {
  --ink: #0a0b12;
  --ink-2: #14161f;
  --indigo: #2b36ff;
  --indigo-2: #5b6cff;
  --orange: #ff5a1f;
  --orange-d: #e8480f;
  --paper: #ffffff;
  --mist: #f4f5f9;
  --mist-2: #eceef5;
  --line: #e3e6ef;
  --text: #15171f;
  --muted: #6b7080;
  --muted-light: #aeb4c6;
  --yellow: #ffd60a;

  --radius: 18px;
  --radius-sm: 12px;
  --container: 1440px;
  --shadow: 0 20px 50px -22px rgba(20, 24, 60, .28);
  --shadow-sm: 0 8px 24px -12px rgba(20, 24, 60, .25);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font: var(--font-manrope), 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: var(--font-grotesk), 'Space Grotesk', var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
.h2 {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -.02em;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--indigo); margin-bottom: 22px;
}
.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,90,31,.18); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 15px;
  padding: 14px 26px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--indigo); box-shadow: 0 14px 30px -12px rgba(43,54,255,.6); }
.btn--orange { background: var(--orange); color: #fff; box-shadow: 0 12px 26px -12px rgba(255,90,31,.7); }
.btn--orange:hover { background: var(--orange-d); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 14px; z-index: 100;
  background: transparent; padding: 0 18px;
}
.header__inner {
  display: flex; align-items: center; gap: 22px;
  max-width: 1240px; margin: 0 auto; height: 60px;
  padding: 0 12px 0 24px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 10px 30px -18px rgba(20,24,60,.30);
  transition: box-shadow .25s var(--ease), background .25s;
}
.header.is-scrolled .header__inner { box-shadow: 0 16px 38px -18px rgba(20,24,60,.42); background: rgba(255,255,255,.94); }
.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); }
.logo__mark { color: var(--orange); display: inline-flex; }
.logo__text { font-family: var(--display); font-weight: 700; font-size: 27px; letter-spacing: .005em; line-height: 1; color: var(--orange); text-transform: lowercase; }
.logo--light { color: #fff; }

.nav { display: flex; gap: 26px; margin-left: 8px; margin-right: auto; }
.nav a { font-size: 15px; font-weight: 600; color: var(--text); position: relative; padding: 4px 0; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px; background: var(--orange); transition: width .25s var(--ease); }
.nav a:hover { color: var(--indigo); }
.nav a:hover::after { width: 100%; }

.header__contacts { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.header__phone { font-family: var(--display); font-weight: 700; font-size: 18px; }
.header__hours { font-size: 11.5px; color: var(--muted); }
.header__cta { padding: 11px 20px; font-size: 14px; }

.burger { display: none; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.burger span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 3px; transition: .25s var(--ease); }
.burger.is-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Sections ---------- */
.section { padding: clamp(40px, 5vw, 64px) 0; position: relative; }
.section--mist { background: #fff; }
.section--stats { padding-top: clamp(44px, 5vw, 70px); padding-bottom: clamp(44px, 5vw, 70px); }
.section--stats .section__head { margin-bottom: 30px; }
.section--dark { background: #fff; color: var(--text); }
.section__head { max-width: 720px; margin-bottom: 48px; }
.section__head--light .section__desc { color: var(--muted); }
.section__desc { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); margin-top: 16px; }

/* ============ HERO ============ */
.hero { position: relative; padding: clamp(20px, 3vw, 44px) 0 clamp(28px, 3vw, 48px); overflow: hidden; background: #fff; }
.hero__grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(43,54,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(43,54,255,.06) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse 88% 82% at 62% 36%, #000 56%, transparent 100%);
  mask-image: radial-gradient(ellipse 88% 82% at 62% 36%, #000 56%, transparent 100%);
}
.hero__orbit { position: absolute; right: -120px; top: 50%; transform: translateY(-50%); width: 640px; max-width: 60vw; opacity: .9; pointer-events: none; animation: spin 60s linear infinite; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }
/* пауза непрерывных анимаций hero вне экрана — экономия CPU/батареи */
.hero--paused .hero__orbit,
.hero--paused .compass-needle,
.hero--paused .mockup__scan,
.hero--paused .mockup__pen,
.hero--paused .glass--lit { animation-play-state: paused; }
.hero__inner { position: relative; display: grid; grid-template-columns: 1.25fr .9fr; gap: 56px; align-items: center; }

.hero__title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(34px, 5.2vw, 64px); line-height: 1.02; letter-spacing: -.025em;
}
.hero__title .accent { color: var(--indigo); position: relative; }
.hero__subhead {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(22px, 2.8vw, 34px); line-height: 1.1; letter-spacing: -.02em;
  margin-top: 14px; color: var(--ink);
}
.hero__subhead .accent { color: var(--indigo); }
.hero__lead { font-size: clamp(16px, 1.7vw, 20px); color: var(--muted); margin: 22px 0 28px; max-width: 540px; }
.hero__utp-dots { display: flex; flex-direction: column; gap: 14px; margin: 6px 0 0; padding: 0; }
.hero__utp-dots li { font-size: 17px; font-weight: 600; color: var(--text); position: relative; padding-left: 24px; }
.hero__utp-dots li::before { content: ''; position: absolute; left: 1px; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--orange); transform: translateY(-50%); box-shadow: 0 0 0 4px rgba(255,90,31,.14); }
.hero__utp-dots b { color: var(--indigo); font-weight: 800; }

/* ---------- Animated blueprint mockup ---------- */
.hero__mockup { position: relative; width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 1 / 1.04; }
.mockup__svg { position: relative; width: 100%; height: 100%; display: block; overflow: visible; }

.bp {
  fill: none; stroke: var(--indigo); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: bpDraw 1s var(--ease) forwards; animation-delay: var(--d, 0s);
}
.bp--thin { stroke: rgba(43,54,255,.5); stroke-width: 1.3; }
.bp--accent { stroke: var(--orange); stroke-width: 3; }
.axis-bub { fill: #fff; }
@keyframes bpDraw { to { stroke-dashoffset: 0; } }

.glass { fill: rgba(43,54,255,.06); opacity: 0; animation: glassIn .8s var(--ease) forwards; animation-delay: var(--d, 0s); }
.glass--hl { fill: rgba(255,255,255,.55); }
.glass--lit { fill: rgba(255,90,31,.18); animation: glassIn .8s var(--ease) forwards, litPulse 4.2s ease-in-out infinite; animation-delay: var(--d, 0s), calc(var(--d, 0s) + var(--dp, 0s)); }
@keyframes glassIn { to { opacity: 1; } }
@keyframes litPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.lbl { fill: var(--muted); font-family: ui-monospace, 'SFMono-Regular', 'Courier New', monospace; font-size: 14px; font-weight: 700; opacity: 0; animation: glassIn .6s var(--ease) forwards; animation-delay: var(--d, 0s); }
.lbl--axis { fill: var(--indigo); }
.lbl--sm { font-size: 11px; }

.mockup__dot {
  fill: var(--orange); opacity: 0; transform: scale(0); transform-origin: center; transform-box: fill-box;
  animation: dotPop .5s var(--ease) forwards; animation-delay: var(--d, 0s);
}
@keyframes dotPop { to { opacity: 1; transform: scale(1); } }

.compass-n { fill: var(--orange); }
.compass-s { fill: rgba(43,54,255,.4); }
.compass-needle { transform-box: fill-box; transform-origin: center; animation: spinNeedle 16s linear infinite; }
@keyframes spinNeedle { to { transform: rotate(360deg); } }

.mockup__pen { fill: var(--orange); filter: drop-shadow(0 0 6px rgba(255,90,31,.75)); opacity: 0; animation: penMove 1.15s var(--ease) .1s forwards; }
@keyframes penMove { 0% { transform: translate(0,0); opacity: 0; } 8% { opacity: 1; } 88% { transform: translate(240px,0); opacity: 1; } 100% { transform: translate(240px,0); opacity: 0; } }

.mockup__scan {
  position: absolute; left: 14%; right: 14%; top: 20%; height: 70px; border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgba(43,54,255,.22), rgba(255,90,31,.20), transparent);
  filter: blur(7px); opacity: 0; pointer-events: none;
  animation: scan 4s ease-in-out 2.4s infinite;
}
@keyframes scan { 0% { transform: translateY(-50%); opacity: 0; } 12% { opacity: .9; } 50% { transform: translateY(250%); opacity: .9; } 64%, 100% { opacity: 0; } }

.mockup__chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 15px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow); opacity: 0;
  animation: chipIn .55s var(--ease) both, chipFloat 5s ease-in-out infinite;
}
.mockup__chip i { font-style: normal; color: var(--orange); }
.mockup__chip--1 { top: 2%; left: -3%; animation-delay: 1.7s, 2.4s; }
.mockup__chip--2 { bottom: 16%; right: -4%; animation-delay: 2s, 2.7s; }
.mockup__chip--3 { bottom: 2%; left: 5%; animation-delay: 2.2s, 2.9s; }
@keyframes chipIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

/* ---------- Lead form (narrow, centered) ---------- */
.hero__cta-form { max-width: 760px; margin: 48px auto 0; }
.hero__form-head { text-align: center; margin-bottom: 18px; }
.hero__form-head b { display: block; font-family: var(--display); font-size: 23px; font-weight: 700; }
.hero__form-head span { display: block; font-size: 14px; color: var(--muted); margin-top: 5px; }
.hero__form-bar {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end;
  background: var(--mist-2); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: var(--shadow);
}
.hero__form-bar .field { gap: 6px; }
.hero__form-bar .btn { height: 52px; white-space: nowrap; }
.hero__cta-form .consent { margin-top: 14px; justify-content: center; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field > span i { color: var(--orange); font-style: normal; }
.field input, .field select {
  font-family: var(--font); font-size: 15.5px; color: var(--text);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(43,54,255,.12); }
.field--radio span { display: block; margin-bottom: 8px; }
.radios { display: flex; gap: 20px; }
.radios label { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; cursor: pointer; }
.consent { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--muted); }
.consent input { margin-top: 2px; accent-color: var(--indigo); }
.consent a { color: var(--indigo); text-decoration: underline; }
.form__note { font-size: 12px; color: var(--muted); }
.form__note a { color: var(--indigo); text-decoration: underline; }

/* ============ STATS ============ */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats--row { grid-template-columns: repeat(4, 1fr); }
.stats--row .stat { padding: 22px 24px; text-align: center; }
.stats--row .stat b { font-size: clamp(26px, 2.6vw, 40px); }
.stat { background: #fff; padding: 26px 28px; transition: background .25s; }
.stat:hover { background: var(--mist); }
.stat b { display: block; font-family: var(--display); font-size: clamp(32px, 4vw, 50px); font-weight: 700; line-height: 1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.stat span { display: block; color: var(--muted); font-size: 14.5px; margin-top: 12px; }

/* ============ TYPES ============ */
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
#types .section__head { margin-bottom: 26px; }
.type-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.type-card:hover { transform: translateY(-6px); border-color: var(--indigo); box-shadow: var(--shadow); }
.type-card__photo { position: relative; aspect-ratio: 5 / 2; background: linear-gradient(135deg, var(--g1, #3a47ff), var(--g2, #7c4dff)); overflow: hidden; }
.type-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s var(--ease); }
.type-card:hover .type-card__photo img { transform: scale(1.06); }
.type-card__photo::after { content: none; position: absolute; bottom: 10px; right: 10px; font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(0,0,0,.4); padding: 4px 9px; border-radius: 6px; letter-spacing: .04em; }
.type-card__body { padding: 16px 22px 20px; }
.type-card h3 { font-family: var(--display); font-size: 19px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.type-card p { color: var(--muted); font-size: 13.5px; }
.type-card__arrow { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--orange); font-size: 20px; font-weight: 700; display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .25s; }
.type-card:hover .type-card__arrow { transform: translateX(4px); }

/* «нет вашего типа?» — форма под карточками */
.types__cta { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px 24px; box-shadow: var(--shadow-sm); }
.types__cta p { font-size: 17px; font-weight: 600; max-width: none; }
.types__cta b { color: var(--indigo); }
.types__form { flex-direction: row; align-items: center; gap: 12px; }
.types__form .field { width: 220px; }
.types__form .btn { white-space: nowrap; height: 52px; }

/* подсказка «листайте» (только мобайл) */
.scroll-hint { display: none; }
@keyframes swipeHint { 0%, 100% { transform: translateX(0); opacity: .55; } 50% { transform: translateX(7px); opacity: 1; } }

/* ============ SERVICES ============ */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; position: relative; }
.service:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.service__num { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--orange); letter-spacing: .05em; }
.service h3 { font-family: var(--display); font-size: 21px; font-weight: 600; margin: 14px 0 10px; }
.service p { color: var(--muted); font-size: 14.5px; }
.services-cta-form { margin-top: 30px; }
#types { padding-top: clamp(40px, 5vw, 60px); padding-bottom: clamp(40px, 5vw, 60px); }
#services { padding-top: clamp(40px, 5vw, 60px); padding-bottom: clamp(20px, 2.5vw, 36px); }
#projects { padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(40px, 5vw, 60px); }
#stages { padding-bottom: clamp(20px, 2.5vw, 36px); }

/* «Журнальная» светлая подложка: Портфолио + Каналы (идут друг за другом) */
/* подложка всегда сплошная — не зависит от reveal-анимации секции (иначе мелькает белый при скролле) */
#projects, #telegram { background: #f6f4ee; opacity: 1; transform: none; }
#telegram { padding-bottom: clamp(48px, 6vw, 76px); }
#projects::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 110px; background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 100%); pointer-events: none; z-index: 0; }
#telegram::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 110px; background: linear-gradient(0deg, #fff 0%, rgba(255,255,255,0) 100%); pointer-events: none; z-index: 0; }
#projects > .container, #telegram > .container { position: relative; z-index: 1; }
#team { padding-top: clamp(20px, 2.5vw, 36px); }
#audit { padding-top: clamp(40px, 5vw, 60px); }

/* ============ PROJECTS ============ */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; cursor: pointer; text-align: left; display: flex; flex-direction: column; }
.project__body { display: flex; flex-direction: column; flex: 1; }
.project:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.project:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; }
.project__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.project:hover .project__img img { transform: scale(1.06); }
.project__more { display: inline-block; margin-top: auto; padding-top: 14px; color: var(--indigo); font-weight: 700; font-size: 14px; }

/* Case modal (портфолио) */
.case-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.case-modal[hidden] { display: none; }
.case-modal__overlay { position: absolute; inset: 0; background: rgba(8,10,25,.55); backdrop-filter: blur(3px); animation: fadeIn .25s ease; }
.case-modal__dialog { position: relative; width: 100%; max-width: min(880px, 100%); max-height: 92vh; overflow-y: auto; overflow-x: hidden; background: #fff; border-radius: 24px; box-shadow: 0 40px 90px -30px rgba(10,12,40,.6); animation: modalIn .3s var(--ease); }
.case-modal__close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; z-index: 2; box-shadow: var(--shadow-sm); }
.case-modal__close:hover { background: #fff; }
.case-modal__media { aspect-ratio: 16 / 8; background: linear-gradient(135deg, var(--g1, #3a47ff), var(--g2, #7c4dff)); position: relative; }
.case-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-modal__content { padding: clamp(22px, 3vw, 34px); }
.case-modal__content h3 { font-family: var(--display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin-bottom: 16px; }
.case-modal__tag { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--indigo); background: rgba(43,54,255,.08); padding: 5px 12px; border-radius: 999px; margin-bottom: 12px; }

/* case content (preview tag + modal body) */
.project__tag { display: inline-block; font-size: 11.5px; font-weight: 700; color: var(--indigo); background: rgba(43,54,255,.08); padding: 4px 11px; border-radius: 999px; margin-bottom: 10px; }
.project__full { display: none; }
.case-body { margin-bottom: 24px; }
.case-lead { color: var(--muted); font-size: 15.5px; margin-bottom: 18px; }
.case-body h4 { font-family: var(--display); font-size: 17px; font-weight: 700; margin: 22px 0 10px; }
.case-body p { color: var(--muted); font-size: 15.5px; line-height: 1.6; }
.case-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 0 0 6px; padding: 0; }
.case-specs li { display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.case-specs li span { color: var(--muted); font-size: 12px; }
.case-specs li b { color: var(--text); }
.case-check { display: grid; gap: 7px; padding: 0; }
.case-check li { position: relative; padding-left: 26px; font-size: 14.8px; line-height: 1.5; color: var(--text); }
.case-check li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--orange); font-weight: 800; }
.case-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.case-gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* ============ TELEGRAM / MAX ============ */
.tg { display: grid; grid-template-columns: 1.5fr .55fr; gap: 56px; align-items: center; }
.tg__features { display: grid; gap: 30px; }
.tg__item { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.tg__ico { width: 50px; height: 50px; border-radius: 13px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--indigo); flex-shrink: 0; }
.tg__item h3 { font-family: var(--display); font-size: 20px; font-weight: 700; margin-bottom: 8px; line-height: 1.2; }
.tg__item p { color: var(--muted); font-size: 15px; max-width: 580px; }
.tg__qr { display: grid; gap: 18px; }
.tg__card { display: grid; gap: 10px; justify-items: center; transition: transform .2s var(--ease); }
.tg__card:hover { transform: translateY(-3px); }
.tg__qrbox { width: 100%; max-width: 210px; aspect-ratio: 1; background: #0a0b12; border-radius: 18px; display: grid; place-items: center; overflow: hidden; box-shadow: var(--shadow-sm); }
.tg__qrbox img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.tg__label { font-weight: 700; font-size: 13.5px; color: var(--text); }

/* открытая форма в поп-апе кейса */
.case-form { border-top: 1px solid var(--line); padding-top: 22px; }
.case-form h4 { font-family: var(--display); font-size: 19px; font-weight: 700; margin-bottom: 14px; }
.case-form__row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; }
.case-form input { font-family: var(--font); font-size: 15px; color: var(--text); padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; width: 100%; transition: border-color .2s, box-shadow .2s; }
.case-form input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(43,54,255,.12); }
.case-form .btn { height: 50px; white-space: nowrap; }
.case-form .consent { justify-content: flex-start; align-items: flex-start; gap: 8px; max-width: none; text-align: left; }
.case-form .consent input { flex-shrink: 0; margin-top: 2px; }
.case-form .consent span { line-height: 1.4; }
.consent--sm { margin-top: 12px; font-size: 12px; }
.project__img {
  aspect-ratio: 16/10; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: rgba(255,255,255,.85); font-size: 15px; letter-spacing: .05em;
  background: linear-gradient(135deg, var(--g1, #3a47ff), var(--g2, #7c4dff));
  position: relative;
}
.project__img::after { content: none; position: absolute; bottom: 12px; right: 12px; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.35); padding: 4px 9px; border-radius: 6px; letter-spacing: .04em; }
.project__body { padding: 24px 26px; }
.project__body h3 { font-family: var(--display); font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.project__body ul { display: flex; flex-direction: column; gap: 9px; }
.project__body li { font-size: 14.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 9px; }
.project__body li b { color: var(--text); }

/* ============ AUDIT ============ */
.section--audit { background: #fff; color: var(--text); }
.audit { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.audit .section__desc { color: var(--muted); }
.audit__list { display: grid; gap: 14px; margin-top: 30px; }
.audit__list li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; font-size: 15.5px; }
.audit__list span { font-family: var(--display); font-weight: 700; color: var(--orange); font-size: 18px; background: rgba(255,90,31,.14); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; }
.audit__form { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.audit__form-title { font-family: var(--display); font-size: 23px; font-weight: 700; margin-bottom: 8px; }


/* Quiz modal */
.quiz-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.quiz-modal[hidden] { display: none; }
.quiz-modal__overlay { position: absolute; inset: 0; background: rgba(8,10,25,.55); backdrop-filter: blur(3px); animation: fadeIn .25s ease; }
.quiz-modal__dialog { position: relative; width: 100%; max-width: min(780px, 100%); max-height: 92vh; overflow-y: auto; overflow-x: hidden; background: #fff; border-radius: 24px; padding: clamp(22px,4vw,40px); box-shadow: 0 40px 90px -30px rgba(10,12,40,.6); animation: modalIn .3s var(--ease); }
.quiz-modal__close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; transition: .2s; z-index: 2; }
.quiz-modal__close:hover { background: var(--mist); color: var(--ink); border-color: var(--ink); }
.quiz-modal__head { margin-bottom: 26px; padding-right: 44px; }
.quiz-modal__head .section__desc { margin-top: 10px; }
.quiz-modal .quiz { max-width: none; margin: 0; border: 0; box-shadow: none; padding: 0; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
body.modal-open { overflow: hidden; }

/* Quiz launcher (FAB, desktop bottom-left) */
.quiz-fab {
  position: fixed; left: 24px; bottom: 24px; z-index: 95; isolation: isolate;
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; border: 0; cursor: pointer;
  padding: 12px 22px 12px 14px; border-radius: 999px;
  box-shadow: 0 16px 36px -14px rgba(255,90,31,.55), 0 10px 26px -14px rgba(20,24,60,.6);
  font-family: var(--font); font-weight: 700; font-size: 15px;
  transition: transform .2s var(--ease), background .2s;
}
.quiz-fab:hover { transform: translateY(-3px); background: var(--indigo); }
.quiz-fab__ico { width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; font-size: 20px; flex-shrink: 0; }
.quiz-fab__txt { display: flex; flex-direction: column; line-height: 1.18; text-align: left; }
.quiz-fab__txt small { font-weight: 600; font-size: 11.5px; opacity: .72; }
.quiz { max-width: 860px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.quiz__progress { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.quiz__progress { position: relative; }
.quiz__bar { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--indigo), var(--orange)); flex: 1; transition: width .4s var(--ease); position: relative; }
.quiz__progress::before { content: ''; position: absolute; left: 0; right: 96px; height: 6px; background: var(--mist-2); border-radius: 999px; }
.quiz__bar { z-index: 1; width: 25%; }
.quiz__step-label { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }

.quiz__step { display: none; animation: fade .35s var(--ease); }
.quiz__step.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.quiz__q { font-family: var(--display); font-size: clamp(20px, 2.6vw, 28px); font-weight: 700; margin-bottom: 6px; }
.quiz__hint { color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.quiz__q + .quiz__options { margin-top: 22px; }

.quiz__options { display: flex; flex-direction: column; gap: 12px; }
.quiz__options--grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.quiz-opt {
  font-family: var(--font); font-size: 16px; font-weight: 600; text-align: left;
  padding: 16px 20px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s; position: relative;
}
.quiz-opt:hover { border-color: var(--indigo); transform: translateX(3px); }
.quiz-opt.is-selected { border-color: var(--indigo); background: rgba(43,54,255,.06); }
.quiz-opt.is-selected::after { content: '✓'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: #fff; background: var(--indigo); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }

.quiz__contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.quiz__contacts .field:last-child { grid-column: 1 / -1; }

.quiz__nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; }
.quiz__success { text-align: center; padding: 30px 0; }
.quiz__success-ico { width: 72px; height: 72px; border-radius: 50%; background: rgba(43,54,255,.1); color: var(--indigo); display: grid; place-items: center; font-size: 38px; margin: 0 auto 18px; }
.quiz__success h3 { font-family: var(--display); font-size: 26px; margin-bottom: 8px; }
.quiz__success p { color: var(--muted); }

/* ============ ABOUT ============ */
.about { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.about__text p { color: var(--muted); font-size: 16.5px; margin-top: 18px; }
.about__badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.badge { font-size: 13.5px; font-weight: 700; padding: 9px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--mist); }
.about__visual { display: block; }
.about__map { width: 100%; height: 400px; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; position: relative; z-index: 0; isolation: isolate; }
.about__map-note { margin-top: 12px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ============ STAGES ============ */
.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.stage { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 28px 26px; position: relative; }
.stage__num { font-family: var(--display); font-size: 16px; font-weight: 700; color: #fff; background: var(--indigo); width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 20px; }
.stage h3 { font-family: var(--display); font-size: 18.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.stage p { color: var(--muted); font-size: 14px; }

/* ============ TEAM ============ */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.team__photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.team__photo img { width: 100%; height: auto; display: block; }
.team__photo::after { content: none; position: absolute; bottom: 14px; right: 14px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.35); padding: 5px 10px; border-radius: 6px; }
.team__list { display: grid; gap: 4px; margin: 24px 0 28px; }
.team__list li { display: grid; grid-template-columns: 70px 1fr; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.team__list b { font-family: var(--display); font-size: 34px; font-weight: 700; color: var(--indigo); line-height: 1; }
.team__list span { color: var(--muted); font-size: 15px; }

/* ============ FAQ ============ */
.faq { display: grid; gap: 12px; max-width: none; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; transition: border-color .2s; }
.faq__item[open] { border-color: var(--indigo); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; padding: 22px 24px; font-weight: 700; font-size: 16.5px; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary i { width: 26px; height: 26px; flex-shrink: 0; position: relative; }
.faq__item summary i::before, .faq__item summary i::after { content: ''; position: absolute; background: var(--orange); border-radius: 2px; transition: transform .25s var(--ease); }
.faq__item summary i::before { width: 16px; height: 2.5px; top: 12px; left: 5px; }
.faq__item summary i::after { width: 2.5px; height: 16px; top: 5px; left: 12px; }
.faq__item[open] summary i::after { transform: rotate(90deg); opacity: 0; }
.faq__a { padding: 0 24px 22px; color: var(--muted); font-size: 15.5px; max-width: none; }

/* ============ FINAL ============ */
.section--final { background: #fff; color: var(--text); overflow: hidden; }
.section--final .hero__grid-bg { -webkit-mask-image: radial-gradient(ellipse 70% 80% at 80% 50%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse 70% 80% at 80% 50%, #000 20%, transparent 70%); background-image: linear-gradient(rgba(43,54,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(43,54,255,.05) 1px, transparent 1px); }
.final { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.final__text p { color: var(--muted); font-size: 16.5px; margin-top: 18px; max-width: 480px; }
.final__form { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }

/* ============ FOOTER ============ */
.footer { background: #fff; color: var(--text); padding: 64px 0 28px; border-top: 1px solid var(--line); }
.footer__inner { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer__col h4 { font-family: var(--display); font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.footer__col a, .footer__col span { display: block; color: var(--muted); font-size: 14.5px; margin-bottom: 10px; transition: color .2s; }
.footer__col a:hover { color: var(--indigo); }
.footer__col--brand p { color: var(--muted); font-size: 14.5px; margin-top: 16px; max-width: 260px; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; gap: 12px; }
.footer__bottom a { color: var(--muted); text-decoration: underline; }

/* ============ Toast ============ */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 120%); background: var(--ink); color: #fff; padding: 15px 26px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); z-index: 200; transition: transform .4s var(--ease), opacity .3s var(--ease), visibility .3s; max-width: 90vw; opacity: 0; visibility: hidden; pointer-events: none; }
.toast.is-show { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; }

/* ============ Reveal animation ============ */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .85s var(--ease), transform .85s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* staggered card reveal — карточки появляются каскадом */
.type-card, .service, .project, .stage, .team__list li, .faq__item { opacity: 0; }
.is-in .type-card,
.is-in .service,
.is-in .project,
.is-in .stage,
.is-in .team__list li,
.is-in .faq__item {
  opacity: 1;
  animation: rise .65s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 75ms);
}
@keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

/* мягкий размытый переход в конце hero (без жёстких линий между секциями) */
.hero::after {
  content: ''; position: absolute; left: 7%; right: 7%; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, rgba(43,54,255,.20), rgba(255,90,31,.16), transparent);
  filter: blur(2px); pointer-events: none; z-index: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ---------- Header «Статьи» ---------- */
.header__articles { font-size: 15px; font-weight: 600; color: var(--text); padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 999px; transition: border-color .2s, color .2s; white-space: nowrap; }
.header__articles:hover { border-color: var(--ink); color: var(--indigo); }
.header__articles { position: relative; overflow: visible; }
.header__articles::after { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--orange); opacity: 0; pointer-events: none; animation: artPulse 3.5s ease-out infinite; }
@keyframes artPulse { 0% { transform: scale(1); opacity: .55; } 16% { transform: scale(1.22); opacity: 0; } 100% { transform: scale(1.22); opacity: 0; } }
.nav__more { display: none; }
.nav.is-open .nav__more { display: block; }

/* ---------- Lead modal ---------- */
.lead-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lead-modal[hidden] { display: none; }
.lead-modal__overlay { position: absolute; inset: 0; background: rgba(8,10,25,.55); backdrop-filter: blur(3px); animation: fadeIn .25s ease; }
.lead-modal__dialog { position: relative; width: 100%; max-width: min(440px, 100%); max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 22px; padding: clamp(24px,4vw,34px); box-shadow: 0 40px 90px -30px rgba(10,12,40,.6); animation: modalIn .3s var(--ease); }
.lead-modal__close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; transition: .2s; }
.lead-modal__close:hover { background: var(--mist); color: var(--ink); border-color: var(--ink); }
.lead-modal__title { font-family: var(--display); font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.lead-modal__sub { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }

/* ---------- Articles page ---------- */
.page-head { padding-top: clamp(20px, 3vw, 40px); }
.breadcrumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.breadcrumbs a:hover { color: var(--indigo); }
.articles-toc { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.articles-toc a { font-size: 14px; font-weight: 600; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); transition: .2s; }
.articles-toc a:hover { border-color: var(--indigo); color: var(--indigo); }
.article { max-width: 840px; padding: clamp(26px, 4vw, 40px) 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.article__meta { font-size: 12.5px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.article h2 { font-family: var(--display); font-size: clamp(23px, 3vw, 32px); font-weight: 700; line-height: 1.12; margin-bottom: 16px; }
.article h3 { font-family: var(--display); font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.article p { color: var(--text); font-size: 16.5px; line-height: 1.7; margin-bottom: 14px; }
.article ul { display: grid; gap: 8px; margin: 6px 0 16px; padding: 0; }
.article ul li { position: relative; padding-left: 27px; color: var(--text); font-size: 16px; line-height: 1.6; }
.article ul li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--orange); font-weight: 800; }
.article__cta { margin-top: 18px; }

/* ---------- SEO block ---------- */
.seo { background: var(--mist); }
.seo__title { font-family: var(--display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; margin-bottom: 14px; }
.seo p { color: var(--muted); font-size: 15px; line-height: 1.7; max-width: 920px; margin-bottom: 16px; }
.seo__tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.seo__tags li { font-size: 12.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }

/* ---------- Articles listing ---------- */
.articles-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.article-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.article-card__cat { font-size: 12.5px; font-weight: 700; color: var(--orange); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.article-card h2 { font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.2; }
.article-card p { color: var(--muted); font-size: 15px; line-height: 1.6; flex: 1; margin: 12px 0 16px; }
.article-card__more { color: var(--indigo); font-weight: 700; font-size: 14.5px; }

/* ---------- Single article ---------- */
.article--single { max-width: 820px; margin: 0 auto; border-top: 0; padding-top: 6px; }
.article__title { font-family: var(--display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; line-height: 1.1; margin-bottom: 18px; }
.article-lead { font-size: 18.5px; line-height: 1.7; color: var(--muted); margin-bottom: 6px; }
.article--single .faq { margin: 18px 0 8px; }
.article-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 32px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.article-cta b { font-family: var(--display); font-size: 19px; display: block; }
.article-cta span { color: var(--muted); font-size: 14.5px; }
.article-related h2 { font-family: var(--display); font-size: 22px; margin-bottom: 18px; }
.article-related__list { display: grid; gap: 12px; max-width: 820px; }
.article-related__list a { display: block; font-weight: 600; color: var(--text); padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: .2s; }
.article-related__list a:hover { border-color: var(--indigo); color: var(--indigo); }
@media (max-width: 760px) { .articles-grid { grid-template-columns: 1fr; } }

@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .header__articles { display: none; }
  .types, .services, .projects { grid-template-columns: repeat(2, 1fr); }
  .stages { grid-template-columns: repeat(2, 1fr); }
  .stats, .stats--row { grid-template-columns: repeat(2, 1fr); }
  .nav, .header__contacts { display: none; }
  .burger { display: flex; }
  .header__cta { margin-left: auto; }
}

@media (max-width: 860px) {
  .audit, .about, .team, .final, .tg { grid-template-columns: 1fr; gap: 36px; }
  .tg__qr { grid-template-columns: 1fr 1fr; }
  .about__map { height: 300px; }
  .quiz__contacts, .quiz__options--grid { grid-template-columns: 1fr; }
  .hero__form-bar { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .hero__form-bar .btn { grid-column: 1 / -1; }
  .quiz-fab { display: none; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .stats, .stats--row { grid-template-columns: 1fr 1fr; }
  .stats--row .stat { padding: 16px 12px; }
  .stats--row .stat b { font-size: clamp(22px, 6.5vw, 30px); }
  .hero__form-bar { grid-template-columns: 1fr; }
  .hero__mockup { max-width: 380px; }
  /* карточные блоки — горизонтальный скролл на мобайле */
  .types, .services, .projects, .stages {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; padding-bottom: 10px; margin-right: -18px; padding-right: 18px; scrollbar-width: none;
  }
  .types::-webkit-scrollbar, .services::-webkit-scrollbar, .projects::-webkit-scrollbar, .stages::-webkit-scrollbar { display: none; }
  .types > *, .services > *, .projects > *, .stages > * { flex: 0 0 80%; scroll-snap-align: start; }
  .scroll-hint { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; font-weight: 700; color: var(--indigo); transition: opacity .4s ease; }
  .scroll-hint.is-hidden { opacity: 0; pointer-events: none; }
  .scroll-hint i { width: 22px; height: 16px; position: relative; }
  .scroll-hint i::before { content: '→'; position: absolute; left: 0; top: -2px; font-size: 17px; animation: swipeHint 1.3s ease-in-out infinite; }
  .types__cta { flex-direction: column; align-items: stretch; }
  .types__form { flex-direction: column; }
  .types__form .field { width: 100%; }
  .case-specs { grid-template-columns: 1fr; }
  .case-form__row { grid-template-columns: 1fr; }
  .header__cta { display: none; }
  .burger { margin-left: auto; }
  .header__inner { gap: 14px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .case-modal, .quiz-modal { padding: 10px; }
  .case-modal__dialog, .quiz-modal__dialog { border-radius: 18px; max-height: 94vh; }
  .case-modal__content { padding: 22px 18px; }
  .quiz-modal__dialog { padding: 22px 18px; }
  .case-modal__media { aspect-ratio: 16 / 10; }
  .case-modal__close { width: 38px; height: 38px; top: 12px; right: 12px; font-size: 22px; }
}

/* Mobile nav drawer */
.nav.is-open {
  display: flex; flex-direction: column; gap: 4px;
  position: fixed; top: 84px; left: 18px; right: 18px; background: #fff;
  padding: 14px 20px 20px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  z-index: 99;
}
.nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  /* показать финальное состояние чертежа без анимации */
  .bp { stroke-dashoffset: 0 !important; }
  .glass, .glass--lit, .lbl, .mockup__dot, .mockup__chip { opacity: 1 !important; }
  .mockup__dot { transform: none !important; }
  .mockup__scan, .mockup__pen { display: none; }
  /* контент, который появляется через анимации — всегда видим без движения */
  .reveal, .type-card, .service, .project, .stage, .team__list li, .faq__item { opacity: 1 !important; transform: none !important; }
}
