/* 
 * Главный лендинг Adviral
 * Стили для страницы с видео-фоном и выбором роли
 */

/* ====== СБРОС И БАЗОВЫЕ СТИЛИ ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #ffffff;
    background-color: #1a0a2e;
}

/* ====== ПРЕЛОАДЕР ====== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a0a2e 0%, #2d1b4e 50%, #1a0a2e 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.preloader-logo {
    height: 60px;
    width: auto;
    animation: pulse 2s ease-in-out infinite;
}

/* Прогресс загрузки */
.preloader-progress {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 200px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b 0%, #ec4899 50%, #8b5cf6 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
}

/* Анимация свечения на прогресс-баре */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: progressShine 1.5s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
}

.preloader-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(0.98); }
}

/* ====== ВИДЕО-ФОН ====== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Затемняющий оверлей с фиолетовым оттенком */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(26, 10, 46, 0.4) 0%,
        rgba(26, 10, 46, 0.2) 30%,
        rgba(26, 10, 46, 0.3) 70%,
        rgba(26, 10, 46, 0.7) 100%
    );
}

/* ====== КОНТЕНТ ====== */
.content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.content.loaded {
    opacity: 1;
}

/* ====== ШАПКА С ЛОГОТИПОМ ====== */
.header {
    text-align: center;
    padding: 1rem 0;
}

.logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 2px 15px rgba(0, 0, 0, 0.4));
}

/* ====== ГЛАВНЫЙ БЛОК (HERO) ====== */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    margin-top: -8vh; /* Поднимаем выше */
}

.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    
    /* Градиентный текст с подсветкой */
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f0e6ff 25%,
        #ffffff 50%,
        #ffe4b3 75%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Свечение под текстом */
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.3))
            drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
    
    /* Анимация переливания */
    animation: shimmer 4s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

/* ====== КНОПКИ ВЫБОРА РОЛИ ====== */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 280px;
    position: relative;
    overflow: hidden;
    
    /* Фон с градиентом */
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.4) 0%,
        rgba(236, 72, 153, 0.3) 50%,
        rgba(245, 158, 11, 0.3) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    
    /* Неоновая граница */
    border: 2px solid rgba(255, 255, 255, 0.3);
    
    /* Неоновое свечение */
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.4),
        0 0 40px rgba(236, 72, 153, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Пульсация */
    animation: neonPulse 3s ease-in-out infinite;
}

@keyframes neonPulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(139, 92, 246, 0.4),
            0 0 40px rgba(236, 72, 153, 0.2),
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(139, 92, 246, 0.6),
            0 0 60px rgba(236, 72, 153, 0.4),
            0 0 80px rgba(245, 158, 11, 0.2),
            0 8px 32px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.6);
    background: linear-gradient(
        135deg,
        rgba(139, 92, 246, 0.6) 0%,
        rgba(236, 72, 153, 0.5) 50%,
        rgba(245, 158, 11, 0.4) 100%
    );
    box-shadow: 
        0 0 40px rgba(139, 92, 246, 0.7),
        0 0 80px rgba(236, 72, 153, 0.5),
        0 0 100px rgba(245, 158, 11, 0.3),
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    animation: none;
}

.cta-button:active {
    transform: translateY(-2px) scale(1.01);
}

/* Иконки SVG */
.cta-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    opacity: 0.9;
}

.cta-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    flex: 1;
}

.cta-role {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.cta-desc {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.75;
    margin-top: 2px;
}

.cta-arrow {
    font-size: 1.2rem;
    opacity: 0.6;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cta-button:hover .cta-arrow {
    transform: translateX(5px);
    opacity: 1;
}

/* ====== ФУТЕР ====== */
.footer {
    text-align: center;
    padding: 1.5rem;
}

.footer-links {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-divider {
    margin: 0 0.75rem;
    color: rgba(255, 255, 255, 0.4);
}

.footer-copyright {
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ====== COOKIE CONSENT ====== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-consent.visible {
    transform: translateY(0);
}

.cookie-consent.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(26, 10, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.cookie-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cookie-text p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.cookie-text a {
    color: #f59e0b;
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-accept {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-accept:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

/* ====== МОБИЛЬНАЯ АДАПТАЦИЯ ====== */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }
    
    .hero {
        padding: 1rem;
        margin-top: -4vh;
    }
    
    .hero-title {
        font-size: 1.9rem;
    }
    
    .hero-subtitle {
        margin-bottom: 2rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }
    
    .cta-button {
        width: 100%;
        min-width: auto;
        padding: 0.9rem 1.25rem;
    }
    
    .logo {
        height: 50px;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-text {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .cta-icon {
        width: 26px;
        height: 26px;
    }
    
    .cta-role {
        font-size: 0.95rem;
    }
    
    .cta-desc {
        font-size: 0.75rem;
    }
    
    .footer-links a {
        font-size: 0.7rem;
    }
    
    .footer-divider {
        margin: 0 0.5rem;
    }
}

/* ====== АНИМАЦИИ ПОЯВЛЕНИЯ ====== */
.content.loaded .header {
    animation: fadeInDown 0.6s ease forwards;
}

.content.loaded .hero-title {
    animation: fadeInUp 0.7s ease 0.1s forwards;
    opacity: 0;
}

.content.loaded .hero-subtitle {
    animation: fadeInUp 0.7s ease 0.2s forwards;
    opacity: 0;
}

.content.loaded .cta-buttons {
    animation: fadeInUp 0.7s ease 0.3s forwards;
    opacity: 0;
}

.content.loaded .footer {
    animation: fadeIn 0.7s ease 0.5s forwards;
    opacity: 0;
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ====== УПРАВЛЕНИЕ ВИДЕО ====== */
.video-controls {
    position: fixed;
    bottom: 100px;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    
    /* Появление с задержкой */
    opacity: 0;
    animation: fadeInControls 0.5s ease 1s forwards;
}

@keyframes fadeInControls {
    to { opacity: 1; }
}

.video-control-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.video-control-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.video-control-btn:active {
    transform: scale(0.95);
}

.video-control-btn svg {
    width: 22px;
    height: 22px;
}

/* Мобильная адаптация для кнопок видео */
@media (max-width: 768px) {
    .video-controls {
        bottom: 80px;
        right: 1rem;
    }
    
    .video-control-btn {
        width: 42px;
        height: 42px;
    }
    
    .video-control-btn svg {
        width: 18px;
        height: 18px;
    }
}
