/* Главная: первый экран-типографика, двери по ситуации, ветки БФЛ и споров. Общее — site.css. */

/* ——— первый экран ——— */
.hero { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-grid { position: relative; z-index: 1; width: 100%; padding-top: calc(var(--top-h) + 64px); padding-bottom: 56px; }
.mega { margin: 18px 0 0; font-weight: 400; }
.mega-word { display: block; font-size: clamp(42px, 8.4vw, 128px); line-height: .98; letter-spacing: -.035em; margin-left: -.03em; }
.mega-word .ln { display: block; white-space: nowrap; }
.hero-canvas { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
/* до сборки и пока текст рассыпан — виден canvas; в покое — обычный шрифт (is-solid) */
@media (prefers-reduced-motion: no-preference) {
  .js .hero .mega-word { color: transparent; }
  .js .hero.is-solid .mega-word { color: #fff; transition: color .7s var(--ease); }
  .js .hero.is-solid .hero-canvas { opacity: 0; transition: opacity .9s var(--ease); }
}
.mega-sub { display: block; margin-top: 28px; font-family: var(--serif); font-size: clamp(20px, 2.1vw, 30px); line-height: 1.25; letter-spacing: -.01em; color: var(--text-d); max-width: 34ch; }
.hero .lead { font-size: 17px; line-height: 1.6; color: var(--mute-d); max-width: 52ch; margin: 22px 0 56px; }

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-d); }
.door { position: relative; display: grid; grid-template-rows: auto auto 1fr auto; gap: 10px; padding: 26px 26px 26px 0; margin-right: 26px; border-right: 1px solid var(--line-d); isolation: isolate; transition: color .45s var(--ease), padding .6s var(--ease); }
.door:last-child { border-right: 0; margin-right: 0; }
.door::before { content: ""; position: absolute; inset: 0 0 0 -26px; z-index: -1; background: #fff; transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.door:first-child::before { left: calc(-1 * var(--gut)); }
.door:hover { color: var(--ink); padding-left: 14px; }
.door:hover::before { transform: none; }
.door-n { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--mute-d); transition: color .45s; }
.door-t { font-family: var(--serif); font-size: clamp(24px, 2.3vw, 32px); line-height: 1.1; letter-spacing: -.01em; }
.door-p { font-size: 14px; line-height: 1.55; color: var(--text-d); max-width: 36ch; transition: color .45s; }
.door-m { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: #fff; margin-top: 10px; transition: color .45s; }
.door-m i { font-style: normal; font-size: 20px; transition: transform .6s var(--ease); }
.door:hover .door-n, .door:hover .door-p { color: var(--muted); }
.door:hover .door-m { color: var(--ink); }
.door:hover .door-m i { transform: translateX(8px); }
.doors-more { margin: 22px 0 0; font-size: 14px; color: var(--text-d); }
.doors-more a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.facts { border-top: 1px solid var(--line-d); }
.facts .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact { padding: 30px 24px 34px 0; margin-right: 24px; border-right: 1px solid var(--line-d); }
.fact:last-child { border-right: 0; margin-right: 0; }
.fact b { display: block; font-family: var(--serif); font-weight: 400; font-size: 32px; margin-bottom: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fact > span { font-size: 13px; color: var(--text-d); line-height: 1.5; }

/* ——— споры: липкий рисунок ——— */
.scrolly { position: relative; padding: 130px 0 60px; overflow: clip; border-top: 1px solid var(--line-d); }
.scrolly-grid { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 64px; }
.svc-step { position: relative; min-height: 82vh; display: flex; flex-direction: column; justify-content: center; gap: 16px; border-top: 1px solid var(--line-d); transition: opacity .7s var(--ease); scroll-margin-top: 90px; }
.js .svc-step { opacity: .35; }
.js .svc-step.on { opacity: 1; }
.svc-step .n { font-family: var(--mono); font-size: 12px; color: var(--mute-d); letter-spacing: .08em; text-transform: uppercase; }
.svc-step h3 { font-size: clamp(30px, 3.1vw, 42px); line-height: 1.08; margin: 0; max-width: 18ch; }
.svc-step p { font-size: 17px; line-height: 1.62; color: var(--text-d); margin: 0; max-width: 42ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; max-width: 46ch; }
.tags li { padding: 6px 12px; border: 1px solid var(--line-d); border-radius: 999px; font-size: 13px; color: var(--text-d); }
.svc-step .link-d { align-self: flex-start; }
.svc-links { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; }
.inline-art { display: none; }
.scrolly-media { position: sticky; top: 72px; height: calc(100vh - 110px); }
.frame { position: relative; height: 100%; }
.svc-docs { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 16px 64px; align-items: start; padding: 40px 0 20px; border-top: 1px solid var(--line-d); scroll-margin-top: 90px; }
.svc-docs h3 { font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; margin: 0; }
.svc-docs p { font-size: 17px; line-height: 1.62; color: var(--text-d); margin: 0; max-width: 52ch; }
.svc-docs .link-d { grid-column: 2; justify-self: start; }

/* рисунок = маска из линий; внутри «чернила» и пятно света за курсором */
.art {
  -webkit-mask-image: var(--src), linear-gradient(100deg, #000 40%, transparent 60%);
  mask-image: var(--src), linear-gradient(100deg, #000 40%, transparent 60%);
  -webkit-mask-size: cover, 250% 100%;
  mask-size: cover, 250% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 72% center, 0% 0;
  mask-position: 72% center, 0% 0;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  overflow: hidden;
}
.ink { position: absolute; inset: 0; background: rgba(230, 230, 226, .6); }
.lamp { position: absolute; left: 0; top: 0; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, .5) 45%, rgba(255, 255, 255, 0)); transform: translate(var(--lx, 60%), var(--ly, 40%)); opacity: 0; transition: opacity .8s; will-change: transform; }
[data-light].is-lit .lamp { opacity: 1; }
.layer { position: absolute; inset: 0; opacity: 0; -webkit-mask-position: 72% center, 100% 0; mask-position: 72% center, 100% 0; transition: -webkit-mask-position 1.6s var(--ease), mask-position 1.6s var(--ease), opacity .9s var(--ease), transform 1.2s var(--ease); will-change: transform; }
.layer.on, .layer.off { -webkit-mask-position: 72% center, 0% 0; mask-position: 72% center, 0% 0; }
.layer.on { opacity: 1; }
.layer.off { opacity: 0; transition-duration: 0s, 0s, .8s, 1.2s; }
html:not(.js) .layer:first-child { opacity: 1; -webkit-mask-position: 72% center, 0% 0; mask-position: 72% center, 0% 0; }
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, var(--dark) 0%, rgba(13, 14, 15, 0) 22%), linear-gradient(180deg, var(--dark) 0%, rgba(13, 14, 15, 0) 14%, rgba(13, 14, 15, 0) 86%, var(--dark) 100%); }
.counter { position: absolute; right: 0; bottom: 30px; z-index: 2; font-family: var(--mono); font-size: 12px; color: var(--text-d); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.counter .cur { display: inline-block; height: 1.2em; overflow: hidden; vertical-align: bottom; color: #fff; }
.counter .cur span { display: block; }
.counter .cur span.roll { animation: roll .7s var(--ease); }
@keyframes roll { from { transform: translateY(100%); } to { transform: none; } }
.track { position: absolute; right: 0; top: 18%; bottom: 18%; z-index: 2; width: 1px; background: var(--line-d); }
.track i { position: absolute; left: 0; top: 0; width: 1px; height: 100%; background: #fff; transform-origin: top; transform: scaleY(var(--p, 0)); }

/* ——— манифест и преимущества ——— */
.statement { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; font-size: clamp(28px, 3.7vw, 52px); line-height: 1.16; margin: 22px 0 80px; max-width: 28ch; color: var(--ink); }
.js .statement .sw { opacity: .13; transition: opacity .35s linear; }
.js .statement .sw.lit { opacity: 1; }
.adv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.adv article { position: relative; padding: 30px 28px 0 0; }
.adv .n { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .08em; margin-bottom: 40px; }
.adv h3 { font-size: 19px; font-weight: 500; line-height: 1.3; margin: 0 0 12px; }
.adv p { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0; }
.guide { margin: 56px 0 0; font-size: 15px; color: var(--text); }
.guide a, .reviews .head a, .faq .head-side a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 0, 0, .3); }
.guide a:hover, .reviews .head a:hover, .faq .head-side a:hover { text-decoration-color: var(--ink); }

/* ——— шаги ——— */
.steps { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.steps::after { background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 1)); }
.step { position: relative; padding: 34px 28px 0 0; }
.step::before { content: ""; position: absolute; left: 0; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: background .4s, box-shadow .4s, transform .5s var(--ease); z-index: 1; }
.step.on::before { background: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); transform: scale(1.25); }
.step .n { display: block; font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--line); transition: color .6s var(--ease); }
.step.on .n { color: var(--ink); }
.step h3 { font-size: 18px; font-weight: 500; margin: 22px 0 8px; }
.step p { font-size: 15px; line-height: 1.6; color: var(--text); margin: 0; }

/* ——— об авторе ——— */
.about { overflow: hidden; }
.about .wrap { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 80px; padding-top: 120px; padding-bottom: 120px; align-items: center; }
.photo { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #0a0a0a; }
.photo img { width: 100%; height: 115%; object-fit: cover; object-position: center top; transform: translateY(var(--py, 0)); }
.photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--dark) 0%, rgba(13, 14, 15, 0) 32%); }
.about h2 { font-size: clamp(36px, 4.4vw, 58px); line-height: 1.03; margin: 14px 0 10px; }
.about .role { color: var(--text-d); font-size: 15px; margin: 0 0 28px; }
.about .bio { font-size: 17px; line-height: 1.65; color: var(--text-d); margin: 0 0 30px; max-width: 52ch; }
.about blockquote { margin: 0 0 36px; padding-left: 22px; border-left: 1px solid #fff; font-family: var(--serif); font-size: 23px; line-height: 1.42; color: #fff; max-width: 34ch; }

/* ——— FAQ и последствия ——— */
.faq { padding-top: 40px !important; }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); gap: 64px; align-items: start; }
.head-side { position: sticky; top: 100px; }
.head-side h2 { font-size: clamp(36px, 4.4vw, 58px); line-height: 1.03; margin: 14px 0 0; }
.legal-more { margin: 14px 0 0; font-size: 14px; }
.legal-more a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal-more a:hover { text-decoration-thickness: 2px; }
/* подсказка «Последствия»: весь перечень без потолка высоты из site.css (520px резали последний пункт);
   раскрытие — через строку сетки 0fr → 1fr, высота по содержимому */
#conseq-pop { display: grid; grid-template-rows: 0fr; max-height: none; transition: grid-template-rows .5s var(--ease), margin-top .4s var(--ease), padding .4s var(--ease), opacity .3s, transform .5s var(--ease), box-shadow .4s; }
#conseq-pop > .cite-list { min-height: 0; overflow: hidden; }
#consequences .legal-cite:hover #conseq-pop, #consequences .legal-cite:focus-within #conseq-pop { grid-template-rows: 1fr; max-height: none; }

/* ═══════════ движение главной ═══════════ */
@media (prefers-reduced-motion: no-preference) {
  .js .photo { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease-io); }
  .js .photo img { scale: 1.18; transition: scale 2.2s var(--ease); }
  .js .photo.in { clip-path: inset(0); }
  .js .photo.in img { scale: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .js .svc-step { opacity: 1; }
  .layer, .layer.off { transition: none; }
}

/* ——— адаптив ——— */
@media (max-width: 1080px) {
  .adv { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}
@media (max-width: 900px) {
  .mega-word .ln { white-space: normal; }
  .hero { min-height: 0; }
  .hero-grid { padding-top: calc(var(--top-h) + 40px); padding-bottom: 40px; }
  .mega-sub { margin-top: 14px; }
  .hero .lead { margin-bottom: 36px; }
  .doors { grid-template-columns: 1fr; }
  .door { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line-d); padding: 22px 0; }
  .door::before, .door:first-child::before { left: calc(-1 * var(--gut)); right: calc(-1 * var(--gut)); }
  .door:hover { padding-left: 0; }
  .facts .wrap { grid-template-columns: 1fr; }
  .fact { padding: 22px 12px 24px 0; margin-right: 12px; }
  .fact { border-right: 0; margin-right: 0; border-bottom: 1px solid var(--line-d); }
  .fact:last-child { border-bottom: 0; }
  .fact b { font-size: 24px; }
  .scrolly { padding: 80px 0 40px; }
  .svc-docs { grid-template-columns: 1fr; }
  .svc-docs .link-d { grid-column: auto; }
  .scrolly-grid { grid-template-columns: 1fr; }
  .scrolly-media { display: none; }
  .js .svc-step, .svc-step { min-height: 0; padding: 32px 0 40px; opacity: 1; }
  .inline-art { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 8px; }
  .statement { margin-bottom: 56px; }
  .adv { grid-template-columns: 1fr; row-gap: 32px; }
  .adv .n { margin-bottom: 14px; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .steps::before, .steps::after { display: none; }
  .step { border-top: 1px solid var(--line); }
  .step::before { display: none; }
  .step .n { color: var(--ink); font-size: 44px; }
  .about .wrap { grid-template-columns: 1fr; gap: 36px; padding-top: 80px; padding-bottom: 80px; }
  .photo { max-width: 420px; }
  .faq-grid { grid-template-columns: 1fr; gap: 18px; }
  .head-side { position: static; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
}
