@font-face {
    font-family: 'Futura Orto';
    src: url('fonts/a_futuraortotitullnln-regular.woff2') format('woff2'),
         url('fonts/a_futuraortotitullnln-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --bg-dark-primary: #0D0D1A; --bg-dark-secondary: #161629; --primary-accent: #8A4FFF;
    --primary-accent-hover: #7a3ee6; --text-light: #F0F0F8; --text-secondary: #a0a0b8;
    --card-border: rgba(138, 79, 255, 0.2); --font-family: 'Montserrat', sans-serif;
}

/* ===== БАЗОВЫЕ СБРОСЫ ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
    width: 100%;
    overflow-x: hidden; /* Убирает горизонтальный скролл и мигание в Chrome */
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-family);
    background-color: var(--bg-dark-primary);
    color: var(--text-light);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-weight: 600; }
h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.25rem; margin-bottom: 2rem; text-align: center; }
p { color: var(--text-secondary); line-height: 1.6; }
a { text-decoration: none; color: var(--primary-accent); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }
#gallery { padding-bottom: 0; }

/* ===== ШАПКА (HEADER) ===== */
.header {
    position: fixed; top: 0; width: 100%;
    background-color: rgba(13, 13, 26, 0.95);
    backdrop-filter: blur(10px); padding: 15px 0;
    z-index: 100; border-bottom: 1px solid var(--card-border);
}

/* Принудительно горизонтальное выравнивание */
.header .container, .header-inner {
    display: flex !important;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 20px;
    flex-wrap: nowrap;
}

.logo {
    font-family: 'Futura Orto', sans-serif;
    font-size: 1.7rem; font-weight: normal;
    letter-spacing: 1.5px; color: var(--text-light);
    z-index: 101; flex-shrink: 0;
}

/* Телефон автоматически прижимается к правому краю */
.header-phone {
    margin-left: auto;
    display: flex; align-items: center; gap: 0.5rem;
    color: var(--text-secondary); text-decoration: none;
    font-weight: 500; white-space: nowrap;
    transition: color 0.3s; flex-shrink: 0;
}
.header-phone:hover { color: var(--text-light); }
.header-phone i { font-size: 1.1rem; color: var(--primary-accent); }
.phone-text { display: inline; }

.burger-menu {
    display: block; cursor: pointer; z-index: 101;
    flex-shrink: 0; margin-left: 20px; padding: 5px;
}
.burger-menu .bar {
    display: block; width: 25px; height: 3px; margin: 5px 0;
    background-color: var(--text-light); transition: all 0.3s ease-in-out;
}
.burger-menu.active .bar:nth-child(2) { opacity: 0; }
.burger-menu.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger-menu.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== ВЫЕЗЖАЮЩЕЕ МЕНЮ ===== */
.nav-links {
    position: fixed; top: 0; right: 0;
    width: min(350px, 85vw); max-width: 100vw;
    height: 100vh; background-color: var(--bg-dark-secondary);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    gap: 40px;
    transform: translate3d(100%, 0, 0); /* GPU-ускорение, убирает мигание */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99; box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    will-change: transform; backface-visibility: hidden;
}
.nav-links.active { transform: translate3d(0, 0, 0); }

.nav-links a {
    position: relative; /* Обязательно для подчеркивания */
    font-size: 1.4rem; color: var(--text-secondary);
    font-weight: 500; transition: color 0.3s;
    text-align: center; width: 100%; padding: 8px 0;
}

.nav-links a:hover { color: var(--text-light); }

/* Красота при наведении: Фиолетовое подчеркивание */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background-color: var(--primary-accent);
    transition: transform 0.3s ease;
}

.nav-links a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 98;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.nav-overlay.active { opacity: 1; pointer-events: auto; }


/* ===== HERO SECTION ===== */
#hero {
    position: relative; height: 100vh; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: url('https://images.unsplash.com/photo-1527529482837-4698179dc6ce?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80') no-repeat center center/cover;
    background-color: #333; background-blend-mode: overlay;
}
#bg-video { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
#hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(13, 13, 26, 0.6); z-index: 2; }
#hero::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, var(--bg-dark-primary), transparent 70%); z-index: 2; }
#intro-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }

.hero-content { position: relative; z-index: 3; text-align: center; padding: 0 20px; }
.hero-content h1 { font-family: 'Futura Orto', sans-serif; font-size: 4.5rem; letter-spacing: 2px; margin-bottom: 0.5rem; }
.hero-slogan { font-size: 1.5rem; font-weight: 400; color: var(--text-light); max-width: 800px; margin: 0.5rem auto 2rem auto; line-height: 1.4; }
.cta-button { background: var(--primary-accent); color: var(--text-light); padding: 15px 35px; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: background-color 0.3s; display: inline-block; }
.cta-button:hover { background-color: var(--primary-accent-hover); }
.scroll-down-indicator {
    position: absolute; bottom: -80px; left: 50%; transform: translateX(-50%);
    font-size: 2.5rem; color: rgba(255, 255, 255, 0.5); animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-20px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}


/* ===== SERVICES ===== */
#services {
    position: relative;
    background: linear-gradient(rgba(22, 22, 41, 0.85), rgba(22, 22, 41, 0.85)),
                url(/photos/block.jpg) no-repeat center center;
    background-size: cover;
}
.services-container { display: flex; flex-direction: column; align-items: center; text-align: center; min-height: 250px; }
.services-container h2 { font-family: var(--font-family); font-size: 3.5rem; letter-spacing: 1.5px; margin-bottom: 0.5rem; color: var(--text-light); }
.services-container h3 { font-size: 2rem; font-weight: 500; color: var(--text-secondary); margin-bottom: 1rem; display: inline-flex; align-items: center; min-height: 2.4rem; }
.services-container p { font-size: 1.1rem; color: var(--text-light); margin-bottom: 2.5rem; }
.typing-cursor { display: inline-block; width: 3px; height: 2rem; background-color: var(--primary-accent); margin-left: 8px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }


/* ===== GRID & CARDS ===== */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.card { background-color: var(--bg-dark-secondary); padding: 30px; border-radius: 15px; border: 1px solid var(--card-border); text-align: center; transition: transform 0.3s, box-shadow 0.3s; }
.card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(138, 79, 255, 0.1); }
.card-icon { font-size: 2.5rem; color: var(--primary-accent); margin-bottom: 1rem; line-height: 1; }
.card h3 { margin: 0 0 0.5rem 0; font-size: 1.25rem; }
.why-us-grid { grid-template-columns: repeat(3, 1fr); }

#about, #contact { background-color: var(--bg-dark-secondary); }
#why-us { background-color: var(--bg-dark-secondary); position: relative; overflow: hidden; }
#beam-show-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
#why-us .container { position: relative; z-index: 1; }
#about .container { max-width: 800px; text-align: center; }


/* ===== FOOTER ===== */
footer { text-align: center; padding: 40px 0; border-top: 1px solid var(--card-border); }
footer { background-color: var(--bg-dark-secondary); padding: 60px 0; }
.footer-container { display: flex; flex-direction: column; align-items: center; gap: 40px; }
.footer-contacts { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 40px; }
.footer-contacts a {
    color: var(--text-secondary); text-decoration: none; font-size: 1.1rem;
    display: inline-flex; align-items: center; gap: 10px; transition: color 0.3s;
}
.footer-contacts a:hover { color: var(--text-light); }
.footer-contacts a i { font-size: 1.5rem; color: var(--primary-accent); }

.max-link { color: var(--text-secondary); text-decoration: none; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 10px; transition: color 0.3s; }
.max-link:hover { color: var(--text-light); }
.max-link i { font-size: 1.5rem; color: var(--primary-accent); }

.copyright { font-size: 0.9rem; color: var(--text-secondary); opacity: 0.7; }


/* ===== GALLERY ===== */
.sliders-container { width: 100%; overflow: hidden; margin-bottom: 60px; }
.gallery-slider { width: 100%; height: 250px; margin-bottom: 20px; }
.swiper-slide { width: auto; overflow: hidden; border-radius: 10px; }
.swiper-slide img { display: block; height: 100%; width: auto; object-fit: cover; transition: transform 0.4s ease; }
.swiper-slide:hover img { transform: scale(1.1); }


/* ===== STORIES ===== */
.vertical-videos-container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; max-width: 1000px; margin: 0 auto; padding: 0 20px; margin-bottom: 80px; }
.story-video { position: relative; aspect-ratio: 9 / 16; border-radius: 20px; overflow: hidden; border: 2px solid var(--card-border); transition: transform 0.3s ease; }
.story-video:hover { transform: scale(1.05); }
.story-video video { width: 100%; height: 100%; object-fit: cover; }
.play-icon-overlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(13, 13, 26, 0.3); justify-content: center; align-items: center; font-size: 3rem; color: rgba(255, 255, 255, 0.9); text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); cursor: pointer; transition: opacity 0.3s ease; pointer-events: none; }
.play-icon-overlay.hidden { opacity: 0; }

.stories-component { position: relative; max-width: 1075px; margin: 0 auto 80px auto; }
#stories-slider { width: 100%; overflow: hidden; }
.stories-nav-prev, .stories-nav-next { background: none; position: absolute; z-index: 10; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, 0.7); transition: opacity 0.3s ease, color 0.3s ease; }
.stories-nav-prev:hover, .stories-nav-next:hover { color: white; }
.stories-nav-prev::after, .stories-nav-next::after { font-size: 1.8rem; font-weight: bold; }
.stories-nav-prev { left: -60px !important; }
.stories-nav-next { right: -60px !important; }
.swiper-button-disabled { opacity: 0 !important; pointer-events: none; }


/* ===== QUIZ ===== */
#quiz-placeholder { max-width: 800px; margin: 0 auto; background: var(--bg-dark-secondary); border: 2px dashed var(--card-border); padding: 50px; border-radius: 15px; text-align: center; color: var(--text-secondary); }
#quiz-placeholder iframe { width: 100%; height: 500px; border: none; }

#contact { background-color: var(--bg-dark-secondary); min-height: 500px; display: flex; align-items: center; }
#quiz-container { max-width: 800px; margin: 0 auto; text-align: center; }
.quiz-step { display: none; animation: fadeIn 0.5s; }
.quiz-step.active { display: flex; flex-direction: column; align-items: center; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.quiz-step h3 { font-size: 1.8rem; margin-bottom: 2.5rem; }
.quiz-step p { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 2.5rem; }
.quiz-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 3rem; }
.quiz-options label { display: flex; align-items: center; padding: 15px 25px; border: 2px solid var(--card-border); border-radius: 50px; cursor: pointer; transition: background-color 0.3s, border-color 0.3s; }
.quiz-options label:hover { border-color: var(--primary-accent); }
.quiz-options input[type="radio"], .quiz-options input[type="checkbox"] { display: none; }

.quiz-options input[type="radio"]:checked + span, .quiz-options input[type="checkbox"]:checked + span { color: var(--text-light); }
.quiz-options label:has(input:checked) { background-color: var(--primary-accent); border-color: var(--primary-accent); color: var(--text-light); }
.quiz-options label:has(input:checked) span { color: var(--text-light); }

.quiz-options label.has-input { display: flex; align-items: center; gap: 10px; }
.quiz-options label.has-input input[type="text"] { background: transparent; border: none; border-bottom: 2px solid var(--card-border); color: var(--text-light); font-size: 1rem; width: 100px; padding: 5px; }
.quiz-options label.has-input:has(input:checked) input[type="text"] { border-bottom-color: var(--text-light); }
.quiz-options label.has-input input[type="text"]:focus { outline: none; border-bottom-color: var(--primary-accent); }

.quiz-options-column { width: 100%; display: flex; flex-direction: column; gap: 20px; margin-bottom: 3rem; }
.quiz-input { background: transparent; border: 2px solid var(--card-border); border-radius: 10px; color: var(--text-light); font-size: 1.1rem; padding: 15px; }
.quiz-input:focus { outline: none; border-color: var(--primary-accent); }
.quiz-button { background: var(--primary-accent); color: var(--text-light); padding: 15px 45px; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: background-color 0.3s; border: none; cursor: pointer; }
.quiz-button:hover { background-color: var(--primary-accent-hover); }

.fade-in-section { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in-section.is-visible { opacity: 1; transform: translateY(0); }


/* ===== TOOLTIPS ===== */
.tippy-box[data-theme~='forevent'] { background-color: #2a2a4a; color: var(--text-light); border: 1px solid var(--card-border); border-radius: 8px; font-family: var(--font-family); }
.tippy-box[data-theme~='forevent'][data-placement^='top'] > .tippy-arrow::before { border-top-color: #2a2a4a; }
.tippy-box[data-theme~='forevent'][data-placement^='bottom'] > .tippy-arrow::before { border-bottom-color: #2a2a4a; }
.tippy-box[data-theme~='forevent'][data-placement^='left'] > .tippy-arrow::before { border-left-color: #2a2a4a; }
.tippy-box[data-theme~='forevent'][data-placement^='right'] > .tippy-arrow::before { border-right-color: #2a2a4a; }


/* ===== MODAL ===== */
.open-modal-btn { background: var(--primary-accent); color: var(--text-light); padding: 15px 35px; border-radius: 50px; font-weight: 600; font-size: 1rem; transition: background-color 0.3s; display: inline-block; border: none; cursor: pointer; font-family: var(--font-family); }
.open-modal-btn:hover { background-color: var(--primary-accent-hover); }

.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(13, 13, 26, 0.7); backdrop-filter: blur(5px); animation: fadeIn 0.3s; }
.modal-content { background-color: var(--bg-dark-secondary); margin: 15% auto; padding: 40px; border: 1px solid var(--card-border); border-radius: 15px; max-width: 500px; width: 90%; position: relative; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); animation: slideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateY(-50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.close-modal-btn { color: var(--text-secondary); position: absolute; top: 15px; right: 25px; font-size: 32px; font-weight: bold; line-height: 1; cursor: pointer; transition: color 0.3s; }
.close-modal-btn:hover, .close-modal-btn:focus { color: var(--text-light); }
.modal-content h2 { font-size: 2rem; margin-bottom: 1rem; }
.modal-content p { margin-bottom: 2rem; color: var(--text-secondary); }
.modal-form { display: flex; flex-direction: column; gap: 20px; }
.modal-checkbox-label { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; padding: 10px 0; }
.modal-checkbox-label input[type="checkbox"] { display:none; }
.modal-checkbox-label span { position: relative; padding-left: 30px; text-align: left; }
.modal-checkbox-label span::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; border: 2px solid var(--card-border); background-color: var(--bg-dark-primary); border-radius: 4px; transition: background-color 0.3s, border-color 0.3s; }
.modal-checkbox-label span::after { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 4px; top: 50%; transform: translateY(-50%) scale(0); font-size: 14px; color: var(--text-light); transition: transform 0.3s; }
.modal-checkbox-label input[type="checkbox"]:checked + span::before { background-color: var(--primary-accent); border-color: var(--primary-accent); }
.modal-checkbox-label input[type="checkbox"]:checked + span::after { transform: translateY(-50%) scale(1); }
.modal-checkbox-label a { color: var(--primary-accent); text-decoration: none; border-bottom: 1px dotted var(--primary-accent); }
.modal-checkbox-label a:hover { color: var(--text-light); border-bottom-color: var(--text-light); }


/* ===== MEDIA QUERIES ===== */
@media (max-width: 1279px) {
    .stories-component { max-width: 100%; }
    #stories-slider { overflow: visible; }
    .stories-nav-prev, .stories-nav-next { display: none; }
}

@media (max-width: 1024px) {
    .why-us-grid { grid-template-columns: repeat(2, 1fr); }
    .nav-links { width: min(45vw, 400px); }
}

@media (max-width: 1024px) and (pointer: coarse) {
    .play-icon-overlay { display: flex; }
}

@media (max-width: 768px) {
    .services-container h2 { font-size: 2.5rem; }
    .services-container h3 { font-size: 1.5rem; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-slogan { font-size: 1.2rem; }
    h2 { font-size: 1.8rem; }
    .grid { grid-template-columns: 1fr; }
    .footer-contacts { flex-direction: column; gap: 25px; }
    .vertical-videos-container { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    
    .phone-text { display: none; }
    .header-phone { padding: 0.3rem; }
    .nav-links { width: 85vw; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2.5rem; }
    .hero-slogan { font-size: 1rem; }
    .gallery-slider { height: 200px; }
    .why-us-grid { grid-template-columns: 1fr; }
    .header .container, .header-inner { padding: 0 15px; }
}

/* ===== НОВЫЕ СТИЛИ ДЛЯ ГЕРОЯ ===== */
.hero-offer {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-light);
    max-width: 900px;
    margin: 0 auto 1rem auto;
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.hero-offer i {
    color: var(--primary-accent);
    margin: 0 4px;
}

.hero-offer .divider {
    color: var(--primary-accent);
    opacity: 0.7;
    font-weight: 300;
}

.about-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0 auto 2rem auto;
    max-width: 800px;
    text-align: center;
}

.about-subtitle strong {
    color: var(--text-light);
}

/* Адаптив для оффера */
@media (max-width: 768px) {
    .hero-offer {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 0.3rem;
    }
    .hero-offer .divider {
        display: none;
    }
}


#about .container {
    max-width: 1200px;
    text-align: center;
    margin: 0 auto;
}
.about-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 50px;
    width: 100%;
    margin: 30px auto 0;
}
.about-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}
.about-item i {
    font-size: 1.6rem;
    color: var(--primary-accent);
    margin-bottom: 4px;
}
.about-item h3 {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0;
    font-weight: 600;
    position: relative;
    padding-bottom: 6px;
}
.about-item h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: var(--primary-accent);
    transition: transform 0.3s ease;
}
.about-item h3:hover::after {
    transform: translateX(-50%) scaleX(1);
}
.about-item p {
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
    width: 100%;
    max-width: 100%;
}
@media (max-width: 768px) {
    .about-grid-2x2 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

.about-svg-icon {
    width: 64px;
    height: 64px;
    color: var(--primary-accent);
    margin-bottom: 6px;
    display: inline-block;
}