/* ==========================================================================
   YAKOR — сайты для стоматологий
   main.css — полный файл стилей под существующую HTML-структуру
   Чистый CSS3: custom properties, grid, flexbox. Mobile-First, min 320px.
   ========================================================================== */

/* ---------- Fonts (self-hosted woff2, cyrillic + latin subsets) ---------- */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-400-cyrillic.woff2') format('woff2');
    font-weight: 400;
    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: 'Inter';
    src: url('/assets/fonts/inter-400-latin.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/inter-500-cyrillic.woff2') format('woff2');
    font-weight: 500;
    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: 'Inter';
    src: url('/assets/fonts/inter-500-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-600-cyrillic.woff2') format('woff2');
    font-weight: 600;
    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: 'Montserrat';
    src: url('/assets/fonts/montserrat-600-latin.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Montserrat';
    src: url('/assets/fonts/montserrat-700-cyrillic.woff2') format('woff2');
    font-weight: 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: 'Montserrat';
    src: url('/assets/fonts/montserrat-700-latin.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
    --color-deep: #1B3A5C;        /* глубокий морской */
    --color-deep-2: #0F1F3A;      /* градиент hero */
    --color-steel: #2D5A7B;       /* стальной синий */
    --color-copper: #C8956C;      /* медный */
    --color-copper-dark: #B07E55; /* медный hover */
    --color-dark: #1A1A2E;        /* основной текст */
    --color-muted: #8B9DB3;       /* светло-серый */
    --color-cream: #F5F3EF;       /* кремовый фон */
    --color-white: #FFFFFF;
    --color-line: #E5E0D8;        /* границы на кремовом */
    --color-error: #C0392B;

    --font-head: 'Montserrat', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    --radius: 8px;
    --shadow-sm: 0 2px 8px rgba(27, 58, 92, .08);
    --shadow-md: 0 8px 24px rgba(27, 58, 92, .12);
    --shadow-lg: 0 16px 40px rgba(27, 58, 92, .18);

    --container: 1200px;
    --transition: .25s ease;

    --bp-sm: 576px;
    --bp-md: 768px;
    --bp-lg: 992px;
    --bp-xl: 1200px;
    --bp-xxl: 1400px;
}

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

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

body {
    min-width: 320px;
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark);
    background: var(--color-cream);
}

body.nav-open {
    overflow: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-deep);
    margin: 0 0 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 1rem; }

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

ul, ol { margin: 0; }

button { font-family: inherit; }

::selection {
    background: var(--color-copper);
    color: var(--color-dark);
}

:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 2px;
}

.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* Ссылки в текстовом контенте: стальной синий + underline slide */
main p a:not(.btn),
.prose a,
.contacts__list a {
    color: var(--color-steel);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size var(--transition), color var(--transition);
}
main p a:not(.btn):hover,
.prose a:hover,
.contacts__list a:hover {
    color: var(--color-copper-dark);
    background-size: 100% 1px;
}

.container {
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
}

.container--narrow {
    max-width: 800px;
}

@media (min-width: 1400px) {
    .container { max-width: 1320px; }
}

/* ==========================================================================
   1. Прелоадер (критический CSS инлайн в layouts/main.php)
   Здесь — анимация рисования SVG-якоря и слова YAKOR.
   ========================================================================== */
@keyframes pl-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes pl-word {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.preloader__logo .pl-ring,
.preloader__logo .pl-shank,
.preloader__logo .pl-stock,
.preloader__logo .pl-flukes,
.preloader__logo .pl-fluke-l,
.preloader__logo .pl-fluke-r {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: pl-draw .6s ease forwards;
}
.preloader__logo .pl-ring    { animation-delay: 0ms; }
.preloader__logo .pl-shank   { animation-delay: 200ms; }
.preloader__logo .pl-stock   { animation-delay: 400ms; }
.preloader__logo .pl-flukes  { animation-delay: 600ms; }
.preloader__logo .pl-fluke-l { animation-delay: 800ms; }
.preloader__logo .pl-fluke-r { animation-delay: 800ms; }

.preloader__word {
    position: absolute;
    margin-top: 220px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: .35em;
    text-indent: .35em;
    color: var(--color-copper);
    opacity: 0;
    animation: pl-word .5s ease 900ms forwards;
}

/* ==========================================================================
   2. Шапка
   ========================================================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(27, 58, 92, .95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
    padding-block: .5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    min-height: 44px;
}

.logo__icon { color: var(--color-copper); }

.logo__text {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: .12em;
    color: var(--color-white);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav__link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--color-white);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.nav__link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 6px;
    height: 2px;
    background: var(--color-copper);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.nav__link:hover { color: var(--color-copper); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--color-copper); }
.nav__link.is-active::after { transform: scaleX(1); }

.header__phone {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    color: var(--color-copper);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--transition);
}
.header__phone:hover { color: var(--color-white); }

/* Бургер — только < lg */
.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
body.nav-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991.98px) {
    .burger { display: inline-flex; }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem clamp(1rem, 4vw, 2rem) 1rem;
        background: rgba(27, 58, 92, .98);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    }
    .nav__link {
        padding-block: .25rem;
        border-bottom: 1px solid rgba(245, 243, 239, .08);
    }
    .nav__link:last-child { border-bottom: none; }
    body.nav-open .nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .header__phone {
        min-width: 44px;
        min-height: 44px;
        justify-content: center;
    }
    .header__phone span { display: none; }
}

/* ==========================================================================
   3. Кнопки
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 44px;
    padding: 14px 28px;
    border: 2px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition), background-position var(--transition),
                color var(--transition), border-color var(--transition),
                transform var(--transition), box-shadow var(--transition);
}

.btn--primary {
    color: var(--color-dark);
    background: linear-gradient(120deg, var(--color-copper) 50%, var(--color-copper-dark) 50%);
    background-size: 220% 100%;
    background-position: 0% 0;
    border-color: var(--color-copper);
}
.btn--primary:hover {
    background-position: 100% 0;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--color-dark);
}
.btn--primary:active { transform: translateY(0); }

.btn--outline {
    color: var(--color-copper);
    background: transparent;
    border-color: var(--color-copper);
}
.btn--outline:hover {
    background: var(--color-copper);
    color: var(--color-dark);
    transform: translateY(-1px);
}

.btn--ghost {
    color: var(--color-muted);
    background: transparent;
    border-color: rgba(139, 157, 179, .5);
}
.btn--ghost:hover {
    color: var(--color-white);
    border-color: var(--color-white);
}
/* На светлом фоне ghost читается тёмным */
.section:not(.section--dark) .btn--ghost,
.hero .btn--ghost {
    color: var(--color-steel);
    border-color: rgba(139, 157, 179, .6);
}
.section:not(.section--dark) .btn--ghost:hover {
    color: var(--color-deep);
    border-color: var(--color-deep);
}

.btn--sm {
    min-height: 44px;
    padding: 9px 18px;
    font-size: .875rem;
}

@media (max-width: 575.98px) {
    .hero .btn,
    .lead-form .btn,
    .cookie-banner .btn {
        width: 100%;
    }
}

/* ==========================================================================
   4. Секции
   ========================================================================== */
.section {
    padding-block: clamp(3rem, 8vw, 6rem);
}

.section--cream { background: var(--color-cream); }

.section--dark {
    background: var(--color-deep);
    color: var(--color-cream);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark .section__title { color: var(--color-white); }
.section--dark .section__subtitle { color: rgba(245, 243, 239, .9); }
.section--dark a:not(.btn) { color: var(--color-copper); }

.section__title {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--color-deep);
    text-align: center;
    margin-bottom: 1rem;
}
.section__title--left { text-align: left; }

.section__subtitle {
    color: var(--color-muted);
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
    margin-bottom: clamp(2rem, 5vw, 3rem);
}
.section__title--left + .section__subtitle,
.section__title--left ~ .section__subtitle {
    margin-inline: 0;
    text-align: left;
}

/* ==========================================================================
   5. Hero
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    min-height: 80vh;
    background: linear-gradient(135deg, var(--color-deep), var(--color-deep-2));
    color: var(--color-cream);
    overflow: hidden;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding-block: clamp(3rem, 8vw, 5rem);
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero__title {
    color: var(--color-white);
    font-size: clamp(2rem, 5vw, 3.5rem);
    max-width: 20ch;
    margin-inline: auto;
}

.hero__subtitle {
    color: rgba(245, 243, 239, .9);
    font-size: 1.125rem;
    max-width: 52ch;
    margin-inline: auto;
    margin-bottom: 2rem;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.hero__decor {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-copper);
    opacity: .15;
    pointer-events: none;
    will-change: transform;
}
.hero__decor svg { display: block; max-width: 40vw; height: auto; }

@media (min-width: 992px) {
    .hero__inner { grid-template-columns: 1fr auto; }
    .hero__content { text-align: left; }
    .hero__title,
    .hero__subtitle { margin-inline: 0; }
    .hero__cta { justify-content: flex-start; }
    .hero__decor { position: static; transform: none; }
    .hero__decor svg { max-width: 100%; }
}

@media (max-width: 575.98px) {
    .hero__cta { flex-direction: column; }
    .hero__decor svg { max-width: 60vw; }
}

/* ==========================================================================
   6. Сетки
   ========================================================================== */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   7. Карточки
   ========================================================================== */
.card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.5rem, 3vw, 2rem);
    transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.pain-card__icon {
    color: var(--color-copper);
    margin-bottom: 1rem;
}
.pain-card h3 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-deep);
    margin-bottom: .5rem;
}
.pain-card p { margin-bottom: 0; }
.pain-card p strong { color: var(--color-copper-dark); }

/* ==========================================================================
   8. Шаги
   ========================================================================== */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    flex: 1;
    text-align: center;
}
.step h3 { margin-top: 1rem; }
.step p { color: var(--color-muted); margin-bottom: 0; }

.step__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-inline: auto;
    border-radius: 50%;
    background: var(--color-copper);
    color: var(--color-white);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.375rem;
}

.steps__arrow {
    color: var(--color-copper);
    align-self: center;
    transform: rotate(90deg);
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .steps { flex-direction: row; align-items: flex-start; gap: 2rem; }
    .steps__arrow { transform: none; margin-top: 12px; }
}

/* ==========================================================================
   9. Демо-превью
   ========================================================================== */
.demo-preview { max-width: 100%; }

section[id] { scroll-margin-top: 90px; }

.demo-preview__frame {
    position: relative;
    height: min(78vh, 820px);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--color-deep);
}
.demo-preview__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--color-white);
}
.demo-preview__fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.demo-preview__hint {
    margin: 1rem 0 0;
    text-align: center;
    color: var(--color-muted);
    font-size: .95rem;
}
.demo-preview__hint a {
    color: var(--color-steel);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
@media (max-width: 767.98px) {
    .demo-preview__frame { height: 70vh; }
}

/* ==========================================================================
   10. Прайсинг
   ========================================================================== */
.pricing { align-items: stretch; }

.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
}
.pricing-card__name {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-deep);
    margin-bottom: .25rem;
}
.pricing-card__price {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.1;
    color: var(--color-copper);
    margin-bottom: 1.25rem;
}
.pricing-card__list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: .625rem;
}
.pricing-card__list li {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}
.pricing-card__list .icon {
    color: var(--color-steel);
    flex-shrink: 0;
    margin-top: 3px;
}
.pricing-card .btn { margin-top: auto; }

.pricing-card--featured {
    border: 2px solid var(--color-copper);
    box-shadow: var(--shadow-md);
}
.pricing-card__badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: .375rem 1rem;
    border-radius: 999px;
    background: var(--color-copper);
    color: var(--color-dark);
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ==========================================================================
   11. Цифры
   ========================================================================== */
.stat { text-align: center; }
.stat__value {
    display: block;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: var(--color-copper);
}
.stat__label {
    color: var(--color-muted);
    font-size: .875rem;
}

/* ==========================================================================
   12. Карусель отзывов
   ========================================================================== */
.carousel {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: center;
}
.carousel__quote {
    color: var(--color-copper);
    margin-inline: auto;
}
.carousel__viewport { overflow: hidden; }
.carousel__track {
    display: flex;
    transition: transform .4s ease;
}
.carousel__slide {
    min-width: 100%;
    padding: 0 1rem;
    margin: 0;
}
.carousel__slide > p {
    font-size: 1.125rem;
    max-width: 60ch;
    margin-inline: auto;
}
.carousel__slide footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    text-align: left;
}
.carousel__slide footer img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}
.carousel__slide footer strong {
    font-family: var(--font-head);
    font-weight: 600;
    display: block;
    color: var(--color-deep);
}
.carousel__slide footer span {
    display: block;
    color: var(--color-muted);
    font-size: .875rem;
}

.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-deep);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.carousel__btn:hover {
    background: var(--color-copper);
    color: var(--color-white);
}
.carousel__btn--prev { left: -8px; }
.carousel__btn--next { right: -8px; }
.carousel__btn--prev .icon { transform: rotate(90deg); }
.carousel__btn--next .icon { transform: rotate(-90deg); }

@media (min-width: 992px) {
    .carousel__btn--prev { left: 0; }
    .carousel__btn--next { right: 0; }
}

/* ==========================================================================
   13. QR-секция «Коробка»
   ========================================================================== */
.box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 992px) {
    .box { grid-template-columns: 1fr 1fr; }
}
.box__icon {
    color: var(--color-copper);
    margin-bottom: 1rem;
}
.box__content p { color: var(--color-dark); }
.box__form {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 4vw, 2rem);
}

/* ==========================================================================
   14. CTA-блок
   ========================================================================== */
.cta {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
}
.cta__form {
    text-align: left;
    margin-top: 2rem;
}
.cta__note {
    font-size: .875rem;
    color: rgba(245, 243, 239, .7);
    margin-top: 1.25rem;
    margin-bottom: 0;
}
.cta__note a {
    color: var(--color-copper);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.cta__note a:hover { color: var(--color-white); }

/* ==========================================================================
   15. Лид-форма
   ========================================================================== */
.lead-form {
    display: grid;
    gap: 1.25rem;
}

.field {
    display: grid;
    gap: .375rem;
}

.field__label {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9375rem;
    color: var(--color-deep);
}
.section--dark .field__label { color: var(--color-cream); }

.field__input {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    border: 2px solid rgba(139, 157, 179, .4);
    border-radius: var(--radius);
    background: var(--color-white);
    color: var(--color-dark);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.field__input:focus {
    outline: none;
    border-color: var(--color-copper);
    box-shadow: 0 0 0 3px rgba(200, 149, 108, .25);
}
.field__input:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 2px;
}
.field__input.is-invalid { border-color: #D64545; }
.field__input.is-invalid:focus { box-shadow: 0 0 0 3px rgba(214, 69, 69, .2); }

select.field__input {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--color-muted) 50%),
                      linear-gradient(135deg, var(--color-muted) 50%, transparent 50%);
    background-position: calc(100% - 21px) 50%, calc(100% - 15px) 50%;
    background-size: 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2.5rem;
}

.field__error {
    display: block;
    min-height: 1em;
    font-size: .8125rem;
    line-height: 1.3;
    color: var(--color-error);
}
.section--dark .field__error { color: #FF9D9D; }

.field--consent .consent {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    font-size: .8125rem;
    line-height: 1.5;
    cursor: pointer;
}
.field--consent input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-copper);
    cursor: pointer;
}
.consent a {
    color: var(--color-steel);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.consent a:hover { color: var(--color-copper-dark); }
.section--dark .consent { color: rgba(245, 243, 239, .9); }
.section--dark .consent a { color: var(--color-copper); }
.section--dark .consent a:hover { color: var(--color-white); }

.hp-field { display: none !important; }

.lead-form__submit {
    justify-self: stretch;
}
@media (min-width: 576px) {
    .lead-form__submit { justify-self: start; }
}

.lead-form.is-sent .field,
.lead-form.is-sent .lead-form__submit {
    display: none;
}

@keyframes lead-success-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.lead-form__success {
    text-align: center;
    padding: 2rem;
    animation: lead-success-in .4s ease;
}
.lead-form__success .icon {
    color: var(--color-copper);
    margin-bottom: .75rem;
}
.lead-form__success h3 { margin-bottom: .5rem; }
.lead-form__success p { margin-bottom: 0; color: var(--color-muted); }
.section--dark .lead-form__success p { color: rgba(245, 243, 239, .8); }

/* ==========================================================================
   16. Cookie-баннер
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 1rem 0;
    background: rgba(26, 26, 46, .97);
    color: var(--color-cream);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .25);
}
.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cookie-banner__text {
    margin: 0;
    font-size: .9375rem;
    flex: 1 1 320px;
}
.cookie-banner__text a {
    color: var(--color-copper);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner__text a:hover { color: var(--color-white); }
.cookie-banner__actions {
    display: flex;
    gap: .75rem;
    flex-shrink: 0;
}
@media (max-width: 575.98px) {
    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }
    .cookie-banner__actions { flex-direction: column; }
}

/* ==========================================================================
   17. Страница пакетов: шапка страницы + таблица сравнения
   ========================================================================== */
.page-head { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.compare {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.compare__row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    min-width: 640px;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-line);
}
.compare__row:nth-child(even):not(.compare__row--head) { background: #FAF8F5; }
.compare__row:last-child { border-radius: 0 0 var(--radius) var(--radius); }

.compare__row--head {
    background: var(--color-deep);
    color: var(--color-white);
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: none;
}
.compare__plan {
    text-align: center;
    padding: 1rem .5rem;
}
.compare__plan--featured { background: rgba(200, 149, 108, .15); }
.compare__price {
    display: block;
    margin-top: .25rem;
    color: var(--color-copper);
    font-family: var(--font-head);
    font-weight: 700;
}

.compare__feature {
    padding: 1rem;
    font-weight: 500;
}
.compare__cell {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem .5rem;
}
.compare__row:not(.compare__row--head) .compare__cell:nth-child(3) {
    background: rgba(200, 149, 108, .08);
}
.compare__yes { color: var(--color-steel); }
.compare__no { color: var(--color-muted); opacity: .6; }

@media (max-width: 767.98px) {
    .compare__row { min-width: 560px; font-size: .875rem; }
    .compare__feature { padding: .75rem; }
}

/* ==========================================================================
   18. Аккордеон (FAQ)
   ========================================================================== */
.accordion {
    max-width: 800px;
    margin-inline: auto;
}
.accordion__item {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: .75rem;
    overflow: hidden;
}
.accordion__heading { margin: 0; }
.accordion__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 44px;
    padding: 1.25rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-deep);
    text-align: left;
    transition: color var(--transition);
}
.accordion__trigger:hover { color: var(--color-steel); }
.accordion__icon {
    color: var(--color-copper);
    flex-shrink: 0;
    transition: transform var(--transition);
}
.accordion__trigger[aria-expanded="true"] .accordion__icon {
    transform: rotate(180deg);
}
.accordion__panel {
    padding: 0 1.5rem 1.25rem;
    color: var(--color-dark);
}
.accordion__panel p { margin: 0; }

/* ==========================================================================
   20. Контакты
   ========================================================================== */
.contacts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 992px) {
    .contacts { grid-template-columns: 1fr 1fr; }
}

.contacts__info { min-width: 0; }

.contacts__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1.25rem;
}
.contacts__list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.contacts__list .icon {
    color: var(--color-copper);
    flex-shrink: 0;
    margin-top: 2px;
}
.contacts__list strong {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-deep);
}
.contacts__list span,
.contacts__list a { font-family: var(--font-body); }

.contacts__requisites { margin-top: 2rem; }
.contacts__requisites h2 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.25rem;
}
.contacts__requisites p { color: var(--color-muted); }

.contacts__map iframe {
    width: 100%;
    min-height: 400px;
    aspect-ratio: 3 / 2;
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    display: block;
}

/* ==========================================================================
   21. 404
   ========================================================================== */
.page-404 {
    min-height: 60vh;
    display: flex;
    align-items: center;
}
.page-404__inner {
    display: grid;
    gap: 1rem;
    justify-items: center;
    text-align: center;
}
.page-404__art {
    color: var(--color-steel);
    opacity: .5;
}
.page-404 h1 {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--color-deep);
    margin-bottom: 0;
}
.page-404 p { color: var(--color-muted); }

/* ==========================================================================
   22. Prose (privacy / terms)
   ========================================================================== */
.prose h2 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--color-deep);
    margin-top: 2rem;
    margin-bottom: .5rem;
}
.prose p { margin: .75rem 0; }
.prose a { color: var(--color-steel); }

/* ==========================================================================
   23. Подвал
   ========================================================================== */
.footer {
    background: var(--color-dark);
    color: var(--color-muted);
    padding: 3rem 0 1.5rem;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 576px) {
    .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
    .footer__grid { grid-template-columns: repeat(4, 1fr); }
}

.footer__col { min-width: 0; }

.footer__heading {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-white);
    margin: 0 0 1rem;
}

.footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .5rem;
}
.footer__list a {
    display: inline-block;
    padding-block: 8px;
    color: var(--color-muted);
    text-decoration: none;
    transition: color var(--transition);
}
.footer__list a:hover { color: var(--color-copper); }

.footer__slogan { margin: 1rem 0 0; }
.logo--footer .logo__text { color: var(--color-white); }

.footer__social {
    display: flex;
    gap: .5rem;
}
.footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--color-muted);
    transition: color var(--transition);
}
.footer__social a:hover { color: var(--color-copper); }

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(139, 157, 179, .2);
    font-size: .875rem;
}
.footer__bottom p { margin: 0; }
.footer__legal {
    display: flex;
    gap: 1.5rem;
}
.footer__legal a {
    color: var(--color-muted);
    text-decoration: none;
    transition: color var(--transition);
}
.footer__legal a:hover { color: var(--color-copper); }

/* ==========================================================================
   24. Появление по скроллу
   ========================================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   25. Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .preloader__logo .pl-ring,
    .preloader__logo .pl-shank,
    .preloader__logo .pl-stock,
    .preloader__logo .pl-flukes,
    .preloader__logo .pl-fluke-l,
    .preloader__logo .pl-fluke-r {
        stroke-dashoffset: 0;
    }
    .preloader__word { opacity: 1; transform: none; }
}

/* ==========================================================================
   26. Конверсионные блоки: hero-доверие, работы, калькулятор, mobile CTA
   ========================================================================== */

/* Hero: строка доверия и мессенджеры */
.hero__trust {
    margin: 1.25rem 0 0;
    font-weight: 600;
    color: var(--color-cream);
}
.hero__geo {
    margin: .5rem 0 0;
    color: rgba(245, 243, 239, .75);
    font-size: .9375rem;
    max-width: 46ch;
}
.hero__messengers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.25rem;
    color: rgba(245, 243, 239, .75);
    font-size: .9375rem;
}
.hero__messengers a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
    padding: .35rem .9rem;
    border: 1px solid rgba(245, 243, 239, .35);
    border-radius: 999px;
    color: var(--color-cream);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}
.hero__messengers a:hover {
    border-color: var(--color-copper);
    background: rgba(200, 149, 108, .15);
}
@media (max-width: 575.98px) {
    .hero__trust,
    .hero__geo,
    .hero__messengers { text-align: center; justify-content: center; margin-inline: auto; }
}

/* Шаги: сроки */
.step__time {
    display: inline-block;
    margin-top: .5rem;
    padding: .15rem .7rem;
    border-radius: 999px;
    background: var(--color-copper);
    color: var(--color-white);
    font-size: .8rem;
    font-weight: 600;
}

/* Портфолио */
.works { margin-top: 2rem; }
.work-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    padding: 0;
}
.work-card__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform var(--transition);
}
.work-card:hover .work-card__img { transform: scale(1.03); }
.work-card__body { padding: 1rem 1.25rem 1.25rem; }
.work-card__name {
    display: block;
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--color-deep);
}
.work-card__meta {
    display: block;
    color: var(--color-muted);
    font-size: .875rem;
    margin-top: .25rem;
}

/* Пакеты: окупаемость и примечание */
.pricing-card__payback {
    margin: 1rem 0 1.25rem;
    font-size: .875rem;
    color: var(--color-steel);
    font-weight: 600;
}
.pricing-note {
    margin: 2rem auto 0;
    max-width: 60ch;
    text-align: center;
    color: var(--color-muted);
    font-size: .9375rem;
}

/* Калькулятор */
.calc {
    display: grid;
    gap: 2rem;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}
@media (min-width: 992px) {
    .calc { grid-template-columns: 1fr 1fr; align-items: center; }
}
.calc__field { margin-bottom: 1.5rem; }
.calc__field:last-child { margin-bottom: 0; }
.calc__field label {
    display: block;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: .5rem;
}
.calc__field output { color: var(--color-copper); }
.calc__field input[type="range"] {
    width: 100%;
    height: 44px;
    accent-color: var(--color-copper);
    cursor: pointer;
}
.calc__row { margin: 0 0 .5rem; color: var(--color-dark); }
.calc__loss {
    margin: 1rem 0 .5rem;
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-deep);
}
.calc__loss span { color: var(--color-copper); white-space: nowrap; }
.calc__note {
    margin: 0 0 1.25rem;
    font-size: .8125rem;
    color: var(--color-muted);
}
.calc__result .btn { width: 100%; text-align: center; }

/* Результаты: метрика в карусели */
.results__title {
    margin: 3.5rem 0 0;
    text-align: center;
    font-family: var(--font-head);
    font-size: 1.35rem;
    color: var(--color-deep);
}
.carousel__metric {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-copper);
    margin-bottom: .5rem;
}
.carousel__dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.5rem;
}
.carousel__dot {
    width: 12px;
    height: 12px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(27, 58, 92, .2);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.carousel__dot:hover { background: rgba(27, 58, 92, .45); }
.carousel__dot.is-active { background: var(--color-copper); transform: scale(1.25); }

/* Липкая мобильная CTA-панель */
.mobile-cta {
    display: none;
}
@media (max-width: 767.98px) {
    body { padding-bottom: 68px; }
    .mobile-cta {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 800;
        display: flex;
        gap: .5rem;
        padding: .6rem .75rem;
        background: rgba(27, 58, 92, .97);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
    }
    .mobile-cta__btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        border-radius: var(--radius);
        font-weight: 600;
        text-decoration: none;
    }
    .mobile-cta__btn--ghost {
        border: 1px solid rgba(245, 243, 239, .5);
        color: var(--color-cream);
    }
    .mobile-cta__btn--primary {
        background: var(--color-copper);
        color: var(--color-white);
    }
    .cookie-banner { bottom: 68px; }
}

/* 404: группа кнопок */
.page-404__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Подсказка под кнопкой формы */
.lead-form__hint {
    margin: .75rem 0 0;
    font-size: .8125rem;
    color: var(--color-muted);
    text-align: center;
}
.section--dark .lead-form__hint { color: rgba(245, 243, 239, .7); }
