/* ---------- База ---------- */
* { box-sizing: border-box; }

html, body {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #ececec;
    background-color: #0b0b0c;

    --accent: #6ea8ff;
    --bg-1: #0b0b0c;
    --bg-2: #141416;
    --bg-3: #1c1c1f;
    --border: rgba(255, 255, 255, .08);
    --border-hover: rgba(255, 255, 255, .16);
    --text-1: #f2f2f2;
    --text-2: #a8a8ad;
    --text-3: #6a6a70;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

/* Блокировка прокрутки фона при открытом лайтбоксе */
body.lb-locked {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* ---------- Фон ---------- */
.bg-layer {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: #0b0b0c url("/bg.png") center center / cover no-repeat;
    pointer-events: none;
}

.bg-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 700px at 50% 0%, rgba(0, 0, 0, .15), rgba(0, 0, 0, .65) 70%),
        linear-gradient(to bottom, rgba(0, 0, 0, .2), rgba(0, 0, 0, .55));
}

@media (max-width: 768px) {
    .bg-layer::after {
        background: rgba(0, 0, 0, .55);
    }
}

/* ---------- Шапка ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px 24px;
    background: transparent;
    pointer-events: none;
}

.site-header__inner {
    pointer-events: auto;
    max-width: 1180px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    background: rgba(20, 20, 22, .55);
    border: 1px solid var(--border);
    border-radius: 999px;
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand__logo {
    height: 40px;
    width: auto;
    display: block;
    flex: none;
    border-radius: 8px;
}

.brand__title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header__phone {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    -webkit-user-select: all;
    user-select: all;
}

/* ---------- Hero ---------- */
.hero {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 24px 32px;
    text-align: center;
}

.hero__logo {
    max-width: min(220px, 55vw);
    max-height: 120px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    filter: drop-shadow(0 12px 40px rgba(0, 0, 0, .65));
}

.hero__title {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(180deg, #ffffff 0%, #b9b9c0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__text {
    margin: 0 auto;
    max-width: 540px;
    color: var(--text-2);
    font-size: 16px;
}

/* Компактный hero на странице раздела */
.hero--compact {
    padding: 32px 24px 8px;
    text-align: left;
}

.hero--compact .back {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 10px;
}

.hero--compact .hero__title {
    font-size: clamp(24px, 3.5vw, 34px);
    text-align: left;
    margin: 0 0 6px;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: var(--text-1);
}

.hero--compact .hero__text {
    text-align: left;
    margin: 0;
    color: var(--text-2);
}

/* ---------- Сетка разделов ---------- */
.sections {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 24px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.section-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .25s cubic-bezier(.2,.7,.2,1),
                box-shadow .25s cubic-bezier(.2,.7,.2,1),
                border-color .25s ease;
}

.section-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .55);
}

.section-card__cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
}

.section-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

.section-card:hover .section-card__cover img {
    transform: scale(1.06);
}

.section-card__cover::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent);
    pointer-events: none;
}

.section-card__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    min-width: 30px;
    height: 28px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.section-card__body {
    padding: 14px 16px 16px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.section-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: -0.01em;
}

.section-card__meta {
    color: var(--text-3);
    font-size: 13px;
    white-space: nowrap;
}

/* ---------- Галерея раздела ---------- */
.gallery {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 16px 32px rgba(0, 0, 0, .5);
}

.thumb-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #16161a;
}

.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .4s ease;
}

.card:hover .thumb-wrap img {
    transform: scale(1.05);
}

.caption {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-1);
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

/* ---------- CTA-блок ---------- */
.cta {
    max-width: 1180px;
    margin: 48px auto 0;
    padding: 0 24px;
}

.cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 32px 36px;
    background:
        radial-gradient(600px 200px at 0% 0%, rgba(110, 168, 255, .12), transparent 60%),
        linear-gradient(180deg, var(--bg-3) 0%, var(--bg-2) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
}

.cta__text { min-width: 0; }

.cta__title {
    margin: 0 0 6px;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-1);
}

.cta__subtitle {
    margin: 0;
    color: var(--text-2);
    font-size: 15px;
    max-width: 540px;
}

.cta__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex: none;
}

/* Кнопки (некликабельные — span) */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    user-select: none;
}

.btn--primary {
    color: #fff;
    background: linear-gradient(180deg, #4a8dff 0%, #2a6fdb 100%);
    border-color: rgba(255, 255, 255, .1);
    box-shadow: 0 8px 24px rgba(42, 111, 219, .35);
}

.btn--ghost {
    color: var(--text-1);
    background: rgba(255, 255, 255, .05);
    border-color: var(--border);
}

.btn__icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    background-color: currentColor;
    flex: none;
}

.btn__icon--phone {
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .57 3.6 1 1 0 0 1-.25 1l-2.2 2.2z' fill='black'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1 11.4 11.4 0 0 0 .57 3.6 1 1 0 0 1-.25 1l-2.2 2.2z' fill='black'/></svg>") center / contain no-repeat;
}

.btn__icon--chat {
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4V4z' fill='black'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4V4z' fill='black'/></svg>") center / contain no-repeat;
}

/* ---------- Подвал ---------- */
.site-footer {
    max-width: 1180px;
    margin: 48px auto 0;
    padding: 24px 24px 48px;
    border-top: 1px solid var(--border);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.site-footer__copy {
    margin: 0;
    color: var(--text-3);
    font-size: 13px;
}


/* ---------- Страница одного фото (fallback) ---------- */
.photo-view .back {
    color: var(--accent);
    text-decoration: none;
    font-size: 15px;
}

.full {
    padding: 24px;
    text-align: center;
}

.full img {
    max-width: 100%;
    max-height: 82vh;
    border-radius: var(--radius-md);
}

.full-caption h2 {
    margin: 16px 0 4px;
    font-size: 20px;
}

.filename {
    color: var(--text-3);
    font-size: 13px;
    margin: 0;
}

.empty {
    padding: 40px 24px;
    color: var(--text-2);
    text-align: center;
    grid-column: 1 / -1;
}

/* ---------- Лайтбокс ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .94);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s ease;
    touch-action: pinch-zoom;
}

.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }

.lb-figure {
    margin: 0;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lb-image {
    max-width: 92vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: #000;
    opacity: 0;
    transition: opacity .2s ease;
    touch-action: pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
}

.lb-image.is-loaded { opacity: 1; }

.lb-caption {
    color: #ddd;
    font-size: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 92vw;
}

.lb-counter { color: #888; font-size: 12px; }
.lb-title {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    transition: background .15s ease, transform .15s ease;
    user-select: none;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
    background: rgba(255, 255, 255, .18);
}

.lb-close { top: 20px; right: 20px; font-size: 26px; }

.lb-prev {
    left: 20px; top: 50%; transform: translateY(-50%);
}
.lb-prev:hover { transform: translateY(-50%) scale(1.05); }

.lb-next {
    right: 20px; top: 50%; transform: translateY(-50%);
}
.lb-next:hover { transform: translateY(-50%) scale(1.05); }

.lb-prev[hidden],
.lb-next[hidden] { display: none !important; }

.lb-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 0;
    margin-top: -4px;
}

.lb-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .4);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, transform .15s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.lb-dot:hover { transform: scale(1.2); }
.lb-dot.is-active { background: #fff; border-color: #fff; }

/* ---------- Мобильные ---------- */
@media (max-width: 768px) {
    .site-header { padding: 8px 12px; }
    .site-header__inner { padding: 8px 14px; gap: 10px; }
    .brand__logo { height: 32px; }
    .brand__title { font-size: 13px; }
    .site-header__phone { font-size: 12px; padding: 6px 10px; }

    .hero { padding: 40px 16px 12px; }
    .hero__logo { max-width: 160px; max-height: 90px; margin-bottom: 14px; }
    .hero__text { font-size: 14px; }

    .hero--compact { padding: 20px 16px 4px; }

    .sections {
        padding: 16px;
        gap: 14px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .section-card__body { padding: 10px 12px 12px; }
    .section-card__title { font-size: 14px; }
    .section-card__meta { font-size: 12px; }
    .section-card__badge { top: 8px; right: 8px; height: 24px; padding: 0 8px; font-size: 12px; }

    .gallery { padding: 12px; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

    .cta { margin-top: 32px; padding: 0 16px; }
    .cta__inner {
        flex-direction: column;
        align-items: stretch;
        padding: 22px 20px;
        gap: 18px;
    }
    .cta__subtitle { font-size: 14px; }
    .cta__actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn {
        justify-content: center;
        width: 100%;
        font-size: 15px;
    }

    .site-footer {
        margin-top: 32px;
        padding: 20px 16px 32px;
    }
    .site-footer__inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .lb-image { max-width: 94vw; max-height: 60vh; }
    .lb-prev, .lb-next {
        width: 44px; height: 44px; font-size: 22px;
        top: auto; bottom: 96px; transform: none;
    }
    .lb-prev { left: 16px; }
    .lb-next { right: 16px; }
    .lb-prev:hover, .lb-next:hover { transform: scale(1.05); }

    .lb-close {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
        width: 40px; height: 40px; font-size: 24px;
    }

    .lb-figure { gap: 8px; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
    .lb-caption { font-size: 13px; max-width: 90vw; padding: 0 8px; }
    .lb-title { font-size: 14px; }
    .lb-counter { font-size: 11px; }
    .lb-dots { gap: 10px; }
    .lb-dot { width: 12px; height: 12px; }
}

@media (max-width: 380px) {
    .sections { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .lb-image { max-height: 55vh; }
    .lb-prev, .lb-next { bottom: 88px; }
}

/* ---------- Расширенный подвал с адресом ---------- */
.site-footer__inner--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
    justify-content: stretch;
    text-align: left;
}

.site-footer__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.site-footer__label {
    color: var(--text-3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
}

.site-footer__value {
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.5;
    -webkit-user-select: all;
    user-select: all;
    overflow-wrap: anywhere;
}

.site-footer__copy {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}

/* Мобильный подвал */
@media (max-width: 768px) {
    .site-footer__inner--grid {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: left;
    }
    .site-footer__value { font-size: 13px; }
}

/* CTA: hover-эффект для кнопки-ссылки */
a.btn {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease,
                background .2s ease, border-color .2s ease, filter .2s ease;
}

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

a.btn--ghost:hover {
    background: rgba(255, 255, 255, .1);
    border-color: var(--border-hover);
}

/* Подвал: стиль ссылки MAX */
.site-footer__link {
    color: var(--accent);
    text-decoration: none;
    transition: color .15s ease, opacity .15s ease;
    -webkit-user-select: none;
    user-select: none;
}

.site-footer__link:hover {
    color: #a9c8ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-footer__link:active {
    opacity: .8;
}