/* Банкрот39 · сайт-визитка. Тёплый камень, жёсткое солнце, чёткие тени. */
:root {
  --stone: #E7DDCC;
  --stone-2: #DDD0BA;
  --stone-3: #CFBFA4;
  --ink: #17130E;
  --ink-2: #4B4237;
  --ink-3: #7A6E5F;
  --seal: #A8361B;
  --shadow: rgba(48, 33, 18, .42);
  --line: rgba(23, 19, 14, .14);
  --display: "Forum", "Times New Roman", serif;
  --text: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gut: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --sun: 0; /* 0..1, двигается со скроллом */
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--stone); color: var(--ink);
  font: 400 17px/1.55 var(--text); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.display {
  font: 400 clamp(56px, 10.5vw, 168px)/.86 var(--display);
  letter-spacing: -.01em; text-transform: uppercase;
}
.hero .display { font-size: clamp(56px, 7.6vw, 128px); }
.hero .line:nth-child(-n+2) { display: inline-block; vertical-align: top; margin-right: .22em; }
.display.sm { font-size: clamp(40px, 6vw, 92px); line-height: .92; }
.muted { color: var(--ink-3); }

/* ---------- шапка */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--gut); transition: background .4s, box-shadow .4s;
}
.top.solid { background: color-mix(in srgb, var(--stone) 88%, transparent); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 22px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand svg { width: 28px; height: 28px; }
.brand b { font-weight: 400; color: var(--seal); }
.top-phone { font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }

/* ---------- первый экран */
.hero {
  position: relative; min-height: 100svh; padding: 96px var(--gut) 0;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); grid-template-rows: 1fr auto;
  overflow: hidden; isolation: isolate;
}
.sun {
  position: absolute; inset: -20% -10%; z-index: -1; pointer-events: none;
  background: linear-gradient(calc(118deg + var(--sun) * 14deg), transparent 0 38%, rgba(255, 246, 228, .55) 38% 58%, transparent 58%);
  mix-blend-mode: soft-light;
}
.hero::before { /* стена и пол */
  content: ""; position: absolute; inset: auto 0 0; height: 22%; z-index: -2;
  background: linear-gradient(var(--stone-2), var(--stone)); border-top: 1px solid rgba(23, 19, 14, .06);
}
.hero-copy { align-self: center; padding: 4vh 0 6vh; position: relative; z-index: 2; }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 22px; }
.line { display: block; overflow: hidden; padding-bottom: .04em; }
.line > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.ready .line > span { transform: none; }
.line:nth-child(2) > span { transition-delay: .08s; }
.line:nth-child(3) > span { transition-delay: .16s; }
.lead { max-width: 30ch; margin-top: 26px; font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); }

.first-q { margin-top: 34px; max-width: 520px; }
.first-q-label { font-weight: 600; margin-bottom: 12px; }
.chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chip, .opt {
  appearance: none; border: 1px solid var(--ink); background: transparent; border-radius: 999px;
  padding: 14px 18px; text-align: left; cursor: pointer; font-weight: 500; position: relative; overflow: hidden;
  transition: color .35s var(--ease), border-color .35s; isolation: isolate; min-height: 52px;
}
.chip::before, .opt::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink);
  transform: translateY(101%); transition: transform .45s var(--ease); border-radius: inherit;
}
.chip:hover::before, .opt:hover::before, .opt[aria-pressed="true"]::before { transform: none; }
.chip:hover, .opt:hover, .opt[aria-pressed="true"] { color: var(--stone); }
.chip:focus-visible, .opt:focus-visible, .btn:focus-visible, input:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }

/* статуя: изображение + живая тень на стене */
.themis { position: relative; margin: 0; align-self: end; justify-self: center; height: min(86svh, 980px); aspect-ratio: 443 / 995; z-index: 1; }
.themis-img, .themis-seq { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: bottom; }
.themis-img { filter: drop-shadow(-6px 10px 14px rgba(48, 33, 18, .18)); transform: translateY(calc(var(--lift, 0) * -1px)); }
.themis-shadow {
  position: absolute; inset: 0; transform-origin: 50% 97%; pointer-events: none;
  transform: translateX(calc(-8% - var(--sun) * 10%)) skewX(calc(28deg + var(--sun) * 14deg)) scaleY(calc(.98 + var(--sun) * .12));
  opacity: calc(.5 - var(--sun) * .12);
}
.themis-shadow img { width: 100%; height: 100%; object-fit: contain; object-position: bottom; filter: brightness(0) blur(.6px); opacity: .62; }
.js .themis { opacity: 0; transform: translateY(40px); transition: opacity 1.4s var(--ease) .2s, transform 1.6s var(--ease) .2s; }
.js.ready .themis { opacity: 1; transform: none; }

.facts {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 22px 0 28px; display: flex; gap: clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line); position: relative; z-index: 2;
}
.facts li { display: grid; gap: 2px; }
.facts b { font: 400 clamp(28px, 3vw, 40px)/1 var(--display); }
.facts li > span { font-size: 14px; color: var(--ink-2); }

/* ---------- квиз */
.quiz-wrap { position: relative; overflow: hidden; isolation: isolate; padding: clamp(64px, 10vw, 140px) var(--gut); background: var(--ink); color: var(--stone); scroll-margin-top: 0; }
.quiz { scroll-margin-top: 96px; position: relative; z-index: 1; max-width: 760px; margin: 0 auto; min-height: 520px; display: flex; flex-direction: column; }
.quiz-head { display: flex; align-items: center; gap: 18px; margin-bottom: 40px; }
.quiz-kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; color: var(--stone-3); }
.bar { flex: 1; height: 2px; background: rgba(231, 221, 204, .18); }
.bar i { display: block; height: 100%; width: 20%; background: var(--stone); transition: width .6s var(--ease); }
.quiz-body { flex: 1; }
.q-title { font: 400 clamp(34px, 5vw, 64px)/1 var(--display); text-transform: uppercase; margin-bottom: 30px; }
.q-hint { color: var(--stone-3); margin: -16px 0 26px; }
.opts { display: grid; gap: 12px; }
.opt { border-color: rgba(231, 221, 204, .5); padding: 18px 22px; font-size: 18px; }
.opt::before { background: var(--stone); }
.opt:hover, .opt[aria-pressed="true"] { color: var(--ink); border-color: var(--stone); }
.step-in { animation: stepIn .6s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateY(24px); } }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field span { font-size: 14px; color: var(--stone-3); }
.field input {
  font: 500 20px/1.2 var(--text); color: var(--stone); background: transparent; border: 0;
  border-bottom: 1px solid rgba(231, 221, 204, .45); padding: 12px 0; border-radius: 0;
}
.field input::placeholder { color: rgba(231, 221, 204, .35); }
.field input:focus { border-bottom-color: var(--stone); outline: none; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--stone-3); margin-top: 6px; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--stone); flex: none; }
.consent a { color: var(--stone); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { color: #F2A48C; min-height: 1.4em; font-size: 15px; }
.back { align-self: flex-start; margin-top: 28px; background: none; border: 0; color: var(--stone-3); cursor: pointer; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 60px; padding: 0 34px;
  border-radius: 999px; font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; border: 0;
  position: relative; overflow: hidden; isolation: isolate; transition: transform .3s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn-light { background: var(--stone); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--stone); }
.btn::after { content: "→"; transition: transform .35s var(--ease); }
.btn:hover::after { transform: translateX(5px); }
.btn[disabled] { opacity: .6; cursor: progress; }

.done { display: grid; gap: 20px; justify-items: start; align-content: start; }
.done .q-title { margin-bottom: 0; }
.done .seal {
  width: 88px; height: 88px; border-radius: 50%; border: 1px solid var(--stone); display: grid; place-items: center;
  font: 400 40px/1 var(--display); animation: stamp .7s var(--ease) both;
}
@keyframes stamp { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } }
.done p { color: var(--stone-3); max-width: 46ch; }
.alt { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.alt a { border: 1px solid rgba(231, 221, 204, .45); border-radius: 999px; padding: 12px 18px; text-decoration: none; font-weight: 500; }
.alt a:hover { border-color: var(--stone); }

/* ---------- деньги */
.money { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: var(--gut); padding: clamp(80px, 12vw, 180px) var(--gut); overflow: hidden; }
.money-stage { position: relative; height: clamp(360px, 46vw, 620px); display: grid; place-items: center; perspective: 1200px; }
.money-float {
  width: min(78%, 440px); will-change: transform; transform-style: preserve-3d;
  transform: translateY(calc(var(--mfloat, 0) * 1px)) rotateZ(calc(var(--mrot, 0) * 1deg)) rotateY(calc(var(--mry, 0) * 1deg));
}
.money-float img, .money-float video { width: 100%; height: auto; }
.money-shadow {
  position: absolute; left: 50%; bottom: 2%; width: 56%; height: 9%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(48, 33, 18, .45), transparent);
  transform: translateX(-38%) scale(calc(1 - var(--mfloat, 0) / -120)); filter: blur(2px);
}
.money-copy { display: grid; gap: 22px; }
.money-copy > p:first-of-type { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 44ch; }
.big-num { font: 400 clamp(64px, 9vw, 140px)/.9 var(--display); color: var(--seal); margin-top: 10px; }
.big-num + .muted { margin-top: -10px; }

/* ---------- шаги */
.steps { padding: clamp(60px, 9vw, 140px) var(--gut); border-top: 1px solid var(--line); }
.steps h2 { max-width: 14ch; margin-bottom: clamp(36px, 6vw, 80px); }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.steps li { background: var(--stone); padding: 28px 26px 36px 0; display: grid; gap: 22px; align-content: start; }
.steps li + li { padding-left: 26px; }
.steps i { font: 400 64px/1 var(--display); font-style: normal; color: var(--seal); }
.steps h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: 16px; }

/* ---------- дела */
.cases { padding: clamp(60px, 9vw, 140px) 0; background: var(--stone-2); }
.cases > h2, .cases > p { padding: 0 var(--gut); }
.cases > p { margin-top: 14px; }
.case-row { scroll-padding-inline: var(--gut); display: flex; gap: 16px; overflow-x: auto; padding: 40px var(--gut) 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.case-row::-webkit-scrollbar { display: none; }
.case {
  flex: 0 0 min(78vw, 320px); scroll-snap-align: start; background: var(--stone); padding: 28px; border-radius: 4px;
  box-shadow: 18px 18px 0 -2px rgba(48, 33, 18, .12); display: grid; gap: 6px;
}
.case-sum { font: 400 40px/1 var(--display); }
.case-no { font-weight: 600; margin-top: 18px; font-variant-numeric: tabular-nums; }
.case-date { color: var(--ink-3); font-size: 14px; }

/* ---------- вопросы */
.faq { padding: clamp(60px, 9vw, 140px) var(--gut); max-width: 980px; }
.faq h2 { margin-bottom: 36px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font: 400 32px/1 var(--display); transition: rotate .35s var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 62ch; }

/* ---------- финал и подвал */
.final { padding: clamp(80px, 12vw, 180px) var(--gut); display: grid; justify-items: start; gap: 34px; border-top: 1px solid var(--line); }
.final h2 { max-width: 12ch; }
.contacts { display: flex; flex-wrap: wrap; gap: 10px 26px; font-weight: 500; }
.contacts a { text-underline-offset: 5px; }
.foot { background: var(--ink); color: var(--stone-3); padding: 48px var(--gut) calc(48px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.main-site { color: var(--stone); font: 400 clamp(26px, 3vw, 38px)/1.1 var(--display); text-transform: uppercase; text-decoration: none; }
.main-site:hover { text-decoration: underline; text-underline-offset: 6px; }
.fine { font-size: 13px; max-width: 90ch; }

.dock {
  position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 45; display: none;
  background: var(--ink); color: var(--stone); text-align: center; padding: 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
  box-shadow: 0 14px 30px -10px rgba(23, 19, 14, .55); transform: translateY(160%); transition: transform .5s var(--ease);
}
.dock.on { transform: none; }

/* появление при прокрутке */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- телефон */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .top-phone { font-size: 15px; }
  .hero { grid-template-columns: 1fr; grid-template-rows: auto; padding-top: 84px; }
  .hero-copy { padding: 2vh 0 0; }
  .display { font-size: clamp(52px, 17vw, 96px); }
  .themis { position: absolute; right: -22vw; top: 64px; height: min(66svh, 600px); z-index: 0; pointer-events: none; }
  .themis-img, .themis-shadow img { -webkit-mask-image: linear-gradient(#000 55%, transparent 88%); mask-image: linear-gradient(#000 55%, transparent 88%); }
  .js.ready .themis { opacity: .92; }
  .hero .line:nth-child(n) { display: block; margin-right: 0; }
  .hero .display { font-size: clamp(52px, 17vw, 96px); }
  .hero-copy .lead { max-width: 22ch; }
  .first-q { padding: 8px 0 0; }
  .chips { grid-template-columns: 1fr; }
  .facts { gap: 18px; justify-content: space-between; }
  .facts li > span { font-size: 12px; }
  .money { grid-template-columns: 1fr; }
  .money-stage { height: 320px; order: 2; }
  .steps ol { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 26px 0; grid-template-columns: 64px 1fr; }
  .steps i { font-size: 44px; }
  .dock { display: block; }
  .quiz { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .line > span, .js .reveal, .js .themis { transform: none; opacity: 1; }
}

/* тень Фемиды как водяной знак в тёмных блоках */
.quiz-wrap::after, .final::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; right: -4%; bottom: 0; width: 46%; height: 112%;
  background: var(--stone); opacity: .05; transform-origin: 50% 100%; transform: skewX(-24deg);
  -webkit-mask: url(/assets/themis.webp) no-repeat 50% 100% / contain; mask: url(/assets/themis.webp) no-repeat 50% 100% / contain;
}
.final { position: relative; overflow: hidden; isolation: isolate; }
.final::after { background: var(--ink); opacity: .1; transform: skewX(32deg); right: 6%; height: 104%; }
@media (max-width: 860px) { .quiz-wrap::after, .final::after { width: 90%; right: -30%; } }
