/* Somnimed — дизайн-система.
   Направление: «ночь → рассвет». Глубокий индиго как доминанта, тёплый
   рассветный янтарь как единственный акцент, контент на тёплой бумаге. */

:root {
    /* Ночь */
    --ink: #080D1C;
    --night: #101736;
    --night-2: #1A2450;
    --night-3: #27336B;

    /* Рассвет — акцент, один на весь сайт */
    --dawn: #F0A05A;
    --dawn-strong: #E4813A;
    --dawn-soft: #FBD9B0;

    /* Бумага и текст */
    --paper: #FBFAF6;
    --paper-2: #F3F1EA;
    --card: #FFFFFF;
    --text: #171C2E;
    --muted: #5C6379;
    --line: #E4E1D8;

    --radius-s: 10px;
    --radius: 18px;
    --radius-l: 28px;

    --shadow-s: 0 2px 8px rgba(8, 13, 28, .06);
    --shadow: 0 18px 40px -24px rgba(8, 13, 28, .45);
    --shadow-l: 0 40px 80px -40px rgba(8, 13, 28, .5);

    --step: clamp(4rem, 9vw, 7.5rem);   /* вертикальный ритм секций */
    --wrap: 1180px;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: Fraunces, Georgia, "Times New Roman", serif;
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.015em;
    margin: 0 0 .5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: rgba(240, 160, 90, .5); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--dawn); }

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

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

.eyebrow {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--dawn-strong);
    margin: 0 0 1rem;
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); }

.section { padding-block: var(--step); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* ── Кнопки ─────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .95rem 1.6rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    font-size: .97rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease),
                background-color .25s var(--ease), color .25s var(--ease);
}

.btn-primary {
    background: linear-gradient(135deg, var(--dawn) 0%, var(--dawn-strong) 100%);
    color: #2A1705;
    box-shadow: 0 14px 30px -14px rgba(228, 129, 58, .8);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -16px rgba(228, 129, 58, .9); }

.btn-ghost {
    background: transparent;
    color: inherit;
    border: 1px solid currentColor;
    opacity: .85;
}
.btn-ghost:hover { opacity: 1; transform: translateY(-2px); }

.btn-light { background: #fff; color: var(--ink); box-shadow: var(--shadow-s); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

/* ── Шапка ──────────────────────────────────────────────────────────── */

.header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(251, 250, 246, .82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 76px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.32rem;
    font-weight: 600;
    letter-spacing: -.02em;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-mark {
    width: 30px; height: 30px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, var(--night-3), var(--ink));
    position: relative;
    overflow: hidden;
}
.logo-mark::after {
    content: "";
    position: absolute;
    inset: -40% -55% auto auto;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--dawn);
    filter: blur(1px);
}

.nav { display: flex; align-items: center; gap: 1.45rem; margin-left: auto; }
.nav a { font-size: .95rem; text-decoration: none; color: var(--muted); transition: color .2s; white-space: nowrap; }
.nav a:hover, .nav a.is-active { color: var(--text); }

.lang {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    font-size: .82rem;
    font-weight: 600;
}
.lang a { padding: .3rem .7rem; text-decoration: none; color: var(--muted); }
.lang a.is-active { background: var(--ink); color: #fff; }

.header-phone { font-weight: 600; text-decoration: none; white-space: nowrap; }

.burger {
    display: none;
    width: 42px; height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    place-items: center;
}
.burger span, .burger span::before, .burger span::after {
    content: "";
    display: block;
    width: 18px; height: 1.5px;
    background: var(--text);
    transition: transform .3s var(--ease), opacity .2s;
}
.burger span::before { transform: translateY(-6px); }
.burger span::after { transform: translateY(4.5px); }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: rotate(45deg); }
.burger.is-open span::after { transform: rotate(-45deg) translateY(0); }

/* ── Герой ──────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(168deg, var(--ink) 0%, var(--night) 46%, var(--night-2) 100%);
    color: #fff;
    padding-block: clamp(4rem, 9vw, 7rem) clamp(5rem, 10vw, 8rem);
}

/* Рассвет у горизонта — источник тепла в холодной сцене */
.hero::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -46%;
    width: min(1100px, 130%);
    aspect-ratio: 1;
    transform: translateX(-50%);
    background: radial-gradient(circle,
        rgba(240, 160, 90, .40) 0%,
        rgba(240, 160, 90, .14) 42%,
        transparent 66%);
    pointer-events: none;
    animation: dawn-rise 2.4s var(--ease) both;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.4px 1.4px at 12% 22%, rgba(255,255,255,.75), transparent),
        radial-gradient(1.2px 1.2px at 78% 16%, rgba(255,255,255,.6), transparent),
        radial-gradient(1.6px 1.6px at 62% 38%, rgba(255,255,255,.5), transparent),
        radial-gradient(1.1px 1.1px at 32% 52%, rgba(255,255,255,.45), transparent),
        radial-gradient(1.3px 1.3px at 88% 46%, rgba(255,255,255,.4), transparent),
        radial-gradient(1px 1px at 46% 12%, rgba(255,255,255,.55), transparent);
    opacity: .9;
    pointer-events: none;
    animation: stars-fade 3s var(--ease) both;
}

@keyframes dawn-rise {
    from { opacity: 0; transform: translateX(-50%) translateY(14%); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes stars-fade { from { opacity: 0; } to { opacity: .9; } }

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .16);
    font-size: .82rem;
    letter-spacing: .04em;
    margin-bottom: 1.6rem;
}
.hero-badge::before {
    content: "";
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--dawn);
    box-shadow: 0 0 0 4px rgba(240, 160, 90, .22);
}

.hero h1 { color: #fff; margin-bottom: .6em; }
.hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--dawn-soft), var(--dawn));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-lead { color: rgba(255, 255, 255, .78); font-size: clamp(1.05rem, 1.5vw, 1.2rem); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.1rem; }
.hero-note { margin-top: 1.6rem; font-size: .9rem; color: rgba(255, 255, 255, .55); }

/* Карточка ночи справа */
.hero-card {
    position: relative;
    border-radius: var(--radius-l);
    padding: 2rem;
    background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: var(--shadow-l);
    backdrop-filter: blur(6px);
}
.hero-card h3 { color: #fff; font-size: 1.1rem; margin-bottom: 1.3rem; }

.sleep-line { display: grid; gap: .9rem; }
.sleep-row { display: flex; align-items: center; gap: .9rem; font-size: .92rem; color: rgba(255,255,255,.8); }
.sleep-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--dawn);
    flex-shrink: 0;
    box-shadow: 0 0 0 5px rgba(240, 160, 90, .16);
}
.sleep-row.is-muted .sleep-dot { background: rgba(255,255,255,.35); box-shadow: none; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.8rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255,255,255,.14);
}
.hero-stat b {
    display: block;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--dawn-soft);
}
.hero-stat span { font-size: .82rem; color: rgba(255,255,255,.6); }

/* ── Проблемы («узнаёте себя?») ─────────────────────────────────────── */

.problems { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

.problem {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 2rem 1.8rem;
    background: var(--card);
    text-decoration: none;
    transition: background-color .3s var(--ease), transform .3s var(--ease);
    position: relative;
}
.problem:hover { background: #fff; }
.problem::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--dawn), var(--dawn-soft));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s var(--ease);
}
.problem:hover::after { transform: scaleX(1); }

.problem-quote {
    font-family: Fraunces, Georgia, serif;
    font-size: 1.28rem;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.problem-name { font-size: .88rem; color: var(--dawn-strong); font-weight: 600; }
.problem-text { font-size: .95rem; color: var(--muted); }

/* ── Шаги ───────────────────────────────────────────────────────────── */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; counter-increment: step; }
.step::before {
    content: "0" counter(step);
    position: absolute;
    top: 0; left: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--dawn);
    opacity: .55;
}
.step h3 { margin-bottom: .4em; }
.step p { color: var(--muted); font-size: .97rem; }

/* ── Тёмная секция (тест) ───────────────────────────────────────────── */

.dark {
    background: linear-gradient(150deg, var(--night) 0%, var(--ink) 100%);
    color: #fff;
    border-radius: var(--radius-l);
    padding: clamp(2.5rem, 6vw, 4.5rem);
    position: relative;
    overflow: hidden;
}
.dark::before {
    content: "";
    position: absolute;
    right: -12%; top: -40%;
    width: 460px; aspect-ratio: 1;
    background: radial-gradient(circle, rgba(240,160,90,.3), transparent 62%);
    pointer-events: none;
}
.dark h2 { color: #fff; }
.dark .lead { color: rgba(255,255,255,.72); }
.dark .eyebrow { color: var(--dawn-soft); }

/* ── Врач ───────────────────────────────────────────────────────────── */

.doctor { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.doctor-photo {
    border-radius: var(--radius-l);
    aspect-ratio: 4 / 5;
    background:
        linear-gradient(160deg, rgba(240,160,90,.22), transparent 60%),
        linear-gradient(200deg, var(--night-2), var(--ink));
    display: grid;
    place-items: center;
    color: rgba(255,255,255,.35);
    font-size: .9rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }

.credentials { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .85rem; }
.credentials li { display: flex; gap: .8rem; align-items: flex-start; font-size: .97rem; color: var(--muted); }
.credentials li::before {
    content: "";
    width: 7px; height: 7px; margin-top: .55rem;
    border-radius: 50%;
    background: var(--dawn);
    flex-shrink: 0;
}

/* ── Карточки статей ────────────────────────────────────────────────── */

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1.2rem, 2.5vw, 2rem); }

.card {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    padding: 1.9rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    text-decoration: none;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card-meta { font-size: .8rem; color: var(--dawn-strong); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.card h3 { font-size: 1.22rem; margin: 0; }
.card p { font-size: .95rem; color: var(--muted); margin: 0; }
.card-date { font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .8rem; }

/* ── FAQ ────────────────────────────────────────────────────────────── */

.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 0;
    cursor: pointer;
    list-style: none;
    font-family: Fraunces, Georgia, serif;
    font-size: 1.13rem;
    line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "";
    width: 12px; height: 12px;
    border-right: 1.5px solid var(--dawn-strong);
    border-bottom: 1.5px solid var(--dawn-strong);
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-top: .4rem;
    transition: transform .3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq-answer { padding-bottom: 1.6rem; color: var(--muted); max-width: 60ch; }

/* ── Цены ───────────────────────────────────────────────────────────── */

.price-group { margin-bottom: 3rem; }
.price-group h3 { margin-bottom: 1.2rem; }
.price-row {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1.05rem 0;
    border-bottom: 1px dashed var(--line);
}
.price-row b { font-weight: 500; }
.price-row .dots { flex: 1; border-bottom: 1px dotted var(--line); transform: translateY(-4px); }
.price-row .amount { font-family: Fraunces, Georgia, serif; font-size: 1.15rem; white-space: nowrap; }
.price-note { display: block; font-size: .88rem; color: var(--muted); }

/* ── Форма ──────────────────────────────────────────────────────────── */

.form-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: clamp(1.8rem, 4vw, 2.8rem);
    box-shadow: var(--shadow);
}
.dark .form-card {
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.15);
    box-shadow: none;
    backdrop-filter: blur(6px);
}

.field { display: grid; gap: .4rem; margin-bottom: 1.05rem; }
.field label { font-size: .87rem; font-weight: 600; }
.field input, .field textarea, .field select {
    width: 100%;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    background: var(--paper);
    font: inherit;
    color: inherit;
    transition: border-color .2s, box-shadow .2s;
}
.dark .field input, .dark .field textarea, .dark .field select {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.18);
    color: #fff;
}
.dark .field input::placeholder, .dark .field textarea::placeholder { color: rgba(255,255,255,.4); }
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--dawn);
    box-shadow: 0 0 0 3px rgba(240, 160, 90, .18);
}
.field textarea { min-height: 110px; resize: vertical; }

.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-consent { font-size: .82rem; color: var(--muted); margin-top: .9rem; }
.dark .form-consent { color: rgba(255,255,255,.55); }

.form-status { margin-top: 1rem; font-size: .95rem; font-weight: 600; }
.form-status.ok { color: #2E7D5B; }
.form-status.err { color: #C0492F; }
.dark .form-status.ok { color: #8FE3B8; }
.dark .form-status.err { color: #FFB4A0; }

/* ── Тест ───────────────────────────────────────────────────────────── */

.quiz { max-width: 44rem; }
.quiz-progress { height: 4px; background: rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; margin-bottom: 2.2rem; }
.quiz-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--dawn-soft), var(--dawn)); transition: width .4s var(--ease); }
.quiz-step { display: none; }
.quiz-step.is-active { display: block; animation: quiz-in .35s var(--ease) both; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.quiz-q { font-family: Fraunces, Georgia, serif; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.25; margin-bottom: .5rem; }
.quiz-hint { color: rgba(255,255,255,.6); font-size: .95rem; margin-bottom: 1.8rem; }
.quiz-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.quiz-count { font-size: .85rem; color: rgba(255,255,255,.5); margin-bottom: .8rem; }

.result-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
    margin-bottom: 1.2rem;
}
.result-low { background: rgba(143, 227, 184, .16); color: #8FE3B8; }
.result-moderate { background: rgba(240, 160, 90, .18); color: var(--dawn-soft); }
.result-high { background: rgba(255, 140, 120, .18); color: #FFB4A0; }
.result-score { font-family: Fraunces, Georgia, serif; font-size: 3.4rem; line-height: 1; color: #fff; }
.result-score small { font-size: 1.1rem; color: rgba(255,255,255,.5); }

/* ── Контакты ───────────────────────────────────────────────────────── */

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }
.contact-item .eyebrow { margin-bottom: .4rem; }
.contact-item p { font-size: 1.08rem; }

/* ── Статья ─────────────────────────────────────────────────────────── */

.article { max-width: 44rem; }
.article p { font-size: 1.08rem; line-height: 1.75; }
.article-meta { display: flex; gap: 1rem; font-size: .88rem; color: var(--muted); margin-bottom: 2rem; }

.prose-block { margin-bottom: 2.6rem; }
.prose-block h3 { margin-bottom: .6em; }
.prose-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.prose-list li { display: flex; gap: .75rem; align-items: flex-start; color: var(--muted); }
.prose-list li::before {
    content: "";
    width: 6px; height: 6px; margin-top: .6rem;
    border-radius: 50%; background: var(--dawn); flex-shrink: 0;
}

/* ── Подвал ─────────────────────────────────────────────────────────── */

.footer {
    background: var(--ink);
    color: rgba(255,255,255,.7);
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
    margin-top: var(--step);
}
.footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.footer h4 { color: #fff; font-size: .95rem; font-family: Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .95rem; }
.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.6rem;
    border-top: 1px solid rgba(255,255,255,.12);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    font-size: .85rem;
    color: rgba(255,255,255,.45);
}
.footer-disclaimer { max-width: 46rem; font-size: .85rem; color: rgba(255,255,255,.45); margin-top: 1.2rem; }

/* ── Плавающая кнопка звонка (мобильные) ────────────────────────────── */

.call-fab {
    position: fixed;
    right: 1rem; bottom: 1rem;
    z-index: 70;
    display: none;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dawn), var(--dawn-strong));
    box-shadow: 0 12px 28px -10px rgba(228,129,58,.9);
    place-items: center;
    color: #2A1705;
}

/* ── Появление при прокрутке ────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Адаптив ────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
    .hero-inner, .doctor { grid-template-columns: 1fr; }
    .doctor-photo { max-width: 380px; }
    .nav {
        position: fixed;
        inset: 76px 0 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 1rem 1.25rem 1.6rem;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        transform: translateY(-130%);
        transition: transform .35s var(--ease);
        margin-left: 0;
    }
    .nav.is-open { transform: none; }
    .nav a { padding: .85rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
    .nav .lang { align-self: flex-start; margin-top: 1rem; }
    .header-inner { justify-content: space-between; }
    .header-phone { margin-left: auto; margin-right: .6rem; }
    .burger { display: grid; }
    .call-fab { display: grid; }
}

@media (max-width: 560px) {
    body { font-size: 16px; }
    .header-phone { display: none; }
    .hero-actions .btn { width: 100%; justify-content: center; }
}

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

/* ── Комикс-слайдер ─────────────────────────────────────────────────── */

.comic-section { padding-top: clamp(2.5rem, 5vw, 4rem); }

.comic { position: relative; }

.comic-track { display: flex; overflow: hidden; }

.comic-slide {
    flex: 0 0 100%;
    margin: 0;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity .5s var(--ease), transform .5s var(--ease);
    pointer-events: none;
}
.comic-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }

/* Полоса очень широкая (4:1). На узких экранах не сжимаем её до нечитаемого
   размера, а даём прокрутить пальцем. */
.comic-frame {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.comic-canvas {
    position: relative;
    min-width: 680px;
    container-type: inline-size;
}
.comic-canvas img { width: 100%; height: auto; display: block; }

/* Реплики поверх вычищенных пузырей: размер шрифта привязан к ширине
   полосы, поэтому текст держится в пузыре на любом масштабе. */
.comic-bubble {
    position: absolute;
    display: grid;
    place-items: center;
    padding: .4cqw .8cqw;
    text-align: center;
    line-height: 1.15;
    color: #14161F;
    font-weight: 600;
    font-size: clamp(8px, 1.12cqw, 16px);
    letter-spacing: -.01em;
    pointer-events: none;
    overflow: hidden;
}
.comic-bubble b { font-weight: 600; text-wrap: balance; }

.comic-caption {
    max-width: 44rem;
    margin: 1.6rem auto 0;
    text-align: center;
}
.comic-caption h3 { margin-bottom: .35em; }
.comic-caption p { color: var(--muted); }

.comic-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.6rem;
}

.comic-arrow {
    width: 42px; height: 42px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    cursor: pointer;
    transition: transform .25s var(--ease), border-color .25s, background-color .25s;
}
.comic-arrow:hover { transform: translateY(-2px); border-color: var(--dawn); }

.comic-dots { display: flex; gap: .5rem; }
.comic-dots button {
    width: 8px; height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--line);
    cursor: pointer;
    transition: width .3s var(--ease), background-color .3s;
}
.comic-dots button.is-active { width: 26px; background: var(--dawn); }

@media (max-width: 560px) {
    .comic-canvas { min-width: 620px; }
}
