/* SOLO STUDIO — палитра: тёмно-синий (navy), светлый беж, чернила и один красный акцент */
:root {
  --black: #0b0b0b;
  --navy: #07142a;      /* основной тёмный фон: первый экран, услуги, процесс, финал */
  --navy-2: #0e2142;    /* приподнятый тёмный: наведение, карточки на синем */
  --white: #f2f0eb;
  --ink: #1a1008;
  --mute: #8a8780;
  --line-d: rgba(242, 240, 235, .14);
  --line-l: rgba(26, 16, 8, .14);
  --red: #e63a2e;
  --display: "Geologica", "Golos Text", system-ui, sans-serif;
  --sans: "Golos Text", system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.smooth { scroll-behavior: smooth; }
/* ?shot — режим для скриншотов: первый экран фиксированной высоты, всё сразу видно */
.shot .hero, .shot .hero-in { min-height: 900px; }
.shot .rv { opacity: 1; transform: none; transition: none; }
.shot .hero-h .ln, .shot .marquee-in { animation: none; }
body { background: var(--navy); color: var(--white); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ol, ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--red); color: #fff; padding: 8px 14px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { padding-inline: var(--pad); max-width: 1680px; margin-inline: auto; }
.cap, .eyebrow { font: 500 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.eyebrow { display: flex; gap: 10px; color: var(--mute); }
.eyebrow span:first-child { color: var(--red); }
.big { font: 800 clamp(34px, 5.2vw, 88px)/.95 var(--display); letter-spacing: -.045em; text-transform: uppercase; max-width: 15ch; }
.sec { padding: clamp(80px, 11vw, 180px) 0; }
.light { background: var(--white); color: var(--ink); }
.light .eyebrow { color: #6f6b63; }
.dark { background: var(--navy); color: var(--white); }
.sec-head { display: grid; gap: 22px; margin-bottom: clamp(40px, 6vw, 88px); }

/* кнопка */
.btn {
  display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 10px 0 26px;
  border-radius: 999px; background: var(--red); color: #fff; font: 600 14px/1 var(--sans); letter-spacing: .02em;
  transition: background .35s var(--ease);
}
.btn i { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--red); display: grid; place-items: center; font-style: normal; transition: transform .5s var(--ease); }
.btn:hover { background: #c92c21; }
.btn:hover i { transform: rotate(45deg); }
.link { display: inline-flex; gap: 10px; align-items: center; font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding-bottom: 6px; border-bottom: 1px solid currentColor; }
.link i { font-style: normal; transition: transform .4s var(--ease); }
.link:hover { color: var(--red); }
.link:hover i { transform: translate(3px, -3px); }
.more { margin-top: clamp(40px, 5vw, 64px); }

/* шапка */
.hdr {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 32px;
  padding: 22px var(--pad); color: var(--white); transition: background .4s, padding .4s;
}
.hdr.solid { background: rgba(7, 20, 42, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 14px; }
.hdr-logo { font: 900 18px/1 var(--display); letter-spacing: -.02em; display: flex; align-items: center; gap: 6px; }
.hdr-logo i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.hdr-nav { display: flex; gap: 28px; margin-left: auto; }
.hdr-nav a, .lang button { font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .75; transition: opacity .3s; }
.hdr-nav a:hover, .lang button[aria-pressed="true"], .lang button:hover { opacity: 1; }
.lang { display: flex; gap: 10px; }
.lang button[aria-pressed="true"] { color: var(--red); }

/* 1. первый экран */
.hero { position: relative; min-height: 100svh; overflow: hidden; background: var(--navy); }
.hero-photo { position: absolute; top: 0; bottom: 0; right: 0; width: 52%; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 40% 25%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0%, rgba(7,20,42,.7) 22%, rgba(7,20,42,.2) 50%, transparent 70%), linear-gradient(0deg, rgba(7,20,42,.9) 0%, transparent 32%); }
.hero-in { position: relative; z-index: 2; min-height: 100svh; display: flex; flex-direction: column; padding: 140px var(--pad) 48px; }
.tag { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(242,240,235,.8); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(230,58,46,.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(230,58,46,0); } 100% { box-shadow: 0 0 0 0 rgba(230,58,46,0); } }
.hero-h { margin-top: auto; padding-top: 48px; font: 900 clamp(64px, 15.5vw, 260px)/.82 var(--display); letter-spacing: -.06em; text-transform: uppercase; }
.hero-h .ln { display: block; animation: rise 1.2s var(--ease) both; }
.hero-h .ln:nth-child(2) { animation-delay: .1s; }
.hero-h .ln-sm { font-size: .3em; letter-spacing: -.03em; line-height: 1; margin-top: .25em; color: var(--red); animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(40%); } }
.hero-foot { display: grid; grid-template-columns: minmax(0, 36ch) auto auto; align-items: end; gap: 32px; margin-top: clamp(28px, 4vw, 56px); padding-top: 24px; border-top: 1px solid var(--line-d); }
.hero-lead { font-size: 17px; color: rgba(242,240,235,.85); }
.hero-foot .cap { color: var(--mute); justify-self: end; }
.hero-foot .btn { justify-self: end; }


/* 2. манифест */
.manifesto { padding-bottom: clamp(40px, 6vw, 96px); }
.mani { margin-top: 28px; font: 600 clamp(28px, 3.9vw, 64px)/1.12 var(--display); letter-spacing: -.035em; max-width: 26ch; }

/* 3. работы — индекс */
#work { position: relative; padding-top: clamp(40px, 6vw, 96px); }
.idx { border-top: 1px solid var(--line-l); }
.idx li { border-bottom: 1px solid var(--line-l); }
.idx a { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto 70px; align-items: center; gap: 24px; padding: clamp(20px, 2.6vw, 36px) 0; transition: color .3s, padding .5s var(--ease); }
.idx .n, .idx .g, .idx .y { font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #6f6b63; }
.idx .y { text-align: right; }
.idx .t { font: 800 clamp(30px, 5vw, 84px)/1 var(--display); letter-spacing: -.05em; text-transform: uppercase; transition: transform .6s var(--ease); }
.idx img { display: none; }
.idx a:hover { color: var(--red); }
.idx a:hover .t { transform: translateX(18px); }
.peek { position: fixed; left: 0; top: 0; z-index: 40; width: 380px; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; scale: .7; transition: opacity .35s var(--ease), scale .5s var(--ease); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.peek.on { opacity: 1; scale: 1; }
.peek img { width: 100%; height: 100%; object-fit: cover; }

/* 4. услуги */
.svc { border-top: 1px solid var(--line-d); }
#services .sec-head .big { font-size: clamp(32px, 4vw, 64px); max-width: 22ch; }
.svc li { display: grid; grid-template-columns: 60px minmax(0, 1.1fr) minmax(0, 1fr) 240px; gap: 24px; align-items: baseline; padding: clamp(24px, 3vw, 40px) 0; border-bottom: 1px solid var(--line-d); }
.svc .n { font: 500 12px/1 var(--sans); letter-spacing: .16em; color: var(--red); }
.svc h3 { font: 800 clamp(26px, 3.4vw, 56px)/1 var(--display); letter-spacing: -.045em; text-transform: uppercase; }
.svc p { color: rgba(242,240,235,.7); max-width: 34ch; }
.svc .m { display: grid; justify-items: end; gap: 8px; font: 500 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
.svc .m b { font: 800 clamp(20px, 2vw, 30px)/1 var(--display); letter-spacing: -.03em; text-transform: none; color: var(--white); }
.note { margin-top: 28px; color: var(--mute); max-width: 60ch; }

/* 5. процесс */
.proc { margin-top: clamp(100px, 13vw, 200px); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-d); border-left: 1px solid var(--line-d); }
.steps li { padding: clamp(24px, 3vw, 44px); border-right: 1px solid var(--line-d); border-bottom: 1px solid var(--line-d); min-height: 260px; transition: background .4s; }
.steps li:hover { background: var(--navy-2); }
.steps .n { font: 900 clamp(48px, 5vw, 80px)/1 var(--display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(242,240,235,.35); transition: -webkit-text-stroke-color .4s, color .4s; }
.steps li:hover .n { color: var(--red); -webkit-text-stroke-color: var(--red); }
.steps h3 { margin-top: 48px; font: 800 26px/1.05 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.steps p { margin-top: 10px; color: rgba(242,240,235,.7); }

/* 6. с кем работаю */
.who { padding-bottom: 0; }
.who-list { margin-top: 32px; border-top: 1px solid var(--line-l); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.who-list li { padding: 36px 28px 36px 0; border-bottom: 1px solid var(--line-l); }
.who-list li + li { padding-left: 28px; border-left: 1px solid var(--line-l); }
.who-list h3 { font: 800 clamp(26px, 3vw, 48px)/1 var(--display); letter-spacing: -.045em; text-transform: uppercase; }
.who-list p { margin-top: 12px; color: #5c5648; }

/* 7. обо мне */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--pad); }
.about-role { margin-top: 18px; color: var(--ink); }
.about-photo { margin-top: 36px; max-width: 420px; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: #e6e3dc; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.about-p { font: 600 clamp(22px, 2.3vw, 36px)/1.25 var(--display); letter-spacing: -.025em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 5vw, 72px); padding-top: 28px; border-top: 1px solid var(--line-l); }
.stats dt { font: 900 clamp(36px, 4.6vw, 76px)/1 var(--display); letter-spacing: -.055em; }
.stats div:first-child dt { color: var(--red); }
.stats div:last-child dt { font-size: clamp(26px, 2.8vw, 46px); line-height: 1.6; letter-spacing: -.04em; }
.stats dd { margin-top: 10px; font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #6f6b63; }
.quote { margin-top: clamp(40px, 5vw, 72px); padding-left: 24px; border-left: 3px solid var(--red); }
.quote p { font: 600 20px/1.4 var(--display); letter-spacing: -.02em; }
.quote cite { display: block; margin-top: 10px; font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; font-style: normal; color: #6f6b63; }

/* 8. FAQ */
.faq { padding-top: 0; }
.faq .wrap { padding-top: clamp(80px, 10vw, 160px); border-top: 1px solid var(--line-l); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--pad); }
.faq-grid .big { margin-top: 22px; font-size: clamp(32px, 3.6vw, 60px); }
.faq-list details { border-bottom: 1px solid var(--line-l); }
.faq-list details:first-child { border-top: 1px solid var(--line-l); }
.faq-list summary { list-style: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 36px; align-items: center; gap: 12px; padding: 24px 0; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list .n { font: 500 12px/1 var(--sans); letter-spacing: .14em; color: var(--red); }
.faq-list .q { font: 600 clamp(18px, 1.6vw, 24px)/1.25 var(--display); letter-spacing: -.02em; }
.faq-list summary i { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-l); transition: background .3s, transform .4s var(--ease); }
.faq-list summary i::before, .faq-list summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; background: currentColor; }
.faq-list summary i::after { transform: rotate(90deg); transition: transform .4s var(--ease); }
.faq-list details[open] summary i { background: var(--ink); color: var(--white); border-color: var(--ink); }
.faq-list details[open] summary i::after { transform: none; }
.faq-list details p { padding: 0 48px 26px 56px; color: #5c5648; max-width: 62ch; }

/* 9. финал */
.final { position: relative; overflow: hidden; background: var(--navy); padding-top: clamp(100px, 12vw, 200px); }
.final-h { margin-top: 28px; font: 900 clamp(48px, 9.4vw, 170px)/.88 var(--display); letter-spacing: -.06em; text-transform: uppercase; }
.final-h .red { color: var(--red); }
.final-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 32px; margin-top: clamp(40px, 5vw, 72px); }
.final-row p { max-width: 44ch; font-size: 18px; color: rgba(242,240,235,.8); }
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(48px, 6vw, 88px); }
.socials a { display: inline-flex; gap: 10px; align-items: center; height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--line-d); font: 500 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; transition: background .3s, color .3s, border-color .3s; }
.socials a i { font-style: normal; }
.socials a:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

/* Форма заявки: поля-линии с подписью, которая уезжает вверх при вводе */
.final-row { align-items: start; }
.lead { flex: 1 1 460px; max-width: 620px; display: grid; gap: 26px; }
.lead .fld { position: relative; }
.lead input:not([type=radio]), .lead textarea { width: 100%; padding: 26px 0 12px; background: none; border: 0; border-bottom: 1px solid var(--line-d); color: var(--white); font: 400 19px/1.4 var(--sans); outline: none; resize: none; border-radius: 0; transition: border-color .3s; }
.lead textarea { min-height: 76px; field-sizing: content; }
.lead .fld label { position: absolute; left: 0; top: 26px; font: 400 19px/1.4 var(--sans); color: rgba(242,240,235,.5); pointer-events: none; transform-origin: 0 0; transition: transform .4s var(--ease), color .3s; }
.lead .fld :focus + label, .lead .fld :not(:placeholder-shown) + label { transform: translateY(-24px) scale(.68); color: rgba(242,240,235,.75); }
.lead .fld::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform .6s var(--ease); }
.lead .fld:has(:focus)::after { transform: scaleX(1); }
.lead [aria-invalid=true] { border-bottom-color: var(--red); }
.lead .mute { opacity: .6; }
.lead .err { display: none; margin-top: 8px; font-size: 14px; color: #ff7a6e; }
.lead .err.show { display: block; }
.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips legend { padding: 0; margin-bottom: 14px; font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(242,240,235,.55); }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-d); font-size: 15px; transition: background .3s, color .3s, border-color .3s; }
.chips label:hover span { border-color: rgba(242,240,235,.5); }
.chips input:checked + span { background: var(--white); color: var(--navy); border-color: var(--white); }
.chips input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 3px; }
.lead .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.lead .btn[disabled] { opacity: .6; cursor: wait; }
.lead .done { display: none; font: 700 clamp(22px, 2.4vw, 30px)/1.25 var(--display); letter-spacing: -.02em; }
.lead.sent > :not(.done) { display: none; }
.lead.sent .done { display: block; animation: doneIn .8s var(--ease) both; }
@keyframes doneIn { from { opacity: 0; translate: 0 20px; } }
.giant { margin-top: clamp(60px, 8vw, 120px); font: 900 14.2vw/.78 var(--display); overflow: hidden; letter-spacing: -.07em; text-align: center; white-space: nowrap; color: #0d1d3a; user-select: none; }
.foot { display: flex; gap: 28px; flex-wrap: wrap; padding-block: 28px 36px; font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.foot span { margin-right: auto; }
.foot a:hover { color: var(--white); }

/* появление */
.rv { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* планшет и телефон */
@media (max-width: 900px) {
  .hdr-nav { display: none; }
  .lang { margin-left: auto; }
  .hero-photo { top: 96px; width: 100%; height: 66%; bottom: auto; }
  .hero-photo::after { background: linear-gradient(0deg, var(--navy) 0%, rgba(7,20,42,.5) 40%, rgba(7,20,42,.25) 85%, var(--navy) 100%); }
  .hero-in { padding-top: 76px; }
  .hero-h { font-size: clamp(56px, 18vw, 130px); }
  .hero-foot { grid-template-columns: 1fr; gap: 18px; }
  .hero-foot .cap, .hero-foot .btn { justify-self: start; }
  .idx a { grid-template-columns: 36px minmax(0, 1fr); row-gap: 14px; }
  .idx .g { grid-column: 2; }
  .idx .y { display: none; }
  .idx img { display: block; grid-column: 1 / -1; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
  .idx a:hover .t { transform: none; }
  .peek { display: none; }
  .svc li { grid-template-columns: 36px minmax(0, 1fr); row-gap: 12px; }
  .svc p, .svc .m { grid-column: 2; }
  .svc .m { justify-items: start; }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
  .who-list { grid-template-columns: 1fr; }
  .who-list li + li { padding-left: 0; border-left: 0; }
  .about-grid, .faq-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .faq-list details p { padding: 0 0 24px 56px; }
}
/* ---------- Первый экран: замирает, справа выезжает красная панель ---------- */
.slide { display: none; }
/* .pin = закреплённый первый экран + пустое место для скролла панели + манифест, который заезжает сверху.
   --p: панель въехала (0→1), --o: панель уехала вверх (0→1). Значения ставит js/main.js. */
.pin { position: relative; }
.pin-space { display: none; }
.fx .pin-space { display: block; height: 320vh; }
.fx .pin-stick { position: sticky; top: 0; height: 100svh; overflow: hidden; z-index: 0; }
/* Манифест без фона: белый текст едет поверх закреплённого фото; текст первого экрана при этом гаснет (--m) */
/* Фото держится, пока текст 01 не доедет до середины экрана (это даёт невидимый хвост .pin-tail),
   а блок «Роботи» идёт сразу за текстом — он заезжает на хвост отрицательным отступом. --tail считает js/main.js. */
.fx .pin .manifesto { position: relative; z-index: 1; background: transparent; color: var(--white); padding-bottom: clamp(56px, 7vw, 110px); }
.pin-tail { display: none; }
.fx .pin-tail { display: block; height: calc(var(--tail, 0) * 1px); }
.fx .pin + #work { position: relative; z-index: 2; margin-top: calc(var(--tail, 0) * -1px); }
.fx .pin .manifesto .wrap { width: 100%; }
.fx .pin .manifesto .eyebrow { color: rgba(242,240,235,.7); }
.fx .pin .manifesto .mani { text-shadow: 0 2px 30px rgba(0,0,0,.35); }
/* проявление по словам: --w от 0 до 1 на каждом слове ставит js/main.js */
.mani.split .w { display: inline-block; opacity: calc(.08 + var(--w, 0) * .92); filter: blur(calc((1 - var(--w, 0)) * 10px));
  transform: translateY(calc((1 - var(--w, 0)) * .45em)) rotate(calc((1 - var(--w, 0)) * 4deg)); transform-origin: 0 100%; }
.mani.split .w:nth-child(4n+2), .mani.split .w:nth-child(4n+3) { color: color-mix(in srgb, var(--red) calc((1 - var(--w, 0)) * 100%), currentColor); }
/* текст первого экрана уезжает вверх и гаснет уже наверху */
.fx .hero-in { transform: translate(calc((var(--p, 0) - var(--o, 0)) * -14%), calc(var(--up, 0) * -1px)); opacity: calc(1.25 - var(--m, 0) * 1.6); }
.fx .hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--navy); opacity: calc(var(--m, 0) * .55); pointer-events: none; }
.fx .slide { display: block; position: absolute; inset: 0; z-index: 5; overflow: hidden; background: var(--red); color: #fff;
  transform: translate(calc((1 - var(--p, 0)) * 100%), calc(var(--o, 0) * -100%)); box-shadow: 0 0 80px rgba(0,0,0, calc(.4 * var(--p, 0) * (1 - var(--o, 0)))); }
.slide-in { height: 100%; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; column-gap: var(--pad); padding: 120px var(--pad) 48px; }
.slide .tag { color: rgba(255,255,255,.85); }
.slide-h { grid-row: 2; align-self: center; display: flex; flex-direction: column; font: 900 clamp(56px, 7.8vw, 150px)/.86 var(--display); letter-spacing: -.06em; text-transform: uppercase; }
.slide-h span { display: block; transform: translateX(calc((1 - var(--p, 0)) * var(--k, 1) * 22vw)); }
/* уезжая вверх, содержимое панели чуть отстаёт — получается глубина */
.fx .slide-in { transform: translateY(calc(var(--o, 0) * 28%)); }
.slide-h span:nth-child(2) { --k: 1.7; padding-left: 1.1em; }
.slide-h span:nth-child(3) { --k: 2.4; }
.slide-foot { grid-row: 3; display: flex; align-items: end; justify-content: space-between; gap: 32px; }
.slide-foot p { max-width: 38ch; font-size: 17px; color: rgba(255,255,255,.9); }
.slide-img { grid-column: 2; grid-row: 1 / 4; align-self: center; justify-self: end; position: relative; width: min(100%, 500px); aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.slide-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.25 - var(--p, 0) * .25)); }
.slide-img figcaption { position: absolute; left: 20px; bottom: 18px; font: 800 20px/1.1 var(--display); letter-spacing: -.02em; text-transform: uppercase; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.5); }
.slide-img figcaption span { display: block; margin-top: 6px; font: 500 11px/1 var(--sans); letter-spacing: .16em; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light i { background: var(--red); color: #fff; }
.btn-light:hover { background: var(--white); }

/* ---------- Крупная фраза ложится на следующий блок ---------- */
.statement { position: relative; height: 140vh; margin-bottom: -70vh; pointer-events: none; }
.statement-bg { position: absolute; left: 0; right: 0; top: 0; height: 70vh; background: var(--white); }
.statement-t { position: sticky; top: calc(50vh - 0.86em); display: flex; flex-direction: column; padding-inline: var(--pad);
  font: 900 clamp(56px, 12.5vw, 220px)/.86 var(--display); letter-spacing: -.06em; text-transform: uppercase; white-space: nowrap; }
.st-a { color: var(--ink); transform: translateX(calc(var(--q, .5) * -12vw + 6vw)); }
.st-b { align-self: flex-end; color: var(--red); transform: translateX(calc(var(--q, .5) * 12vw - 6vw)); }
/* верх слова — тёмный (на светлом фоне), ниже границы с тёмным блоком — белый; --edge считает js/main.js */
.fx .st-a { color: transparent; background: linear-gradient(180deg, var(--ink) calc(var(--edge, 9999) * 1px), var(--white) calc(var(--edge, 9999) * 1px)); -webkit-background-clip: text; background-clip: text; padding-top: .14em; margin-top: -.14em; }
.statement + .sec { padding-top: calc(70vh + 40px); }
main { overflow-x: clip; }
.shot .statement { height: auto; margin: 0; background: var(--white); padding: 80px 0; }
.shot .statement-bg { display: none; }
.shot .statement-t { position: static; }
.shot .statement + .sec { padding-top: clamp(80px, 11vw, 180px); }

@media (max-width: 900px) {
  .slide-in { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; row-gap: 22px; padding-top: 92px; }
  .slide-h { grid-row: 2; font-size: clamp(44px, 14.5vw, 110px); }
  .slide-foot { grid-row: 3; flex-direction: column; align-items: flex-start; gap: 18px; }
  .slide-img { grid-column: 1; grid-row: 4; justify-self: stretch; width: 100%; aspect-ratio: auto; min-height: 0; height: 100%; max-height: 34svh; align-self: start; }
  .statement-t { font-size: clamp(48px, 15vw, 120px); }
}

/* ---------- Страница кейса (js/case.js) ---------- */
.c-hero { padding-top: clamp(110px, 12vw, 170px); background: var(--navy); }
.back { display: inline-flex; gap: 10px; align-items: center; margin-bottom: clamp(36px, 5vw, 64px); font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; opacity: .75; transition: opacity .3s; }
.back i { font-style: normal; transition: transform .4s var(--ease); }
.back:hover { opacity: 1; }
.back:hover i { transform: translateX(-4px); }
.c-title { margin-top: 22px; font: 900 clamp(52px, 10.5vw, 200px)/.86 var(--display); letter-spacing: -.06em; text-transform: uppercase; }
.c-title .ln { display: inline-block; overflow: hidden; padding: .1em .02em .04em; margin: -.1em 0 -.04em; vertical-align: top; }
.c-title .ln > span { display: inline-block; animation: lineUp 1.3s var(--ease) both; }
.c-title .ln:nth-child(2) > span { animation-delay: .1s; }
.c-title .ln:nth-child(3) > span { animation-delay: .2s; }
@keyframes lineUp { from { transform: translateY(105%); } }
.c-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 120px); align-items: start; margin-top: clamp(40px, 5vw, 80px); padding-bottom: clamp(48px, 6vw, 96px); }
.c-lead { font: 400 clamp(20px, 1.9vw, 30px)/1.35 var(--sans); max-width: 30ch; }
.c-meta { display: grid; gap: 0; border-top: 1px solid var(--line-d); transition-delay: .12s; }
.c-meta div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line-d); }
.c-meta dt { font: 500 12px/1.6 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.c-meta dd { font-size: 16px; }
.c-cover { position: relative; height: min(88svh, 62vw); overflow: hidden; }
.c-cover img, .c-cover video { width: 100%; height: 100%; object-fit: cover; scale: 1.12; translate: 0 calc(var(--py, 0) * 1%); }
.c-cover { animation: coverIn 1.6s .25s var(--ease) both; }
@keyframes coverIn { from { clip-path: inset(18% 6% 0 6%); } to { clip-path: inset(0); } }

.c-tsr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); padding-bottom: clamp(64px, 8vw, 140px); }
.c-tsr li { border-top: 1px solid var(--line-l); padding-top: 22px; transition-delay: calc(var(--i, 0) * 110ms); }
.c-tsr .n { font: 500 12px/1 var(--sans); letter-spacing: .16em; color: var(--red); }
.c-tsr h2 { margin: 18px 0 16px; font: 800 clamp(26px, 2.6vw, 40px)/1 var(--display); letter-spacing: -.035em; text-transform: uppercase; }
.c-tsr p { font-size: 17px; line-height: 1.6; color: #3d3730; }

.c-blocks { display: grid; gap: clamp(56px, 7vw, 120px); }
.c-grid { display: grid; gap: clamp(20px, 2.4vw, 36px); }
.c-wide { gap: clamp(40px, 5vw, 88px); }
.c-two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.c-three { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.c-four { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.c-eyebrow { margin-bottom: calc(-1 * clamp(28px, 4vw, 72px)); }
.c-fig figcaption { margin-top: 14px; font: 500 12px/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6f6b63; }
.c-img { overflow: hidden; border-radius: 6px; background: #e4e1d9; }
.c-img img { width: 100%; transition: scale 1.2s var(--ease); }
.c-fig:hover .c-img img { scale: 1.03; }
.c-wide .c-img img { scale: 1.06; translate: 0 calc(var(--py, 0) * 1%); }
.c-wide .c-fig:hover .c-img img { scale: 1.08; }
.c-logo .c-img { display: grid; place-items: center; padding: clamp(40px, 6vw, 96px); max-width: 520px; }
.c-logo .c-img img { width: min(260px, 100%); }
.c-phone { display: grid; justify-items: center; }
.c-phone .phone { width: min(360px, 78vw); max-height: 80svh; overflow-y: auto; border-radius: 40px; border: 10px solid var(--ink); background: var(--ink); scrollbar-width: none; }
.c-phone .phone::-webkit-scrollbar { display: none; }
.c-phone .phone img { border-radius: 30px; }
.c-phone figcaption { text-align: center; }

.c-end { padding-bottom: 0; }
.c-cta { display: grid; gap: 32px; }
.c-cta .big { max-width: 14ch; }
.c-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 28px 36px; }
.c-note { max-width: 70ch; font-size: 14px; color: var(--mute); }
.c-next { position: relative; display: grid; gap: 18px; margin-top: clamp(80px, 10vw, 160px); padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line-d); }
.c-next-t { font: 900 clamp(44px, 8.5vw, 160px)/.9 var(--display); letter-spacing: -.06em; text-transform: uppercase; transition: color .4s, transform .6s var(--ease); }
.c-next:hover .c-next-t { color: var(--red); transform: translateX(clamp(10px, 2vw, 32px)); }
.c-next-img { position: absolute; right: 0; top: 50%; width: clamp(160px, 22vw, 360px); aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; translate: 0 -50%; clip-path: inset(50% 0 50% 0); transition: clip-path .7s var(--ease); pointer-events: none; }
.c-next-img img { width: 100%; height: 100%; object-fit: cover; scale: 1.2; transition: scale .9s var(--ease); }
.c-next:hover .c-next-img { clip-path: inset(0); }
.c-next:hover .c-next-img img { scale: 1; }
.case-page .foot { border-top: 1px solid var(--line-d); }

@media (max-width: 900px) {
  .c-intro, .c-tsr, .c-two, .c-three { grid-template-columns: 1fr; }
  .c-four { grid-template-columns: 1fr 1fr; }
  .c-meta div { grid-template-columns: 96px minmax(0, 1fr); }
  .c-cover { height: min(72svh, 125vw); }
  .c-next-img { position: static; translate: none; width: 100%; clip-path: none; }
  .c-next-img img { scale: 1; }
}
.shot .c-title .ln > span, .shot .c-cover { animation: none; }

/* ---------- Калькулятор стоимости ---------- */
.calc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 36px; }
.calc-cta > span { color: var(--mute); font-size: 14px; }
.calc {
  width: min(600px, calc(100% - 24px)); max-height: calc(100svh - 24px); margin: auto;
  padding: clamp(26px, 4vw, 48px); border: 0; border-radius: 22px;
  background: var(--white); color: var(--ink); overflow: auto; overscroll-behavior: contain;
}
.calc::backdrop { background: rgba(7, 20, 42, .72); backdrop-filter: blur(6px); }
.calc[open] { animation: calcIn .6s var(--ease) both; }
.calc[open]::backdrop { animation: fadeIn .4s ease both; }
@keyframes calcIn { from { opacity: 0; transform: translateY(28px) scale(.97); } }
@keyframes fadeIn { from { opacity: 0; } }
.calc-x { position: absolute; right: 14px; top: 14px; width: 42px; height: 42px; border-radius: 50%; font-size: 24px; line-height: 1; border: 1px solid var(--line-l); transition: background .3s, color .3s, transform .5s var(--ease); }
.calc-x:hover { background: var(--ink); color: var(--white); transform: rotate(90deg); }
.calc .eyebrow { color: var(--red); text-transform: none; letter-spacing: .04em; font-size: 13px; } /* без капса: «з» не путается с «3» */
body:has(.calc[open]) .fab { opacity: 0; visibility: hidden; }
.calc-bar { height: 2px; margin: 16px 56px 26px 0; background: var(--line-l); }
.calc-bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .6s var(--ease); }
.calc h2 { font: 800 clamp(26px, 3.4vw, 38px)/1.02 var(--display); letter-spacing: -.035em; margin-bottom: 24px; }
.calc-body { display: grid; gap: 10px; }
.calc-body > * { animation: optIn .5s var(--ease) both; }
.calc-body > :nth-child(2) { animation-delay: .04s; } .calc-body > :nth-child(3) { animation-delay: .08s; }
.calc-body > :nth-child(4) { animation-delay: .12s; } .calc-body > :nth-child(n+5) { animation-delay: .16s; }
@keyframes optIn { from { opacity: 0; transform: translateY(12px); } }
.calc-opt {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; width: 100%;
  padding: 17px 20px; border: 1px solid var(--line-l); border-radius: 14px; text-align: left; font: 500 16px/1.3 var(--sans);
  transition: border-color .3s, background .3s, color .3s;
}
.calc-opt::after { content: "→"; color: var(--red); transition: transform .4s var(--ease); }
.calc-opt small { order: 3; flex-basis: 100%; font-size: 13px; color: #6f6b63; }
.calc-opt:hover { border-color: var(--ink); }
.calc-opt:hover::after { transform: translateX(4px); }
.calc-opt[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.calc-opt[aria-pressed="true"] small { color: rgba(242,240,235,.6); }
.calc-opt[aria-pressed="true"]::after { content: "✓"; }
.calc-hint { color: #6f6b63; font-size: 14px; }
.calc-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }
.calc-nav[hidden], .calc-nav [hidden] { display: none; }
.calc-nav .btn { margin-left: auto; }
.calc-back { font: 600 13px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: #6f6b63; padding: 10px 0; transition: color .3s; }
.calc-back:hover { color: var(--red); }
.calc-sum { font: 900 clamp(44px, 8vw, 76px)/.95 var(--display); letter-spacing: -.05em; color: var(--red); margin: -6px 0 4px; }
.calc-time { font-weight: 600; }
.calc-fit { padding: 12px 16px; border-radius: 12px; background: rgba(230,58,46,.08); font-size: 14px; }
.calc-fit.ok { background: rgba(7,20,42,.06); }
.calc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 26px; margin-top: 14px; }
.calc-acts .calc-back { margin-left: auto; }
/* заявка прямо из калькулятора */
.calc-lead { display: grid; gap: 14px; margin-top: 10px; padding: clamp(20px, 3vw, 28px); border-radius: 16px; background: var(--navy); color: var(--white); }
.calc-lead h3 { font: 800 clamp(22px, 2.6vw, 28px)/1.05 var(--display); letter-spacing: -.03em; }
.calc-lead .calc-hint { color: rgba(242,240,235,.62); }
.calc-fld { display: grid; gap: 6px; }
.calc-fld span, .calc-how { font: 500 12px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(242,240,235,.55); }
.calc-fld input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(242,240,235,.18);
  background: rgba(242,240,235,.06); color: var(--white); font: 400 17px/1 var(--sans); transition: border-color .3s, background .3s;
}
.calc-fld input::placeholder { color: rgba(242,240,235,.35); }
.calc-fld input:focus { outline: none; border-color: var(--white); background: rgba(242,240,235,.1); }
.calc-fld input[aria-invalid="true"] { border-color: var(--red); }
.calc-how { margin-top: 4px; }
.calc-ways { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-way { padding: 10px 16px; border-radius: 99px; border: 1px solid rgba(242,240,235,.22); font: 500 14px/1 var(--sans); transition: background .3s, border-color .3s, color .3s; }
.calc-way:hover { border-color: var(--white); }
.calc-way[aria-checked="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.calc-err { color: #ff8a80; font-size: 14px; }
.calc-err:empty { display: none; }
.calc-lead .btn { justify-self: start; margin-top: 4px; }
.calc-lead .btn:disabled { opacity: .6; cursor: progress; }
.calc-done { font: 600 18px/1.4 var(--sans); padding: 6px 0; animation: doneIn .8s var(--ease) both; }
.calc-done::before { content: "✓"; display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 14px; border-radius: 50%; background: var(--red); color: #fff; }
.calc .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Одна закреплённая кнопка связи (со второго экрана) ---------- */
.fab {
  position: fixed; right: clamp(16px, 2.4vw, 36px); bottom: clamp(16px, 2.4vw, 32px); z-index: 45;
  box-shadow: 0 14px 34px rgba(7, 20, 42, .35), 0 0 0 1px rgba(255,255,255,.12);
  opacity: 0; translate: 0 24px; scale: .92; pointer-events: none; visibility: hidden;
  transition: opacity .45s var(--ease), translate .6s var(--ease), scale .6s var(--ease), background .35s var(--ease), visibility 0s .6s;
}
.fab.on-red { background: #fff; color: var(--ink); }
.fab.on-red i { background: var(--red); color: #fff; }
.fab.on { opacity: 1; translate: none; scale: 1; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.fab.jump { transition: none; }
.hero .btn.gone { visibility: hidden; } /* кнопка первого экрана «улетела» вниз и живёт в .fab */
/* центрируем без transform — его занимает анимация перелёта */
@media (max-width: 640px) {
  .fab { left: 0; right: 0; margin-inline: auto; width: max-content; bottom: calc(14px + env(safe-area-inset-bottom)); white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { .fab, .calc[open], .calc-body > * { transition: opacity .2s; animation: none; translate: none; scale: none; } }

/* ---------- Анимации блоков ---------- */
/* крупные заголовки разделов: выезжают из-под маски снизу */
.big.rv { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); translate: 0 .35em; transition: clip-path 1.1s var(--ease), translate 1.1s var(--ease); }
.big.rv.in { clip-path: inset(-.15em -.15em -.25em -.15em); translate: 0 0; }
/* строки списков появляются по очереди (--i ставит js/main.js) */
.svc li.rv, .steps li.rv, .who-list li.rv, .stats .rv { transition-delay: calc(var(--i, 0) * 90ms); }

/* услуги: при наведении строку снизу заливает красным, название отъезжает вправо */
.svc li { position: relative; isolation: isolate; }
.svc li::before { content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); z-index: -1; background: var(--red); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .6s var(--ease); }
.svc h3 { transition: transform .6s var(--ease); }
@media (hover: hover) {
  .svc li:hover::before { transform: scaleY(1); }
  .svc li:hover h3 { transform: translateX(14px); }
  .svc li:hover p, .svc li:hover .m, .svc li:hover .n, .svc li:hover .m b { color: #fff; }
}

/* процесс: контурные цифры наливаются красным снизу вверх, когда шаг появился */
.steps .n { background: linear-gradient(var(--red), var(--red)) 0 100% / 100% 0 no-repeat; -webkit-background-clip: text; background-clip: text;
  transition: background-size 1.3s var(--ease) calc(var(--i, 0) * 120ms + .35s), -webkit-text-stroke-color .8s calc(var(--i, 0) * 120ms + .35s); }
.steps li.in .n { background-size: 100% 100%; -webkit-text-stroke-color: var(--red); }


/* обо мне: фото открывается шторкой снизу, внутри лёгкий параллакс (--py) */
.about-photo.rv { opacity: 1; transform: none; clip-path: inset(100% 0 0 0 round 14px); transition: clip-path 1.4s var(--ease); }
.about-photo.rv.in { clip-path: inset(0 0 0 0 round 14px); }
/* параллакс без обрезки головы: фото прижато к верху и при скролле опускается (--py 0…8%),
   сверху открывается фон рамки того же цвета, что и фон снимка */
.about-photo { background: #f0eeef; }
.about-photo img { object-position: 50% 0; translate: 0 calc(var(--py, 0) * 1%); will-change: translate; }
/* объём, как на iPhone: --tx/--ty от -1 до 1 ставит js/main.js (мышь или наклон телефона).
   Рамка наклоняется, портрет едет в обратную сторону (увеличен от верхнего края — голова не режется), блик скользит */
.fx .about-photo { position: relative; transform-origin: 50% 50%; }
.fx .about-photo.rv.in { transform: perspective(1100px) rotateY(calc(var(--tx, 0) * 7deg)) rotateX(calc(var(--ty, 0) * -6deg)); }
.fx .about-photo img { transform-origin: 50% 0; scale: 1.07; translate: calc(var(--tx, 0) * -2.6%) calc(var(--py, 0) * 1% + var(--ty, 0) * 1.2%); }
.fx .about-photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(60% 50% at calc(50% + var(--tx, 0) * 45%) calc(35% + var(--ty, 0) * 40%), rgba(255,255,255,.55), rgba(255,255,255,0) 70%); }

/* FAQ: вопросы появляются по очереди, ответ раскрывается плавно */
#faq.rv { opacity: 1; transform: none; }
#faq.rv details { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
#faq.rv.in details { opacity: 1; transform: none; }
:root { interpolate-size: allow-keywords; }
.faq-list details::details-content { block-size: 0; overflow: hidden; transition: block-size .55s var(--ease), content-visibility .55s allow-discrete; }
.faq-list details[open]::details-content { block-size: auto; }

/* финал: строки заголовка выезжают из-под маски, гигантская надпись поднимается по буквам (--g) */
.final-h.rv { opacity: 1; transform: none; }
.final-h.rv > span { display: inline-block; clip-path: inset(0 0 100% 0); translate: 0 .45em; transition: clip-path 1.2s var(--ease), translate 1.2s var(--ease); }
.final-h.rv > span.red { transition-delay: .15s; }
.final-h.rv.in > span { clip-path: inset(-.15em -.15em -.3em -.15em); translate: 0 0; }
.giant .ch { display: inline-block; translate: 0 calc((1 - var(--g, 1)) * 105%); }

/* режим скриншотов: всё сразу открыто */
.shot .big.rv, .shot .about-photo.rv, .shot .final-h.rv > span { clip-path: none; translate: none; }
.shot #faq.rv details { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .big.rv, .about-photo.rv, .final-h.rv > span { clip-path: none !important; translate: none !important; }
  #faq.rv details { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
@media (prefers-reduced-motion: reduce) { .c-title .ln > span, .c-cover { animation: none; } .c-cover img, .c-cover video, .c-wide .c-img img { translate: none; } }
