/* Портфолио-маршрут. Образ — схема линии метро: одна красная линия, станции-остановки, вывески.
   Шрифт один, в двух начертаниях: Sofia Sans для текста и её узкая версия для вывесок и заголовков. */
:root {
  --bg: #f1f2f4;
  --paper: #ffffff;
  --ink: #111318;
  --muted: #5a616c;
  --hair: #d8dbe0;
  --line: #e22b1e;
  --line-soft: #fbe3e0;
  --ok: #1c8a4a;
  --display: "Sofia Sans Extra Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Sofia Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 14px;
  --pad: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.5 var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--line); outline-offset: 3px; border-radius: 4px; }

h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.005em; text-wrap: balance; }
h1 { font-size: clamp(42px, 12vw, 62px); line-height: .92; }
h2 { font-size: clamp(38px, 8.4vw, 64px); line-height: .96; margin-top: 14px; }
h3 { font: 700 21px/1.25 var(--text); margin: 44px 0 14px; }
.note { color: var(--muted); font-size: 16px; margin-top: 14px; max-width: 62ch; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 24px; border: 2px solid var(--ink);
  border-radius: 12px; background: var(--ink); color: #fff; font: 600 18px/1 var(--text); text-decoration: none; cursor: pointer; transition: transform .12s, background .15s; }
.btn:hover { background: #2a2e36; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: #1113180d; }
.btn.go { background: var(--line); border-color: var(--line); }
.btn.go:hover { background: #c82318; }

/* ---------- полоса маршрута на телефоне ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: #f1f2f4f2; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px var(--pad) 0; }
.bar-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.bar-row b { font: 700 20px/1 var(--display); letter-spacing: .01em; }
.bar-row span { color: var(--muted); white-space: nowrap; }
.bar-line { height: 5px; margin: 9px calc(var(--pad) * -1) 0; background: var(--hair); }
.bar-line i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--line); transition: width .25s linear; }

/* ---------- каркас ---------- */
.layout { max-width: 1260px; margin: 0 auto; }
.rail { display: none; }
.route { padding: 0 var(--pad) 0; min-width: 0; }
.stop { padding: 54px 0 10px; }

/* вывеска станции: линия приходит с левого края экрана */
.sign { position: relative; display: flex; align-items: center; gap: 12px; font: 700 24px/1 var(--display); letter-spacing: .01em; }
.sign::before { content: ""; position: absolute; left: calc(var(--pad) * -1); top: 50%; width: var(--pad); height: 5px; margin-top: -2.5px; background: var(--line); }
.dot { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--line); color: #fff; font: 800 22px/1 var(--display); padding-bottom: 1px; }

/* ---------- отправление ---------- */
/* на телефоне порядок такой: обещание, лицо, пояснение, кнопки — заголовок и лицо видны сразу */
.hero { display: flex; flex-direction: column; padding-top: 16px; }
.hero-text { display: contents; }
.hero-kicker { order: 1; font-size: 16px; color: var(--muted); margin-bottom: 10px; max-width: 34ch; }
.hero h1 { order: 2; }
.hero-photo { order: 3; position: relative; margin-top: 20px; border-radius: var(--r); overflow: hidden; background: #d9d6d2; aspect-ratio: 4 / 5; max-height: 62vh; }
.hero-photo img, .hero-photo video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.lead { order: 4; font-size: 20px; line-height: 1.42; margin-top: 20px; max-width: 34em; }
.hero-acts { order: 5; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.play { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 18px 0 10px;
  border: 0; border-radius: 40px; background: #fffffff2; color: var(--ink); font: 600 18px/1.15 var(--text); text-align: left; cursor: pointer; box-shadow: 0 6px 22px #0004; }
.play i { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--line); }
.play i::before { content: ""; margin-left: 4px; border-left: 14px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.play small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.play:hover { background: #fff; }
.play[hidden] { display: none; }
.hero-acts .btn:first-child { background: var(--line); border-color: var(--line); }
.hero-acts .btn:first-child:hover { background: #c82318; }

/* ---------- знакомство ---------- */
.hello { display: grid; gap: 22px; margin-top: 24px; }
.hello-media { position: relative; width: min(100%, 340px); border-radius: var(--r); overflow: hidden; background: #111; aspect-ratio: 9 / 14; }
.hello-media img, .hello-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.said { font-size: 22px; line-height: 1.36; font-weight: 500; }
.facts { margin-top: 20px; display: grid; gap: 14px; }
.facts li { padding-left: 18px; border-left: 5px solid var(--line); }
.facts b { display: block; }

/* ---------- ваша ситуация ---------- */
.picks { display: grid; gap: 10px; margin-top: 22px; }
.pick { text-align: left; padding: 16px 18px; border: 2px solid var(--hair); border-radius: var(--r); background: var(--paper); color: var(--ink); font: 500 18px/1.35 var(--text); cursor: pointer; transition: border-color .15s, background .15s; }
.pick:hover { border-color: #aeb3bc; }
.pick[aria-pressed="true"] { border-color: var(--line); background: var(--line-soft); }
.answer { margin-top: 16px; padding: 20px; border-radius: var(--r); background: var(--ink); color: #fff; min-height: 120px; }
.answer-empty { color: #aab0ba; }
.answer b { display: block; font: 800 30px/1 var(--display); margin-bottom: 10px; letter-spacing: .005em; }
.answer p + p { margin-top: 10px; color: #c9ced6; font-size: 16px; }

/* ---------- экраны ---------- */
.screens { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 16px; margin: 26px calc(var(--pad) * -1) 0; padding: 0 var(--pad) 12px; overflow-x: auto; scroll-snap-type: x mandatory; counter-reset: screen; }
.screens li { scroll-snap-align: center; counter-increment: screen; }
.screens img { width: 100%; border: 7px solid var(--ink); border-radius: 30px; background: #000; aspect-ratio: 9 / 18; object-fit: cover; object-position: top; }
.screens p { margin-top: 14px; font-size: 17px; }
.screens p::before { content: counter(screen); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; border: 2px solid var(--line); color: var(--line); font: 800 17px/1 var(--display); vertical-align: 2px; }

/* ---------- потрогайте ---------- */
.try { display: grid; gap: 22px; margin-top: 20px; }
.try-text p + p, .try-text ol + p { margin-top: 18px; }
.quest { counter-reset: quest; display: grid; gap: 10px; margin-top: 18px; }
.quest li { counter-increment: quest; position: relative; padding-left: 38px; }
.quest li::before { content: counter(quest); position: absolute; left: 0; top: .05em; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); color: var(--line); font: 800 17px/1 var(--display); }
.phone { width: 318px; height: 640px; border: 9px solid var(--ink); border-radius: 40px; overflow: hidden; background: #000; }
.phone iframe { width: 390px; height: 813px; border: 0; transform: scale(.7692); transform-origin: 0 0; background: #fff; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 10px; overflow-x: auto; scroll-snap-type: x proximity; }
.strip figure { margin: 0; scroll-snap-align: start; }
.strip img { width: 100%; border-radius: 16px; border: 1px solid var(--hair); aspect-ratio: 9 / 17; object-fit: cover; object-position: top; background: #ddd; }
.strip figcaption { margin-top: 8px; font-size: 15px; color: var(--muted); }

/* ---------- работа ---------- */
.work { display: grid; gap: 24px; margin-top: 24px; }
.steps { counter-reset: step; display: grid; gap: 20px; }
.steps li { counter-increment: step; position: relative; padding-left: 54px; min-height: 44px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; font: 800 50px/.8 var(--display); color: var(--line); }
.steps b { display: block; }

/* ---------- цена ---------- */
.price { display: grid; gap: 12px; margin-top: 24px; }
.price-tag { padding: 20px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--hair); }
.sum { font: 800 62px/.9 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.sum small { font: 500 18px/1 var(--text); color: var(--muted); letter-spacing: 0; }
.price-tag p + p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.incl { margin-top: 20px; display: grid; gap: 10px; }
.incl li { padding-left: 30px; position: relative; }
.incl li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 14px; height: 8px; border-left: 3px solid var(--ok); border-bottom: 3px solid var(--ok); transform: rotate(-45deg); }

/* ---------- конечная ---------- */
.finish { margin: 50px calc(var(--pad) * -1) 0; padding: 44px var(--pad) 60px; background: var(--ink); color: #fff; }
.finish .sign::before { background: var(--line); }
.end { display: grid; gap: 24px; margin-top: 24px; }
.end-photo { width: min(62%, 260px); aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 45%; border-radius: var(--r); }
.msg { display: grid; gap: 8px; margin-top: 18px; }
.msg span { font-size: 15px; color: #aab0ba; }
.msg textarea { width: 100%; padding: 14px 16px; border: 2px solid #3a3f49; border-radius: var(--r); background: #1b1e25; color: #fff; font: 400 18px/1.4 var(--text); resize: vertical; }
.msg textarea:focus { outline: 0; border-color: var(--line); }
.end-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.end-acts .btn { border-color: #fff; background: #fff; color: var(--ink); }
.end-acts .btn:hover { background: #e8eaee; }
.end-acts .btn.tg { background: #2aabee; border-color: #2aabee; color: #fff; }
.end-acts .btn.tg:hover { background: #1f97d6; }
.end-acts .btn.ghost { background: transparent; color: #fff; border-color: #6a707c; }
.finish .note { color: #aab0ba; min-height: 1.4em; }
.ticket { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 22px; font-size: 14px; }
.ticket li { padding: 5px 10px; border-radius: 20px; border: 1px solid #3a3f49; color: #7d8491; }
.ticket li.seen { border-color: var(--line); color: #fff; }
.ticket li.seen::before { content: "✓ "; color: var(--line); font-weight: 700; }

.draft { margin: 0; padding: 8px var(--pad-draft, 20px); background: #fff3c4; color: #5c4700; font-size: 14px; line-height: 1.35; text-align: center; }

/* ---------- компьютер: схема линии слева ---------- */
@media (min-width: 1000px) {
  :root { --pad: 0px; }
  html { scroll-padding-top: 40px; }
  body { font-size: 19px; }
  .bar { display: none; }
  .layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); column-gap: 64px; padding: 0 44px; }
  .rail { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 36px 0 32px; }
  .rail-me { display: flex; align-items: center; gap: 12px; }
  .rail-me img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
  .rail-me b { display: block; font: 700 19px/1.1 var(--text); }
  .rail-me small { color: var(--muted); font-size: 14px; }
  .stops { position: relative; margin: 34px 0 auto; display: grid; gap: 4px; }
  .stops::before, .stops::after { content: ""; position: absolute; left: 12px; top: 20px; width: 6px; border-radius: 3px; }
  .stops::before { bottom: 20px; background: var(--hair); }
  .stops::after { height: calc((100% - 40px) * var(--p, 0)); background: var(--line); transition: height .25s linear; }
  .stops a { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; padding: 8px 0; text-decoration: none; font: 700 22px/1 var(--display); letter-spacing: .01em; color: var(--muted); }
  .stops i { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 5px solid var(--hair); background: var(--bg); transition: border-color .2s, background .2s, transform .2s; }
  .stops .is-done a { color: var(--ink); }
  .stops .is-done i { border-color: var(--line); background: var(--line); }
  .stops .is-now a { color: var(--ink); }
  .stops .is-now i { border-color: var(--line); background: #fff; transform: scale(1.12); }
  .stops a:hover { color: var(--ink); }
  .rail-cta { align-self: flex-start; font-weight: 600; text-underline-offset: 4px; }

  .stop { padding: 84px 0 20px; max-width: 880px; }
  .sign::before { display: none; }
  h1 { font-size: clamp(60px, 5.5vw, 84px); }
  .hero { flex-direction: row; align-items: center; gap: 48px; padding-top: 40px; min-height: min(100vh, 860px); max-width: none; }
  .hero-text { display: block; flex: 1 1 0; min-width: 0; }
  .hero-photo { flex: none; width: 380px; height: 560px; aspect-ratio: auto; max-height: none; margin-top: 0; border-radius: 20px; }
  .lead { font-size: 22px; }
  .hello { grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
  .picks { grid-template-columns: 1fr 1fr; }
  .screens { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; gap: 26px; margin-inline: 0; padding: 0; overflow: visible; }
  .try { grid-template-columns: 1fr 318px; gap: 48px; align-items: start; }
  .strip { grid-auto-flow: row; grid-template-columns: repeat(5, 1fr); grid-auto-columns: auto; gap: 18px 14px; margin-inline: 0; padding-inline: 0; overflow: visible; }
  .steps { grid-template-columns: 1fr 1fr; gap: 28px 48px; }
  .price { grid-template-columns: 1fr 1fr; }
  .sum { font-size: 76px; }
  .finish { margin: 70px 0 0; padding: 60px 48px 70px; border-radius: 24px 24px 0 0; max-width: none; }
  .end { grid-template-columns: 280px 1fr; gap: 44px; align-items: start; }
  .end-photo { width: 100%; }
}
@media (min-width: 1000px) and (max-width: 1180px) {
  .layout { grid-template-columns: 230px minmax(0, 1fr); column-gap: 40px; padding: 0 28px; }
  .hero-photo { width: 320px; height: 480px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
