/* Личный сайт Влада: форма-опрос «Рассчитать стоимость» + страницы документов.
   Дизайн — Figma «Личный сайт» (v7 + выбранные экраны v8, 21.11.2026).
   Один экран на всех устройствах: телефон — во весь экран, планшет и компьютер — карточка 390 по центру. */

@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/assets/fonts/manrope-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+20BD, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #17181B;          /* фон экрана */
  --page: #0E0F11;        /* фон страницы вокруг карточки на планшете и ПК */
  --ink: #21232A;         /* текст на белых кнопках */
  --w: #FFFFFF;
  --w03: rgba(255,255,255,.03);
  --w10: rgba(255,255,255,.10);
  --w35: rgba(255,255,255,.35);
  --soft: rgba(255,255,255,.45);   /* серая часть заголовков */
  --muted: rgba(255,255,255,.55);
  --dim: rgba(255,255,255,.6);
  --err: #FF7A6B;
  --r: 3px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--w);
  font-family: Manrope, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px; line-height: 1.35;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: left; }
input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
.nw { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }

/* ============================================================ каркас экрана */
.app { position: relative; overflow-x: hidden; overflow-x: clip; }
.screen {
  display: none; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  padding: max(56px, calc(env(safe-area-inset-top) + 24px)) 24px calc(28px + env(safe-area-inset-bottom));
  background: var(--bg);
}
.screen.is-on { display: flex; animation: in .32s var(--ease) both; }
.screen.is-on.is-back { animation-name: in-back; }
@keyframes in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
@keyframes in-back { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.grow { flex: 1 0 auto; min-height: 24px; }

@media (min-width: 600px) {
  body.quiz-page { background: var(--page); display: grid; place-items: center; padding: 32px 0; }
  .app { width: 390px; }
  .screen { min-height: 844px; border-radius: var(--r); }
}

/* ============================================================ старт */
.who { display: flex; align-items: center; gap: 12px; }
.who__photo { width: 40px; height: 40px; border-radius: var(--r); object-fit: cover; background: #3A3C43; flex: none; }
.who b { display: block; font-size: 15px; font-weight: 500; line-height: 20px; }
.who span { display: block; font-size: 13px; line-height: 18px; color: var(--dim); }

.reel {
  position: relative; margin-top: 18px; width: 100%; aspect-ratio: 1 / 1;   /* квадрат: все работы 1080×1080 */
  overflow: hidden; border-radius: var(--r); background: #2A2B2F;
  user-select: none; -webkit-user-select: none; touch-action: pan-y; cursor: pointer;
}
/* смена (22.11): картинка стоит 1,5 с, старая гаснет поверх новой за 0,6 с — без тёмного провала */
.slide { position: absolute; inset: 0; opacity: 0; }
.slide.on { opacity: 1; z-index: 1; }
.slide.off { opacity: 0; z-index: 2; transition: opacity .6s ease; }
.slide img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.start-title { margin-top: 22px; font-size: 34px; font-weight: 300; line-height: 32px; letter-spacing: -.02em; }
.soft { color: var(--soft); }
.start-lead { margin-top: 17px; font-size: 15px; line-height: 20px; color: rgba(255,255,255,.7); }
.chips { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 34px; padding: 0 11px; display: flex; align-items: center; border: 1px solid var(--w10); background: var(--w03); border-radius: var(--r); font-size: 13px; line-height: 18px; color: rgba(255,255,255,.85); }
.under { margin-top: 10px; text-align: center; font-size: 12.5px; color: rgba(255,255,255,.5); }

/* ============================================================ верх шага */
.q-top { display: flex; align-items: center; gap: 16px; min-height: 20px; }
.q-back { display: flex; align-items: center; gap: 4px; font-size: 15px; color: var(--dim); padding: 6px 8px 6px 0; margin: -6px 0; transition: color .2s; }
.q-back svg { color: #9EA1A6; }
.q-back:active { color: var(--w); }
.q-progress { flex: 1; height: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.q-progress i { display: block; height: 100%; width: 100%; background: var(--w); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); transition: transform .45s var(--ease); }
.q-count { font-size: 13px; color: var(--dim); min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }

/* ============================================================ заголовки */
.q-title { margin-top: 32px; font-size: 34px; font-weight: 300; line-height: 1; letter-spacing: -.01em; }
.q-title--sm { font-size: 30px; }
.q-title--center { margin-top: 28px; text-align: center; }
.q-lead { margin-top: 12px; font-size: 14px; color: rgba(255,255,255,.65); }

/* ============================================================ плашки-ответы */
.q-list { margin-top: 26px; display: flex; flex-direction: column; gap: 8px; }
.q-title--sm + .q-list { margin-top: 18px; }
.q-opt, .q-card {
  position: relative; width: 100%; display: flex; align-items: center;
  background: var(--w03); border: 1.5px solid var(--w10); border-radius: var(--r);
  transition: background .2s, border-color .2s;
}
.q-opt { gap: 14px; padding: 17px 16px 17px 18px; }
.q-opt__text { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; }
.q-box {
  flex: none; width: 22px; height: 22px; border: 1.5px solid var(--w35); border-radius: 2px;
  display: grid; place-items: center; color: var(--ink);
  transition: background .18s, border-color .18s;
}
.q-box svg { opacity: 0; transform: scale(.6); transition: opacity .18s, transform .18s var(--ease); }
.q-opt[aria-pressed="true"], .q-card[aria-pressed="true"] { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.45); }
[aria-pressed="true"] > .q-box, [aria-pressed="true"] .q-box, .q-consent input:checked + .q-box { background: var(--w); border-color: var(--w); }
[aria-pressed="true"] > .q-box svg, [aria-pressed="true"] .q-box svg, .q-consent input:checked + .q-box svg { opacity: 1; transform: none; }
@media (hover: hover) {
  .q-opt:hover, .q-card:hover { border-color: rgba(255,255,255,.22); }
  .q-chip:hover:not(.is-on):not([aria-pressed="true"]) { border-color: rgba(255,255,255,.22); }
}
.q-opt:active, .q-card:active { background: rgba(255,255,255,.06); }

/* карточка формата: картинка 104×100 слева, текст, галочка */
.q-card { overflow: hidden; }
.q-card__img { position: relative; flex: none; width: 104px; height: 100px; overflow: hidden; }
.q-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.q-card__img img.is-top { top: -3.28%; height: 163.93%; object-fit: fill; }
.q-card__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 8px 8px 14px; }
.q-card__txt b { font-size: 15px; font-weight: 500; }
.q-card__txt small { font-size: 12.5px; color: var(--muted); }
.q-card__gap { height: 8px; }
.q-card__box { flex: none; width: 38px; }

.q-note { margin-top: 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.q-note svg { flex: none; }

/* бюджет квадратиками 2×2 */
.q-budget { margin-top: 40px; }
.q-budget .q-title { margin-top: 0; }
.q-budget--gap { margin-top: 26px; }
.q-grid { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.q-chip {
  height: 52px; padding: 0 10px 0 14px; display: flex; align-items: center;
  background: var(--w03); border: 1.5px solid var(--w10); border-radius: var(--r);
  font-size: 14.5px; font-weight: 500; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s;
}
.q-chip[aria-pressed="true"], .q-chip.is-on { background: var(--w); border-color: var(--w); color: var(--ink); }
.q-foot { margin-top: 32px; }

/* ============================================================ поля */
.q-field { display: block; margin-top: 34px; border-bottom: 2px solid rgba(255,255,255,.25); padding: 6px 0 12px; transition: border-color .2s; }
.q-field:focus-within { border-color: rgba(255,255,255,.7); }
.q-field.is-err { border-color: var(--err); }
.q-field input, .q-field textarea {
  width: 100%; border: 0; outline: 0; background: none; padding: 0;
  font-size: 20px; line-height: 1.35; color: var(--w); resize: none; border-radius: 0;
}
.q-field textarea { min-height: 54px; overflow: hidden; }
.q-field ::placeholder { color: var(--w35); opacity: 1; }
.q-err { display: block; margin-top: 8px; font-size: 12.5px; color: var(--err); }
.q-err[hidden] { display: none; }

/* ============================================================ кнопки */
.q-btn {
  width: 100%; height: 56px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
  background: var(--w); color: var(--ink); border-radius: var(--r);
  font-size: 16px; font-weight: 500; text-decoration: none;
  transition: opacity .2s, transform .1s;
}
.q-btn:active { transform: scale(.99); opacity: .9; }
.q-btn[aria-disabled="true"] { opacity: .35; }
.q-btn.is-busy { opacity: .6; pointer-events: none; }
.q-btn--line {
  margin-top: 10px; height: 50px; justify-content: center;
  background: none; color: var(--w); border: 1.5px solid rgba(255,255,255,.25); font-size: 15px;
}
.q-btn--center { justify-content: center; gap: 10px; }

/* ============================================================ контакт */
.q-seg3 { margin-top: 18px; display: flex; gap: 8px; }
.q-seg3 .q-chip { flex: 1; height: 44px; padding: 0; justify-content: center; font-size: 15px; }
.q-field--contact { margin-top: 18px; }
.q-talk { margin-top: 16px; }
.q-talk[hidden] { display: none; }
.q-switch { display: flex; border: 1.5px solid rgba(255,255,255,.14); border-radius: var(--r); }
.q-switch button { flex: 1; height: 40px; text-align: center; font-size: 14px; font-weight: 500; color: var(--dim); transition: background .2s, color .2s; }
.q-switch button.is-on { background: rgba(255,255,255,.14); color: var(--w); }
.q-hint { margin-top: 8px; font-size: 12.5px; color: rgba(255,255,255,.5); }
.q-consent { position: relative; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.q-consent input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; }
.q-consent input:focus-visible + .q-box { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }
.q-consent.is-err .q-box { border-color: var(--err); }
.q-consent__text { flex: 1; font-size: 12.5px; color: rgba(255,255,255,.75); }
.q-consent__text a { text-decoration: underline; text-underline-offset: 2px; }
.q-err--consent { margin-top: 6px; }
[data-submit] { margin-top: 14px; }

/* ============================================================ заявка принята */
.screen--done { align-items: center; text-align: center; }
.mark { position: relative; width: 88px; height: 88px; }
.mark__glow { position: absolute; inset: -44px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,255,255,.16), rgba(255,255,255,.06) 55%, transparent); filter: blur(10px); animation: glow 3.4s ease-in-out infinite; pointer-events: none; }
.mark__circle { position: relative; width: 88px; height: 88px; border-radius: 50%; background: var(--w); display: grid; place-items: center; }
.screen--done.is-on .mark__circle { animation: pop .55s var(--ease) both; }
.mark path { stroke-dasharray: 40; }
.screen--done.is-on .mark path { animation: draw .5s ease-out .25s both; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes glow { 0%, 100% { opacity: .5; transform: translate(-4%, -2%) scale(1); } 50% { opacity: .85; transform: translate(4%, 3%) scale(1.12); } }
.done-text { margin-top: 16px; max-width: 342px; font-size: 15px; color: rgba(255,255,255,.7); }
.screen--done .q-btn { margin-top: 32px; }
.under--done { margin-top: 12px; }

/* подсказка «ответьте на вопрос»: короткое покачивание */
.shake { animation: shake .4s var(--ease); }
.shake .q-opt, .shake .q-card, .shake .q-chip { border-color: rgba(255,255,255,.35); }
@keyframes shake { 0%, 100% { transform: none; } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

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

/* ============================================================ документы и 404 */
.doc-wrap { max-width: 760px; margin: 0 auto; padding: 56px 24px 64px; }
.toc { display: none; }
.doc .lbl, .nf .lbl { font-size: 13px; color: var(--dim); }
.doc h1 { margin-top: 12px; font-size: 34px; font-weight: 300; line-height: 1.05; letter-spacing: -.01em; }
.doc h1 span { color: var(--soft); }
.doc .meta { margin-top: 12px; font-size: 13px; color: var(--muted); }
.doc h2 { margin-top: 36px; font-size: 22px; font-weight: 400; }
.doc p, .doc li { margin-top: 12px; font-size: 15px; color: rgba(255,255,255,.8); }
.doc ul, .doc ol { padding-left: 20px; }
.doc a { text-decoration: underline; text-underline-offset: 2px; }
.nf-text { margin-top: 16px; color: rgba(255,255,255,.7); }
.nf-btn, .toc-other a { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; text-decoration: none; }
.nf-btn svg, .toc-other svg { width: 21px; height: 10px; }

/* старт (22.11, Влад): от «Влад Болгов» до верха окна — столько же, сколько сбоку (24 px) */
.screen[data-step="start"] { padding-top: max(24px, env(safe-area-inset-top)); }

/* «Чем занимаетесь → Другое»: поле для своей ниши */
.q-other { margin-top: 8px; }
.q-other[hidden] { display: none; }
.q-other .q-field { margin-top: 18px; }

/* старт (22.11, Влад): «Ответьте на 4 вопроса» — как выделено маркером: белая заливка «прорисовывается», текст становится тёмным */
.hl {
  color: inherit; padding: 1px 4px; margin: 0 -1px; border-radius: 2px;
  background: linear-gradient(#fff, #fff) no-repeat 0 0 / 0% 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  animation: hl .7s cubic-bezier(.22,.61,.36,1) .35s forwards;
}
@keyframes hl { to { background-size: 100% 100%; color: var(--ink); } }

/* кнопка «Рассчитать стоимость»: блик пробегает по кнопке, стрелка зовёт вперёд */
.q-btn--cta { position: relative; overflow: hidden; isolation: isolate; }
.q-btn--cta::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, rgba(23,24,27,0) 0%, rgba(23,24,27,.10) 50%, rgba(23,24,27,0) 100%);
  transform: skewX(-18deg); animation: shine 3.2s ease-in-out 1.2s infinite;
}
.q-btn--cta svg { animation: nudge 1.6s ease-in-out 1.2s infinite; }
@keyframes shine { 0% { left: -60%; } 45%, 100% { left: 130%; } }
@keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateX(4px); } }
@media (hover: hover) { .q-btn--cta:hover { transform: translateY(-2px); } }

/* старт (22.11, Влад): от плашек «1 минута…» до кнопки — минимум на 10 px больше */
.screen[data-step="start"] .grow { min-height: 34px; }

/* экран зафиксирован (22.11, Влад): не двигается вправо-влево и не масштабируется (щипок, двойное нажатие) */
html, body { overflow-x: hidden; overscroll-behavior-x: none; touch-action: pan-y; }

/* плашки «1 минута · 4 вопроса · Разбор бесплатно» — в один ряд и на узких телефонах (360 px) */
@media (max-width: 380px) { .chip { padding: 0 9px; } .chips { gap: 6px; } }

/* невысокие телефоны (iPhone SE и т. п.): окно работ не выше 290 px, чтобы кнопка была ближе к экрану;
   на остальных — полный квадрат */
@media (max-height: 760px) and (max-width: 599px) { .reel { max-height: 290px; } }

/* ============================================================ окно про куки (23.11.2026)
   Маленькое окно внизу экрана: на телефоне и планшете — по центру поверх формы, на широком экране — в левом нижнем углу.
   Появляется, только если подключена Метрика; без «Соглашаюсь» Метрика не загружается. */
.ck {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 366px; margin: 0 auto; padding: 12px 14px 14px;
  background: #2A2C32; border-radius: var(--r); box-shadow: 0 12px 40px rgba(0,0,0,.5);
  animation: ck-in .35s var(--ease) .5s both;
}
.ck[hidden] { display: none; }
@keyframes ck-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ck__text { font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.75); }
.ck__text a { text-decoration: underline; text-underline-offset: 2px; }
.ck__btns { margin-top: 10px; display: flex; gap: 8px; }
.ck__btn { flex: 1; height: 38px; text-align: center; border-radius: var(--r); font-size: 14px; font-weight: 500; background: rgba(255,255,255,.08); color: var(--w); transition: opacity .2s; }
.ck__btn--yes { background: var(--w); color: var(--ink); }
.ck__btn:active { opacity: .8; }
@media (min-width: 1200px) { .ck { left: 24px; right: auto; bottom: 24px; width: 320px; margin: 0; } }
