/* Critical CSS - загружается в head для быстрого отображения */
@import 'variables.css';

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--secondary-color);
}

/* Hero video section */
.hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

/* Hero fallback для быстрой загрузки */
.hero-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.hero-fallback-image {
    max-width: 200px;
    height: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Скрываем fallback когда видео загружено */
.hero-video__media.loaded+.hero-fallback {
    opacity: 0;
    transition: opacity 0.5s ease-out;
    pointer-events: none;
}

/* Header styles - только критические стили */
.site-header {
    background: var(--white);
    padding: 20px 40px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: var(--z-header);
    transition: transform var(--transition-normal);
    border: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: none;
    padding: 0 36px;
    width: 100%;
    box-sizing: border-box;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Main navigation */
.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.main-nav a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-normal);
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Contact button - базовые стили */
.contact-btn {
    background: var(--primary-color);
    color: var(--white);
    font-weight: var(--font-weight-semibold);
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 16px;
    box-shadow: var(--shadow-button);
    text-align: center;
    transition: all var(--transition-fast);
    display: inline-block;
}

.contact-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0px 20px var(--shadow-primary-hover);
    transform: translateY(-2px);
}

/* Hero title section */
.hero-title-section {
    padding: 120px 20px 80px;
    text-align: center;
    background: var(--white);
}

.hero-title-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-main-title {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

/* Results section */
.results-section {
    padding: 80px 20px;
    background: var(--white);
}

.results-container {
    max-width: 1200px;
    margin: 0 auto;
}

.results-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.result-card {
    text-align: center;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal);
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-number {
    font-size: 3rem;
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    margin-bottom: 2rem;
}

.loading-logo img {
    width: 80px;
    height: 80px;
    animation: pulse 2s infinite;
}

.loading-text {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-main-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .results-title {
        font-size: 2rem;
    }

    .result-number {
        font-size: 2.5rem;
    }
}