:root {
  --bg-outer: #F3EBE1;
  --bg-shell: #FAF5EF;
  --bg-white: #FFFFFF;
  --border: #EDE3D6;
  --text-primary: #241F1B;
  --text-secondary: #6F655C;
  --text-muted: #8C8177;
  --text-faint: #9B8F80;
  --text-faintest: #A2978C;
  --text-whisper: #B0A599;
  --accent: #C2683F;
  --accent-hover: #A5522D;
  --accent-soft: #F7E9DF;
  --accent-disabled: #DCCDBC;
  --green: #7A8B5A;
  --placeholder-a: #F1E7DA;
  --placeholder-b: #EADFCF;
  --font-serif: 'Literata', Georgia, serif;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg-outer); }
body { font-family: var(--font-sans); color: var(--text-primary); }
input, button, textarea { font-family: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
button { -webkit-appearance: none; appearance: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.page {
  min-height: 100svh;
  background: var(--bg-outer);
  display: flex;
  justify-content: center;
}

.shell {
  width: 100%;
  max-width: 430px;
  background: var(--bg-shell);
  min-height: 100svh;
  box-shadow: 0 0 60px rgba(60, 40, 25, .10);
  position: relative;
  overflow: hidden;
}

@media (min-width: 880px) {
  .shell { max-width: 1120px; box-shadow: 0 20px 80px rgba(60, 40, 25, .10); }
}

[hidden] { display: none !important; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
}

@media (min-width: 880px) {
  .hero { grid-template-columns: 1.02fr 1fr; grid-template-rows: 1fr; }
}

.hero-media { position: relative; overflow: hidden; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
}
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(36,31,27,.10) 0%, rgba(36,31,27,.06) 45%, rgba(250,245,239,.85) 88%, var(--bg-shell) 100%);
}
@media (min-width: 880px) {
  .hero-media::after { background: linear-gradient(to right, rgba(36,31,27,.10), rgba(36,31,27,0) 60%); }
}

.hero-brand {
  position: absolute; top: 20px; left: 22px; z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.hero-brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: block; }
.hero-brand span.name {
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.35);
}

.hero-copy {
  padding: 0 22px 26px;
  display: flex; flex-direction: column; gap: 16px;
  margin-top: -8px;
}
@media (min-width: 880px) {
  .hero-copy { padding: 0 56px 0 48px; align-self: center; margin-top: 0; }
}

.hero-copy h1 {
  font-family: var(--font-serif); font-weight: 500;
  font-size: 33px; line-height: 1.14; margin: 0; letter-spacing: -.01em;
  text-wrap: pretty;
}
@media (min-width: 880px) { .hero-copy h1 { font-size: 46px; } }

.hero-copy p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--text-secondary); text-wrap: pretty; }

.btn-primary {
  width: 100%; border: none; border-radius: 18px;
  background: var(--accent); color: #FFF7F1;
  font-size: 17px; font-weight: 700; padding: 19px 20px;
  cursor: pointer; box-shadow: 0 10px 24px rgba(194,104,63,.28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(194,104,63,.34); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { background: var(--accent-disabled); box-shadow: none; cursor: default; pointer-events: none; }
@media (min-width: 880px) { .btn-primary.cta-narrow { max-width: 420px; } }

.hero-note {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; color: var(--text-muted);
}
.hero-note .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); display: block; }
@media (min-width: 880px) { .hero-note.cta-narrow { max-width: 420px; } }

/* ---------- Section shared ---------- */
.section { padding: 32px 22px 30px; }
@media (min-width: 880px) { .section { padding-top: 64px; padding-bottom: 64px; } }
.section-white { background: var(--bg-white); border-top: 1px solid var(--border); }
.section-white-both { background: var(--bg-white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.wrap { max-width: none; margin: 0 auto; }
@media (min-width: 880px) { .wrap { max-width: 880px; } }

.h2 { font-family: var(--font-serif); font-weight: 500; font-size: 24px; margin: 0 0 18px; }

/* ---------- Trust block ---------- */
.trust-top {
  display: grid; gap: 16px 26px; align-items: center;
  grid-template-columns: 96px 1fr;
}
@media (min-width: 880px) { .trust-top { grid-template-columns: 220px 1fr; } }
.trust-top img { width: 100%; height: 120px; object-fit: cover; border-radius: 16px; }
@media (min-width: 880px) { .trust-top img { height: 260px; } }
.trust-top .name { font-family: var(--font-serif); font-weight: 500; font-size: 21px; margin: 0; }
.trust-top .bio { margin: 7px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }

.stat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px;
}
@media (min-width: 880px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
.stat-card { background: var(--bg-shell); border-radius: 16px; padding: 16px 16px 14px; }
.stat-card .num { font-family: var(--font-serif); font-size: 28px; line-height: 1; color: var(--accent); }
.stat-card .label { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.stat-card.wide { grid-column: span 2; display: flex; gap: 12px; align-items: center; }
@media (min-width: 880px) { .stat-card.wide { grid-column: span 1; } }
.stat-card.wide .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.stat-card.wide .txt { font-size: 13px; color: var(--text-secondary); }

/* ---------- Cases carousel ---------- */
.cases-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cases-hint { font-size: 12px; color: var(--text-faintest); font-family: ui-monospace, monospace; }
@media (min-width: 880px) { .cases-hint { display: none; } }
.cases-row {
  margin-top: 16px; display: flex; gap: 12px; overflow-x: auto; padding: 4px 22px 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
@media (min-width: 880px) {
  .cases-row { flex-wrap: wrap; overflow-x: visible; justify-content: center; padding: 4px 0 8px; }
}
.case-card { flex: none; width: 210px; scroll-snap-align: start; background: var(--bg-white); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.case-photo {
  height: 220px; background-image: repeating-linear-gradient(135deg, var(--placeholder-a) 0 8px, var(--placeholder-b) 8px 16px);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.case-photo span { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-faint); padding: 0 14px; line-height: 1.5; }
/* Реальные фото до/после — уже готовые коллажи разных пропорций (портрет/квадрат).
   contain вместо cover, чтобы никогда не обрезать половину "было/стало". */
.case-photo-real { height: auto; aspect-ratio: 3 / 4; background: var(--bg-shell); background-image: none; }
.case-photo-real img { width: 100%; height: 100%; object-fit: contain; }
.case-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 5px; }
.case-body .name { font-size: 15px; font-weight: 600; }
.case-body .meta { font-size: 13px; color: var(--text-secondary); }

/* ---------- Steps ---------- */
.steps3 { display: grid; gap: 14px 26px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 880px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }
.step-item { display: flex; gap: 14px; align-items: flex-start; }
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-outer);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.step-text .title { font-size: 16px; font-weight: 600; }
.step-text .desc { font-size: 14px; line-height: 1.5; color: var(--text-secondary); margin-top: 4px; }

/* ---------- Reviews ---------- */
.reviews-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .reviews-grid { grid-template-columns: repeat(3, 1fr); } }
.review-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: 18px; padding: 14px; display: flex; gap: 13px; align-items: center; }
.review-photo { flex: none; width: 74px; height: 92px; border-radius: 12px; background-image: repeating-linear-gradient(135deg, var(--placeholder-a) 0 8px, var(--placeholder-b) 8px 16px); }
.review-text { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-faint); line-height: 1.6; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 8px; align-items: start; grid-template-columns: 1fr; }
@media (min-width: 880px) { .faq-grid { grid-template-columns: repeat(2, 1fr); } }
.faq-item { border: 1px solid var(--border); border-radius: 16px; background: var(--bg-shell); overflow: hidden; }
.faq-q {
  width: 100%; background: none; border: none; text-align: left; padding: 15px 16px;
  font-size: 15px; font-weight: 600; color: var(--text-primary); cursor: pointer;
  display: flex; gap: 12px; justify-content: space-between; align-items: center;
}
.faq-q .sign { color: var(--accent); font-size: 18px; flex: none; }
.faq-a { padding: 0 16px 16px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); }

.faq-cta-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer { padding: 24px 22px 34px; background: var(--bg-outer); }
.site-footer .disclaimer { margin: 0 0 12px; font-size: 11px; line-height: 1.6; color: var(--text-faint); }
.site-footer .links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; }
.site-footer .copy { margin: 14px 0 0; font-size: 11px; color: var(--text-whisper); }

/* ---------- Quiz ---------- */
.quiz { min-height: 100svh; display: flex; flex-direction: column; }

.quiz-head {
  padding: 16px 20px 14px; display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: 0; background: var(--bg-shell); z-index: 5;
  width: 100%; margin: 0 auto;
}
@media (min-width: 880px) { .quiz-head { max-width: 560px; } }
.quiz-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.quiz-back { background: none; border: none; padding: 6px 8px 6px 0; font-size: 14px; color: var(--text-muted); cursor: pointer; }
.quiz-progress-label { font-size: 13px; color: var(--text-faintest); font-family: ui-monospace, monospace; }
.quiz-progress-track { height: 6px; border-radius: 99px; background: var(--placeholder-b); overflow: hidden; }
.quiz-progress-bar { height: 100%; border-radius: 99px; background: var(--accent); transition: width .35s ease; }

.quiz-body {
  flex: 1; padding: 10px 20px 30px; display: flex; flex-direction: column;
  width: 100%; margin: 0 auto;
}
@media (min-width: 880px) { .quiz-body { max-width: 560px; } }

.quiz-step { animation: fadeUp .3s ease both; display: flex; flex-direction: column; gap: 18px; }
.quiz-step h2 { font-family: var(--font-serif); font-weight: 500; font-size: 27px; line-height: 1.2; margin: 8px 0 0; text-wrap: pretty; }
.quiz-step .sub { margin: -8px 0 0; font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt-btn {
  width: 100%; min-height: 62px; text-align: left; padding: 18px; border-radius: 18px;
  border: 1.5px solid var(--border); background: var(--bg-white);
  font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--text-primary);
  cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.opt-btn:active { transform: translateY(1px); }
.opt-btn.selected { background: var(--accent-soft); border-color: var(--accent); }

.consent-box {
  display: flex; gap: 12px; align-items: flex-start; background: var(--bg-white);
  border: 1px solid var(--border); border-radius: 16px; padding: 14px; cursor: pointer;
}
.consent-box input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); flex: none; margin: 0; }
.consent-box .txt { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.consent-hint { margin: -6px 0 0; font-size: 12px; color: var(--text-faintest); }

.field-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--bg-white); border: 1px solid var(--border); border-radius: 18px; padding: 14px 18px;
}
.field-row .field-label { font-size: 16px; }
.field-row .field-input { display: flex; align-items: baseline; gap: 6px; }
.field-row input[type=number] {
  width: 84px; text-align: right; font-size: 22px; font-weight: 600; border: none;
  background: none; outline: none; color: var(--text-primary); padding: 0;
}
.field-row .field-unit { font-size: 14px; color: var(--text-faintest); }
.fields-col { display: flex; flex-direction: column; gap: 12px; }

.graph-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: 22px; padding: 18px 16px 14px; }
.graph-labels { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.graph-labels span { font-size: 13px; color: var(--text-muted); }
.graph-values { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.graph-values .from { font-family: var(--font-serif); font-size: 26px; }
.graph-values .to { font-family: var(--font-serif); font-size: 26px; color: var(--accent); }
.graph-footer { text-align: center; margin-top: 6px; }
.graph-footer .term { font-size: 15px; font-weight: 600; }
.graph-footer .pace { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.graph-legal { margin: 0; font-size: 11px; line-height: 1.6; color: var(--text-faint); }

.final-photo {
  height: 190px; border-radius: 22px;
  background-image: repeating-linear-gradient(135deg, var(--placeholder-a) 0 8px, var(--placeholder-b) 8px 16px);
  display: flex; align-items: center; justify-content: center;
}
.final-photo span { font-family: ui-monospace, monospace; font-size: 11px; color: var(--text-faint); text-align: center; padding: 0 24px; line-height: 1.6; }

.summary-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.summary-row .k { color: var(--text-muted); }
.summary-row .v { font-weight: 600; text-align: right; }

.final-cta {
  display: block; text-align: center; border-radius: 18px; background: var(--accent-disabled);
  color: #FFF7F1; font-size: 17px; font-weight: 700; padding: 19px 20px; pointer-events: none;
}
.final-cta.ready { background: var(--accent); pointer-events: auto; }
.final-cta-hint { margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--text-faintest); }

.quiz-spacer { flex: 1; }
.quiz-next { width: 100%; margin-top: 22px; border: none; border-radius: 18px; background: var(--accent-disabled); color: #FFF7F1; font-size: 17px; font-weight: 700; padding: 19px 20px; cursor: pointer; }
.quiz-next.ready { background: var(--accent); }
.quiz-next:active { transform: translateY(1px); }

/* ---------- Legal pages ---------- */
.legal-page { max-width: 680px; margin: 0 auto; padding: 40px 22px 60px; font-family: var(--font-sans); color: var(--text-primary); line-height: 1.6; }
.legal-page h1 { font-family: var(--font-serif); font-size: 28px; }
.legal-page a.back { display: inline-block; margin-bottom: 24px; font-size: 14px; }
