/* =========================================================
   прото — стили сайта
   Палитра: зелёный #2E5B4F, акцент #e8a33d, фон #f6f8f7
   ========================================================= */

:root {
  --green: #2E5B4F;
  --green-700: #234840;
  --green-900: #16302a;
  --green-50: #e8f0ed;
  --amber: #e8a33d;
  --amber-600: #d68f26;
  --amber-50: #fcf2e1;
  --bg: #f6f8f7;
  --white: #fff;
  --ink: #15211d;
  --muted: #5a6863;
  --line: #dbe4e0;

  --header-h: 68px;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22, 48, 42, .05), 0 8px 24px rgba(22, 48, 42, .07);
  --shadow-lg: 0 2px 6px rgba(22, 48, 42, .08), 0 30px 70px rgba(22, 48, 42, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* ширина окна браузера в хиро; всё внутри него масштабируется от неё */
  --bw: min(640px, 56vw, calc((100svh - 340px) * 1.6));
  --scene-gap: 40px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
section[id], footer[id] { scroll-margin-top: var(--header-h); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 0;
  font: 600 16px/1 var(--font);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn-amber { background: var(--amber); color: var(--green-900); box-shadow: 0 6px 18px rgba(232, 163, 61, .35); }
.btn-amber:hover { background: #f0b04f; box-shadow: 0 10px 26px rgba(232, 163, 61, .45); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(46, 91, 79, .35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--green); background: rgba(46, 91, 79, .05); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 58px; padding: 0 32px; font-size: 17px; }
.btn:focus-visible, .nav a:focus-visible, .logo:focus-visible, .burger:focus-visible, .case-link:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 3px;
}

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  background: rgba(46, 91, 79, .94);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 6px 20px rgba(22, 48, 42, .12);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }
/* Логотип «прото»: пунктирная рамка выделения с маркерами по углам */
.logo { display: flex; align-items: center; flex: none; color: #fff; --logo-bg: var(--green); }
.logo-svg { width: 117px; height: 44px; overflow: visible; }

/* «прото» внутри слова «прототип» — в стиле логотипа */
.proto-word { white-space: nowrap; } /* не разрывать «прото» и «тип» по строкам */
.proto {
  position: relative; display: inline-block;
  padding: 0 .07em; margin: 0 .1em;
  color: var(--green); font-weight: 700;
  outline: 1.5px dashed var(--amber); outline-offset: 0;
}
.proto::before, .proto::after {
  content: ""; position: absolute; width: .3em; height: .3em;
  border: 1.5px solid var(--amber); background: var(--proto-bg, var(--bg));
}
.proto::before { left: calc(-.15em - .75px); top: calc(-.15em - .75px); }
.proto::after { right: calc(-.15em - .75px); bottom: calc(-.15em - .75px); }
.section-tint .proto { --proto-bg: var(--white); }
.guarantee .proto { --proto-bg: var(--amber-50); }
.site-footer .proto { color: #fff; --proto-bg: var(--green); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; opacity: .85; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.header-cta { flex: none; }
.burger { display: none; }

/* ---------- ХИРО ---------- */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  padding-top: var(--header-h);
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(46, 91, 79, .07), transparent 70%),
    var(--bg);
}
.hero::before { /* «чертёжная» сетка */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(46, 91, 79, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 91, 79, .07) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 55%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 55%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero-inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 36px; padding-top: 20px; padding-bottom: 28px;
}
.hero-head { text-align: center; max-width: 1100px; position: relative; z-index: 3; }
.hero-title { font-size: clamp(30px, 3.4vw, 50px); font-weight: 800; color: var(--green-900); text-wrap: balance; }
.hero-sub { margin: 14px auto 0; max-width: 760px; text-wrap: balance; font-size: clamp(16px, 1.35vw, 19px); color: var(--muted); }
.hero-actions { margin-top: 22px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.scene {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: var(--scene-gap);
}

/* Окно браузера: 640×400 условных единиц, 1em = ширина/40 */
.browser {
  position: relative; flex: none;
  width: var(--bw);
  font-size: calc(var(--bw) / 40);
  background: var(--white);
  border-radius: .9em;
  box-shadow: 0 0 0 1px rgba(46, 91, 79, .16), var(--shadow-lg);
  overflow: hidden;
  will-change: transform;
}
.browser-bar {
  height: 2.5em; display: flex; align-items: center; gap: 1em; padding: 0 1em;
  border-bottom: 1px solid var(--line); background: #fbfcfc;
}
.dots { display: flex; gap: .4em; }
.dots i { width: .62em; height: .62em; border-radius: 50%; background: #e2e8e5; }
.dots i:nth-child(1) { background: #f0796a; }
.dots i:nth-child(2) { background: #f3c14f; }
.dots i:nth-child(3) { background: #5fc27a; }
.url {
  flex: 1; max-width: 22em; margin: 0 auto; height: 1.6em; border-radius: .8em;
  background: #eef2f0; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: .4em;
  font-size: .72em; letter-spacing: .01em;
}
.url svg { width: 1em; height: 1em; }
.browser-view { position: relative; height: 22.5em; }

.wire { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; z-index: 2; }
.wire .wire-line { fill: none; stroke: var(--green); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: .75; }
.wire .wire-label { font: 600 8px/1 ui-monospace, Consolas, monospace; fill: var(--green); opacity: .55; letter-spacing: .04em; }

.ui-el {
  position: absolute;
  left: calc(var(--x) * 1em / 16); top: calc(var(--y) * 1em / 16);
  width: calc(var(--w) * 1em / 16); height: calc(var(--h) * 1em / 16);
}
.ui-header {
  display: flex; align-items: center; gap: 1em; padding: 0 .4em 0 .5em;
  border-radius: .5em; background: var(--white);
}
.ui-logo { display: flex; align-items: center; gap: .4em; font-weight: 700; font-size: .7em; color: var(--ink); }
.ui-logo b { display: grid; place-items: center; width: 2em; height: 2em; border-radius: .5em; background: #2a4f8f; color: #fff; font-size: .7em; }
.ui-nav { display: flex; gap: 1.4em; margin-left: auto; font-size: .56em; color: var(--muted); }
.ui-nav i { font-style: normal; }
.ui-call { font-size: .56em; font-weight: 700; color: #fff; background: #2a4f8f; padding: .55em 1.1em; border-radius: 2em; }
.ui-title { font-size: 1.42em; font-weight: 800; line-height: 1.1; color: #172238; letter-spacing: -.02em;
  left: calc(var(--x) * 1em / 16 / 1.42); top: calc(var(--y) * 1em / 16 / 1.42);
  width: calc(var(--w) * 1em / 16 / 1.42); height: calc(var(--h) * 1em / 16 / 1.42);
  display: flex; align-items: center; }
.ui-sub { font-size: .55em; color: #5b6475; display: flex; align-items: center;
  left: calc(var(--x) * 1em / 16 / .55); top: calc(var(--y) * 1em / 16 / .55);
  width: calc(var(--w) * 1em / 16 / .55); height: calc(var(--h) * 1em / 16 / .55); }
.ui-btn { display: grid; place-items: center; border-radius: 2em; background: #f2a43a; color: #fff;
  font-weight: 700; box-shadow: 0 .3em .8em rgba(242, 164, 58, .35); }
.ui-btn { font-size: .6em;
  left: calc(var(--x) * 1em / 16 / .6); top: calc(var(--y) * 1em / 16 / .6);
  width: calc(var(--w) * 1em / 16 / .6); height: calc(var(--h) * 1em / 16 / .6); }
.ui-visual { border-radius: .65em; background: linear-gradient(140deg, #2a4f8f, #1c3566); overflow: hidden; }
.ui-visual-art { position: absolute; inset: 8% 10% 22%; width: 80%; height: 70%; }
.ui-rating { position: absolute; left: .6em; bottom: .6em; font-size: .5em; font-weight: 600; color: #172238;
  background: #fff; padding: .45em .9em; border-radius: 2em; }
.ui-card {
  border-radius: .62em; background: #fff; box-shadow: 0 0 0 1px #e6e9ef, 0 .3em .9em rgba(23, 34, 56, .06);
  padding: .7em .75em; display: flex; flex-direction: column; gap: .15em;
}
.ui-card-ico { width: 1.6em; height: 1.6em; border-radius: .45em; background: #eaf0fb; color: #2a4f8f; display: grid; place-items: center; margin-bottom: .35em; }
.ui-card-ico svg { width: 1em; height: 1em; }
.ui-card b { font-size: .64em; color: #172238; }
.ui-card span { font-size: .5em; color: #6b7385; }
.ui-card em { margin-top: auto; font-style: normal; font-weight: 700; font-size: .58em; color: #2a4f8f; }

/* Телефон с ботом: высота = высоте окна браузера */
.phone {
  position: relative; flex: none;
  font-size: calc(var(--bw) / 40);
  width: 12.5em; height: 25em;
  padding: .42em; border-radius: 2em;
  background: var(--green-900);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-lg);
  will-change: transform;
}
.phone-screen {
  height: 100%; border-radius: 1.6em; overflow: hidden;
  display: flex; flex-direction: column;
  background: #dfe9e4 radial-gradient(circle at 20% 30%, rgba(255, 255, 255, .5), transparent 40%);
}
.chat-head { display: flex; align-items: center; gap: .45em; padding: 1.1em .7em .55em; background: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .05); }
.chat-back { color: #3a8bd6; font-size: 1.2em; line-height: 1; }
.chat-ava { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: #2a4f8f; color: #fff; font-size: .62em; font-weight: 700; }
.chat-name { display: flex; flex-direction: column; line-height: 1.15; }
.chat-name b { font-size: .64em; }
.chat-name small { font-size: .5em; color: #8b9692; }
.chat-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: .45em; padding: .6em .55em; }
.slot { display: grid; }
.slot > * { grid-area: 1 / 1; }
.msg {
  position: relative; max-width: 88%; padding: .5em .65em .45em;
  font-size: .64em; line-height: 1.32; border-radius: 1.1em;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
}
.msg time { display: block; text-align: right; font-size: .78em; color: #8b9692; margin-top: .15em; }
.msg-bot { align-self: start; justify-self: start; background: #fff; border-bottom-left-radius: .35em; }
.msg-me { align-self: flex-end; background: #d9f5c6; border-bottom-right-radius: .35em; }
.msg-me time { color: #5ca162; }
.typing {
  align-self: end; justify-self: start;
  display: flex; gap: .22em; padding: .55em .7em; border-radius: 1.1em; border-bottom-left-radius: .35em;
  background: #fff; opacity: 0; box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
}
.typing i { width: .38em; height: .38em; border-radius: 50%; background: #9aa7a2; animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-.2em); opacity: 1; } }
.chat-input { display: flex; align-items: center; gap: .4em; margin: 0 .5em .9em; padding: .35em .35em .35em .8em; background: #fff; border-radius: 2em; }
.chat-input span { flex: 1; font-size: .58em; color: #a3aeaa; }
.chat-input i { width: 1.4em; height: 1.4em; border-radius: 50%; background: #3a8bd6; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  opacity: 0; /* показывается только при включённой анимации */
  z-index: 4; pointer-events: none;
}
.mouse { width: 22px; height: 34px; border-radius: 12px; border: 2px solid currentColor; display: flex; justify-content: center; padding-top: 6px; }
.mouse i { width: 3px; height: 7px; border-radius: 2px; background: currentColor; animation: wheel 1.6s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-2px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(8px); } }

/* ---------- Общие секции ---------- */
.section { padding: 110px 0; }
.section-tint { background: var(--white); }
.section-head { max-width: 680px; margin-bottom: 52px; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #9a6212; /* тёмный янтарь: на светлом фоне мелкий текст в #e8a33d нечитаем (контраст < 3:1) */
}
.section-head h2 { font-size: clamp(30px, 3.4vw, 44px); color: var(--green-900); }
.section-head p { margin-top: 14px; font-size: 18px; color: var(--muted); }

/* Услуги */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service {
  position: relative; display: flex; flex-direction: column;
  padding: 30px 28px 28px; border-radius: var(--radius);
  background: var(--white); box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .25s, transform .25s;
}
.service:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(46, 91, 79, .25), var(--shadow); }
.service-featured { background: var(--green); color: #fff; box-shadow: none; }
.service-featured:hover { box-shadow: var(--shadow-lg); }
.service-badge {
  position: absolute; top: 22px; right: 22px;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: var(--amber); color: var(--green-900);
}
.service-ico {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  background: var(--green-50); color: var(--green); margin-bottom: 22px;
}
.service-featured .service-ico { background: rgba(255, 255, 255, .12); color: var(--amber); }
.service-ico svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service h3 { font-size: 21px; margin-bottom: 10px; }
.service p { color: var(--muted); font-size: 16px; margin-bottom: 22px; }
.service-featured p { color: rgba(255, 255, 255, .78); }
.price { margin-top: auto; font-weight: 800; font-size: 20px; color: var(--green); }
.service-featured .price { color: var(--amber); }
.services-note { margin-top: 24px; font-size: 16px; color: var(--muted); }

/* Как это работает */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 27px; left: 12%; right: 12%; height: 0;
  border-top: 2px dashed rgba(46, 91, 79, .25);
}
.step { position: relative; text-align: center; padding: 0 8px; }
.step-num {
  position: relative; display: grid; place-items: center; margin: 0 auto 20px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--white); color: var(--green); font-size: 22px; font-weight: 800;
  box-shadow: 0 0 0 2px var(--green), 0 0 0 9px var(--white);
}
.step:nth-child(2) .step-num { background: var(--amber); color: var(--green-900); box-shadow: 0 0 0 2px var(--amber), 0 0 0 9px var(--white); }
.step h3 { font-size: 20px; margin-bottom: 8px; color: var(--green-900); }
.step p { color: var(--muted); font-size: 16px; }
.step strong { color: var(--ink); }
.guarantee {
  margin-top: 56px; display: flex; align-items: center; gap: 18px;
  padding: 24px 30px; border-radius: var(--radius);
  background: var(--amber-50); box-shadow: inset 0 0 0 1.5px rgba(232, 163, 61, .55);
}
.guarantee-ico { width: 40px; height: 40px; flex: none; color: var(--amber-600); }
.guarantee p { font-size: 20px; color: var(--green-900); }

/* Частые вопросы */
.faq { display: grid; gap: 12px; max-width: 820px; }
.faq-item { border-radius: 14px; background: var(--white); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.faq-item[open] { box-shadow: 0 0 0 1px rgba(46, 91, 79, .3), var(--shadow); }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; font-size: 19px; font-weight: 700; color: var(--green-900);
  --proto-bg: var(--white);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { /* плюс, который поворачивается в крестик */
  content: "+"; flex: none; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--green-50); color: var(--green); font-size: 22px; font-weight: 500; line-height: 1;
  transition: transform .25s, background-color .25s;
}
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--amber); color: var(--green-900); }
.faq-item summary:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 14px; }
.faq-item p { padding: 0 24px 22px; color: var(--muted); font-size: 17px; max-width: 680px; --proto-bg: var(--white); }

/* Кейсы */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.case {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius); background: var(--white); box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow .25s, transform .25s;
}
.case:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(46, 91, 79, .25), var(--shadow); }
.case-cover {
  position: relative; height: 200px; overflow: hidden;
  background: var(--c1, var(--green));
  background-image: linear-gradient(135deg, var(--c1, var(--green)), var(--c2, var(--green-900)));
}
.case-cover::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.case-mock { /* мини-окно браузера на обложке */
  position: absolute; left: 32px; right: 32px; top: 40px; bottom: -20px;
  border-radius: 12px 12px 0 0; background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .2); padding: 34px 22px 0;
}
.case-mock::before { /* точки окна */
  content: ""; position: absolute; top: 13px; left: 14px; width: 8px; height: 8px; border-radius: 50%;
  background: #f0796a; box-shadow: 13px 0 0 #f3c14f, 26px 0 0 #5fc27a;
}
.case-mock b { display: block; font-size: 22px; color: var(--green-900); letter-spacing: -.02em; }
.case-mock i { display: block; height: 8px; border-radius: 4px; background: #e4eae7; margin-top: 12px; width: 70%; }
.case-mock i + i { width: 45%; margin-top: 8px; }
.case-mock u { display: inline-block; margin-top: 16px; width: 92px; height: 24px; border-radius: 12px; background: var(--c1, var(--amber)); }
.case-shot { /* окно браузера со скриншотом настоящего сайта */
  position: absolute; left: 28px; right: 28px; top: 26px; bottom: -14px;
  border-radius: 10px 10px 0 0; overflow: hidden; background: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, .25);
  padding-top: 22px;
  transition: transform .35s ease;
}
.case-shot::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 22px; background: #eef1f0;
}
.case-shot::after {
  content: ""; position: absolute; top: 8px; left: 12px; width: 7px; height: 7px; border-radius: 50%;
  background: #f0796a; box-shadow: 11px 0 0 #f3c14f, 22px 0 0 #5fc27a;
}
.case-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.case:hover .case-shot { transform: translateY(-4px); }
.case-body { display: flex; flex-direction: column; gap: 10px; padding: 26px 28px 28px; flex: 1; }
.case-tag { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--green-50); color: var(--green); }
.case h3 { font-size: 24px; color: var(--green-900); }
.case p { color: var(--muted); font-size: 16px; }
.case-link {
  margin-top: auto; padding-top: 10px;
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-weight: 700; color: var(--green); text-decoration: none;
}
.case-link .ico { width: 18px; height: 18px; transition: transform .2s; }
.case-link:hover .ico { transform: translateX(4px); }
.case-link.is-soon { color: var(--muted); font-weight: 600; }
.cases-empty { color: var(--muted); }

/* Футер */
.site-footer { background: var(--green); color: #fff; padding: 100px 0 36px; }
.footer-cta {
  display: grid; grid-template-columns: 1fr minmax(0, 480px); gap: 64px; align-items: center;
}
.footer-cta-text h2 { font-size: clamp(32px, 3.8vw, 48px); }
.footer-cta-text p { margin: 16px 0 30px; color: rgba(255, 255, 255, .78); font-size: 18px; max-width: 520px; }
.footer-cta-text .footer-cta-or { margin: 28px 0 0; font-size: 16px; color: rgba(255, 255, 255, .62); }

/* ---------- Форма заявки ---------- */
.lead {
  position: relative; padding: 32px 30px;
  border-radius: 24px; background: var(--white); color: var(--ink);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .22);
}
.lead-form { display: grid; gap: 18px; transition: opacity .35s, transform .35s, filter .35s; }
.lead-title { font-size: 24px; color: var(--green-900); }
.field { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--green-900); padding: 0; }
.field-label em { font-style: normal; font-weight: 400; color: var(--muted); }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg);
  font: 16px/1.4 var(--font); color: var(--ink);
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
textarea.input { resize: vertical; min-height: 88px; }
.input::placeholder { color: #9aa7a2; }
.input:focus { outline: none; border-color: var(--green); background: var(--white); box-shadow: 0 0 0 4px rgba(46, 91, 79, .12); }
.field.has-error .input { border-color: #d0533f; background: #fdf3f1; }
.field-error { min-height: 0; font-size: 13px; color: #b5402c; }
.field-error:empty { display: none; }

/* Способ связи — кнопки-переключатели */
.methods-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.methods-row label { position: relative; }
.methods-row input { position: absolute; opacity: 0; pointer-events: none; }
.methods-row span {
  display: grid; place-items: center; min-height: 44px; padding: 0 6px;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg);
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s, transform .15s;
}
.methods-row span:hover { border-color: rgba(46, 91, 79, .4); color: var(--green); }
.methods-row input:checked + span { border-color: var(--green); background: var(--green); color: #fff; }
.methods-row input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.methods-row label:active span { transform: scale(.97); }

/* Поле контакта с зафиксированным +7 */
.contact-box { position: relative; display: block; }
.contact-prefix {
  position: absolute; left: 1px; top: 1px; bottom: 1px; width: 52px;
  display: grid; place-items: center; border-right: 1.5px solid var(--line);
  border-radius: 11px 0 0 11px; background: #eef2f0;
  font-weight: 700; color: var(--green-900); pointer-events: none;
}
.contact-box.has-prefix .input { padding-left: 64px; letter-spacing: .02em; }
.contact-box:not(.has-prefix) .contact-prefix { display: none; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); cursor: pointer; }
.consent a { color: var(--green); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.lead-submit { position: relative; width: 100%; margin-top: 4px; }
.lead-submit:disabled { background: #e7ece9; color: #8d9a95; box-shadow: none; cursor: not-allowed; transform: none; }
.lead-hint { font-size: 13px; color: var(--muted); text-align: center; margin-top: -8px; }
.lead-submit:not(:disabled) ~ .lead-hint { display: none; }
.lead-spinner {
  position: absolute; left: 50%; top: 50%; width: 24px; height: 24px; margin: -12px 0 0 -12px;
  border-radius: 50%; border: 3px solid rgba(22, 48, 42, .25); border-top-color: var(--green-900);
  opacity: 0; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.is-sending .lead-submit { pointer-events: none; }
.is-sending .lead-submit-text { opacity: 0; }
.is-sending .lead-spinner { opacity: 1; }
.lead-error { font-size: 14px; color: #b5402c; text-align: center; }
.lead-error:empty { display: none; }
.lead-error a { color: inherit; font-weight: 700; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Анимация «заявка улетела» */
.lead-flight {
  position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none; opacity: 0;
}
.lead-flight .trail { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: 7 7; stroke-linecap: round; }
.lead-flight .trail-draw { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.lead.is-flying .lead-flight { opacity: 1; }
.lead.is-flying .trail-draw { animation: trail-draw 1.15s cubic-bezier(.45, 0, .25, 1) forwards; }
@keyframes trail-draw { to { stroke-dashoffset: 0; } }
.lead.is-flying .lead-form,
.lead.is-sent .lead-form { opacity: 0; transform: scale(.96); filter: blur(2px); pointer-events: none; }
.lead.is-sent .lead-flight { opacity: 0; transition: opacity .5s .2s; }

.lead-success {
  position: absolute; inset: 0; padding: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .45s, transform .45s, visibility .45s;
}
.lead.is-sent .lead-success { opacity: 1; visibility: visible; transform: none; }
.success-check { width: 84px; height: 84px; margin-bottom: 6px; }
.success-check circle { fill: var(--green); transform-origin: center; transform: scale(.6); transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.success-check path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .45s .3s ease-out; }
.lead.is-sent .success-check circle { transform: scale(1); }
.lead.is-sent .success-check path { stroke-dashoffset: 0; }
.lead-success h3 { font-size: 26px; color: var(--green-900); }
.lead-success p { color: var(--muted); max-width: 300px; }
.btn-ghost-light { margin-top: 10px; min-height: 44px; padding: 0 20px; font-size: 15px; background: transparent; color: var(--green); box-shadow: inset 0 0 0 1.5px rgba(46, 91, 79, .3); }
.btn-ghost-light:hover { box-shadow: inset 0 0 0 1.5px var(--green); }

@media (max-width: 920px) {
  .footer-cta { grid-template-columns: 1fr; gap: 40px; }
  .lead { max-width: 560px; }
}
.footer-bottom {
  margin-top: 80px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 15px;
}
.footer-contacts { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-contacts a { font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .3); }
.footer-contacts a:hover { border-color: var(--amber); }
.footer-copy { color: rgba(255, 255, 255, .62); }
.footer-copy a { color: inherit; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 24px 20px;
    background: var(--green); box-shadow: 0 14px 30px rgba(22, 48, 42, .25);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .menu-open .nav { visibility: visible; opacity: 1; transform: none; }
  .header-cta { margin-left: auto; }
  .burger {
    display: grid; place-content: center; gap: 6px; flex: none;
    width: 42px; height: 42px; border: 0; border-radius: 12px; cursor: pointer;
    background: rgba(255, 255, 255, .1);
  }
  .burger span { display: block; width: 18px; height: 2px; border-radius: 1px; background: #fff; transition: transform .2s; }
  .menu-open .burger span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .burger span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .steps::before { display: none; }
}

/* Невысокие широкие экраны (ноутбук с лупой, телефон боком): хиро без пина, статично */
@media (min-width: 768px) and (max-height: 599px) {
  :root { --bw: min(560px, 52vw); }
  .hero { height: auto; padding-bottom: 40px; }
  .hero-inner { padding-top: 36px; }
}

@media (max-width: 767px) {
  :root {
    --header-h: 60px;
    --bw: min(calc(100vw - 32px), 460px);
    --pf: calc(min(100vw, 480px) / 30); /* 1em телефона */
  }
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .header-inner { gap: 12px; }
  .logo-svg { width: 90px; height: 34px; }
  .header-cta { padding: 0 14px; min-height: 40px; }
  .header-cta span { display: none; }
  .header-cta .ico { width: 22px; height: 22px; }

  .hero-inner { gap: 22px; padding-top: 16px; padding-bottom: 16px; justify-content: center; }
  .hero-title { font-size: clamp(25px, 7vw, 32px); }
  .hero-sub { font-size: 15px; margin-top: 10px; }
  .hero-actions { margin-top: 16px; }
  .hero-actions .btn { min-height: 48px; padding: 0 22px; font-size: 15px; }
  .hero-actions .btn-ghost { display: none; }

  .scene {
    display: block; width: var(--bw);
    /* место под телефон, который выступает ниже окна браузера */
    padding-bottom: calc(var(--pf) * 19 + var(--bw) / 1.6 * .3 - var(--bw) / 1.6);
  }
  .phone {
    position: absolute; right: -6px; top: calc(var(--bw) / 1.6 * .3);
    font-size: var(--pf); width: 13.5em; height: 19em; border-radius: 1.8em; padding: .38em;
  }
  .phone-screen { border-radius: 1.45em; }
  .chat-head { padding: .75em .6em .45em; }
  .chat-input { margin-bottom: .6em; }
  .msg { font-size: .66em; }
  .scroll-hint { bottom: 14px; font-size: 12px; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head p { font-size: 16px; }
  .services, .cases { grid-template-columns: 1fr; gap: 16px; }
  .service { padding: 26px 22px 24px; }
  .steps { grid-template-columns: 1fr; row-gap: 28px; }
  .step { text-align: left; display: grid; grid-template-columns: 56px 1fr; column-gap: 18px; padding: 0; }
  .step-num { margin: 0; grid-row: span 2; }
  .step h3 { align-self: end; margin-bottom: 4px; }
  .guarantee { margin-top: 40px; padding: 20px; align-items: flex-start; }
  .guarantee p { font-size: 17px; }
  .case-cover { height: 170px; }
  .case-body { padding: 22px; }
  .faq-item summary { padding: 18px 18px; font-size: 17px; }
  .faq-item p { padding: 0 18px 20px; font-size: 16px; }
  .site-footer { padding: 72px 0 28px; }
  .footer-cta { gap: 36px; }
  .footer-cta-text .btn { width: 100%; }
  .lead { padding: 24px 18px; border-radius: 20px; }
  .methods-row { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { margin-top: 56px; flex-direction: column; align-items: flex-start; }
}

/* Совсем невысокие телефоны: убираем подзаголовок в хиро, чтобы всё влезло */
@media (max-width: 767px) and (max-height: 700px) {
  .hero-sub { display: none; }
}

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