/* ============================================================
   Улыбка - дизайн-система нового сайта
   Токены, сетка, типографика, базовые компоненты.
   Секции лежат в css/sections.css
   ============================================================ */

:root {
    /* Цвет */
    --deep:        #0E4E5E;  /* основной, глубокий сине-бирюзовый */
    --deep-700:    #0A3B47;
    --deep-300:    #2E7F92;
    --mint:        #24B3A4;  /* поддерживающий акцент */
    --mint-soft:   #E4F6F4;
    --coral:       #EF5B48;  /* целевое действие */
    --coral-dark:  #D94733;
    --gold:        #E8A33D;

    --ink:         #10232B;  /* основной текст */
    --ink-2:       #4A6069;  /* вторичный текст */
    --ink-3:       #7E939B;  /* подписи */
    --line:        #DCE7EB;
    --bg:          #FFFFFF;
    --bg-soft:     #F2F8FA;
    --bg-deep:     #0E4E5E;

    /* Размеры */
    --wrap:        1200px;
    --gap:         24px;
    --radius:      20px;
    --radius-sm:   12px;
    --radius-pill: 999px;

    /* Тени */
    --shadow-sm:   0 2px 8px rgba(14, 78, 94, .06);
    --shadow:      0 12px 32px rgba(14, 78, 94, .10);
    --shadow-lg:   0 24px 60px rgba(14, 78, 94, .16);

    --tr:          .25s cubic-bezier(.4, 0, .2, 1);
}

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

html { scroll-behavior: smooth; }

body.u-page {
    margin: 0;
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.u-page img { max-width: 100%; height: auto; display: block; }
.u-page a { color: var(--deep-300); text-decoration: none; transition: color var(--tr); }
.u-page a:hover { color: var(--coral); }

/* ---------- Сетка ---------- */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--deep { background: var(--bg-deep); color: #fff; }
.section--tight { padding: 56px 0; }

/* ---------- Типографика ---------- */
.u-page h1, .u-page h2, .u-page h3, .u-page h4 {
    margin: 0 0 .5em;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink);
}

.u-page h1 { font-size: clamp(29px, 4.6vw, 54px); }
.u-page h2 { font-size: clamp(27px, 3.4vw, 40px); }
.u-page h3 { font-size: clamp(20px, 2.2vw, 25px); }
.u-page h4 { font-size: 19px; font-weight: 700; }
.u-page p  { margin: 0 0 1em; }

.section--deep h2, .section--deep h3, .section--deep h4 { color: #fff; }

.lead     { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); }
.muted    { color: var(--ink-2); }
.small    { font-size: 15px; }
.tiny     { font-size: 13px; color: var(--ink-3); }

.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: var(--mint-soft);
    color: var(--deep);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.section--deep .eyebrow { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 30px;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: transform var(--tr), background var(--tr), color var(--tr), box-shadow var(--tr);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--coral);
    color: #fff;
    box-shadow: 0 10px 24px rgba(239, 91, 72, .28);
}
.btn--primary:hover { background: var(--coral-dark); color: #fff; }

.btn--deep { background: var(--deep); color: #fff; }
.btn--deep:hover { background: var(--deep-700); color: #fff; }

.btn--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--deep);
}
.btn--ghost:hover { border-color: var(--deep-300); color: var(--deep); background: #fff; }

.section--deep .btn--ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.section--deep .btn--ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

.btn--wide { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Карточки ---------- */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
    transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}

.card--hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Иконки ---------- */
.ico {
    width: 24px;
    height: 24px;
    flex: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ico-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: var(--mint-soft);
    color: var(--deep);
    margin-bottom: 18px;
}

/* ---------- Формы ---------- */
.field { margin-bottom: 14px; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-2);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 15px 18px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    font-size: 16px;
    color: var(--ink);
    transition: border-color var(--tr), box-shadow var(--tr);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--deep-300);
    box-shadow: 0 0 0 4px rgba(46, 127, 146, .12);
}

.field textarea { resize: vertical; min-height: 96px; }

.consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 6px 0 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--ink-3);
}

.consent input { margin-top: 2px; flex: none; width: 17px; height: 17px; accent-color: var(--deep); }

.lead-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-answer { margin-top: 12px; font-size: 15px; line-height: 1.4; }
.form-answer.is-ok    { color: #14794A; }
.form-answer.is-error { color: var(--coral-dark); }

/* ---------- Мелочи ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background: var(--mint-soft);
    color: var(--deep);
    font-size: 13px;
    font-weight: 700;
}

.badge--gold { background: rgba(232, 163, 61, .16); color: #97640F; }

.price-tag {
    font-size: 22px;
    font-weight: 800;
    color: var(--deep);
    letter-spacing: -.02em;
}

.price-tag span { font-size: 14px; font-weight: 600; color: var(--ink-3); }

hr.u-sep { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 1024px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 64px 0; }
}

@media (max-width: 720px) {
    body.u-page { font-size: 16px; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .section { padding: 48px 0; }
    .section-head { margin-bottom: 32px; }
    .card { padding: 22px; }
    .wrap { padding: 0 16px; }
    .btn { padding: 15px 24px; }
}

/* ============================================================
   Фоны секций, разделители, появление при прокрутке
   ============================================================ */

/* Волны - пучок линий по диагонали (tools/waves.py). Направление чередуется. */
.wv-a, .wv-b {
    background-position: 0 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.wv-a { background-image: url(../images/ui/waves-d1.svg); }
.wv-b { background-image: url(../images/ui/waves-d2.svg); }

.section--soft.wv-a { background-image: url(../images/ui/waves-d1.svg), linear-gradient(180deg, #F2F8FA, #EAF4F6); }
.section--soft.wv-b { background-image: url(../images/ui/waves-d2.svg), linear-gradient(180deg, #F2F8FA, #EAF4F6); }

/* Разделитель секций: тонкая линия с зубом посередине */
.section--split { position: relative; }

.section--split::before,
.section--split::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    pointer-events: none;
}

.section--split::after {
    z-index: 1;
    width: min(640px, 76%);
    height: 1px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, #BCD9DA 22%, var(--deep-300) 50%, #BCD9DA 78%, transparent);
}

.section--split::before {
    z-index: 2;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff url(../images/ui/tooth-mark.svg) center / 26px no-repeat;
    box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px #CFE3E4, 0 8px 20px rgba(14, 78, 94, .12);
}

.section--soft.section--split::before { box-shadow: 0 0 0 6px var(--bg-soft), 0 0 0 7px #CFE3E4, 0 8px 20px rgba(14, 78, 94, .12); }
.section--deep.section--split::before { background-color: var(--bg-deep); box-shadow: 0 0 0 6px var(--bg-deep), 0 0 0 7px rgba(255,255,255,.2); filter: invert(1) hue-rotate(180deg); }

/* Появление блоков при прокрутке */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
}

.js [data-reveal].is-in {
    opacity: 1;
    transform: none;
    transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
}

.js [data-reveal-stagger] > * { opacity: 0; transform: translateY(18px); }

.js [data-reveal-stagger].is-in > * {
    opacity: 1;
    transform: none;
    transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
}

.js [data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: .08s; }
.js [data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: .16s; }
.js [data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: .24s; }
.js [data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: .32s; }
.js [data-reveal-stagger].is-in > *:nth-child(6) { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
    .js [data-reveal], .js [data-reveal-stagger] > * { opacity: 1 !important; transform: none !important; }
    html { scroll-behavior: auto; }
}

/* Иконка внутри кнопки */
.btn .ico { width: 19px; height: 19px; }
.btn .ico--go { transition: transform var(--tr); }
.btn:hover .ico--go { transform: translateX(4px); }

/* перенос строки в заголовке без склейки слов в текстовом слое */
.nowrap-br { display: block; height: 0; }

/* ============================================================
   Матовое стекло: общая система
   ============================================================ */

:root {
    /* стекло на тёмном */
    --glass-dark-bg:     rgba(255, 255, 255, .07);
    --glass-dark-bg-2:   rgba(255, 255, 255, .11);
    --glass-dark-line:   rgba(255, 255, 255, .16);
    --glass-dark-shine:  rgba(255, 255, 255, .22);

    /* стекло на светлом */
    --glass-light-bg:    rgba(255, 255, 255, .62);
    --glass-light-line:  rgba(255, 255, 255, .85);

    --blur:   saturate(150%) blur(16px);
    --blur-s: saturate(140%) blur(10px);
}

.glass {
    position: relative;
    background: var(--glass-dark-bg);
    border: 1px solid var(--glass-dark-line);
    border-radius: var(--radius);
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    box-shadow:
        inset 0 1px 0 var(--glass-dark-shine),
        0 18px 40px -22px rgba(0, 0, 0, .65);
    transition: transform var(--tr), background var(--tr), border-color var(--tr), box-shadow var(--tr);
}

.glass--light {
    background: var(--glass-light-bg);
    border-color: var(--glass-light-line);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .9),
        0 20px 46px -26px rgba(14, 78, 94, .4);
}

.glass--hover:hover {
    background: var(--glass-dark-bg-2);
    border-color: rgba(255, 255, 255, .26);
    transform: translateY(-4px);
}

/* блик по верхней кромке */
.glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(160deg, rgba(255, 255, 255, .14), transparent 42%);
}

/* мягкие цветные пятна для тёмных секций */
.aurora { position: relative; isolation: isolate; overflow: hidden; }

.aurora > .aurora__blob {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .5;
    pointer-events: none;
}

.aurora__blob--1 { width: 560px; height: 560px; left: -140px; top: -180px;  background: radial-gradient(circle, #24B3A4, transparent 68%); }
.aurora__blob--2 { width: 640px; height: 640px; right: -180px; bottom: -220px; background: radial-gradient(circle, #1E7F9A, transparent 68%); }
.aurora__blob--3 { width: 420px; height: 420px; left: 46%; top: 30%; background: radial-gradient(circle, #2FD3B6, transparent 70%); opacity: .28; }

/* тонкий шум поверх - убирает «пластиковость» градиентов */
.noise::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
    .glass, .glass--hover:hover { transition: none; transform: none; }
}

/* запасной вариант, если браузер не умеет backdrop-filter */
@supports not ((backdrop-filter: blur(4px)) or (-webkit-backdrop-filter: blur(4px))) {
    .glass { background: rgba(12, 58, 70, .82); }
    .glass--light { background: rgba(255, 255, 255, .94); }
}
