﻿/* ============================================================================
   ЛАНДШАФТ И ХВОЯ — БАЗОВЫЙ СТИЛЬ
   Тёмная палитра: глубокий уголь + полированное золото + хвойный изумруд
   Типографика: Cormorant Garamond (display) + Manrope (body)
============================================================================ */

/* --- 1. Дизайн-токены ----------------------------------------------------- */
:root {
    /* Палитра */
    --c-bg: #0a0a0a;
    --c-bg-2: #111;
    --c-bg-3: #161616;
    --c-bg-card: #131313;
    --c-line: rgba(74, 140, 110, 0.18);
    --c-line-soft: rgba(255, 255, 255, 0.06);
    --c-text: #e7e3d8;
    --c-text-muted: #9c958a;
    --c-text-dim: #6b6660;

    /* Золото — несколько оттенков */
    --c-gold-1: #b5d5c3;
    --c-gold-2: #7eb89e;
    --c-gold: #4a8c6e;
    --c-gold-dark: #2f6650;
    --c-gold-darker: #1e4535;

    /* Изумруд (вторичный акцент) */
    --c-emerald: #2d4a3e;
    --c-emerald-2: #4a6b5d;

    /* Состояния */
    --c-error: #c47878;
    --c-success: #6ba47f;

    /* Типографика */
    --ff-display: 'Cormorant Garamond', 'Times New Roman', serif;
    --ff-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --fs-base: 16px;
    --lh-base: 1.65;

    /* Радиусы / тени / переходы */
    --r-sm: 4px;
    --r: 8px;
    --r-lg: 16px;
    --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
    --shadow-gold: 0 0 40px -10px rgba(74, 140, 110, 0.35);
    --transition: 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
    --transition-fast: 0.25s ease-out;

    /* Сетка */
    --container: 1280px;
    --container-narrow: 1020px;
    --gutter: 24px;

    /* Золотой градиент */
    --grad-gold: linear-gradient(135deg, #7eb89e 0%, #4a8c6e 40%, #b5d5c3 70%, #2f6650 100%);
    --grad-gold-soft: linear-gradient(135deg, rgba(100,180,150,.18), rgba(74,140,110,.10) 40%, rgba(243,224,160,.20) 70%, rgba(47,102,80,.08));
}

/* --- 2. Сброс и базовые --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;          /* запрет горизонтального скролла */
    max-width: 100vw;
}
body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 400 var(--fs-base)/var(--lh-base) var(--ff-body);
    font-feature-settings: "kern" 1, "ss01" 1;
    overflow-x: hidden;
    max-width: 100vw;
    min-height: 100vh;
    position: relative;
}
/* Страховка: ни одна картинка / iframe не «вытолкнут» макет вправо */
img, svg, video, iframe { max-width: 100%; }
body::before {
    /* тонкая золотая дымка по краю экрана */
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 0% 0%, rgba(74,140,110,0.05), transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(74,140,110,0.04), transparent 40%);
    z-index: 1;
}
body::after {
    /* тонкая зернистость для премиальности */
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.05;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
    mix-blend-mode: overlay;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* --- 3. Утилиты ---------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
}
.container--narrow { max-width: var(--container-narrow); }

.gold-text {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--ff-body);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--c-gold);
    margin-bottom: 18px;
}
.eyebrow::before {
    content: '';
    width: 30px;
    height: 1px;
    background: var(--grad-gold);
}

.section { padding: 100px 0; position: relative; z-index: 2; }
.section--tight { padding: 64px 0; }
.section--lg { padding: 140px 0 100px; }
@media (max-width: 768px) {
    .section { padding: 64px 0; }
    .section--lg { padding: 80px 0 60px; }
}

.section__head {
    margin-bottom: 64px;
    max-width: 760px;
}
.section__head--center { text-align: center; margin-left: auto; margin-right: auto; }

h1, h2, h3, h4 {
    font-family: var(--ff-display);
    font-weight: 500;
    line-height: 1.1;
    margin: 0 0 0.6em;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 500; }
h2 { font-size: clamp(30px, 4vw, 52px); }
h3 { font-size: clamp(22px, 2.5vw, 32px); }
h4 { font-size: clamp(18px, 1.6vw, 22px); }

.h-display {
    font-family: var(--ff-display);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.015em;
}

p { margin: 0 0 1em; }
.lead {
    font-size: clamp(17px, 1.4vw, 20px);
    line-height: 1.55;
    color: var(--c-text-muted);
    font-weight: 300;
}

/* Тонкая золотая линия-разделитель */
.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--c-gold);
    margin: 28px 0;
}
.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-gold-dark), transparent);
}
.divider svg { width: 24px; height: 24px; }

/* --- 4. Прелоадер ---------------------------------------------------------*/
.site-preloader {
    position: fixed;
    inset: 0;
    background: var(--c-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
.site-preloader.is-hidden { opacity: 0; visibility: hidden; }
.site-preloader__icon {
    width: 60px;
    height: 60px;
    color: var(--c-gold);
    animation: lh-rotate 4s linear infinite;
}
@keyframes lh-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 5. Топлайн / Топбар ------------------------------------------------- */
.topline {
    height: 2px;
    background: var(--grad-gold);
    position: relative;
    z-index: 5;
}
.topbar {
    background: var(--c-bg-2);
    border-bottom: 1px solid var(--c-line-soft);
    font-size: 13px;
    color: var(--c-text-muted);
    position: relative;
    z-index: 4;
}
.topbar__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}
.topbar__col {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.topbar__col .ico {
    width: 14px;
    height: 14px;
    fill: var(--c-gold);
    flex: 0 0 14px;
    display: block;
    transform: translateY(1px);
}

.topbar__phone {
    display: inline-flex;
    align-items: center;
    color: var(--c-gold-1);
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}
.topbar__phone:hover { color: var(--c-gold-2); }

/* На мобильных оставляем в топбаре только телефон, всё в одну линию */
@media (max-width: 900px) {
    .topbar__col--hours, .topbar__col--addr { display: none; }
    .topbar { padding: 8px 0; }
    .topbar__row { justify-content: center; }
    .topbar__col--phone { width: auto; }
    .topbar__phone {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-direction: row;       /* иконка и номер в одну строку */
        white-space: nowrap;
        font-size: 14px;
        letter-spacing: 1.5px;
    }
    .topbar__phone .ico { width: 13px; height: 13px; }
}

/* --- 6. Шапка / Навигация ------------------------------------------------ */
.header {
    background: rgba(10, 10, 10, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-line-soft);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: transform 0.4s ease, background 0.3s ease;
}
.header.is-scrolled {
    background: rgba(10,10,10,0.98);
    box-shadow: 0 8px 30px -8px rgba(0,0,0,0.6);
}
.header__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0;
    min-height: 80px;
}
/* Порядок на десктопе по умолчанию */
.logo        { order: 1; flex: none; }
.nav         { order: 2; }
.header__cta { order: 3; flex: none; }
.burger      { order: 4; }
.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    line-height: 1;
    flex: none;
}
.logo__mark {
    width: 50px;
    height: 50px;
    flex: none;
    transition: transform var(--transition);
}
.logo:hover .logo__mark { transform: rotate(-8deg) scale(1.05); }
.logo__text {
    display: flex;
    flex-direction: column;
    font-family: var(--ff-display);
}
.logo__name {
    font-size: 19px;
    letter-spacing: 4px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--c-text);
    line-height: 1.1;
}
.logo__name--accent {
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 13px;
    letter-spacing: 5px;
}
@media (max-width: 480px) {
    .logo__name { font-size: 16px; letter-spacing: 3px; }
    .logo__name--accent { font-size: 11px; letter-spacing: 4px; }
    .logo__mark { width: 42px; height: 42px; }
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav__list {
    display: flex;
    list-style: none;
    margin: 0; padding: 0;
    gap: 4px;
    align-items: center;
}
.nav__link {
    display: inline-block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--c-text-muted);
    position: relative;
    letter-spacing: 0.02em;
    transition: color var(--transition-fast);
}
.nav__link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 4px;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: var(--grad-gold);
    transition: width var(--transition);
}
.nav__link:hover,
.nav__link.is-active { color: var(--c-gold-1); }
.nav__link.is-active::after { width: calc(100% - 28px); }
.nav__footer { display: none; }

.header__cta { flex: none; }

.burger {
    display: none;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid var(--c-gold-dark);
    border-radius: var(--r-sm);
    padding: 0;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 52;
    transition: border-color var(--transition-fast);
}
.burger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: var(--c-gold-1);
    transition: transform 0.3s, opacity 0.3s;
}
.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 1024px) {
    /* Кнопка ЗАМЕР остаётся видимой, но более компактная */
    .header__cta {
        padding: 10px 16px;
        font-size: 12px;
        letter-spacing: 1.2px;
    }
    .header__cta svg { width: 12px; height: 12px; }
    .burger { display: flex; }
    /* Порядок на мобильных: лого → замер → бургер */
    .header__row { gap: 10px; padding: 12px 0; min-height: 64px; }
    .logo        { order: 1; margin-right: auto; }
    .header__cta { order: 2; }
    .burger      { order: 3; }
    .nav         { order: 99; }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        width: 100%;
        max-width: 380px;
        background: var(--c-bg-2);
        flex-direction: column;
        gap: 0;
        padding: 100px 28px 32px;
        transform: translate3d(101%, 0, 0);
        will-change: transform;
        transition: transform 0.45s cubic-bezier(0.7, 0, 0.3, 1);
        border-left: 1px solid var(--c-line);
        overflow-y: auto;
        z-index: 51;
        visibility: hidden;       /* пока меню закрыто — невидимо для горизонтального layout */
    }
    .nav.is-open { transform: translate3d(0, 0, 0); visibility: visible; }
    /* Блокируем скролл body при открытом меню */
    body.menu-open { overflow: hidden; }
    .nav__list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
    }
    .nav__item { border-bottom: 1px solid var(--c-line-soft); }
    .nav__link {
        display: block;
        padding: 18px 8px;
        font-size: 17px;
        font-family: var(--ff-display);
        letter-spacing: 0.04em;
        color: var(--c-text);
    }
    .nav__link.is-active { color: var(--c-gold-1); }
    .nav__link::after { display: none; }
    .nav__footer {
        display: block;
        margin-top: auto;
        padding-top: 32px;
        text-align: center;
    }
    .nav__phone {
        display: block;
        font-family: var(--ff-display);
        font-size: 26px;
        color: var(--c-gold-1);
        margin-bottom: 18px;
        letter-spacing: 0.04em;
    }
}

/* На очень узких экранах кнопка ЗАМЕР превращается в краткий вариант */
@media (max-width: 480px) {
    .header__cta { padding: 9px 12px; font-size: 11px; letter-spacing: 0.5px; gap: 6px; }
    .header__cta span::before { content: ''; }
    .header__row { gap: 8px; padding: 10px 0; min-height: 60px; }
    /* Лого сжимаем сильнее, чтобы всё влезало */
    .logo { gap: 10px; }
    .logo__mark { width: 36px; height: 36px; }
}

@media (max-width: 380px) {
    /* На совсем узких — текст внутри кнопки сокращаем через JS, но и CSS подстрахуем */
    .header__cta span { font-size: 10px; }
    .logo__name { font-size: 14px; letter-spacing: 2px; }
    .logo__name--accent { font-size: 10px; letter-spacing: 3px; }
}

/* --- 7. Кнопки ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--ff-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: none;
    color: var(--c-text);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform var(--transition); }
.btn:hover svg { transform: translateX(4px); }

.btn--sm { padding: 11px 18px; font-size: 12px; letter-spacing: 0.06em; }
.btn--lg { padding: 18px 36px; font-size: 15px; }
.btn--block { display: flex; width: 100%; }

.btn--gold {
    background: var(--grad-gold);
    color: #0a0a0a;
    box-shadow: 0 8px 30px -8px rgba(74,140,110,0.6);
}
.btn--gold::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad-gold);
    background-position: 100% 100%;
    background-size: 200% 200%;
    transition: background-position 0.6s ease;
    z-index: -1;
}
.btn--gold:hover {
    box-shadow: 0 14px 40px -10px rgba(74,140,110,0.85);
    transform: translateY(-2px);
}

.btn--outline {
    border-color: var(--c-gold-dark);
    color: var(--c-gold-1);
    background: transparent;
}
.btn--outline:hover {
    border-color: var(--c-gold);
    background: rgba(74,140,110,0.08);
    color: var(--c-gold-2);
}

.btn--ghost {
    border-color: var(--c-line);
    color: var(--c-text);
    background: transparent;
}
.btn--ghost:hover {
    border-color: var(--c-gold);
    color: var(--c-gold-1);
}

/* --- 8. Хиро-секция ------------------------------------------------------- */
.hero {
    position: relative;
    min-height: calc(100vh - 80px);
    min-height: calc(100dvh - 80px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    padding: 120px 0 80px;
}
.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../img/hero-main.jpg') center/cover no-repeat;
    transform: scale(1.05);
    will-change: transform;
    animation: hero-zoom 20s ease-in-out infinite alternate;
}
@keyframes hero-zoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.15); }
}
.hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.55) 50%, rgba(10,10,10,0.95) 100%),
        linear-gradient(90deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.4) 60%, transparent 100%);
}
.hero__decor {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 320px;
    pointer-events: none;
    z-index: -1;
    background:
        linear-gradient(135deg, transparent, rgba(74,140,110,0.06) 50%, transparent),
        radial-gradient(ellipse at top right, rgba(74,140,110,0.1), transparent 60%);
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: end;
}
@media (min-width: 900px) {
    .hero__grid { grid-template-columns: 1.4fr 1fr; gap: 80px; }
}

.hero__content { max-width: 720px; }
.hero__title {
    margin: 0 0 24px;
    font-size: clamp(40px, 7.5vw, 86px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
}
.hero__title-line { display: block; }
.hero__title-accent {
    display: block;
    font-style: italic;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-top: 6px;
}
.hero__lead {
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.55;
    color: var(--c-text);
    opacity: 0.85;
    margin: 24px 0 36px;
    max-width: 560px;
    font-weight: 300;
}
.hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.hero__features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 36px;
    max-width: 520px;
}
@media (min-width: 600px) {
    .hero__features { grid-template-columns: repeat(3, 1fr); }
}
.hero__feature {
    border-top: 1px solid var(--c-line);
    padding-top: 14px;
}
.hero__feature-value {
    font-family: var(--ff-display);
    font-size: 32px;
    color: var(--c-gold-1);
    line-height: 1;
    margin-bottom: 6px;
}
.hero__feature-label {
    font-size: 12px;
    color: var(--c-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.4;
}

.hero__side {
    align-self: end;
    border-left: 1px solid var(--c-line);
    padding-left: 28px;
    padding-bottom: 8px;
}
.hero__side-quote {
    font-family: var(--ff-display);
    font-style: italic;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.45;
    color: var(--c-text);
    margin: 0 0 18px;
}
.hero__side-attrib {
    font-size: 12px;
    color: var(--c-gold);
    text-transform: uppercase;
    letter-spacing: 2.5px;
}
@media (max-width: 900px) {
    .hero__side { display: none; }
}

/* --- 9. Сетка карточек услуг --------------------------------------------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.service-card {
    position: relative;
    background: var(--c-bg-card);
    border: 1px solid var(--c-line-soft);
    padding: 36px 28px 32px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition);
    isolation: isolate;
}
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74,140,110,0.07) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition);
    z-index: -1;
}
.service-card:hover {
    border-color: var(--c-gold-dark);
    transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }
.service-card__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 24px;
    color: var(--c-gold-1);
    transition: transform var(--transition);
}
.service-card:hover .service-card__icon { transform: rotate(-6deg) scale(1.08); }
.service-card__title {
    font-family: var(--ff-display);
    font-size: 26px;
    line-height: 1.15;
    margin: 0 0 14px;
    font-weight: 500;
    color: var(--c-text);
}
.service-card__subtitle {
    font-size: 13px;
    color: var(--c-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
    display: block;
}
.service-card__text {
    color: var(--c-text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}
.service-card__more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--c-gold-1);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-top: 1px solid var(--c-line);
    padding-top: 18px;
    margin-top: auto;
}
.service-card__more svg { width: 14px; height: 14px; transition: transform var(--transition); }
.service-card:hover .service-card__more svg { transform: translateX(4px); }

/* --- 10. Портфолио / Проекты -------------------------------------------- */
.projects {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}
.project {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--c-bg-card);
    border: 1px solid var(--c-line-soft);
    transition: transform var(--transition), border-color var(--transition);
    isolation: isolate;
}
.project--lg { grid-column: span 8; aspect-ratio: 16 / 11; }
.project--md { grid-column: span 4; aspect-ratio: 4 / 5; }
.project--sm { grid-column: span 6; aspect-ratio: 4 / 3; }
.project--wide { grid-column: span 12; aspect-ratio: 21 / 9; }

@media (max-width: 900px) {
    .project--lg, .project--md, .project--sm { grid-column: span 12; aspect-ratio: 4 / 3; }
    .project--wide { aspect-ratio: 16 / 11; }
}

.project__img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease-out, filter var(--transition);
}
.project::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(10,10,10,0.95) 100%);
    z-index: 1;
}
.project:hover { border-color: var(--c-gold-dark); }
.project:hover .project__img { transform: scale(1.05); }

.project__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 28px 24px;
    z-index: 2;
}
.project__category {
    display: inline-block;
    font-size: 11px;
    color: var(--c-gold-1);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
    padding: 6px 10px;
    border: 1px solid var(--c-gold-dark);
    background: rgba(10,10,10,0.5);
    backdrop-filter: blur(6px);
}
.project__title {
    font-family: var(--ff-display);
    font-size: clamp(22px, 2.3vw, 30px);
    margin: 0 0 8px;
    color: #fff;
    line-height: 1.15;
}
.project__meta {
    font-size: 13px;
    color: var(--c-text-muted);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.project__meta span { display: inline-flex; gap: 6px; align-items: center; }
.project__meta svg { width: 12px; height: 12px; opacity: 0.7; }

/* --- 11. Карточки статей ------------------------------------------------- */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--c-bg-card);
    border: 1px solid var(--c-line-soft);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition);
}
.article-card:hover { transform: translateY(-4px); border-color: var(--c-gold-dark); }
.article-card__img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--c-bg-3);
}
.article-card__img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.article-card:hover .article-card__img img { transform: scale(1.05); }
.article-card__category {
    position: absolute;
    top: 16px; left: 16px;
    font-size: 11px;
    background: var(--c-bg);
    color: var(--c-gold-1);
    padding: 6px 12px;
    border: 1px solid var(--c-gold-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    z-index: 2;
}
.article-card__body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.article-card__meta {
    font-size: 12px;
    color: var(--c-text-dim);
    margin-bottom: 14px;
    display: flex;
    gap: 14px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.article-card__title {
    font-family: var(--ff-display);
    font-size: 24px;
    line-height: 1.2;
    margin: 0 0 14px;
    color: var(--c-text);
}
.article-card__excerpt {
    color: var(--c-text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px;
    flex: 1;
}
.article-card__more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--c-gold-1);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: auto;
    font-weight: 500;
}
.article-card__more svg { width: 14px; height: 14px; transition: transform var(--transition); }
.article-card:hover .article-card__more svg { transform: translateX(4px); }

/* --- 12. Отзывы --------------------------------------------------------- */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 26px;
}
.review-card {
    background: var(--c-bg-card);
    border: 1px solid var(--c-line-soft);
    padding: 36px 32px 32px;
    position: relative;
    overflow: hidden;
}
.review-card::before {
    content: '"';
    position: absolute;
    top: 4px;
    right: 24px;
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 120px;
    color: var(--c-gold-dark);
    opacity: 0.18;
    line-height: 1;
}
.review-card__rating {
    color: var(--c-gold-1);
    margin-bottom: 18px;
    font-size: 18px;
    letter-spacing: 4px;
}
.review-card__text {
    font-family: var(--ff-display);
    font-size: 19px;
    line-height: 1.5;
    color: var(--c-text);
    font-style: italic;
    margin: 0 0 24px;
    position: relative;
    z-index: 1;
}
.review-card__author {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--c-line);
    padding-top: 16px;
}
.review-card__name {
    font-size: 15px;
    color: var(--c-gold-1);
    font-weight: 500;
    letter-spacing: 0.5px;
}
.review-card__meta {
    font-size: 12px;
    color: var(--c-text-dim);
    margin-top: 4px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

/* --- 13. Формы --------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.form__field {
    position: relative;
}
.form__input {
    width: 100%;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--c-line);
    color: var(--c-text);
    font: 400 15px/1.4 var(--ff-body);
    padding: 22px 16px 10px;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    border-radius: var(--r-sm);
    outline: none;
}
.form__input:focus { border-color: var(--c-gold); background: rgba(255,255,255,0.04); }
.form__label {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 14px;
    color: var(--c-text-dim);
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 4px;
}
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
    top: -7px;
    left: 12px;
    font-size: 11px;
    color: var(--c-gold-1);
    background: var(--c-bg);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.form__input--textarea { resize: vertical; min-height: 92px; padding-top: 22px; }
.form__input.is-invalid { border-color: var(--c-error); }

.form__error {
    font-size: 12px;
    color: var(--c-error);
    margin-top: 4px;
    display: none;
    letter-spacing: 0.3px;
}
.form__error.is-shown { display: block; }

.form__legal {
    font-size: 12px;
    color: var(--c-text-dim);
    line-height: 1.5;
    margin: 12px 0 0;
}
.form__legal a { color: var(--c-gold); text-decoration: underline; text-decoration-color: var(--c-gold-dark); }

.form__success {
    text-align: center;
    padding: 28px 16px;
    color: var(--c-gold-1);
}
.form__success svg {
    width: 64px; height: 64px; margin: 0 auto 16px;
    color: var(--c-gold-1);
}
.form__success h3 {
    font-family: var(--ff-display);
    color: var(--c-gold-1);
    font-size: 26px;
    margin-bottom: 8px;
}
.form__success p { color: var(--c-text-muted); }

/* Поле-приманка для ботов */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Рейтинг звёзды */
.rating-input {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 4px;
    font-size: 30px;
    color: var(--c-line);
}
.rating-input input { display: none; }
.rating-input label {
    cursor: pointer;
    color: var(--c-line);
    transition: color var(--transition-fast);
    line-height: 1;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color: var(--c-gold); }

/* --- 14. Модалка -------------------------------------------------------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.is-open { display: flex; }
.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    animation: fade 0.3s;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 540px;
    background: var(--c-bg);
    border: 1px solid var(--c-gold-dark);
    box-shadow: var(--shadow-soft), var(--shadow-gold);
    animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal__inner { padding: 48px 40px 40px; position: relative; }
@media (max-width: 480px) { .modal__inner { padding: 40px 24px 28px; } }

.modal__decor {
    position: absolute;
    top: 0; left: 0;
    width: 80px;
    height: 80px;
    border-top: 1px solid var(--c-gold);
    border-left: 1px solid var(--c-gold);
}
.modal__inner::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 80px;
    height: 80px;
    border-bottom: 1px solid var(--c-gold);
    border-right: 1px solid var(--c-gold);
}
.modal__close {
    position: absolute;
    top: 14px; right: 14px;
    width: 38px; height: 38px;
    background: transparent;
    border: 1px solid var(--c-line);
    color: var(--c-text-muted);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
    z-index: 2;
}
.modal__close:hover {
    border-color: var(--c-gold);
    color: var(--c-gold);
    transform: rotate(90deg);
}
.modal__close svg { width: 16px; height: 16px; }

.modal__eyebrow {
    display: block;
    font-size: 11px;
    color: var(--c-gold);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 10px;
}
.modal__title {
    font-family: var(--ff-display);
    font-size: clamp(26px, 3.5vw, 34px);
    color: var(--c-text);
    margin: 0 0 12px;
    line-height: 1.15;
}
.modal__lead {
    color: var(--c-text-muted);
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 24px;
}

/* --- 15. Плавающие кнопки ----------------------------------------------- */
.float-cta {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 40;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--grad-gold);
    border: none;
    color: #0a0a0a;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px -8px rgba(74,140,110,0.6);
    animation: pulseGold 2.5s ease-in-out infinite;
}
@keyframes pulseGold {
    0%,100% { box-shadow: 0 12px 30px -8px rgba(74,140,110,0.6); }
    50% { box-shadow: 0 12px 40px -4px rgba(74,140,110,0.9); }
}
.float-cta svg { width: 24px; height: 24px; fill: currentColor; }

@media (max-width: 768px) { .float-cta { display: flex; } }

.up-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 39;
    width: 48px; height: 48px;
    background: var(--c-bg-3);
    border: 1px solid var(--c-gold-dark);
    color: var(--c-gold-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s, transform 0.4s, visibility 0.4s, background 0.3s;
}
.up-btn.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.up-btn:hover { background: var(--c-gold); color: var(--c-bg); }
.up-btn svg { width: 18px; height: 18px; fill: currentColor; }

@media (max-width: 768px) {
    .up-btn { right: 84px; }
}

/* --- 16. Подвал --------------------------------------------------------- */
.footer {
    background: var(--c-bg-2);
    border-top: 1px solid var(--c-gold-dark);
    color: var(--c-text-muted);
    margin-top: 80px;
    position: relative;
    z-index: 2;
}
.footer::before {
    content: '';
    height: 1px;
    background: var(--grad-gold);
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
}
.footer__top {
    display: grid;
    grid-template-columns: 1.6fr repeat(3, 1fr);
    gap: 40px;
    padding: 80px 0 60px;
}
@media (max-width: 1024px) {
    .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .footer__top { grid-template-columns: 1fr; gap: 28px; padding: 56px 0 32px; }
}

.footer__head {
    font-family: var(--ff-display);
    font-size: 17px;
    color: var(--c-gold-1);
    margin-bottom: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 500;
}
.footer__about {
    color: var(--c-text-muted);
    line-height: 1.6;
    font-size: 14px;
    margin: 24px 0 18px;
    max-width: 380px;
}
.footer__legal {
    font-size: 12px;
    color: var(--c-text-dim);
    line-height: 1.6;
}

.footer__menu, .footer__contacts {
    list-style: none;
    padding: 0; margin: 0;
}
.footer__menu li { margin-bottom: 10px; }
.footer__menu a {
    color: var(--c-text-muted);
    font-size: 14px;
    transition: color var(--transition-fast);
}
.footer__menu a:hover { color: var(--c-gold-1); }

.footer__contacts li {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.footer__contact-label {
    font-size: 11px;
    color: var(--c-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2px;
}
.footer__contacts a {
    color: var(--c-text);
    font-size: 15px;
    transition: color var(--transition-fast);
}
.footer__contacts a:hover { color: var(--c-gold-1); }
.footer__cta { margin-top: 20px; }

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
    border-top: 1px solid var(--c-line-soft);
    font-size: 13px;
    color: var(--c-text-dim);
    flex-wrap: wrap;
}
.footer__dev a {
    color: var(--c-gold);
    transition: color var(--transition-fast);
    border-bottom: 1px dashed var(--c-gold-dark);
}
.footer__dev a:hover { color: var(--c-gold-1); border-color: var(--c-gold); }

/* --- 17. Анимации появления --------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease-out, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* --- 18. Хлебные крошки + страница --------------------------------------- */
.breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--c-text-dim);
    margin-bottom: 28px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.breadcrumbs a {
    color: var(--c-gold);
    transition: color var(--transition-fast);
}
.breadcrumbs a:hover { color: var(--c-gold-1); }
.breadcrumbs span:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: var(--c-text-dim);
}

.page-head {
    padding: 80px 0 60px;
    position: relative;
    border-bottom: 1px solid var(--c-line-soft);
    background: linear-gradient(180deg, var(--c-bg-2), var(--c-bg));
    overflow: hidden;
}
.page-head::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40%;
    background: radial-gradient(ellipse at top right, rgba(74,140,110,0.08), transparent 60%);
    pointer-events: none;
}
.page-head__inner { position: relative; z-index: 1; max-width: 880px; }
.page-head h1 {
    font-size: clamp(36px, 5vw, 64px);
    margin: 0;
    line-height: 1.1;
}
.page-head__lead {
    color: var(--c-text-muted);
    font-size: 18px;
    line-height: 1.6;
    margin: 20px 0 0;
    max-width: 700px;
    font-weight: 300;
}

/* --- 19. Отдельная статья / услуга / проект ------------------------------ */
.article-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--c-text);
}
.article-body p { margin: 0 0 1.2em; }
.article-body h2 {
    font-size: clamp(24px, 3vw, 34px);
    color: var(--c-gold-1);
    margin: 1.5em 0 0.6em;
    line-height: 1.2;
}
.article-body h3 {
    font-size: clamp(20px, 2.4vw, 26px);
    color: var(--c-text);
    margin: 1.4em 0 0.5em;
}
.article-body ul, .article-body ol {
    padding-left: 1.5em;
    margin: 1em 0 1.4em;
}
.article-body li { margin-bottom: 0.5em; }
.article-body blockquote {
    border-left: 2px solid var(--c-gold);
    padding: 8px 24px;
    margin: 1.5em 0;
    font-family: var(--ff-display);
    font-style: italic;
    font-size: 22px;
    color: var(--c-text);
    line-height: 1.5;
}
.article-body a { color: var(--c-gold-1); text-decoration: underline; text-decoration-color: var(--c-gold-dark); }
.article-body img { margin: 1.5em 0; border-radius: var(--r-sm); }

/* --- 20. Главные секции главной страницы --------------------------------- */
.intro-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
@media (max-width: 900px) { .intro-block { grid-template-columns: 1fr; gap: 40px; } }
.intro-block__media {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
}
.intro-block__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.intro-block__media::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--c-gold);
    transform: translate(20px, 20px);
    pointer-events: none;
    z-index: -1;
}
.intro-block__media:hover img { transform: scale(1.04); }
.intro-block__content h2 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
}
.intro-block__points {
    margin-top: 32px;
    list-style: none;
    padding: 0;
    display: grid;
    gap: 16px;
}
.intro-block__points li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    font-size: 16px;
    color: var(--c-text);
    line-height: 1.5;
    padding-left: 14px;
    border-left: 1px solid var(--c-gold-dark);
}
.intro-block__points li strong {
    color: var(--c-gold-1);
    font-weight: 600;
    margin-right: 4px;
}

/* --- 21. CTA-баннер ------------------------------------------------------ */
.cta-banner {
    position: relative;
    background: var(--c-bg-2);
    overflow: hidden;
    isolation: isolate;
    padding: 80px 0;
}
.cta-banner__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.cta-banner__bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.25;
}
.cta-banner__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.65) 100%);
}
.cta-banner__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: center;
    max-width: 1080px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .cta-banner__inner { grid-template-columns: 1fr; text-align: center; }
}
.cta-banner__title {
    font-family: var(--ff-display);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    margin: 0 0 12px;
}
.cta-banner__lead {
    color: var(--c-text-muted);
    font-size: 16px;
    margin: 0;
}

/* --- 22. Преимущества (Numbered list) ------------------------------------ */
.advantages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}
.advantage {
    position: relative;
    padding: 32px 28px;
    border: 1px solid var(--c-line-soft);
    background: var(--c-bg-card);
    transition: border-color var(--transition);
}
.advantage:hover { border-color: var(--c-gold-dark); }
.advantage__num {
    font-family: var(--ff-display);
    font-size: 64px;
    line-height: 0.9;
    background: var(--grad-gold);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin-bottom: 18px;
    font-style: italic;
}
.advantage__title {
    font-family: var(--ff-display);
    font-size: 22px;
    color: var(--c-text);
    margin: 0 0 12px;
    line-height: 1.2;
}
.advantage__text {
    color: var(--c-text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* --- 23. Lightbox для портфолио ------------------------------------------ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.96);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: var(--shadow-soft);
    animation: rise 0.4s ease-out;
}
.lightbox__close, .lightbox__prev, .lightbox__next {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--c-bg-2);
    border: 1px solid var(--c-gold-dark);
    color: var(--c-gold-1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all var(--transition);
}
.lightbox__close { top: 24px; right: 24px; border-radius: 50%; }
.lightbox__prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover {
    background: var(--c-gold);
    color: var(--c-bg);
    border-color: var(--c-gold);
}
.lightbox__close svg, .lightbox__prev svg, .lightbox__next svg { width: 20px; height: 20px; }

/* --- 24. Тосты ----------------------------------------------------------- */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    background: var(--c-bg-2);
    border: 1px solid var(--c-gold-dark);
    color: var(--c-text);
    padding: 14px 24px;
    box-shadow: var(--shadow-soft);
    z-index: 300;
    transition: transform 0.4s cubic-bezier(0.2,0.7,0.2,1);
    max-width: calc(100vw - 40px);
    font-size: 14px;
}
.toast.is-shown { transform: translateX(-50%) translateY(0); }
.toast--error { border-color: var(--c-error); color: var(--c-error); }
.toast--success { border-color: var(--c-success); color: var(--c-success); }

/* --- 25. Доступность (фокус) -------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--c-gold-1);
    outline-offset: 3px;
    border-radius: 2px;
}
button:focus-visible, .btn:focus-visible {
    outline-color: var(--c-gold);
}

/* --- 26. Заглушка для пустых разделов ------------------------------------ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    border: 1px dashed var(--c-line);
    color: var(--c-text-muted);
}
.empty-state svg {
    width: 48px; height: 48px;
    color: var(--c-gold);
    margin: 0 auto 16px;
}

/* --- 27. Адаптив поправки ------------------------------------------------ */
@media (max-width: 768px) {
    body { font-size: 15px; }
    .section { padding: 56px 0; }
    .hero__features { gap: 22px 16px; }
    .hero__feature-value { font-size: 24px; }
    .modal__inner { padding: 36px 22px 28px; }
}
@media (max-width: 380px) {
    .container { padding: 0 16px; }
}

/* iOS safe-area */
@supports (padding: max(0px)) {
    .float-cta { right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); }
    .up-btn { bottom: max(18px, env(safe-area-inset-bottom)); }
    @media (max-width: 768px) {
        .up-btn { right: max(84px, calc(env(safe-area-inset-right) + 66px)); }
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .hero__bg::before { animation: none; }
}

/* ========================================================================
   ГАЛЕРЕЯ - ПУБЛИЧНАЯ ЧАСТЬ
   ======================================================================== */
.gallery-filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    color: var(--c-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: 1px solid var(--c-line);
    background: transparent;
    text-decoration: none;
    transition: all .3s ease;
}
.gallery-filter:hover { color: var(--c-gold-1); border-color: var(--c-gold-dark); }
.gallery-filter.is-active {
    color: var(--c-bg);
    background: var(--grad-gold);
    border-color: transparent;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 4px;
    /* масонри-эффект через grid-auto-rows */
    grid-auto-rows: 240px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    display: block;
    background: var(--c-bg-3);
    cursor: zoom-in;
}
.gallery-item:nth-child(7n+1) { grid-row: span 2; }
.gallery-item:nth-child(11n+5) { grid-column: span 2; }
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1s cubic-bezier(.2,.7,.2,1), filter .6s;
    filter: brightness(0.92);
}
.gallery-item:hover img { transform: scale(1.06); filter: brightness(1.05); }
.gallery-item::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0) 50%, rgba(10,10,10,0.7) 100%);
    opacity: 0; transition: opacity .4s;
    pointer-events: none;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item__caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 18px 20px;
    color: var(--c-text);
    font-size: 14px;
    letter-spacing: 0.3px;
    transform: translateY(100%);
    transition: transform .4s ease;
    z-index: 2;
    background: linear-gradient(180deg, transparent, rgba(10,10,10,0.85));
}
.gallery-item:hover .gallery-item__caption { transform: translateY(0); }

@media (max-width: 700px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 160px;
    }
    .gallery-item:nth-child(7n+1),
    .gallery-item:nth-child(11n+5) { grid-row: auto; grid-column: auto; }
    /* На мобильных подпись всегда видна */
    .gallery-item__caption { transform: translateY(0); font-size: 12px; padding: 10px 14px; }
    .gallery-item::after { opacity: 1; }
}
@media (max-width: 400px) {
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
}
