/* ============================================
   LOCAL FONTS & BASE
   ============================================ */
@font-face { font-family: 'Venus Rising'; src: url('fonts/Venus-Rising.woff2') format('woff2'); font-weight: normal; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
    --white: #ffffff;
    --black: #0a0a0a;
    --gray-300: #c0c0c0;
    --gray-400: #9a9a9a;
    --gray-500: #707070;
    --gray-700: #3a3a3a;
    --gray-900: #141414;
    --font-display: 'Venus Rising', 'Arial Black', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --section-gap: 30px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overscroll-behavior-x: none;
    touch-action: pan-y;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height, 70px) + 12px);
    scrollbar-width: thin;
    scrollbar-color: var(--gray-500) var(--black);
}

#hero,
#contacts {
    scroll-margin-top: calc(var(--header-height, 70px) + 12px);
}

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
}

::selection {
    background: var(--white);
    color: var(--black);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--black);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-500);
    border-radius: 3px;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================ BACKGROUND ============================================ */
.bg-gradient-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at 20% 50%, rgba(255,255,255,0.03) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.02) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 80%, rgba(255,255,255,0.03) 0%, transparent 50%);
    animation: bgShift 15s ease-in-out infinite alternate;
}

@keyframes bgShift {
    0% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.5; transform: scale(1); }
}

/* ============================================ HEADER ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: env(safe-area-inset-top, 0px) clamp(20px, 5vw, 80px) 0;
    height: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 60%, transparent 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header__nav {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 32px);
    flex-wrap: nowrap;
}

.header__nav a {
    font-family: var(--font-body);
    font-size: clamp(11px, 1.2vw, 13px);
    font-weight: 400;
    letter-spacing: clamp(1px, 0.1vw, 2px);
    text-transform: uppercase;
    color: var(--gray-300);
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

.header__nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width 0.3s ease;
}

.header__nav a:hover {
    color: var(--white);
}

.header__nav a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    width: 44px;
    height: 44px;
    padding: 0;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: inherit;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 12px 16px;
    background: var(--white);
    color: var(--black);
}

.skip-link:focus {
    left: 16px;
    top: 16px;
}

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

.page-lead {
    text-align: center;
    color: var(--gray-400);
    margin-bottom: 30px;
}

button.modal__close {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    border-radius: 1px;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0, 6.5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-8px);
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0, -6.5px);
}

.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
    background: rgba(0, 0, 0, 0.98);
    z-index: 999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mobile-nav.active {
    display: flex;
    opacity: 1;
}

.mobile-nav a {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: var(--gray-300);
    transition: color 0.3s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--white);
}

/* ============================================ COMMON ============================================ */
.page-main {
    padding-top: calc(var(--header-height) + env(safe-area-inset-top, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.page-main--projects {
    padding-top: 0;
}

.contests-page.page-main {
    padding-bottom: 40px;
}

.horizontal-scroll,
.promo__grid,
.gallery__grid.gallery__grid--mobile {
    touch-action: auto;
}

button.card,
button.gallery__item {
    border: none;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button.gallery__item {
    display: block;
    width: 100%;
    background: transparent;
}

section {
    position: relative;
    z-index: 1;
    padding: var(--section-gap) 0;
}

.section-divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-500), transparent);
    margin: 0 auto 15px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(20px, 3.5vw, 28px);
    font-weight: normal;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 25px;
    background: linear-gradient(180deg, var(--white) 20%, var(--gray-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
}

/* ============================================ HERO ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px clamp(20px, 5vw, 60px) 60px;
    position: relative;
}

.hero__logo-wrap {
    width: 1000px;
    max-width: 95vw;
    margin-bottom: 30px;
    position: relative;
    animation: logoFadeIn 1.5s ease forwards;
    opacity: 0;
}

@keyframes logoFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.hero__logo-wrap img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

.hero__logo-ring {
    position: absolute;
    inset: -20px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    animation: ringPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.hero__logo-ring:nth-child(2) {
    inset: -40px;
    animation-delay: 1s;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.1; transform: scale(1.03); }
}

.hero__subtitle {
    font-family: var(--font-body);
    font-size: clamp(14px, 1.6vw, 17px);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray-500);
    max-width: 750px;
    line-height: 1.7;
    animation: subtitleFadeIn 1.8s ease 0.5s forwards;
    opacity: 0;
}

@keyframes subtitleFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero__scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: scrollBounce 2s ease-in-out infinite;
}

.hero__scroll-hint span {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gray-500);
}

.hero__scroll-hint .arrow {
    width: 1px;
    height: 30px;
    background: linear-gradient(180deg, var(--gray-500), transparent);
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* ============================================ PROMO ============================================ */
.promo__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-bottom: 10px;
}

.promo__grid .card.is-vertical {
    grid-column: span 1;
}

.promo__grid .card:not(.is-vertical) {
    grid-column: span 2;
}

.promo__grid .card {
    grid-row: span 1;
}

.card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    background: var(--gray-900);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.card:hover {
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    z-index: 2;
}

.card__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background: #111;
    overflow: hidden;
    flex-grow: 1;
    position: relative;
}

.card.is-vertical .card__thumb {
    aspect-ratio: 9/16;
}

.card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: opacity 0.3s, transform 0.3s;
}

.card:hover .card__thumb img {
    transform: scale(1.03);
}

.card__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.card__play::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #fff;
    margin-left: 2px;
}

.card:hover .card__play {
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255,255,255,0.15);
}

.card__info {
    padding: 7px 9px;
    background: rgba(20,20,20,0.95);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.card__title {
    font-family: var(--font-display);
    font-size: 9px;
    font-weight: normal;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

/* ============================================ GALLERY ============================================ */
#gallery { 
    min-height: auto;
    padding: 0 0 30px 0; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start; 
    position: relative; 
    z-index: 1; 
    overflow: hidden;
    background: var(--black);
}

#gallery .container { 
    width: 100%; 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 clamp(16px, 4vw, 60px);
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

#gallery .section-title { 
    flex-shrink: 0; 
    margin-bottom: 20px; 
    width: 100%; 
}

.gallery__viewport { 
    width: 100%; 
    height: auto;
    min-height: 280px;
    display: flex; 
    align-items: flex-start; 
    justify-content: center; 
    overflow: visible;
}

.gallery__grid {
    display: grid; 
    grid-template-columns: repeat(8, minmax(0, 1fr)); 
    grid-auto-rows: 130px;
    gap: 16px; 
    width: 100%; 
    transition: opacity 0.5s ease;
}

.gallery__grid--mosaic {
    column-gap: 12px;
    row-gap: 16px;
    align-items: stretch;
    justify-items: stretch;
}

.gallery__grid--mosaic .gallery__item {
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.gallery__item { 
    position: relative; 
    cursor: pointer; 
    padding: 0; 
    break-inside: avoid;
    overflow: hidden;
    z-index: 1;
}

.gallery__inner {
    position: relative; 
    width: 100%; 
    height: 100%; 
    background: var(--gray-900); 
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s ease;
}

.gallery__item:hover .gallery__inner { 
    transform: translateY(-3px) scale(1.02); 
    box-shadow: 0 12px 30px rgba(0,0,0,0.6); 
    z-index: 10;
}

.gallery__inner img, 
.gallery__inner video { 
    width: 100%; 
    height: 100%; 
    object-fit: cover;
    object-position: center;
    background: var(--black);
    display: block;
}

.gallery__item.is-vert .gallery__inner img,
.gallery__item.is-vert .gallery__inner video {
    object-fit: cover;
    object-position: top center;
}

.gallery__item:hover .gallery__inner img { opacity: 1; }

.gallery__item.is-placeholder .gallery__inner { 
    background: #111; 
    border: 1px dashed rgba(255,255,255,0.15); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: default;
}
.gallery__item.is-placeholder .gallery__inner::after { 
    content: '+'; 
    font-size: 24px; 
    font-weight: 300; 
    color: #444; 
    pointer-events: none;
}

.gallery__item.is-invisible .gallery__inner {
    background: transparent;
    border: none;
    box-shadow: none;
}
.gallery__item.is-invisible {
    cursor: default;
}
.gallery__item.is-invisible:hover .gallery__inner {
    transform: none;
    box-shadow: none;
}

.gallery__play { 
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%) scale(0.9); 
    width: 30px; 
    height: 30px; 
    border: 2px solid rgba(255,255,255,0.9); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    opacity: 0; 
    transition: all 0.3s ease; 
    z-index: 2; 
}
.gallery__play::after { 
    content: ''; 
    display: block; 
    width: 0; 
    height: 0; 
    border-style: solid; 
    border-width: 4px 0 4px 7px; 
    border-color: transparent transparent transparent var(--white); 
    margin-left: 2px; 
}
.gallery__item:hover .gallery__play { 
    opacity: 1; 
    transform: translate(-50%, -50%) scale(1); 
}

.gallery__overlay { 
    position: absolute; 
    inset: 0; 
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.7) 100%); 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    pointer-events: none; 
}
.gallery__item:hover .gallery__overlay { opacity: 1; }

.gallery__label { 
    position: absolute; 
    bottom: 8px; 
    left: 8px; 
    font-family: var(--font-display); 
    font-size: 8px; 
    letter-spacing: 0.5px; 
    text-transform: uppercase; 
    color: var(--white); 
    z-index: 2; 
    opacity: 0; 
    transform: translateY(4px); 
    transition: all 0.3s ease; 
    text-shadow: 0 1px 4px rgba(0,0,0,0.8); 
    pointer-events: none;
}
.gallery__item.is-video:hover .gallery__label { 
    opacity: 1; 
    transform: translateY(0); 
}

/* ============================================ REVIEWS ============================================ */
.reviews { padding: var(--section-gap) 0; background: var(--black); position: relative; z-index: 4; }
.reviews__wrapper { position: relative; display: flex; align-items: center; justify-content: center; gap: 20px; max-width: 800px; margin: 0 auto; }
.reviews__card-container { flex: 1; position: relative; height: 280px; touch-action: pan-y; }
.review-card { position: absolute; inset: 0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 18px 18px 18px 4px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-start; backdrop-filter: blur(8px); opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); will-change: opacity, transform; pointer-events: none; }
.review-card.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; z-index: 2; }
.review-card.hidden { opacity: 0; transform: translateY(-8px) scale(0.96); z-index: 1; }
.review__header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.review__avatar { width: 36px; height: 36px; background: linear-gradient(135deg, var(--gray-700), var(--gray-500)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: var(--white); flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.review__author { font-size: 14px; font-weight: 600; color: var(--white); letter-spacing: 0.3px; line-height: 1.3; }
.review__text-scroller {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 180px;
    margin-bottom: 10px;
}

.review__text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-300);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.4) rgba(255,255,255,0.08);
}

.review__text::-webkit-scrollbar { width: 6px; }
.review__text::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); border-radius: 3px; }
.review__text::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.35); border-radius: 3px; }

.review__scroll-track {
    display: none;
    width: 6px;
    flex-shrink: 0;
    border-radius: 3px;
    background: rgba(255,255,255,0.14);
    position: relative;
    overflow: hidden;
}

.review__scroll-thumb {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-radius: 3px;
    background: rgba(255,255,255,0.5);
    min-height: 32px;
    transition: transform 0.08s linear;
}

.review__text-scroller--scrollable .review__scroll-track {
    display: block;
}
.review__date { text-align: right; font-size: 11px; color: var(--gray-500); letter-spacing: 0.5px; }
.carousel-btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); color: white; font-size: 18px; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.carousel-btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); transform: scale(1.05); } .carousel-btn:active { transform: scale(0.95); }
.reviews__dots { display: flex; justify-content: center; gap: 8px; margin-top: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); cursor: pointer; transition: all 0.3s; border: 0; padding: 0; }
.dot.active { background: var(--white); transform: scale(1.3); box-shadow: 0 0 8px rgba(255,255,255,0.4); }

/* ============================================ CONTACTS ============================================ */
.contacts { padding: var(--section-gap) 0; }
.contacts__layout { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.contacts__column { display: flex; flex-direction: column; gap: 25px; }
.contact-block__title { font-family: var(--font-display); font-size: 12px; font-weight: normal; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-500); margin-bottom: 8px; }
.contact-block__name { font-size: 16px; font-weight: 400; color: var(--white); margin-bottom: 4px; }
.contact-block__phone { font-size: 18px; font-weight: 300; color: var(--gray-300); transition: color 0.3s; letter-spacing: 0.5px; } .contact-block__phone:hover { color: var(--white); }
.contacts__socials { text-align: right; }
.social-icons { display: flex; gap: 16px; justify-content: flex-end; margin-top: 10px; }
.social-icon { width: 44px; height: 44px; border: 1px solid rgba(255,255,255,0.12); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.social-icon:hover { border-color: var(--white); transform: translateY(-3px); box-shadow: 0 6px 15px rgba(255,255,255,0.1); }
.social-icon svg { width: 20px; height: 20px; fill: var(--gray-300); transition: fill 0.3s; } .social-icon:hover svg { fill: var(--white); }

/* ============================================ MODALS & NAVIGATION BUTTONS ============================================ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.96);
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(8px);
}
.modal.active { display: flex; }

.modal__close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 2001;
}
.modal__close::before, .modal__close::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 1.5px;
    background: #fff;
}
.modal__close::before { transform: rotate(45deg); }
.modal__close::after { transform: rotate(-45deg); }

.video-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2002;
    backdrop-filter: blur(4px);
}

.video-nav-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.8);
    transform: translateY(-50%) scale(1.1);
}

.nav-prev, .promo-nav-prev, .gallery-nav-prev {
    left: 20px;
}

.nav-next, .promo-nav-next, .gallery-nav-next {
    right: 20px;
}

.video-modal video {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    outline: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* ============================================ FOOTER & ANIMATIONS ============================================ */
.footer { position: relative; z-index: 1; padding: 20px 0; text-align: center; border-top: 1px solid rgba(255,255,255,0.06); }
.footer p { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--gray-500); font-weight: 300; }
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; } .d3 { transition-delay: 0.3s; }

/* ============================================ RESPONSIVE ============================================ */
@media (min-width: 769px) {
    #gallery {
        min-height: 100vh;
        height: 100vh;
        box-sizing: border-box;
        padding-top: clamp(20px, 3vh, 36px);
        padding-bottom: clamp(20px, 3vh, 36px);
    }

    #gallery .container {
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    #gallery .section-title {
        flex-shrink: 0;
        margin-bottom: clamp(12px, 2vh, 22px);
    }

    .gallery__viewport {
        flex: 1 1 auto;
        min-height: 0;
        align-items: stretch;
    }

    .gallery__grid--mosaic {
        height: 100%;
        grid-auto-rows: unset;
        grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
        align-content: stretch;
    }

    .review__scroll-track {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .contacts__layout { gap: 20px; }
    .header__nav { gap: 14px; } .header__nav a { font-size: 11px; letter-spacing: 1px; }
    .gallery__grid:not(.gallery__grid--mosaic) { grid-auto-rows: 110px; gap: 12px; }
}

@media (max-width: 768px) {
    .header { padding: 0 clamp(16px, 4vw, 24px); justify-content: flex-end; gap: 0; }
    .header__nav { display: none; } .burger { display: flex; margin-left: auto; }
    .container { padding: 0 clamp(16px, 4vw, 24px); }
    .hero { padding: calc(var(--header-height) + env(safe-area-inset-top, 0px) + 24px) clamp(16px, 4vw, 24px) 40px; }
    .hero__logo-wrap { width: 100%; max-width: min(95vw, 420px); }
    .section-title { letter-spacing: 3px; margin-bottom: 20px; font-size: 22px; }
    :root { --section-gap: 20px; } .contacts__layout { grid-template-columns: 1fr; gap: 20px; }
    .contacts__socials { text-align: left; } .social-icons { justify-content: flex-start; }

    .promo__grid { display: flex !important; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; gap: 16px; padding: 0 clamp(16px, 4vw, 24px) 15px; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 calc(clamp(16px, 4vw, 24px) * -1); touch-action: auto; overscroll-behavior-x: contain; }
    .promo__grid::-webkit-scrollbar { display: none; }
    .promo__grid .card { flex: 0 0 85%; min-width: 280px; scroll-snap-align: center; align-self: flex-start; height: auto; }
    .promo__grid .card.reveal { opacity: 1; transform: none; transition: none; }
    .promo__grid .card .card__thumb { flex: 0 0 auto; height: auto; }
    .promo__grid .card__info { flex: 0 0 auto; min-height: 2.8em; display: flex; align-items: center; }
    .promo__grid .card__title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }

    #gallery { 
        padding: 0 0 20px 0;
        overflow: hidden;
    }
    
    .gallery__viewport { 
        min-height: 240px;
        overflow: hidden;
    }
    
    .gallery__grid.gallery__grid--mobile,
    .gallery__grid { 
        display: flex !important; 
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        gap: 12px; 
        padding: 0 clamp(16px, 4vw, 24px) 10px; 
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
        margin: 0 calc(clamp(16px, 4vw, 24px) * -1); 
        width: auto;
        min-height: 180px;
        will-change: scroll-position;
        transition: none !important;
        touch-action: auto;
        overscroll-behavior-x: contain;
    }

    .gallery__grid--mobile .gallery__item--scroll-in {
        opacity: 0;
        transform: translateX(16px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .gallery__grid--mobile .gallery__item--scroll-in.gallery__item--visible {
        opacity: 1;
        transform: translateX(0);
    }

    .gallery__grid--mobile .gallery__item.is-vert .gallery__inner img {
        object-position: top center;
    }

    .gallery__grid--mobile .gallery__item.is-video .gallery__play {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        background: rgba(0, 0, 0, 0.35);
    }

    .gallery__grid--mobile .gallery__item.is-video .gallery__overlay {
        opacity: 0.45;
    }

    .gallery__grid--mobile .gallery__item.is-video .gallery__label {
        opacity: 1;
        transform: translateY(0);
    }
    
    .gallery__grid::-webkit-scrollbar { 
        display: none; 
    }
    
    .gallery__grid .gallery__item { 
        flex: 0 0 60%; 
        min-width: 160px; 
        scroll-snap-align: start; 
        padding: 0; 
        height: auto;
        max-height: 180px;
    }
    
    .gallery__grid .gallery__item.is-vert { 
        flex: 0 0 45%; 
    }
    
    .gallery__grid .gallery__item .gallery__inner { 
        height: 100%;
    }
    
    .gallery__inner {
        aspect-ratio: 16 / 9;
    }
    
    .gallery__item.is-vert .gallery__inner {
        aspect-ratio: 9 / 16;
    }

    .reviews__wrapper { gap: 10px; }
    .reviews__card-container { min-height: 280px; height: auto; }
    .carousel-btn { width: 44px; height: 44px; min-width: 44px; min-height: 44px; font-size: 16px; }
    .review-card { padding: 16px; } .review__avatar { width: 32px; height: 32px; font-size: 12px; }
    .review__author { font-size: 13px; }
    .review__text-scroller { max-height: 160px; }
    .review__text {
        max-height: 160px;
        padding-right: 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .review__text::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    .review__scroll-track { display: none; }
    .review__text-scroller--scrollable .review__scroll-track { display: block; }
    
    .video-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    .nav-prev, .promo-nav-prev, .gallery-nav-prev { left: 10px; }
    .nav-next, .promo-nav-next, .gallery-nav-next { right: 10px; }
}

@media (max-width: 480px) { 
    .hero__logo-wrap { max-width: min(92vw, 360px); }
    .gallery__grid .gallery__item { flex: 0 0 70%; min-width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
    .bg-gradient-animated {
        animation: none;
    }
    .reveal {
        transition-duration: 0.01ms;
    }
}
/* Предпросмотр видео при наведении в промо */
.promo__grid .card {
    position: relative;
    overflow: hidden;
}

.preview-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
    background: #000;
}

.promo__grid .card .preview-video.is-playing {
    opacity: 1;
}

.promo__grid .card:has(.preview-video.is-playing) .card__thumb img {
    opacity: 0.3;
}

.promo__grid .card:hover .card__play {
    opacity: 0;
}
/* PDF модалка */
.pdf-modal .pdf-viewer {
    width: 90vw;
    height: 85vh;
    max-width: 1000px;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

.pdf-modal .pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 768px) {
    .pdf-modal .pdf-viewer {
        width: 95vw;
        height: 80vh;
    }
}

.gallery__inner img.media-pending,
.card__thumb img.media-pending {
    opacity: 0;
}

.gallery__inner img.media-pending.is-ready {
    opacity: 1;
    transition: opacity 0.35s ease;
}

.card__thumb img.media-pending.is-ready {
    opacity: 0.85;
}

#gallery.is-preparing .gallery__grid {
    opacity: 0;
}

.carousel-slide {
    background: #141414;
}

.carousel-slide img.media-pending,
.gallery-inner img.media-pending {
    opacity: 0;
}

.carousel-slide img.media-pending.is-ready,
.gallery-inner img.media-pending.is-ready {
    opacity: 1;
    transition: opacity 0.35s ease;
}
