/* ========== SELF-HOSTED FONTS ========== */
/* Manrope — variable font (wt 400–800), Cyrillic + Latin */
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope/manrope-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@view-transition {
    navigation: none;
}

html {
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    @media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
        html {
            overflow-y: scroll;
        }
    }
}

/* ========== INTERNAL PAGES FINAL CLEAN FOUNDATION ========== */
@media (min-width: 1101px) and (hover: hover) and (pointer: fine) {
    body#top {
        --site-desktop-band:
            radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 26%),
            linear-gradient(135deg, var(--theme-band-from) 0%, var(--theme-band-mid) 52%, var(--theme-band-to) 100%);
        --site-desktop-container: min(1500px, calc(100vw - 76px));
        background:
            radial-gradient(circle at 11% 0%, rgba(var(--theme-accent-rgb), 0.07), transparent 28%),
            radial-gradient(circle at 78% 8%, rgba(var(--theme-accent-rgb), 0.05), transparent 24%),
            radial-gradient(circle at 89% 2%, rgba(255, 255, 255, 0.82), transparent 26%),
            linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 52%, #f7fafc 100%) !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) {
        position: relative;
        isolation: isolate;
        overflow: visible !important;
        background:
            radial-gradient(circle at 11% 0%, rgba(var(--theme-accent-rgb), 0.07), transparent 28%),
            radial-gradient(circle at 78% 8%, rgba(var(--theme-accent-rgb), 0.05), transparent 24%),
            radial-gradient(circle at 89% 2%, rgba(255, 255, 255, 0.82), transparent 26%),
            linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 52%, #f7fafc 100%) !important;
        padding-top: 198px !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)::before,
    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)::after {
        content: none !important;
        display: none !important;
    }

    body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page) > .container {
        width: var(--site-desktop-container) !important;
        max-width: none !important;
        position: relative;
        z-index: 1;
        padding-top: 18px;
    }

    body#top .privacy-container {
        position: relative;
        z-index: 1;
    }

    body#top :is(.service-detail-card, .before-after-section .container, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-container, .prices-page .section[aria-labelledby="prices-faq-title"]) {
        overflow: visible !important;
        isolation: auto !important;
        background: var(--theme-surface-gradient) !important;
        border: 1px solid rgba(var(--theme-accent-strong-rgb), 0.12) !important;
        box-shadow: 0 22px 40px rgba(31, 38, 34, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
    }

    body#top :is(.service-detail-card, .before-after-section .container, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-container, .prices-page .section[aria-labelledby="prices-faq-title"])::before,
    body#top :is(.service-detail-card, .before-after-section .container, .gallery-item, .gallery-empty, .gallery-filters, .price-factors, .guarantee-section, .calculator-section, .contacts-hero-card, .contact-info-card, .contact-form-card, .contacts-location-card, .payment-docs-panel, .payment-docs-section, .payment-docs-cta, .automation-product-card, .privacy-container, .prices-page .section[aria-labelledby="prices-faq-title"])::after {
        content: none !important;
        display: none !important;
    }

    body#top :is(.services-header h1, .gallery-header h1, .price-header h1) {
        background: none !important;
        color: var(--theme-text-strong) !important;
        -webkit-text-fill-color: currentColor !important;
        background-clip: initial !important;
        -webkit-background-clip: initial !important;
    }

    body#top :is(.services-header .subtitle, .gallery-header .subtitle, .price-header .subtitle, .contacts-subtitle) {
        color: var(--theme-text-muted) !important;
    }

    body#top :is(.filter-btn, .service-nav-link, .work-category, .detail, .payment-docs-card, .payment-docs-step, .factor-card) {
        border-color: rgba(var(--theme-accent-strong-rgb), 0.12) !important;
        box-shadow: 0 12px 20px rgba(31, 38, 34, 0.05) !important;
        color: var(--theme-text) !important;
    }

    body#top :is(.filter-btn:hover, .service-nav-link:hover, .payment-docs-card:hover, .payment-docs-step:hover, .factor-card:hover) {
        transform: translateY(-2px);
        border-color: rgba(var(--theme-accent-rgb), 0.18) !important;
        box-shadow: 0 18px 30px rgba(31, 38, 34, 0.08) !important;
    }

    body#top :is(.filter-btn.active, .filter-btn[aria-pressed="true"], .service-nav-link.active, .service-nav-link[aria-current="page"]) {
        background: linear-gradient(135deg, var(--site-action-slate) 0%, var(--site-action-slate-strong) 100%) !important;
        border-color: transparent !important;
        color: #fffdf9 !important;
        box-shadow: 0 10px 18px rgba(var(--site-action-slate-rgb), 0.14) !important;
    }

    body#top :is(.calculator-section, .payment-docs-cta, .work-counter, .contact-block) {
        background:
            radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 28%),
            var(--theme-band) !important;
        box-shadow: 0 26px 48px rgba(31, 38, 34, 0.16) !important;
    }
}

/* ========== FINAL HEADER ACTIVE NAV CLARITY ========== */
.header.header--desktop-hero .desktop-hero-header .hero-nav__link--active,
.header.header--desktop-hero .desktop-hero-header .hero-nav__link--active:visited,
.header-top--compact .nav-list a.active {
    border-color: transparent !important;
    background: none !important;
    color: var(--theme-accent) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.header.header--desktop-hero .desktop-hero-header .hero-nav__link--active:hover,
.header.header--desktop-hero .desktop-hero-header .hero-nav__link--active:focus-visible,
.header-top--compact .nav-list a.active:hover,
.header-top--compact .nav-list a.active:focus-visible {
    color: var(--theme-accent) !important;
    transform: none !important;
}

body#top :is(.catalog-page, .services-page, .gallery-page, .prices-page, .contacts-page, .payment-docs-page, .automation-product-page, .privacy-page)::before {
    content: none !important;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope/manrope-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Manrope';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/manrope/manrope-latin.woff2') format('woff2');
    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: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/cormorant/cormorant-cyrillic-ext.woff2') format('woff2');
    unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/cormorant/cormorant-cyrillic.woff2') format('woff2');
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/cormorant/cormorant-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url('../fonts/cormorant/cormorant-latin.woff2') format('woff2');
    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;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

:root {
    --font-body: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --header-height: 140px;
    --header-top-height: 140px;
    --type-display-callout: clamp(4rem, 7vw, 6.6rem);
    --type-display-feature: clamp(2.6rem, 4.2vw, 4.45rem);
    --type-display-page: clamp(2.7rem, 4.4vw, 4.1rem);
    --type-title-section: clamp(2.2rem, 3.25vw, 3.1rem);
    --type-title-card: clamp(1.08rem, 0.98rem + 0.34vw, 1.3rem);
    --type-body-lg: clamp(1.04rem, 1rem + 0.14vw, 1.12rem);
    --type-body-md: clamp(1rem, 0.98rem + 0.08vw, 1.05rem);
    --type-body-sm: clamp(0.94rem, 0.91rem + 0.08vw, 0.98rem);
    --type-meta: 0.82rem;
    --leading-display: 0.94;
    --leading-body: 1.72;
    --leading-copy: 1.58;
    --theme-bg: #f2f6f7;
    --theme-bg-deep: #e8eef2;
    --theme-bg-soft: #fbfcfd;
    --theme-surface: #ffffff;
    --theme-surface-soft: #f2f5f6;
    --theme-surface-muted: #eceff0;
    --theme-surface-strong: #f3f2ee;
    --theme-text: #2b332f;
    --theme-text-strong: #1f2622;
    --theme-text-muted: #627386;
    --theme-text-rgb: 43, 51, 47;
    --theme-text-strong-rgb: 31, 38, 34;
    --theme-accent: #2f5d88;
    --theme-accent-strong: #183d5d;
    --theme-accent-soft: #e7eef6;
    --theme-accent-rgb: 47, 93, 136;
    --theme-accent-strong-rgb: 24, 61, 93;
    --theme-champagne: #d8b879;
    --theme-champagne-strong: #a7773c;
    --theme-champagne-rgb: 216, 184, 121;
    --theme-warm: #9b7444;
    --theme-warm-strong: #725331;
    --theme-band-from: #1d2f42;
    --theme-band-mid: #274c69;
    --theme-band-to: #4f78a0;
    --theme-on-band: #f8fbff;
    --theme-on-band-muted: rgba(232, 241, 249, 0.78);
    --theme-on-band-soft: rgba(248, 251, 255, 0.12);
    --theme-focus-ring: rgba(var(--theme-accent-rgb), 0.26);
    --theme-border: rgba(58, 64, 58, 0.08);
    --theme-border-strong: rgba(58, 64, 58, 0.14);
    --theme-shadow-soft: 0 18px 34px rgba(63, 53, 38, 0.045);
    --theme-shadow: 0 24px 46px rgba(63, 53, 38, 0.075);
    --theme-shadow-strong: 0 30px 60px rgba(63, 53, 38, 0.13);
    --theme-radius-xl: 32px;
    --theme-radius-lg: 24px;
    --theme-radius-md: 18px;
    --theme-radius-sm: 14px;
    --theme-surface-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 240, 232, 0.9));
    --theme-surface-gradient-soft: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 237, 229, 0.82));
    --theme-surface-gradient-muted: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(234, 229, 219, 0.78));
    --theme-band: linear-gradient(135deg, var(--theme-band-from) 0%, var(--theme-band-mid) 56%, var(--theme-band-to) 100%);
    --premium-ink: #1b1f24;
    --premium-ink-soft: #2f3640;
    --premium-muted: var(--theme-text-muted);
    --premium-surface: var(--theme-bg);
    --premium-surface-strong: var(--theme-surface);
    --premium-border: rgba(22, 47, 74, 0.08);
    --premium-accent: var(--theme-accent);
    --premium-accent-strong: var(--theme-accent-strong);
    --premium-on-accent: #ffffff;
    --premium-hero: var(--theme-band);
    --card-radius: var(--theme-radius-md);
    --card-shadow: var(--theme-shadow);
}

/* Match the compact fixed header before header.js refines the measured height. */
@media (min-width: 641px) and (max-width: 1100px) {
    :root {
        --header-height: 73px;
        --header-top-height: 73px;
    }
}

@media (max-width: 640px) {
    :root {
        --header-height: 61px;
        --header-top-height: 61px;
    }
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.7;
    color: var(--theme-text);
    background-color: var(--theme-bg-soft);
}

p {
    font-weight: 500;
}

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

body.menu-open,
body.modal-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== HEADER ========== */
.header {
    background: white;
    position: static;
}

.header .container {
    padding: 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Верхняя строка: Лого + Навигация */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 12px;
    border-bottom: 1px solid rgba(22, 40, 63, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 34px rgba(18, 30, 48, 0.08);
    transition: transform 0.25s ease;
    gap: 18px;
    flex-wrap: wrap;
}

.header.is-hidden .header-top {
    transform: translateY(-100%);
}

/* Логотип */
.logo-link {
    text-decoration: none !important;
}

.logo-premium {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-main {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.2;
    position: relative;
    padding-bottom: 6px;
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    letter-spacing: 0.02em;
}

.logo-main:before {
    content: '';
    position: absolute;
    left: -6px;
    right: -6px;
    bottom: -2px;
    height: 10px;
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.18), rgba(231, 76, 60, 0.18));
    filter: blur(6px);
    z-index: -1;
}

.logo-main:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(231,76,60,0) 0%, rgba(231,76,60,0.5) 15%, rgba(231,76,60,1) 50%, rgba(231,76,60,0.5) 85%, rgba(231,76,60,0) 100%);
}

.logo-tagline {
    font-size: 0.76rem;
    color: rgba(var(--theme-text-rgb), 0.58);
    font-weight: 700;
    line-height: 1.35;
    max-width: 168px;
}

.header-top--compact .logo-tagline {
    max-width: 168px;
}

.header-top--compact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "logo contacts actions"
        "nav nav nav";
    align-items: center;
    gap: 14px 18px;
}

.header-top--compact > * {
    min-width: 0;
}

.header-top--compact .logo {
    grid-area: logo;
}

.header-contact-stack {
    grid-area: contacts;
}

.nav {
    grid-area: nav;
}

.header-actions {
    display: none;
}

.header-contact-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    min-width: 200px;
    margin-left: 0;
    justify-self: center;
    text-align: left;
    align-items: flex-start;
}

.header-actions {
    align-items: center;
    gap: 14px;
}

/* Палитра цветов */
.palette-section {
    background: #fff;
}

.palette-wrapper {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 36px;
    align-items: center;
}

.palette-list {
    margin: 20px 0 25px;
    padding-left: 18px;
    color: var(--theme-text-muted);
}

.palette-list li {
    margin-bottom: 8px;
}

.palette-slider {
    display: grid;
    gap: 18px;
}

.palette-main {
    position: relative;
}

.palette-zoom {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
}

.palette-main img {
    width: 100%;
    height: auto;
    max-height: 620px;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.14);
}

.palette-zoom__hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.9rem;
}

.palette-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.75);
    z-index: 2000;
    padding: 20px;
}

.palette-modal.is-open {
    display: flex;
}

.palette-modal__content {
    position: relative;
    width: min(1100px, 96vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.palette-modal__image {
    width: 100%;
    height: auto;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 12px;
}

.palette-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.12);
    color: #0f172a;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.palette-modal__close:hover {
    background: rgba(15, 23, 42, 0.2);
}

.lightbox-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.85);
    z-index: 2100;
    padding: 20px;
}

.lightbox-modal.is-open {
    display: flex;
}

.lightbox-modal__content {
    position: relative;
    width: min(1280px, 96vw);
    max-height: 90vh;
    background: #0f172a;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-modal__figure {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-height: 100%;
}

.lightbox-modal__image {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    height: auto;
    border-radius: 12px;
    object-fit: contain;
    background: #0b1120;
}

.lightbox-modal__caption {
    color: #e2e8f0;
    font-size: 0.95rem;
    text-align: center;
    max-width: 70ch;
}

.lightbox-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(226, 232, 240, 0.12);
    color: #e2e8f0;
    font-size: 1.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lightbox-modal__close:hover {
    background: rgba(226, 232, 240, 0.22);
}

.lightbox-modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.26);
    color: rgba(255, 255, 255, 0.58);
    font-size: 1.1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    opacity: 0.5;
    transition: background-color 0.2s ease, opacity 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.lightbox-modal__nav:hover {
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
    opacity: 0.76;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.14);
}

.lightbox-modal__nav--prev {
    left: 12px;
}

.lightbox-modal__nav--next {
    right: 12px;
}

.lightbox-modal__nav[disabled] {
    opacity: 0.4;
    cursor: default;
}

.palette-thumbs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.palette-thumb {
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 0;
    background: transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.palette-thumb img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.palette-thumb:hover {
    transform: translateY(-2px);
}

.palette-thumb.is-active {
    border-color: var(--theme-accent);
}

.palette-slider--compact .palette-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.palette-card {
    display: grid;
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 28px;
    padding: 25px;
    background: var(--theme-surface-gradient-soft);
    border-radius: 18px;
    border: 1px solid var(--theme-border);
    margin: 25px 0;
}

.palette-card__info ul {
    margin: 15px 0 20px;
    padding-left: 18px;
    color: var(--theme-text-muted);
}

.palette-card__media img {
    width: 100%;
    height: auto;
    border-radius: 14px;
}

@media (max-width: 900px) {
    .palette-wrapper,
    .palette-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .palette-thumbs,
    .palette-slider--compact .palette-thumbs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.logo-main--image {
    padding-bottom: 0;
}

.logo-main--image:before,
.logo-main--image:after {
    content: none;
}

.logo-wave {
    display: none;
}

.logo-image {
    display: block;
    height: 80px;
    width: auto;
    max-width: 300px;
    border-radius: 0;
    object-fit: contain;
}

.header .logo-image {
    filter: none;
    border-radius: 12px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.header .logo-main--image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    contain: paint;
    padding: 6px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(247, 249, 252, 0.98) 0%, rgba(201, 212, 227, 0.92) 100%);
    border: none;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    isolation: isolate;
}

.header .logo-main--image::before,
.header .logo-main--image::after {
    content: none;
}

.header .logo-wave {
    display: block;
    position: absolute;
    inset: -185% -185%;
    background: linear-gradient(135deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0) 44%,
        rgba(255,255,255,0.7) 50%,
        rgba(255,255,255,0) 56%,
        rgba(255,255,255,0) 100%);
    transform: translate(150%, -150%) rotate(10deg);
    opacity: 0.6;
    pointer-events: none;
    filter: blur(0.6px);
    z-index: 2;
    animation: logo-wave-shine 3.1s linear infinite;
}

.header .logo-wave::before,
.header .logo-wave::after {
    content: none;
}

/* shared classic footer logo layer moved to footer.css */

@media (max-width: 768px) {
    .logo-image {
        height: 64px;
    }
}

/* ========== 2026 GLOBAL VISUAL POLISH ========== */
:root {
    --site-shell: linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 52%, #f7fafc 100%);
    --site-glass: rgba(255, 255, 255, 0.82);
    --site-glass-strong: rgba(255, 255, 255, 0.92);
    --site-line: rgba(43, 51, 47, 0.08);
    --site-line-strong: rgba(43, 51, 47, 0.12);
    --site-shadow: 0 24px 48px rgba(63, 53, 38, 0.075);
    --site-shadow-soft: 0 16px 32px rgba(63, 53, 38, 0.045);
    --site-text: #2b332f;
    --site-text-soft: #786f66;
    --site-accent: var(--theme-accent-strong);
    --site-accent-soft: rgba(var(--theme-accent-rgb), 0.12);
    --site-action-slate: #748895;
    --site-action-slate-strong: #5f7584;
    --site-action-slate-rgb: 95, 117, 132;
    --site-action-matte: #748895;
    --site-action-matte-hover: #667d8d;
    --site-action-matte-text: #fffdf9;
    --site-action-matte-border: rgba(255, 255, 255, 0.14);
    --site-action-ghost: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 250, 0.9));
    --site-action-ghost-hover: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(232, 240, 247, 0.96));
    --site-action-ghost-text: #31495e;
    --site-action-ghost-border: rgba(var(--theme-accent-rgb), 0.14);
    --site-card-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.985), rgba(244, 240, 232, 0.88));
    --site-card-border: rgba(var(--theme-accent-strong-rgb), 0.12);
    --site-card-shadow: 0 20px 38px rgba(31, 38, 34, 0.06);
}

body {
    color: var(--site-text);
    background:
        radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.09), transparent 28%),
        radial-gradient(circle at 80% 12%, rgba(var(--theme-accent-rgb), 0.05), transparent 26%),
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.62), transparent 20%),
        var(--site-shell);
}

@media (max-width: 1100px) {
    .scene-reveal {
        position: relative;
        isolation: isolate;
        opacity: 0;
        transform: translate3d(0, 16px, 0) scale(0.996);
        transition:
            opacity 0.72s ease,
            transform 0.98s cubic-bezier(0.16, 1, 0.3, 1);
        will-change: opacity, transform;
        transform-origin: center top;
    }

    .scene-reveal.is-visible {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

    .scene-reveal__curtain {
        position: absolute;
        inset: 0;
        z-index: 8;
        pointer-events: none;
        border-radius: inherit;
        background:
            linear-gradient(180deg, rgba(250, 251, 252, 0.94) 0%, rgba(243, 247, 251, 0.76) 52%, rgba(243, 247, 251, 0.18) 100%);
        transform: translate3d(0, 0, 0);
        opacity: 1;
        transition:
            transform 0.84s cubic-bezier(0.16, 1, 0.3, 1),
            opacity 0.42s ease;
        will-change: transform, opacity;
    }

    .scene-reveal.is-visible > .scene-reveal__curtain {
        transform: translate3d(0, -102%, 0);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .scene-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .scene-reveal__curtain {
        display: none !important;
        transition: none !important;
    }
}

@media (max-width: 1100px) {
    :root {
        --site-shell: linear-gradient(180deg, #fbfcfd 0%, #f2f6f7 52%, #f7fafc 100%);
    }

    body {
        background:
            radial-gradient(circle at top left, rgba(var(--theme-accent-rgb), 0.07), transparent 30%),
            radial-gradient(circle at 76% 10%, rgba(var(--theme-accent-rgb), 0.05), transparent 28%),
            radial-gradient(circle at top right, rgba(255, 255, 255, 0.76), transparent 22%),
            var(--site-shell);
    }
}

.btn {
    gap: 9px;
    min-height: 52px;
    padding: 14px 26px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.btn-primary,
.btn--primary {
    background: var(--site-action-matte);
    background-image: none;
    border: 1px solid var(--site-action-matte-border);
    color: var(--site-action-matte-text);
    box-shadow: 0 12px 24px rgba(var(--site-action-slate-rgb), 0.12);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn--primary:hover,
.btn--primary:focus-visible {
    background: var(--site-action-matte-hover);
    background-image: none;
    border-color: rgba(98, 121, 139, 0.22);
    color: var(--site-action-matte-text);
    box-shadow: 0 14px 26px rgba(var(--site-action-slate-rgb), 0.14);
}

.btn-secondary {
    background: var(--site-action-ghost);
    color: var(--site-action-ghost-text);
    border: 1px solid var(--site-action-ghost-border);
    box-shadow: 0 12px 22px rgba(var(--site-action-slate-rgb), 0.08);
}

.btn-secondary:hover {
    background: var(--site-action-ghost-hover);
    color: var(--site-action-ghost-text);
    border-color: rgba(var(--theme-accent-rgb), 0.2);
    box-shadow: 0 14px 24px rgba(var(--site-action-slate-rgb), 0.1);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(17, 42, 68, 0.1);
    color: #31475e;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.92);
}

.section {
    padding: 64px 0;
}

.section-title {
    color: var(--theme-text-strong);
    font-family: var(--font-display);
    font-size: clamp(2.15rem, 3.1vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.028em;
    font-weight: 700;
    text-wrap: balance;
}

.section-title:after {
    width: 92px;
    height: 3px;
    margin: 16px auto 0;
    background: linear-gradient(90deg, rgba(29, 111, 178, 0), rgba(29, 111, 178, 0.85), rgba(29, 111, 178, 0));
}

.section-subtitle {
    max-width: 680px;
    margin-top: 10px;
    color: var(--theme-text-muted);
    font-size: 1.02rem;
    line-height: 1.72;
}

.faq-item {
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--site-line);
    box-shadow: var(--site-shadow-soft);
    padding: 20px 22px;
}

.faq-question {
    color: #24364b;
    font-size: var(--type-title-card);
    line-height: 1.26;
    font-weight: 700;
}

.faq-question:after {
    color: var(--site-accent);
}

/* shared classic footer theme moved to footer.css */

@media (max-width: 768px) {
    .section {
        padding: 62px 0;
    }

    .section-subtitle {
        font-size: 1rem;
        line-height: 1.72;
    }

    .btn {
        min-height: 48px;
        padding: 13px 20px;
        font-size: 0.95rem;
    }
}

/* Навигация */
.nav {
    display: flex;
    align-items: center;
    justify-self: end;
    margin-left: 0;
}

.nav-list {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 14px;
    margin: 0;
    padding: 0;
    width: 100%;
}

.header-top--compact .nav {
    justify-self: stretch;
    width: 100%;
}

.header-top--compact .nav-list {
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 12px;
    row-gap: 8px;
}

.header-top--compact .nav-list li {
    flex: 0 0 auto;
}

.header-top--compact .nav-list a {
    white-space: nowrap;
}

.nav-list a {
    text-decoration: none;
    color: rgba(var(--theme-text-rgb), 0.78);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 0.97rem;
    padding: 8px 10px;
    line-height: 1.1;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.nav-list a i {
    display: none;
}

.nav-list a:hover {
    background: rgba(247, 241, 230, 0.94);
    color: var(--theme-accent);
}

.nav-list a.active {
    background: none;
    border-color: rgba(var(--theme-accent-rgb), 0.18);
    color: var(--theme-accent);
    font-weight: 700;
}

.nav.active {
    display: flex;
}

/* Кнопка мобильного меню */
.mobile-menu-btn {
    display: none;
    background: #f7f2e8;
    border: 1px solid rgba(64, 49, 32, 0.12);
    font-size: 1.35rem;
    color: #0f172a;
    cursor: pointer;
    padding: 5px;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    position: relative;
    z-index: 1002;
}

.mobile-menu-btn:hover {
    background: #efe5d5;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
    transform: translateY(-1px);
}

.mobile-menu-btn.active i {
    transform: rotate(90deg);
}

/* ========== HERO SECTION (Variant A) ========== */
.hero {
  --hero-img: url('../images/hero/hero-gates-clean.webp');
  background-color: #0b0f16;

  color: #fff;
  text-align: center;

  position: relative;
  overflow: hidden;
  /* стабильная высота */
  min-height: clamp(600px, 70vh, 900px);

  /* hero без padding (отступы задаём контейнером) */
  padding: 0;

  display: flex;
  align-items: stretch;
}

/* Фон: размытие + четкая картинка целиком (без обрезки) */
.hero::before {
  content: '';
  position: absolute;
  inset: -8%;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: 50% 50%;
  filter: blur(18px) brightness(0.9);
  transform: scale(1.06);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}

/* При сильном уменьшении масштаба (очень широкое окно) показываем размытые поля */
@media (min-width: 1600px) {
  .hero::before {
    opacity: 1;
  }
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-img);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 50%;
  z-index: 1;
  pointer-events: none;
}

/* Контейнер внутри hero — тут отступы */
.hero > .container {
  width: 100%;
  max-width: 1400px;
  padding: 70px 72px 90px;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 40px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary,
.btn--primary {
    background: var(--site-action-matte);
    background-image: none;
    color: var(--site-action-matte-text);
    border: 1px solid var(--site-action-matte-border);
    box-shadow: 0 10px 20px rgba(var(--site-action-slate-rgb), 0.12);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn--primary:hover,
.btn--primary:focus-visible {
    background: var(--site-action-matte-hover);
    background-image: none;
    color: var(--site-action-matte-text);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(var(--site-action-slate-rgb), 0.14);
}

.btn-secondary {
    background: var(--site-action-ghost);
    color: var(--site-action-ghost-text);
    border: 1px solid var(--site-action-ghost-border);
    box-shadow: 0 12px 22px rgba(var(--site-action-slate-rgb), 0.08);
}

.btn-secondary:hover {
    background: var(--site-action-ghost-hover);
    color: var(--site-action-ghost-text);
    border-color: rgba(var(--theme-accent-rgb), 0.2);
    font-weight: 700;
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(var(--site-action-slate-rgb), 0.1);
}

.btn-outline {
    background: var(--site-action-ghost);
    color: var(--site-action-ghost-text);
    border: 1px solid var(--site-action-ghost-border);
    box-shadow: 0 10px 20px rgba(var(--site-action-slate-rgb), 0.06);
}

.btn-outline:hover {
    border-color: rgba(var(--theme-accent-rgb), 0.2);
    background: var(--site-action-ghost-hover);
    color: var(--site-action-ghost-text);
    transform: translateY(-2px);
    box-shadow: 0 14px 24px rgba(var(--site-action-slate-rgb), 0.1);
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

/* ========== SECTIONS ========== */
.section {
    padding: 64px 0;
}

.section-title {
    text-align: center;
    color: var(--theme-text-strong);
    font-family: var(--font-display);
    font-size: var(--type-title-section);
    margin-bottom: 0;
    font-weight: 700;
    position: relative;
    line-height: 0.98;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.section-title:after {
    content: '';
    display: block;
    width: 84px;
    height: 3px;
    background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0), rgba(var(--theme-accent-rgb), 0.88), rgba(var(--theme-accent-rgb), 0));
    margin: 14px auto 0;
    border-radius: 999px;
}

.section-subtitle {
    text-align: center;
    color: var(--theme-text-muted);
    margin: 12px auto 32px;
    font-size: var(--type-body-md);
    max-width: 680px;
    line-height: var(--leading-body);
}

/* ========== FAQ ========== */
.faq-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 25px;
}

.faq-item {
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--theme-border);
    padding: 18px 20px;
}

.faq-question {
    cursor: pointer;
    font-weight: 600;
    color: var(--theme-text-strong);
    list-style: none;
    position: relative;
    padding-right: 28px;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--theme-accent);
    font-weight: 700;
}

.faq-item[open] .faq-question:after {
    content: '–';
}

.faq-answer {
    margin-top: 12px;
    color: var(--theme-text-muted);
    font-size: var(--type-body-sm);
    line-height: var(--leading-copy);
}

/* ========== PROCESS TIMELINE ========== */
.process-step {
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 255, 0.95));
    border-radius: 20px;
    padding: 22px 18px 20px;
    border: 1px solid #dbe8f3;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
    text-align: left;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.process-step::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #2f79c3, #1f5b96);
}

.process-step:hover {
    transform: translateY(-2px);
    border-color: #cddff0;
    box-shadow: 0 18px 30px rgba(47, 121, 195, 0.12);
}

.process-step h3 {
    margin: 0 0 8px;
    color: var(--theme-text-strong);
    font-size: 1.12rem;
}

.process-step p {
    margin: 0;
    color: var(--theme-text-muted);
    font-size: 0.94rem;
    line-height: 1.55;
}

.work-info {
    padding: 25px;
    background: white;
}

.work-info h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--theme-text-strong);
    margin: 0 0 10px 0;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: break-word;
}

.work-category {
    font-size: 0.9rem;
    color: var(--theme-accent);
    font-weight: 600;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.work-category:before {
    content: "•";
    color: #e74c3c;
    font-size: 1.5rem;
}

/* ========== BEFORE/AFTER ========== */
.before-after-section {
    background: #f7f9fc;
}

.before-after {
    max-width: 900px;
    margin: 0 auto;
}

.before-after__media {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    background: #0f172a;
}

.before-after__after {
    position: absolute;
    inset: 0;
    width: calc(100% - var(--before-width, 50%));
    height: 100%;
    overflow: hidden;
    left: 0;
    right: auto;
    z-index: 1;
}

.before-after__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.before-after__image--after {
    object-fit: cover;
}

.before-after__before {
    position: absolute;
    inset: 0;
    width: var(--before-width, 50%);
    overflow: hidden;
    right: 0;
    left: auto;
    border-left: none;
    border-right: none;
    z-index: 2;
}

.before-after__middle {
    position: absolute;
    inset: 0;
    width: var(--middle-width, 68%);
    overflow: hidden;
    left: 0;
    right: auto;
    z-index: 1;
}

.before-after__image--before {
    filter: none;
}

.before-after__label {
    position: absolute;
    top: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, 0.75);
    z-index: 2;
}

.before-after__label--before {
    right: 16px;
    left: auto;
}

.before-after__label--after {
    left: 16px;
    right: auto;
}

.before-after__label--middle {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.before-after__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(100% - var(--before-width, 50%));
    width: 0;
    background: transparent;
    transform: translateX(-1px);
    cursor: ew-resize;
    z-index: 2;
}

.before-after__handle:before {
    content: none;
}

/* Sandblasting: show "До" on the left and zoom out the after image */
.before-after--before-left .before-after__before {
    left: 0;
    right: auto;
}

.before-after--before-left .before-after__after {
    left: auto;
    right: 0;
}


.before-after--before-left .before-after__label--before {
    left: 16px;
    right: auto;
}

.before-after--before-left .before-after__label--after {
    right: 16px;
    left: auto;
}

.before-after--before-left .before-after__handle {
    left: var(--before-width, 50%);
}

.before-after--before-left.before-after--triple .before-after__handle--first {
    left: var(--before-width, 34%);
}

.before-after--before-left.before-after--triple .before-after__handle--second {
    left: var(--middle-width, 68%);
}

.before-after--triple .before-after__handle {
    width: 2px;
    background: rgba(255,255,255,0.85);
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.35);
}

.before-after--triple .before-after__handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid var(--theme-accent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
    transform: translate(-50%, -50%);
}

.before-after--triple .before-after__before {
    z-index: 2;
}

.before-after--after-contain .before-after__image--after {
    object-fit: contain;
}

.before-after--portrait {
    max-width: 720px;
}

.before-after--portrait .before-after__media {
    height: clamp(520px, 70vh, 760px);
    background: #0f172a;
}

.before-after--portrait .before-after__media::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--after-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.05);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.before-after--portrait .before-after__before::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--before-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.05);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.before-after--portrait .before-after__middle::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--middle-image);
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.05);
    opacity: 0.7;
    z-index: 0;
    pointer-events: none;
}

.before-after--portrait .before-after__image {
    object-fit: contain;
    position: relative;
    z-index: 1;
}

.before-after--portrait .before-after__before {
    z-index: 1;
}

.before-after--portrait.before-after--triple .before-after__before {
    z-index: 2;
}

.before-after__control {
    position: relative;
    margin-top: 18px;
    padding: 8px 0;
}

.before-after__control--triple {
    display: grid;
    gap: 10px;
}

.before-after__control-row {
    display: grid;
    gap: 6px;
}

.before-after__control-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-text-muted);
}

.before-after__control--triple .before-after__range {
    height: 30px;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
}

.before-after__control--triple .before-after__range::-webkit-slider-runnable-track {
    height: 8px;
    background: linear-gradient(90deg, #cbd5f5, #dbeafe);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.5);
}

.before-after__control--triple .before-after__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--theme-accent);
    border: 3px solid #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
    margin-top: -7px;
}

.before-after__control--triple .before-after__range::-moz-range-track {
    height: 8px;
    background: linear-gradient(90deg, #cbd5f5, #dbeafe);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.5);
}

.before-after__control--triple .before-after__range::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--theme-accent);
    border: 3px solid #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.before-after__range {
    width: 100%;
    height: 36px;
    margin: 0;
    cursor: ew-resize;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    position: relative;
    z-index: 2;
}

.before-after__range::-webkit-slider-runnable-track {
    height: 36px;
    background: transparent;
}

.before-after__range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
}

.before-after__range::-moz-range-track {
    height: 36px;
    background: transparent;
    border: none;
}

.before-after__range::-moz-range-thumb {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
}

.before-after__prompt {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 36px;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.before-after__prompt--triple {
    position: static;
    transform: none;
    height: auto;
    margin-top: 4px;
    display: flex;
    justify-content: center;
}

.before-after__prompt--triple .before-after__prompt-bar,
.before-after__prompt--triple .before-after__prompt-hint {
    display: none;
}

.before-after__prompt-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.98);
    border: 2px solid var(--theme-accent);
    color: var(--theme-accent-strong);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
}

.before-after__prompt-bar {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 5px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--theme-accent-rgb), 0.12), rgba(var(--theme-accent-rgb), 0.9), rgba(var(--theme-accent-rgb), 0.12));
    box-shadow: 0 4px 12px rgba(var(--theme-accent-rgb), 0.22);
}

.before-after__prompt-hint {
    position: absolute;
    left: clamp(8%, calc(100% - var(--before-width, 50%)), 92%);
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.98);
    border: 2px solid var(--theme-accent);
    color: var(--theme-accent-strong);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
    animation: prompt-pulse 1.8s ease-in-out infinite;
}

.before-after--before-left .before-after__prompt-hint {
    left: clamp(8%, var(--before-width, 50%), 92%);
}

.before-after__prompt-hint i {
    font-size: 1rem;
    color: var(--theme-accent);
    animation: prompt-hand 1.6s ease-in-out infinite;
}

.before-after__prompt-arrow {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 12px;
    animation: prompt-arrow-nudge 1.4s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(83, 210, 255, 0.6));
}

.before-after__chevron {
    width: 10px;
    height: 10px;
    border-right: 2px solid #63dcff;
    border-bottom: 2px solid #63dcff;
    transform: rotate(-45deg);
    opacity: 0.4;
    animation: chevron-glow 1.2s ease-in-out infinite;
}

.before-after__chevron:nth-child(2) {
    opacity: 0.55;
    animation-delay: 0.12s;
}

.before-after__chevron:nth-child(3) {
    opacity: 0.7;
    animation-delay: 0.24s;
}

.before-after__chevron:nth-child(4) {
    opacity: 0.85;
    animation-delay: 0.36s;
}

.before-after__chevron:nth-child(5) {
    opacity: 1;
    animation-delay: 0.48s;
}

@keyframes prompt-arrow-nudge {
    0% {
        transform: translateX(0);
        opacity: 0.8;
    }
    60% {
        transform: translateX(6px);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 0.8;
    }
}

@keyframes prompt-pulse {
    0% {
        box-shadow: 0 12px 24px rgba(0,0,0,0.3);
        opacity: 0.85;
    }
    50% {
        box-shadow: 0 16px 28px rgba(0,0,0,0.38);
        opacity: 1;
    }
    100% {
        box-shadow: 0 12px 24px rgba(0,0,0,0.3);
        opacity: 0.85;
    }
}

@keyframes prompt-hand {
    0% {
        transform: translateX(0);
    }
    60% {
        transform: translateX(4px);
    }
    100% {
        transform: translateX(0);
    }
}

@keyframes chevron-glow {
    0% {
        opacity: 0.35;
        transform: rotate(-45deg) scale(0.92);
        filter: drop-shadow(0 0 2px rgba(83, 210, 255, 0.35));
    }
    50% {
        opacity: 1;
        transform: rotate(-45deg) scale(1.05);
        filter: drop-shadow(0 0 8px rgba(83, 210, 255, 0.8));
    }
    100% {
        opacity: 0.35;
        transform: rotate(-45deg) scale(0.92);
        filter: drop-shadow(0 0 2px rgba(83, 210, 255, 0.35));
    }
}

.before-after__range {
    width: 100%;
    margin-top: 0;
}

.before-after__note {
    margin-top: 12px;
    text-align: center;
    color: var(--theme-text-muted);
    font-size: 0.95rem;
}

.contact-info {
    margin-top: auto;
    padding: 20px 20px 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 251, 255, 0.96));
    border-radius: 22px;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.07);
    border: 1px solid var(--theme-border);
}

.contact-info h3 {
    color: var(--theme-text-strong);
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-info h3:before {
    content: '';
    width: 30px;
    height: 3px;
    background: var(--theme-accent);
    border-radius: 2px;
}

.contact-info__intro {
    margin: 0 0 14px;
    color: var(--theme-text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.contact-info > p:not(.contact-info__intro) {
    margin: 12px 0;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    column-gap: 12px;
    row-gap: 4px;
    color: var(--theme-text);
    font-size: 1rem;
}

.contact-note {
    color: var(--theme-text-muted);
    margin-left: 8px;
    font-size: 0.95em;
}

.contact-info i {
    color: var(--theme-accent);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.contact-info a {
    color: var(--theme-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--theme-accent-strong);
    text-decoration: underline;
}

/* shared classic footer moved to footer.css */

@keyframes logo-wave-shine {
    0% {
        transform: translate(150%, -150%) rotate(10deg);
        opacity: 0.6;
    }
    100% {
        transform: translate(-150%, 150%) rotate(10deg);
        opacity: 0.6;
    }
}

/* ========== RESPONSIVE DESIGN ========== */

/* Для планшетов */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 2.5rem;
    }

    .before-after__media {
        height: 360px;
    }

    .before-after--portrait .before-after__media {
        height: clamp(460px, 70vh, 640px);
    }
}

/* Для мобильных телефонов */
@media (max-width: 768px) {
    body {
        padding-top: var(--header-height, 140px);
    }

    body.header-hidden {
        padding-top: 0;
    }

    /* ✅ ВАЖНО: новый hero для мобильных — без паддинга у .hero */
    .hero {
        padding: 0;            /* важно! */
        min-height: clamp(460px, 70vh, 700px);
    }

    /* ✅ Отступы переносим на контейнер */
    .hero > .container {
        padding: 10px 0 110px;
    }

    .hero h2 {
        font-size: 1.85rem;
        padding: 0;
    }

    .before-after__media {
        height: 300px;
    }

    .section {
        padding: 55px 0;
    }

    .section-title {
        font-size: 1.8rem;
        padding: 0 20px;
    }

    .section-subtitle {
        font-size: 1rem;
        padding: 0 20px;
    }

    .contact-info {
        padding: 18px;
    }

    .contact-info > p:not(.contact-info__intro) {
        grid-template-columns: 22px minmax(0, 1fr);
        column-gap: 8px;
    }

    .contact-note {
        display: block;
        margin-left: 0;
        margin-top: 2px;
    }

}

/* Для телефонов в альбомной ориентации (мало высоты) */
@media (max-height: 520px) and (max-width: 1024px) {
    body {
        padding-top: var(--header-height, 110px);
    }

    body.header-hidden {
        padding-top: 0;
    }

    /* ✅ Важно: тоже НЕ задаем padding на .hero (иначе перетрёт) */
    .hero {
        padding: 0;
        min-height: clamp(520px, 70vh, 820px);            /* можно оставить, чтобы не прыгал */
    }

    .hero > .container {
        padding: 50px 0;              /* было 50px у .hero — перенесли сюда */
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .section {
        padding: 45px 0;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .btn {
        padding: 14px 26px;
        font-size: 0.95rem;
    }

    .footer {
        padding: 45px 0 18px;
    }

    .section {
        padding: 45px 0;
    }

}

/* Для очень узких экранов */
/* Гарантированный перенос длинных слов */
/* Для всех заголовков на сайте */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ========== DEBUG LAYOUT MODE ========== */

/* shared premium footer moved to footer.css */

/* shared desktop legacy header moved to header.css */

/* shared internal pages moved to internal-pages.css */
/* shared internal hero moved to hero-inner.css */
