/* ============================================================
   СЕНСЕЙ · Вячеслав Молчанов — sensei-molchanov.ru
   Палитра и типографика — по требованиям роли №6 (UI-дизайнер).
   Ни одного обращения к стороннему домену.
   ============================================================ */

@font-face {
    font-family: 'Playfair Display';
    src: url('/fonts/playfair-cyr.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: 'Manrope';
    src: url('/fonts/manrope-cyr.woff2') format('woff2');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    --ink-900: #08090B;
    --ink-850: #0D0F12;
    --ink-800: #12151A;
    --ink-700: #1A1E24;

    --line: rgba(232, 228, 218, .10);
    --line-gold: rgba(201, 162, 39, .28);

    --text: #E8E4DA;
    --text-muted: #B8B1A4;

    --gold-500: #C9A227;
    --gold-400: #D8B872;
    --gold-300: #E7CE9B;
    --error: #E06A5A;

    --gold-metal: linear-gradient(145deg, #E7CE9B 0%, #C9A227 42%, #8F6E15 78%, #D8B872 100%);

    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

    /* Шкала отступов — других значений в файле нет */
    --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
    --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

    --container: 1180px;
    --pad: 20px;
    --rhythm: 72px;
}

@media (min-width: 900px) {
    :root { --pad: 40px; --rhythm: 128px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--ink-900);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@media (min-width: 900px) { body { font-size: 18px; } }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-300); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-400); }

/* Фокус виден всегда и везде — без исключений */
:focus-visible {
    outline: 2px solid var(--gold-300);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--gold-500); color: #0A0A0A; padding: 12px 20px;
    font-weight: 600; border-radius: 0 0 4px 0;
}
.skip:focus { left: 0; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--pad);
}

/* ---------- Типографика ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; }

h1 {
    font-size: clamp(32px, 7vw, 62px);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(26px, 4.2vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

h3 {
    font-family: var(--sans);
    font-weight: 600;
    font-size: clamp(18px, 2.2vw, 22px);
    line-height: 1.3;
}

p { margin: 0 0 var(--s4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

.eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-300);
    margin: 0 0 var(--s4);
}
.eyebrow::before {
    content: '';
    display: block;
    width: 48px; height: 1px;
    background: var(--gold-500);
    margin-bottom: var(--s4);
}

.lead { font-size: clamp(17px, 2.1vw, 20px); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.small { font-size: 15px; line-height: 1.5; }
.caption { font-size: 13px; line-height: 1.45; color: var(--text-muted); margin-top: var(--s3); }

/* ---------- Секции ---------- */
.section { padding-block: var(--rhythm); }
.section--alt { background: var(--ink-850); }
.section--tight { padding-block: calc(var(--rhythm) * .7); }

/* ---------- Шапка ---------- */
.header {
    position: relative; z-index: 20;
    border-bottom: 1px solid var(--line);
    background: var(--ink-900);
}
.header__in {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--s4);
    min-height: 68px;
    flex-wrap: wrap;
}
.logo {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 17px;
    letter-spacing: 0.22em;
    color: var(--gold-300);
    text-decoration: none;
    white-space: nowrap;
}
.header__right { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.header__link { font-size: 14px; color: var(--text-muted); text-decoration: none; }
.header__link:hover { color: var(--gold-300); }
.header__tel {
    font-size: 15px; font-weight: 600; color: var(--text);
    text-decoration: none; white-space: nowrap;
}
.header__tel:hover { color: var(--gold-300); }

/* ---------- Кнопки: все первичные одинаковы ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 56px; min-width: 260px;
    padding: 18px 34px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-family: var(--sans); font-size: 16px; font-weight: 600;
    line-height: 1.2; text-align: center; text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--gold-500); color: #0A0A0A; }
.btn--primary:hover { background: var(--gold-400); color: #0A0A0A; transform: translateY(-1px); box-shadow: 0 8px 30px rgba(201, 162, 39, .18); }
.btn--ghost { background: transparent; border-color: rgba(201, 162, 39, .45); color: var(--gold-300); }
.btn--ghost:hover { border-color: var(--gold-400); color: var(--gold-400); transform: translateY(-1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
@media (max-width: 560px) {
    .btn { width: 100%; min-width: 0; }
    .btn-row { gap: var(--s3); }
}

/* ---------- Первый экран ---------- */
.hero { position: relative; padding-block: var(--s7) var(--rhythm); overflow: hidden; }
.hero__grid { display: grid; gap: var(--s7); align-items: center; }
@media (min-width: 900px) {
    .hero { padding-block: var(--s9) var(--s10); }
    .hero__grid { grid-template-columns: 1.05fr .95fr; gap: var(--s8); }
}
.hero__sub { margin-top: var(--s5); font-size: clamp(17px, 2.1vw, 20px); color: var(--text-muted); }
.hero__regalia {
    margin-top: var(--s6);
    font-family: var(--serif);
    font-size: clamp(16px, 2.2vw, 21px);
    color: var(--gold-300);
    letter-spacing: .01em;
}
.hero__note { margin-top: var(--s4); font-size: 14px; color: var(--text-muted); }

.hero__media { position: relative; }
.hero__media img {
    width: 100%;
    border-radius: 8px;
    /* мягкое затухание нижнего края в фон страницы */
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 84%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 84%, transparent 100%);
}
.hero__badge {
    margin-top: var(--s3);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}
@media (max-width: 899px) {
    .hero__media { order: 2; max-width: 420px; margin-inline: auto; }
    .hero__text { order: 1; }
}

/* ---------- Карточки ---------- */
.grid { display: grid; gap: var(--s4); }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: var(--s5);
}
.card__num {
    font-family: var(--serif);
    font-size: 15px;
    color: var(--gold-500);
    letter-spacing: .1em;
    display: block;
    margin-bottom: var(--s3);
}
.card h3 { margin: 0 0 var(--s3); }
.card p { font-size: 16px; color: var(--text-muted); }

/* ---------- Список-чеклист ---------- */
.checks { list-style: none; margin: var(--s5) 0 0; padding: 0; max-width: 68ch; }
.checks li {
    position: relative;
    padding-left: 28px;
    margin-bottom: var(--s3);
    color: var(--text-muted);
}
.checks li::before {
    content: '';
    position: absolute; left: 0; top: .62em;
    width: 9px; height: 9px;
    border: 1px solid var(--gold-500);
    transform: rotate(45deg);
}
.checks strong { color: var(--text); font-weight: 600; }

.nolist { list-style: none; margin: var(--s5) 0 0; padding: 0; max-width: 68ch; }
.nolist li {
    position: relative;
    padding-left: 26px;
    margin-bottom: var(--s4);
    color: var(--text-muted);
}
.nolist li::before {
    content: '—';
    position: absolute; left: 0; top: 0;
    color: var(--gold-500);
}

/* ---------- Секция «сдержанная»: цена, отказы, здоровье ---------- */
.plain {
    background: var(--ink-850);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.plain h2 { font-family: var(--sans); font-weight: 600; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.01em; }
.plain p, .plain li { font-size: 16px; }

/* ---------- Шаги ---------- */
.steps { counter-reset: st; list-style: none; margin: var(--s6) 0 0; padding: 0; }
.steps li {
    counter-increment: st;
    position: relative;
    padding-left: 56px;
    margin-bottom: var(--s5);
    max-width: 68ch;
    color: var(--text-muted);
}
.steps li::before {
    content: counter(st);
    position: absolute; left: 0; top: -2px;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border: 1px solid var(--line-gold);
    border-radius: 4px;
    font-family: var(--serif);
    color: var(--gold-300);
    font-size: 17px;
}
.steps strong { color: var(--text); display: block; font-weight: 600; margin-bottom: 2px; }

/* ---------- Фото-блок результатов ---------- */
.proof { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 900px) { .proof { grid-template-columns: 1fr 1fr; gap: var(--s8); } }
.proof img { border-radius: 8px; }

/* ---------- FAQ ---------- */
.faq { margin-top: var(--s6); max-width: 80ch; }
.faq details {
    border-bottom: 1px solid var(--line);
    padding: var(--s4) 0;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 17px;
    list-style: none;
    display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4);
    color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+';
    color: var(--gold-500);
    font-size: 22px;
    line-height: 1;
    flex: 0 0 auto;
}
.faq details[open] summary::after { content: '–'; }
.faq details p { margin-top: var(--s3); color: var(--text-muted); font-size: 16px; }

/* ---------- Квиз-форма ---------- */
.quiz-wrap {
    background: var(--ink-800);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: var(--s5);
    margin-top: var(--s6);
}
@media (min-width: 700px) { .quiz-wrap { padding: var(--s7); } }

.quiz__progress {
    display: none;
    align-items: center;
    gap: var(--s3);
    margin-bottom: var(--s5);
    font-size: 13px;
    color: var(--text-muted);
}
html.js .quiz__progress { display: flex; }
.quiz__bar { flex: 1; height: 2px; background: var(--line); position: relative; }
.quiz__bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold-500); width: 0; transition: width .3s ease; }

.step { margin-bottom: var(--s7); }
html.js .step { display: none; margin-bottom: 0; }
html.js .step.is-active { display: block; }

.step__q {
    font-family: var(--serif);
    font-size: clamp(21px, 3vw, 28px);
    line-height: 1.25;
    margin: 0 0 var(--s5);
}
.step__hint { font-size: 14px; color: var(--text-muted); margin: calc(var(--s5) * -1 + var(--s3)) 0 var(--s5); }

.opts { display: grid; gap: var(--s2); margin-bottom: var(--s4); }
.opt {
    position: relative;
    display: block;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--ink-850);
    transition: border-color .18s ease, background-color .18s ease;
}
.opt:hover { border-color: var(--line-gold); background: var(--ink-700); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt span {
    display: block;
    padding: 15px 18px;
    min-height: 52px;
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
}
.opt input:checked + span { color: var(--gold-300); }
.opt:has(input:checked) { border-color: var(--gold-500); background: var(--ink-700); }
.opt:has(input:focus-visible) { outline: 2px solid var(--gold-300); outline-offset: 2px; }

.field { margin-bottom: var(--s4); }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: var(--s2); }
.field .req { color: var(--gold-500); }
.field input[type="text"],
.field input[type="tel"],
.field textarea {
    width: 100%;
    background: var(--ink-850);
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px; /* не ниже 16px — иначе iOS зумит страницу */
    padding: 15px 16px;
    min-height: 54px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #6E6A62; }
.field input:focus, .field textarea:focus { border-color: var(--gold-500); outline: none; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 2px; }
.field--error input, .field--error textarea { border-color: var(--error); }
.field__err { display: none; color: var(--error); font-size: 14px; margin-top: var(--s2); }
.field--error .field__err { display: block; }

.consent { display: flex; gap: var(--s3); align-items: flex-start; margin: var(--s5) 0; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--gold-500); flex: 0 0 auto; }
.consent label { font-size: 14px; color: var(--text-muted); line-height: 1.5; }

.hp { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

.quiz__nav { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; }
.quiz__back {
    background: none; border: none; color: var(--text-muted);
    font-family: var(--sans); font-size: 15px; cursor: pointer;
    padding: 10px 4px; min-height: 44px;
}
.quiz__back:hover { color: var(--gold-300); }
.quiz__note { font-size: 14px; color: var(--text-muted); margin-top: var(--s4); }

.notice {
    border-left: 2px solid var(--gold-500);
    background: var(--ink-850);
    padding: var(--s4);
    font-size: 15px;
    color: var(--text-muted);
    margin-top: var(--s4);
}

.formmsg { margin-top: var(--s4); font-size: 16px; }
.formmsg--err { color: var(--error); }
.formmsg--ok { color: var(--gold-300); }

/* ---------- Финальный CTA на фото ---------- */
.final {
    position: relative;
    background: var(--ink-900);
    isolation: isolate;
    text-align: center;
    padding-block: var(--rhythm);
}
.final__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.final__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.final::before {
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(8, 9, 11, .78) 0%, rgba(8, 9, 11, .92) 100%);
}
.final .btn-row { justify-content: center; }
.final p { margin-inline: auto; }

/* ---------- Подвал ---------- */
.footer {
    background: var(--ink-900);
    border-top: 1px solid var(--line);
    padding-block: var(--s7);
    font-size: 14px;
    color: var(--text-muted);
}
.footer__grid { display: grid; gap: var(--s5); }
@media (min-width: 800px) { .footer__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--gold-300); }
.footer__legal { font-size: 13px; line-height: 1.5; opacity: .85; }

/* ---------- Липкая панель на мобильном ---------- */
.sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: 64px;
    display: none;
    gap: var(--s2);
    padding: 8px 12px;
    background: rgba(8, 9, 11, .92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(201, 162, 39, .2);
    transform: translateY(105%);
    transition: transform .25s ease;
}
.sticky.is-on { transform: translateY(0); }
.sticky .btn { min-width: 0; flex: 1; min-height: 48px; padding: 12px 10px; font-size: 15px; }
@media (max-width: 899px) {
    .sticky { display: flex; }
    body { padding-bottom: 0; }
    body.has-sticky { padding-bottom: 64px; }
}

/* ---------- Появление блоков ---------- */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html.js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- Служебные страницы ---------- */
.mini { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-block: var(--s9); }
.mini .btn-row { justify-content: center; }
.doc { padding-block: var(--rhythm); }
.doc h2 { font-family: var(--sans); font-weight: 600; font-size: 22px; margin-top: var(--s6); }
.doc p, .doc li { font-size: 16px; color: var(--text-muted); }
.doc ol, .doc ul { max-width: 68ch; padding-left: 22px; }
.doc li { margin-bottom: var(--s3); }
