:root {
    --bg-color: #000000;
    --accent-color: #E31212; 
    --text-main: #ffffff;
    --text-muted: #888888;
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --ease-custom: cubic-bezier(0.23, 1, 0.32, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    cursor: none !important; 
}

html { 
    background-color: var(--bg-color); 
    scrollbar-width: none; 
    overflow-x: hidden; 
    scroll-behavior: auto; /* Handled by GSAP ScrollTo */
    max-width: 100vw;
}

html::-webkit-scrollbar { 
    display: none; 
}

body {
    background-color: transparent;
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: hidden; /* Locked during preloader */
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100vw;
}

/* 1. ПРЕЛОАДЕР */
.preloader {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background-color: #050505;
    z-index: 9999999;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    flex-direction: column;
}

.counter {
    font-family: var(--font-heading);
    font-size: 8vw;
    font-weight: 800;
    color: var(--text-main);
    mix-blend-mode: difference;
}

.preloader-bg {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0); 
    transform-origin: bottom; 
    z-index: -1;
}

/* ИНТЕРАКТИВНЫЙ CANVAS ФОН */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* Оптимизированный шум (will-change и translate3d для разгрузки GPU) */
.noise-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    opacity: 0.03; 
    pointer-events: none; 
    z-index: 99999;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* КУРСОР С КОЛЬЦОМ ПРОГРЕССА */
.cursor-wrapper {
    position: fixed; 
    top: 0; 
    left: 0; 
    pointer-events: none; 
    z-index: 100000;
    transform: translate(-50%, -50%); 
    mix-blend-mode: difference;
}

.cursor-dot {
    width: 16px; 
    height: 16px; 
    background-color: #fff; 
    border-radius: 50%;
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.cursor-ring {
    width: 70px; 
    height: 70px; 
    position: absolute;
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%) rotate(-90deg);
}

.cursor-ring circle {
    fill: none; 
    stroke: rgba(255,255,255,0.3); 
    stroke-width: 1.5;
    stroke-dasharray: 207; 
    stroke-dashoffset: 207;
}

.cursor-ring .progress-circle {
    stroke: #fff; 
    transition: stroke-dashoffset 0.1s linear;
}

/* Контент поверх canvas-фона */
main, footer, header {
    position: relative;
    z-index: 2;
    overflow-x: hidden;
    max-width: 100%;
}

/* Навигация */
header {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%;
    padding: 24px 5%; 
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    z-index: 90; 
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s, padding 0.3s, border-color 0.3s;
}

header.scrolled {
    background-color: rgba(5, 5, 5, 0.85);
    padding: 14px 5%;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.logo {
    font-family: var(--font-heading); 
    font-size: clamp(1.4rem, 2vw, 2.2rem); 
    font-weight: 800;
    text-transform: uppercase; 
    letter-spacing: -1px; 
    text-decoration: none; 
    color: #fff;
}
.logo span { 
    color: var(--accent-color); 
}

/* Контейнер навигации и переключателя языков */
.nav-container {
    display: flex;
    align-items: center;
    position: fixed;
    top: 24px;
    right: 5%;
    z-index: 91;
    transition: top 0.3s var(--ease-custom);
}

header.scrolled + .nav-container {
    top: 14px;
}

nav { 
    display: flex; 
}
.nav-link-wrapper { 
    position: relative; 
    margin-left: clamp(20px, 3vw, 40px); 
    padding: 10px; 
}

nav a {
    color: #fff; 
    text-decoration: none; 
    font-size: 0.95rem;
    font-weight: 500; 
    letter-spacing: 1.5px; 
    display: block;
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
    transition: color 0.3s var(--ease-custom);
}

nav a:hover {
    color: var(--accent-color);
}

/* Переключатель языков */
.lang-switcher {
    display: flex;
    gap: 4px;
    margin-left: clamp(20px, 3vw, 40px);
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
    padding-left: 20px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 6px;
    cursor: none !important;
    transition: color 0.3s, font-weight 0.3s;
}

.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    color: var(--accent-color);
    font-weight: 700;
}

/* Переключатель звука (Sound Toggle) */
.sound-toggle {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    background: none;
    border: none;
    padding: 10px;
    cursor: none !important;
    height: 32px;
    margin-left: 20px;
    outline: none;
}

.sound-bar {
    display: block;
    width: 2px;
    height: 14px;
    background-color: var(--text-muted);
    transform-origin: bottom;
    transform: scaleY(0.3);
    transition: transform 0.3s var(--ease-custom), background-color 0.3s;
}

.sound-toggle:hover .sound-bar {
    background-color: var(--text-main);
}

.sound-toggle.playing .sound-bar {
    background-color: var(--accent-color);
    animation: sound-wave 1.2s ease-in-out infinite alternate;
}
.sound-toggle.playing .sound-bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.sound-toggle.playing .sound-bar:nth-child(2) { height: 16px; animation-delay: 0.3s; }
.sound-toggle.playing .sound-bar:nth-child(3) { height: 12px; animation-delay: 0.0s; }
.sound-toggle.playing .sound-bar:nth-child(4) { height: 18px; animation-delay: 0.4s; }

@keyframes sound-wave {
    0% { transform: scaleY(0.2); }
    100% { transform: scaleY(1); }
}

/* Кнопка бургера для мобильных */
.burger-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 6px;
    width: 28px;
    height: 20px;
    justify-content: space-between;
    z-index: 100;
    cursor: none !important;
}

.burger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: transform 0.3s var(--ease-custom), opacity 0.3s var(--ease-custom);
}

/* Основной контент */
.hero { 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    padding: 0 5%; 
    position: relative; 
}

.hero-title { 
    font-family: var(--font-heading); 
    font-size: clamp(3rem, 7.5vw, 12rem); 
    line-height: 1.05; 
    text-transform: uppercase; 
    font-weight: 800; 
    letter-spacing: -2px; 
    opacity: 0; 
    max-width: 100%; 
    overflow: visible;
}

.hero-title .outline { 
    color: transparent; 
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2); 
}
.hero-subtitle { 
    margin-top: 40px; 
    font-size: 1.4rem; 
    max-width: 650px; 
    color: var(--text-muted); 
    font-weight: 300; 
    line-height: 1.6; 
    opacity: 0; 
    white-space: normal; 
}

.about { 
    padding: 250px 5%; 
    display: grid; 
    grid-template-columns: 1.3fr 1fr; 
    gap: 120px; 
    position: relative;
    overflow: hidden;
}
.about-title { 
    font-family: var(--font-heading); 
    font-size: 4.5rem; 
    text-transform: uppercase; 
    line-height: 0.95; 
    letter-spacing: -2px; 
}
.about-text { 
    font-size: 1.5rem; 
    line-height: 1.7; 
    color: var(--text-muted); 
    font-weight: 300; 
}

.portfolio { 
    padding: 150px 5%; 
    position: relative; 
}
.grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 150px 80px; 
}
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: none !important;
}
.project-card:nth-child(even) { 
    margin-top: 150px; 
}
.project-img-wrapper { 
    width: 100%; 
    height: 700px; 
    overflow: hidden; 
    position: relative; 
    background-color: #080808; 
    border: 1px solid rgba(255,255,255,0.05); 
    will-change: transform; 
}

/* Стилизованные градиентные обложки проектов с интерактивным шумом */
.project-img-placeholder { 
    position: absolute; 
    top: -10%; 
    left: 0; 
    width: 100%; 
    height: 120%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 7rem; 
    font-family: var(--font-heading); 
    font-weight: 800; 
    color: rgba(255, 255, 255, 0.03); 
    will-change: transform; 
    transition: background 0.6s var(--ease-custom), color 0.6s var(--ease-custom);
}

/* Кастомные градиенты для каждого проекта */
.project-card:nth-child(1) .project-img-placeholder {
    background: linear-gradient(135deg, #120101 0%, #300202 50%, #050505 100%);
}
.project-card:nth-child(2) .project-img-placeholder {
    background: linear-gradient(135deg, #02120e 0%, #053026 50%, #050505 100%);
}
.project-card:nth-child(3) .project-img-placeholder {
    background: linear-gradient(135deg, #020912 0%, #041d38 50%, #050505 100%);
}
.project-card:nth-child(4) .project-img-placeholder {
    background: linear-gradient(135deg, #110212 0%, #2f0430 50%, #050505 100%);
}

.project-card:hover .project-img-placeholder { 
    background: var(--accent-color) !important; 
    color: rgba(0, 0, 0, 0.15) !important; 
}
.project-info { 
    margin-top: 35px; 
    padding-bottom: 25px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    display: flex; 
    justify-content: space-between; 
    align-items: baseline; 
}
.project-name { 
    font-family: var(--font-heading); 
    font-size: 2.2rem; 
    text-transform: uppercase; 
    letter-spacing: -0.5px; 
    transition: color 0.3s; 
}
.project-card:hover .project-name { 
    color: var(--accent-color); 
}
.project-category { 
    font-size: 1.1rem; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

/* СЕКЦИЯ КОНТАКТНОЙ ФОРМЫ (НОВАЯ) */
.contact-section {
    padding: 180px 5%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 120px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: -2px;
}

.contact-details {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-detail-item {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.contact-detail-item a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s;
    cursor: none !important;
}

.contact-detail-item a:hover {
    color: var(--accent-color);
}

.contact-form-container {
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-input {
    width: 100%;
    padding: 15px 0;
    background: none;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: border-color 0.4s var(--ease-custom);
    outline: none;
}

.form-input:focus {
    border-bottom-color: var(--accent-color);
}

.form-label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
    transition: transform 0.4s var(--ease-custom), font-size 0.4s var(--ease-custom), color 0.4s var(--ease-custom);
}

.form-input:focus ~ .form-label, 
.form-input:not(:placeholder-shown) ~ .form-label {
    transform: translateY(-25px);
    font-size: 0.85rem;
    color: var(--accent-color);
}

.form-submit-btn {
    align-self: flex-start;
    padding: 25px 60px;
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.15);
    text-decoration: none;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 1.1rem;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    cursor: none !important;
    transition: border-color 0.4s, color 0.4s;
}

.form-submit-btn::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    transition: top 0.4s var(--ease-custom);
    z-index: -1;
}

.form-submit-btn:hover::before {
    top: 0;
}

.form-submit-btn:hover {
    color: #000000;
    border-color: #ffffff;
}

/* Окно успеха при отправке формы */
.form-success-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    z-index: 10;
}

.success-icon {
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.success-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.success-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 350px;
    line-height: 1.5;
}

/* БЕГУЩАЯ СТРОКА (MARQUEE) */
.marquee-strip {
    padding: 40px 0;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.marquee-track {
    display: flex;
    gap: 60px;
    white-space: nowrap;
    animation: marquee-scroll 20s linear infinite;
    width: max-content;
}

.marquee-reverse .marquee-track {
    animation: marquee-scroll-reverse 25s linear infinite;
}

.marquee-track span {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: -1px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.06);
    transition: color 0.3s;
}

.marquee-track span:hover {
    color: rgba(255, 255, 255, 0.15);
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes marquee-scroll-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* ДЕКОРАТИВНЫЙ ФОНОВЫЙ ТЕКСТ */
.section-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: clamp(8rem, 18vw, 22rem);
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    white-space: nowrap;
    z-index: -1;
    letter-spacing: -5px;
}

/* СЕКЦИЯ СТАТИСТИКИ */
.stats-section {
    padding: 120px 5%;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
}

.stat-plus {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 400;
}

/* ACCENT ЦВЕТА ПО СЕКЦИЯМ */
#animation {
    --section-accent: #F59E0B;
}

#motion {
    --section-accent: #06B6D4;
}

#animation .showcase-title,
#animation .showcase-item:hover {
    color: var(--section-accent);
    border-color: rgba(245, 158, 11, 0.3);
}

#motion .showcase-title,
#motion .showcase-item:hover {
    color: var(--section-accent);
    border-color: rgba(6, 182, 212, 0.3);
}

.serif-italic {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    text-transform: none !important;
}

/* SHOWCASE СЕКЦИИ (Videos, Animation, Motion) */
.showcase-section {
    padding: 150px 5%;
    position: relative;
    overflow: hidden;
}

.showcase-header {
    margin-bottom: 80px;
    max-width: 700px;
}

.showcase-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 7rem);
    text-transform: uppercase;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 25px;
}

.showcase-desc {
    font-size: 1.3rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 300;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.showcase-item {
    position: relative;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.6s var(--ease-custom), transform 0.6s var(--ease-custom), box-shadow 0.6s var(--ease-custom);
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.showcase-item:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.showcase-item-visual {
    aspect-ratio: 16 / 10;
    position: relative;
    overflow: hidden;
    width: 100%;
    background-color: #050505;
}

.showcase-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.08) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s var(--ease-custom);
    z-index: 2;
}

#animation .showcase-glow {
    background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(245, 158, 11, 0.15) 0%, transparent 100%);
}

#motion .showcase-glow {
    background: radial-gradient(circle 120px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(6, 182, 212, 0.15) 0%, transparent 100%);
}

.showcase-item:hover .showcase-glow {
    opacity: 1;
}

.showcase-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.8s var(--ease-custom);
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 50%, #0a0a0a 100%);
}

#animation .showcase-placeholder {
    background: linear-gradient(135deg, #120a02 0%, #2b1705 50%, #0a0a0a 100%);
}

#motion .showcase-placeholder {
    background: linear-gradient(135deg, #020a12 0%, #05222b 50%, #0a0a0a 100%);
}

.showcase-item:hover .showcase-placeholder {
    transform: scale(1.05);
}

.placeholder-svg {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 80%;
    pointer-events: none;
}

.placeholder-svg stroke {
    transition: stroke 0.6s var(--ease-custom);
}

.showcase-item:hover .placeholder-svg circle,
.showcase-item:hover .placeholder-svg line,
.showcase-item:hover .placeholder-svg rect,
.showcase-item:hover .placeholder-svg path {
    stroke: rgba(255, 255, 255, 0.08);
}

.project-num {
    position: absolute;
    top: 25px;
    left: 25px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.25);
    transition: color 0.6s var(--ease-custom);
}

.showcase-item:hover .project-num {
    color: var(--section-accent);
}

.play-indicator {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    top: 50%;
    left: 50%;
    transition: opacity 0.4s var(--ease-custom), transform 0.4s var(--ease-custom), background-color 0.4s, border-color 0.4s;
    z-index: 3;
}

.showcase-item:hover .play-indicator {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.play-indicator:hover {
    background-color: var(--section-accent);
    border-color: var(--section-accent);
}

.showcase-placeholder.anim-pulse {
    animation: pulse-glow 3s ease-in-out infinite;
}

.showcase-placeholder.motion-wave {
    animation: wave-shift 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

@keyframes wave-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.showcase-meta {
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(10, 10, 10, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    transition: background-color 0.6s var(--ease-custom);
    z-index: 2;
}

.showcase-item:hover .showcase-meta {
    background-color: rgba(15, 15, 15, 0.8);
}

.showcase-item-title {
    padding: 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
    text-transform: uppercase;
    transition: color 0.3s;
}

.showcase-item:hover .showcase-item-title {
    color: var(--section-accent);
}

.showcase-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
    transition: color 0.4s, border-color 0.4s;
}

.showcase-item:hover .showcase-tag {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

/* ФУТЕР */
footer { 
    padding: 150px 5% 80px 5%; 
    background-color: #000000; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    text-align: center; 
}
.cta-title { 
    font-family: var(--font-heading); 
    font-size: 8vw; 
    text-transform: uppercase; 
    line-height: 1.0; 
    margin-bottom: 80px; 
}
.mag-button-wrapper { 
    display: inline-block; 
    padding: 40px; 
}
.instagram-btn { 
    display: inline-block; 
    padding: 30px 80px; 
    background-color: transparent; 
    color: white; 
    border: 1px solid rgba(255,255,255,0.15); 
    text-decoration: none; 
    font-family: var(--font-heading); 
    text-transform: uppercase; 
    font-size: 1.3rem; 
    letter-spacing: 2px; 
    position: relative; 
    overflow: hidden; 
    cursor: none !important;
    transition: border-color 0.4s, color 0.4s; 
}
.instagram-btn::before { 
    content: ''; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background-color: #ffffff; 
    transition: top 0.4s var(--ease-custom); 
    z-index: -1; 
}
.instagram-btn:hover::before { 
    top: 0; 
}
.instagram-btn:hover { 
    color: #000000; 
    border-color: #ffffff; 
}

.footer-bottom { 
    margin-top: 150px; 
    padding-top: 40px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    color: var(--text-muted); 
}

/* Идеальное математическое центрирование кнопки "Back to top" на десктопе */
@media (min-width: 993px) {
    .footer-bottom > * {
        flex: 1;
    }
    .footer-bottom > :first-child {
        text-align: left;
    }
    .footer-bottom .back-to-top {
        text-align: center;
        display: block;
    }
    .footer-bottom > :last-child {
        text-align: right;
    }
}

/* Кнопка "Наверх" */
.back-to-top {
    font-family: var(--font-heading);
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    cursor: none !important;
    transition: color 0.3s;
}

.back-to-top:hover {
    color: var(--accent-color);
}

/* БОКОВОЙ ПРОГРЕСС-БАР */
.side-progress-bar {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 250px;
    background-color: rgba(255, 255, 255, 0.08);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s, transform 0.5s;
}

.progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background-color: var(--accent-color);
    transform-origin: top;
    transition: height 0.1s linear;
}

.nav-dots {
    position: absolute;
    top: 0;
    left: -3px;
    height: 100%;
    width: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(0, 0, 0, 0.5);
    display: block;
    cursor: none !important;
    position: relative;
    transition: background-color 0.4s var(--ease-custom), transform 0.4s var(--ease-custom);
}

.nav-dot.active {
    background-color: var(--accent-color);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-color);
}

.dot-label {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.4s var(--ease-custom), transform 0.4s var(--ease-custom);
}

.nav-dot:hover {
    background-color: #fff;
    transform: scale(1.3);
}

.nav-dot:hover .dot-label {
    opacity: 0.75;
    transform: translateY(-50%) translateX(0);
}

.nav-dot.active .dot-label {
    opacity: 1;
    color: var(--accent-color);
}

/* МАСКИ ДЛЯ КИНЕТИЧЕСКОГО РАСКРЫТИЯ ТЕКСТА */
.text-reveal-mask {
    overflow: hidden;
    position: relative;
    display: inline-block;
    width: 100%;
}

.text-reveal-line {
    display: inline-block;
    transform: translateY(105%);
    will-change: transform;
    transition: transform 1.2s var(--ease-custom);
}

.text-reveal-mask.revealed .text-reveal-line {
    transform: translateY(0);
}

/* Тонкая световая волна поверх SVG */
.showcase-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    transform: skewX(-25deg);
    transition: left 0.8s var(--ease-custom);
    pointer-events: none;
}

.showcase-item:hover .showcase-placeholder::after {
    left: 150%;
    transition: left 1.2s var(--ease-custom);
}

/* ИДЕАЛЬНАЯ МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 992px) {
    * { 
        cursor: auto !important; 
    }
    .video-modal-close {
        top: 20px;
        right: 20px;
    }
    .cursor-wrapper, .noise-overlay, .side-progress-bar { 
        display: none !important; 
    }
    body { 
        overflow-y: auto; 
        overflow-x: hidden; 
    }
    
    .counter { 
        font-size: 15vw; 
    }

    /* Мобильный хэдер */
    header { 
        padding: 25px 5%; 
        mix-blend-mode: normal;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .burger-btn {
        display: flex;
    }

    /* Навигационное мобильное меню (Полноэкранный оверлей) */
    .nav-container {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        background-color: #050505 !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 40px !important;
        transform: translateY(-100%) !important;
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1) !important;
        z-index: 9999 !important;
        padding: 80px 5% 60px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
    }
    
    .nav-container.active {
        transform: translateY(0) !important;
    }

    nav { 
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .nav-link-wrapper { 
        margin-left: 0; 
        padding: 0; 
    }
    nav a { 
        font-size: 1.8rem; 
        font-weight: 700;
    }

    /* Переключатель в мобильном меню */
    .lang-switcher {
        margin-left: 0;
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 30px;
        width: 60%;
        justify-content: center;
        gap: 15px;
    }
    
    .lang-btn {
        font-size: 1.1rem;
        padding: 10px 15px;
    }

    .hero { 
        padding: 140px 5% 0; 
        justify-content: center; 
        text-align: center; 
    }
    .hero-title { 
        font-size: 12vw; 
        letter-spacing: -1px; 
        white-space: normal; 
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .hero-subtitle { 
        font-size: 1.1rem; 
        margin: 30px auto 0; 
        text-align: center; 
    }

    .about { 
        padding: 120px 5%; 
        gap: 40px; 
        grid-template-columns: 1fr; 
        text-align: center; 
    }
    .about-title { 
        font-size: 3rem; 
        letter-spacing: -1px; 
        line-height: 1; 
    }
    .about-text { 
        font-size: 1.15rem; 
        line-height: 1.6; 
    }

    .portfolio { 
        padding: 100px 5%; 
    }
    .grid { 
        grid-template-columns: 1fr; 
        gap: 60px; 
    }
    .project-card:nth-child(even) { 
        margin-top: 0; 
    }
    .project-img-wrapper { 
        height: 100vw; 
        max-height: 450px; 
    }
    .project-name { 
        font-size: 1.6rem; 
    }
    .project-category { 
        font-size: 0.9rem; 
    }

    /* Marquee на мобилках */
    .marquee-track span {
        font-size: 2rem;
    }
    .marquee-strip {
        padding: 25px 0;
    }

    /* Stats на мобилках */
    .stats-section {
        padding: 80px 5%;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .stat-number {
        font-size: 3.5rem;
    }
    .stat-label {
        font-size: 0.9rem;
    }

    /* Watermark на мобилках */
    .section-watermark {
        font-size: 6rem;
    }

    /* Showcase секции на мобилках */
    .showcase-section {
        padding: 100px 5%;
    }
    .showcase-header {
        margin-bottom: 50px;
    }
    .showcase-title {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }
    .showcase-desc {
        font-size: 1.1rem;
    }
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .showcase-item-visual {
        aspect-ratio: 16 / 9;
    }

    /* Контактная секция на мобилках */
    .contact-section {
        grid-template-columns: 1fr;
        padding: 100px 5%;
        gap: 60px;
        text-align: center;
    }
    
    .contact-title {
        font-size: 3rem;
        letter-spacing: -1px;
    }
    
    .contact-details {
        margin-top: 30px;
        gap: 15px;
    }
    
    .contact-form-container {
        padding: 40px 20px;
    }
    
    .form-submit-btn {
        width: 100%;
        text-align: center;
    }

    footer { 
        padding: 100px 5% 40px; 
    }
    .cta-title { 
        font-size: 11vw; 
        margin-bottom: 50px; 
        letter-spacing: -1px; 
    }
    
    .mag-button-wrapper { 
        padding: 0; 
        width: 100%; 
        display: block; 
    }
    .instagram-btn { 
        padding: 25px 20px; 
        font-size: 1.1rem; 
        width: 100%; 
        display: block; 
        box-sizing: border-box; 
    }
    .footer-bottom { 
        margin-top: 80px; 
        flex-direction: column; 
        gap: 20px; 
        text-align: center; 
        font-size: 0.9rem; 
    }
}

/* ==========================================================================
   КИНЕМАТОГРАФИЧЕСКИЙ ВИДЕОПЛЕЕР (МОДАЛКА И ВИДЕО КАРТОЧЕК)
   ========================================================================== */

.showcase-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45; /* Смешивание с темным оверлеем */
    transition: opacity 0.6s var(--ease-custom), transform 0.8s var(--ease-custom);
    z-index: 1;
    pointer-events: none;
}

.showcase-item:hover .showcase-video {
    opacity: 0.85; /* Загорается при наведении */
    transform: scale(1.05);
}

/* МОДАЛКА ВИДЕОПЛЕЕРА */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s var(--ease-custom);
}
body.video-modal-open {
    overflow: hidden !important;
}

body.video-modal-open,
body.video-modal-open * {
    cursor: auto !important;
}

body.video-modal-open a,
body.video-modal-open button,
body.video-modal-open [role="button"],
body.video-modal-open .video-modal-close,
body.video-modal-open .video-modal-close * {
    cursor: pointer !important;
}

/* Скрываем кастомный cursor-wrapper через CSS когда открыта модалка */
body.video-modal-open .cursor-wrapper {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.video-modal.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.video-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.video-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    z-index: 2;
    background-color: #050505;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    transform: scale(0.95);
    transition: transform 0.5s var(--ease-custom);
}

.video-modal.active .video-modal-container {
    transform: scale(1);
}

/* Портретное видео (9:16) */
.video-modal-container.portrait {
    width: auto;
    max-width: none;
    height: 90dvh;
    max-height: 90dvh;
    aspect-ratio: 9 / 16;
}

/* Альбомное видео (16:9) — по умолчанию */
.video-modal-container.landscape {
    width: 90%;
    max-width: 1200px;
    height: auto;
    aspect-ratio: 16 / 9;
}

/* Мобильные экраны — портрет */
@media (max-width: 768px) {
    .video-modal-container.portrait {
        height: 85dvh;
        max-height: 85dvh;
        width: auto;
        aspect-ratio: 9 / 16;
    }

    .video-modal-container.landscape {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* Альбомный режим телефона — landscape video заполняет экран */
@media (max-width: 992px) and (orientation: landscape) {
    .video-modal-container.landscape {
        width: auto;
        height: 95dvh;
        max-height: 95dvh;
        aspect-ratio: 16 / 9;
    }

    .video-modal-container.portrait {
        height: 95dvh;
        width: auto;
        aspect-ratio: 9 / 16;
    }
}

.video-player-wrapper {
    width: 100%;
    height: 100%;
}

.video-player-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    outline: none;
    z-index: 10;
}

.video-modal-close * {
    cursor: pointer !important;
}

.video-modal-close span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #fff;
    transition: background-color 0.3s;
}

.video-modal-close span:nth-child(1) {
    transform: rotate(45deg) translateY(1px);
}

.video-modal-close span:nth-child(2) {
    transform: rotate(-45deg) translateY(-1px);
    margin-top: -2px;
}

.video-modal-close:hover span {
    background-color: var(--accent-color);
}
