/* ===================================
   Аудит-Pro - Основные стили
   =================================== */

/* Базовые стили */
* {
    font-family: 'Inter', sans-serif;
}

/* Утилиты */
.max-w-screen-1600 {
    max-width: 1600px;
}

/* Градиенты и фоны */
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-gradient {
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
                radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse 50% 30% at 20% 80%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
}

.grid-bg {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Карточки и компоненты */
.card-glow {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 24px -1px rgba(99, 102, 241, 0.1),
                0 0 0 1px rgba(99, 102, 241, 0.05);
}

/* Кнопки */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 14px -2px rgba(99, 102, 241, 0.4),
                0 0 0 1px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -2px rgba(99, 102, 241, 0.5),
                0 0 0 1px rgba(99, 102, 241, 0.2);
}

/* Статистические карточки */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -8px rgba(99, 102, 241, 0.2);
}

/* Навигация */
.nav-blur {
    background: transparent;
    backdrop-filter: none;
}

/* Мобильное меню */
.hamburger-line {
    transition: all 0.3s ease;
}

.hamburger-active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-smooth {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-overlay-smooth {
    transition: opacity 0.3s ease;
}

/* Метрики и иконки */
.metric-bar {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7);
    border-radius: 4px;
    height: 8px;
}

.check-icon {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.warning-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.error-icon {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

/* Градиентный текст для заголовков */
.h2-gradient {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7, #ec4899, #f43f5e, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    animation: color-shift 6s ease-in-out infinite;
}

.h2-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7, #ec4899, #f43f5e, #6366f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.4;
    z-index: -1;
    animation: color-shift 6s ease-in-out infinite, glow 3s ease-in-out infinite;
}

/* Изумрудный для города в H1 */
.city-name {
    background: linear-gradient(135deg, #059669, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ===================================
   Анимации
   =================================== */

/* Плавающая анимация */
.floating {
    animation: floating 6s ease-in-out infinite;
}

.floating-delay {
    animation: floating 6s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Появление снизу вверх */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-up-delay-1 {
    animation-delay: 0.2s;
}

.fade-in-up-delay-2 {
    animation-delay: 0.4s;
}

.fade-in-up-delay-3 {
    animation-delay: 0.6s;
}

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

/* Выезд слева/справа */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.8s ease-out forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Масштабирование */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scaleIn 0.6s ease-out forwards;
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hover эффекты */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(99, 102, 241, 0.3);
}

/* Последовательная анимация */
.stagger-animation > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Для браузеров, которые не поддерживают scroll-behavior */
@supports not (scroll-behavior: smooth) {
    html {
        scroll-behavior: auto;
    }
}

/* Пульсирующее кольцо */
.pulse-ring {
    animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(0.95); opacity: 1; }
}

/* Анимация градиента */
@keyframes color-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* ===================================
   Адаптивность и медиа-запросы
   =================================== */

/* Мобильные устройства */
@media (max-width: 768px) {
    .fade-in-up,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        animation-duration: 0.6s;
    }
    
    .stagger-animation > * {
        animation-duration: 0.4s;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .hover-lift:hover {
        transform: translateY(-3px);
    }
}

/* Десктоп */
@media (min-width: 1025px) {
    .hover-lift:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 40px -15px rgba(99, 102, 241, 0.4);
    }
}

/* ===================================
   Утилиты для доступности
   =================================== */

/* Уменьшение анимаций для пользователей с чувствительностью к движению */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating,
    .floating-delay,
    .pulse-ring {
        animation: none !important;
    }
}

/* Высококонтрастный режим */
@media (prefers-contrast: high) {
    .card-glow {
        background: #ffffff;
        border: 2px solid #000000;
    }
    
    .btn-primary {
        background: #0066cc;
        border: 2px solid #000000;
    }
}
