/* Основные стили MANAWA */

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 165, 116, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 165, 116, 0.7), 0 0 60px rgba(212, 165, 116, 0.4);
    }
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(100px) rotate(720deg);
        opacity: 0;
    }
}

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

@keyframes border-glow {
    0%, 100% {
        border-color: rgba(212, 165, 116, 0.3);
    }
    50% {
        border-color: rgba(212, 165, 116, 0.6);
    }
}

/* Scroll reveal classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for grid items */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ============================================
   ENHANCED BUTTON EFFECTS
   ============================================ */
.btn-glow {
    animation: glow 2s ease-in-out infinite;
}

.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: shimmer 3s ease-in-out infinite;
}

/* ============================================
   3D CARD EFFECTS
   ============================================ */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
}

.card-3d:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 40px rgba(212, 165, 116, 0.15);
}

.card-3d::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-3d:hover::before {
    opacity: 1;
}

/* ============================================
   FLOATING PARTICLES
   ============================================ */
.particles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    animation: float-particle 15s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; animation-duration: 16s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; animation-duration: 13s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 15s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; animation-duration: 11s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 14.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4.5s; animation-duration: 12.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.5s; animation-duration: 15.5s; }
.particle:nth-child(10) { left: 15%; animation-delay: 3.5s; animation-duration: 13.5s; }

/* ============================================
   ANIMATED GRADIENT BACKGROUNDS
   ============================================ */
.animated-gradient {
    background: linear-gradient(-45deg, #0a0908, #1a1815, #252220, #1a1815);
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
}

.light .animated-gradient,
html.light .animated-gradient,
html.light section.animated-gradient {
    background: linear-gradient(-45deg, #fafafa, #f5f5f5, #ffffff, #f8f8f8) !important;
    background-size: 400% 400% !important;
}

/* ============================================
   ICON ANIMATIONS
   ============================================ */
.icon-bounce {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.group:hover .icon-bounce {
    transform: scale(1.2) rotate(-5deg);
}

.icon-spin {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .icon-spin {
    transform: rotate(360deg);
}

/* ============================================
   ENHANCED BORDER ANIMATIONS
   ============================================ */
.border-animated {
    position: relative;
}

.border-animated::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% 200%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: gradient-shift 3s ease infinite;
}

.border-animated:hover::after {
    opacity: 1;
}

/* ============================================
   GLASSMORPHISM CARDS
   ============================================ */
.glass-card {
    background: rgba(26, 24, 21, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 165, 116, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.light .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(200, 149, 96, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ============================================
   TEXT GRADIENT ANIMATION
   ============================================ */
.text-gradient-animated {
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 4s linear infinite;
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   PROGRESS LINE
   ============================================ */
.progress-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s linear;
}

/* Светлая тема (по умолчанию) - Apple HIG inspired */
:root {
    /* Background Colors - Чистые светлые цвета фона */
    --bg-main: #fafafa;
    --bg-card: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-elevated: #ffffff;
    --bg-grouped: #f8f8f8;
    
    /* Text Colors - Увеличенная контрастность для лучшей читаемости */
    --text-main: #000000;
    --text-secondary: #1d1d1f;
    --text-muted: #3a3a3c;
    --text-quaternary: #545456;
    
    /* Primary Colors - Акцентные цвета */
    --primary: #c89560;
    --primary-hover: #b57d47;
    --primary-light: #e5d4c5;
    --accent: #b08856;
    --accent-light: #d9c4ad;
    
    /* Semantic Colors - Apple Style */
    --color-success: #28a745;
    --color-success-bg: #d1f4db;
    --color-warning: #ff9f0a;
    --color-warning-bg: #fff5e0;
    --color-error: #dc2626;
    --color-error-bg: #fee;
    --color-info: #007aff;
    --color-info-bg: #e5f2ff;
    
    /* Border Colors - Адаптивные границы */
    --border-primary: rgba(200, 149, 96, 0.3);
    --border-light: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.12);
    --border-strong: rgba(0, 0, 0, 0.18);
    --separator: rgba(60, 60, 67, 0.36);
    
    /* Shadow System - Apple-style elevation */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.12);
    
    /* Material Blur - iOS-style vibrancy */
    --blur-bg: rgba(255, 255, 255, 0.7);
    --blur-bg-strong: rgba(255, 255, 255, 0.85);
    
    /* Scrollbar */
    --scrollbar-track: transparent;
    --scrollbar-thumb: rgba(0, 0, 0, 0.2);
    --scrollbar-thumb-hover: rgba(200, 149, 96, 0.6);
}

/* Темная тема */
.dark {
    --bg-main: #0a0908;
    --bg-card: #1a1815;
    --bg-secondary: #252220;
    --text-main: #ffffff;
    --text-muted: #c4c4c4;
    --primary: #d4a574;
    --primary-hover: #c89560;
    --accent: #b8956a;
    --border-primary: rgba(212, 165, 116, 0.2);
    --scrollbar-track: #0a0908;
    --scrollbar-thumb: #1a1815;
    --scrollbar-thumb-hover: #d4a574;
}

/* Светлая тема (явно установленная) - Apple HIG inspired */
.light {
    /* Background Colors - Чистые светлые цвета фона */
    --bg-main: #fafafa;
    --bg-card: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-elevated: #ffffff;
    --bg-grouped: #f8f8f8;
    
    /* Text Colors - Увеличенная контрастность для лучшей читаемости */
    --text-main: #000000;
    --text-secondary: #1d1d1f;
    --text-muted: #3a3a3c;
    --text-quaternary: #545456;
    
    /* Primary Colors - Акцентные цвета */
    --primary: #c89560;
    --primary-hover: #b57d47;
    --primary-light: #e5d4c5;
    --accent: #b08856;
    --accent-light: #d9c4ad;
    
    /* Semantic Colors - Apple Style */
    --color-success: #28a745;
    --color-success-bg: #d1f4db;
    --color-warning: #ff9f0a;
    --color-warning-bg: #fff5e0;
    --color-error: #dc2626;
    --color-error-bg: #fee;
    --color-info: #007aff;
    --color-info-bg: #e5f2ff;
    
    /* Border Colors - Адаптивные границы */
    --border-primary: rgba(200, 149, 96, 0.3);
    --border-light: rgba(0, 0, 0, 0.08);
    --border-medium: rgba(0, 0, 0, 0.12);
    --border-strong: rgba(0, 0, 0, 0.18);
    --separator: rgba(60, 60, 67, 0.36);
    
    /* Shadow System - Apple-style elevation */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.08), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.12);
    
    /* Material Blur - iOS-style vibrancy */
    --blur-bg: rgba(255, 255, 255, 0.7);
    --blur-bg-strong: rgba(255, 255, 255, 0.85);
    
    /* Scrollbar */
    --scrollbar-track: transparent;
    --scrollbar-thumb: rgba(0, 0, 0, 0.2);
    --scrollbar-thumb-hover: rgba(200, 149, 96, 0.6);
}

/* Автоопределение темы из браузера */
@media (prefers-color-scheme: light) {
    html:not(.dark):not(.light) {
        --bg-main: #f5f5f7;
        --bg-card: #ffffff;
        --bg-secondary: #e8e8ed;
        --bg-elevated: #ffffff;
        --bg-grouped: #f2f2f7;
        --text-main: #000000;
        --text-secondary: #1d1d1f;
        --text-muted: #3a3a3c;
        --border-light: rgba(0, 0, 0, 0.08);
        --border-medium: rgba(0, 0, 0, 0.12);
        --scrollbar-track: transparent;
        --scrollbar-thumb: rgba(0, 0, 0, 0.2);
    }
}

@media (prefers-color-scheme: dark) {
    html:not(.dark):not(.light) {
        --bg-main: #0a0908;
        --bg-card: #1a1815;
        --bg-secondary: #252220;
        --text-main: #ffffff;
        --text-muted: #c4c4c4;
        --scrollbar-track: #0a0908;
        --scrollbar-thumb: #1a1815;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
}

/* Плавные переходы при смене темы */
.light,
.dark {
    transition: background-color 0.3s ease;
}

.light *:not([class*="animate"]):not([class*="transition"]),
.dark *:not([class*="animate"]):not([class*="transition"]) {
    transition-property: background-color, border-color, color, box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Manrope', sans-serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Apple HIG: Минималистичная прокрутка (iOS-style) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
    background-clip: padding-box;
}

/* Анимация параллакса */
@keyframes parallax-lift {
    from { transform: translateY(0); }
    to { transform: translateY(-120px); }
}

.parallax-effect {
    animation: parallax-lift linear both;
    animation-timeline: view();
    animation-range: entry 0% exit 100%;
}

/* Переопределения для светлой темы */
.light body,
.light.bg-background-dark,
.light .bg-background-dark,
html.light body.bg-background-dark {
    background-color: #fafafa !important;
}

/* Фоны body в светлой теме */
html.light body {
    background-color: #fafafa !important;
    color: #000000 !important;
}

/* Принудительный светлый фон для всего контента */
html.light {
    background-color: #fafafa !important;
}

html.light body {
    background: #fafafa !important;
}

.light .bg-background-card {
    background-color: var(--bg-card) !important;
}

.light .bg-secondary {
    background-color: var(--bg-secondary) !important;
}

.light .text-text-main,
.light .text-white {
    color: var(--text-main) !important;
}

.light .text-text-muted {
    color: var(--text-muted) !important;
}

/* Apple HIG: Высокая контрастность для текстовых элементов (минимум 4.5:1) */
.light * {
    color: var(--text-main);
}

.light h1,
.light h2,
.light h3,
.light h4,
.light h5,
.light h6 {
    color: var(--text-main) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.light .font-bold,
.light .font-semibold,
.light strong {
    color: var(--text-main) !important;
    font-weight: 600;
}

.light p,
.light span,
.light div,
.light a {
    color: inherit;
}

.light .text-white {
    color: var(--text-main) !important;
}

.light .text-text-main {
    color: var(--text-main) !important;
}

.light .text-text-secondary {
    color: var(--text-secondary) !important;
}

/* Apple HIG: Elevation через многослойные тени */
.light .shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.light .shadow,
.light .shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.light .shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.light .shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

.light .shadow-2xl {
    box-shadow: var(--shadow-2xl) !important;
}

.light .border-primary\/10 {
    border-color: rgba(200, 149, 96, 0.15) !important;
}

.light .border-primary\/20 {
    border-color: rgba(200, 149, 96, 0.25) !important;
}

.light .border-primary\/30 {
    border-color: rgba(200, 149, 96, 0.35) !important;
}

.light .border-primary\/40 {
    border-color: rgba(200, 149, 96, 0.45) !important;
}

.light .border-primary\/50 {
    border-color: rgba(200, 149, 96, 0.55) !important;
}

/* Apple HIG: Material/Vibrancy эффекты для навигации и модалов */
.light .bg-\[\#0a0908\]\/80 {
    background-color: var(--blur-bg-strong) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 var(--separator), var(--shadow-sm);
    border-bottom: 1px solid var(--separator);
}

.light .bg-\[url\(\'https\:\/\/grainy-gradients\.vercel\.app\/noise\.svg\'\)\] {
    opacity: 0.02 !important;
}

/* Apple HIG: Карточки с чистым светлым фоном */
html.light .bg-\[\#141122\],
.light .bg-\[\#141122\] {
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

html.light .border-\[\#292348\],
.light .border-\[\#292348\] {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Apple HIG: Чистый белый фон для info-блоков внутри карточек */
.light .bg-background-dark\/80 {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.light .bg-background-card\/60 {
    background-color: var(--blur-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.light .bg-background-card\/90 {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.light .bg-background-card\/95 {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

/* Apple HIG: Чистые светлые градиенты */
.light .bg-gradient-to-br.from-background-card.to-background-dark {
    background: #ffffff !important;
}

.light .bg-gradient-to-br.from-background-card.via-background-card.to-background-dark {
    background: linear-gradient(135deg, #ffffff 0%, #fcfcfc 50%, #fafafa 100%) !important;
    background-color: #ffffff !important;
}

.light .bg-gradient-to-b.from-background-card\/30.to-transparent {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.6), transparent) !important;
}

.light .bg-gradient-to-b.from-background-dark.to-black {
    background-image: linear-gradient(to bottom, #fafafa, #f5f5f5) !important;
}

.light .bg-gradient-to-b.from-background-card\/20.to-transparent {
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.4), transparent) !important;
}

/* Apple HIG: Акцентные цвета с низкой прозрачностью */
.light .bg-primary\/8 {
    background-color: rgba(200, 149, 96, 0.08) !important;
}

.light .bg-primary\/15 {
    background-color: rgba(200, 149, 96, 0.12) !important;
}

.light .bg-primary\/5 {
    background-color: rgba(200, 149, 96, 0.05) !important;
}

.light .bg-accent\/6 {
    background-color: rgba(176, 136, 86, 0.06) !important;
}

.light .bg-accent\/8 {
    background-color: rgba(176, 136, 86, 0.08) !important;
}

/* Apple HIG: Чистый светлый фон для контента */
.light .bg-gray-800 {
    background-color: #fafafa !important;
}

/* Apple HIG: Overlay эффекты для разделения */
.light .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

.light .bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.light .border-white\/10 {
    border-color: var(--separator) !important;
}

/* Apple HIG: Семантические цвета (Success, Error) */
.light .bg-green-400\/10 {
    background-color: var(--color-success-bg) !important;
}

.light .bg-green-400\/20,
.light .bg-green-500\/20 {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

.light .bg-green-500\/5 {
    background-color: rgba(40, 167, 69, 0.08) !important;
}

.light .border-green-400\/30,
.light .border-green-500\/30 {
    border-color: rgba(40, 167, 69, 0.3) !important;
}

/* Apple HIG: Цвета текста с высокой контрастностью */
.light .text-green-400 {
    color: var(--color-success) !important;
    font-weight: 600;
}

.light .text-red-400 {
    color: var(--color-error) !important;
}

.light .bg-green-400 {
    background-color: var(--color-success) !important;
    color: #ffffff !important;
}

/* Apple HIG: Семантические цвета ошибок */
.light .bg-red-500\/5 {
    background-color: var(--color-error-bg) !important;
}

.light .border-red-500\/30 {
    border-color: rgba(220, 38, 38, 0.4) !important;
}

.light .border-red-500\/50 {
    border-color: rgba(220, 38, 38, 0.6) !important;
}

/* Apple HIG: Акцентные оттенки для интерактивных элементов */
.light .bg-primary\/10 {
    background-color: rgba(200, 149, 96, 0.1) !important;
}

.light .bg-primary\/20 {
    background-color: rgba(200, 149, 96, 0.15) !important;
}

.light .bg-primary\/25 {
    background-color: rgba(200, 149, 96, 0.2) !important;
}

.light .bg-primary\/30 {
    background-color: rgba(200, 149, 96, 0.25) !important;
}

/* Apple HIG: Accent цвета */
.light .bg-accent\/10 {
    background-color: rgba(176, 136, 86, 0.1) !important;
}

.light .bg-accent\/15 {
    background-color: rgba(176, 136, 86, 0.12) !important;
}

.light .bg-accent\/20 {
    background-color: rgba(176, 136, 86, 0.15) !important;
}

/* Apple HIG: Текстовая иерархия */
.light .text-\[\#0a0908\] {
    color: var(--text-main) !important;
}

/* Apple HIG: Вторичный текст с контрастностью минимум 4.5:1 */
.light .text-text-muted,
.light [class*="text-text-muted"] {
    color: var(--text-muted) !important;
}

/* Улучшенный контраст для white/XX прозрачностей в светлой теме */
.light .text-white\/60 {
    color: var(--text-secondary) !important;
}

.light .text-white\/70 {
    color: var(--text-muted) !important;
}

.light .text-white\/80 {
    color: var(--text-secondary) !important;
}

/* Гарантируем читаемость для всех типов контента */
.light .text-xs,
.light .text-sm,
.light .text-base,
.light .text-lg,
.light .text-xl {
    color: inherit;
}

/* Цифры и важные данные */
.light .font-mono,
.light .font-bold {
    color: var(--text-main) !important;
}

/* Apple HIG: Футер с чистым светлым градиентом */
.light footer {
    background: linear-gradient(to bottom, #fafafa, #f5f5f5) !important;
}

/* Apple HIG: Формы с четкими границами и состояниями */
.light input[type="text"],
.light input[type="email"],
.light select,
.light textarea {
    background-color: var(--bg-elevated) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--separator) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease-in-out;
    -webkit-appearance: none;
    appearance: none;
}

.light input[type="text"]:focus,
.light input[type="email"]:focus,
.light select:focus,
.light textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(200, 149, 96, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    outline: none;
}

.light input::placeholder {
    color: var(--text-muted) !important;
    opacity: 0.8;
}

/* Apple HIG: Состояние disabled с пониженной непрозрачностью */
.light button:disabled,
.light button[disabled] {
    background-color: var(--bg-grouped) !important;
    color: var(--text-secondary) !important;
    opacity: 0.7;
    cursor: not-allowed;
}

/* Apple HIG: Специальные shadow эффекты */
.light [class*="shadow-\[0_0_"] {
    filter: opacity(0.7) saturate(1.1);
}

/* Apple HIG: Hover состояния с мягкими переходами */
.light .hover\:bg-background-card:hover {
    background-color: var(--bg-elevated) !important;
    box-shadow: var(--shadow-sm);
}

.light .hover\:bg-primary\/5:hover {
    background-color: rgba(200, 149, 96, 0.08) !important;
}

/* Apple HIG: Gradient текст с высокой контрастностью */
.light .text-transparent.bg-clip-text.bg-gradient-to-r {
    background-image: linear-gradient(to right, #9e6c42, #c89560, #b57d47) !important;
}

/* Apple HIG: Material/Vibrancy эффекты */
.light [class*="backdrop-blur"] {
    background-color: var(--blur-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Материал иконки должны быть видимыми */
.light .material-symbols-outlined {
    opacity: 1;
}

/* Переопределение для конкретных блоков с inline стилями */
.light section {
    position: relative;
}

/* Убрано - конфликтовало с .section-divider::before */

/* Apple HIG: Карточки с четкими границами */
.light .rounded-xl,
.light .rounded-2xl,
.light .rounded-3xl {
    border: 1px solid var(--separator);
}

/* Apple HIG: Блюр эффекты - отключены */
.light [class*="blur-"] {
    opacity: 1;
}

/* Apple HIG: Градиентные заливки */
.light .from-primary\/20,
.light .to-accent\/20 {
    --tw-gradient-from: rgba(200, 149, 96, 0.12) !important;
    --tw-gradient-to: rgba(176, 136, 86, 0.12) !important;
}

/* Apple HIG: Дополнительные улучшения для светлой темы */

/* Apple HIG: Навигация с vibrancy эффектом */
.light nav {
    background-color: var(--blur-bg) !important;
    border-color: var(--separator) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Apple HIG: Карточки с четкой elevation на hover */
.light .group:hover:not(a):not(footer *):not(header *) {
    box-shadow: var(--shadow-lg) !important;
    transition: box-shadow 0.2s ease-in-out;
}

/* Apple HIG: Улучшенные кнопки с четкими состояниями */
.light button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.light button:not(:disabled):active {
    transform: scale(0.98);
    transition-duration: 0.05s;
}

/* Apple HIG: Светлый градиент на изображениях карточек */
.light .bg-gradient-to-t.from-background-dark\/80,
html.light .bg-gradient-to-t.from-background-dark\/80 {
    background-image: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.85) 50%, transparent 100%) !important;
}

.light .bg-gradient-to-t.from-background-dark\/80.via-transparent,
html.light .bg-gradient-to-t.from-background-dark\/80.via-transparent {
    background-image: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.7) 60%, transparent 100%) !important;
}

/* Apple HIG: Текст в карточках фондов должен быть чёрным */
.light .card-3d .text-white,
.light .card-glow-hover .text-white {
    color: var(--text-main) !important;
}

.light .card-3d .text-white\/70,
.light .card-glow-hover .text-white\/70 {
    color: var(--text-muted) !important;
}

/* Apple HIG: Badge элементы */
.light [class*="badge"],
.light [class*="rounded-full"][class*="bg-"] {
    box-shadow: var(--shadow-sm);
}

/* Apple HIG: Hover эффекты для акцентных элементов */
.light .hover\:shadow-\[0_0_20px_rgba\(212\,165\,116\,0\.4\)\]:hover,
.light .hover\:shadow-\[0_0_25px_rgba\(212\,165\,116\,0\.2\)\]:hover,
.light .hover\:shadow-\[0_0_30px_rgba\(212\,165\,116\,0\.2\)\]:hover {
    box-shadow: 0 8px 24px rgba(200, 149, 96, 0.2) !important;
}

/* Apple HIG: Иконки */
.light .material-symbols-outlined {
    color: inherit;
    filter: none;
}

/* Apple HIG: Заголовки с четкой иерархией */
.light h1, 
.light h2, 
.light h3, 
.light h4, 
.light h5, 
.light h6 {
    color: var(--text-main);
    letter-spacing: -0.015em;
}

/* Apple HIG: Hero секция с чистым акцентом */
.light section:first-of-type {
    background: radial-gradient(ellipse at top, rgba(200, 149, 96, 0.03) 0%, transparent 50%), #fafafa;
}

/* Все секции должны быть светлыми */
html.light section,
.light section {
    background-color: #fafafa !important;
}

html.light section.section-divider,
.light section.section-divider {
    background-color: #fafafa !important;
    border-color: rgba(200, 149, 96, 0.15) !important;
}

/* Hero фоновые эффекты - скрыть в светлой теме */
html.light .bg-hero-wave {
    background-image: none !important;
}

/* Тёмные блюры адаптировать */
html.light .bg-primary\/8,
html.light .bg-accent\/6 {
    opacity: 0.3 !important;
}

/* Секция "Для кого" - чистый тёплый градиент в светлой теме */
.light #audience {
    background: linear-gradient(180deg, 
        rgba(255, 248, 240, 0.9) 0%, 
        rgba(255, 253, 250, 0.5) 50%,
        transparent 100%
    ) !important;
}

.light #audience .bg-\[radial-gradient\(ellipse_at_bottom\,_var\(--tw-gradient-stops\)\)\] {
    background: radial-gradient(ellipse at bottom, rgba(212, 175, 130, 0.08), transparent 70%) !important;
}

/* Apple HIG: Ссылки с четкими состояниями */
.light a {
    transition: color 0.15s ease-in-out;
}

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

.light a:active {
    opacity: 0.7;
}

/* Apple HIG: Дополнительные стили для компонентов */

/* Отступы по системе 8pt grid */
.light .p-1 { padding: 4px; }
.light .p-2 { padding: 8px; }
.light .p-3 { padding: 12px; }
.light .p-4 { padding: 16px; }
.light .p-5 { padding: 20px; }
.light .p-6 { padding: 24px; }
.light .p-8 { padding: 32px; }

/* Улучшенные разделители */
.light hr,
.light .divider {
    border-color: var(--separator);
    opacity: 1;
}

/* Список с четкими разделителями */
.light ul li + li,
.light ol li + li {
    border-top: 1px solid var(--separator);
}

/* Книга заявок: повышенная контрастность в светлой теме */
.light #p2p .orderbook-card {
    background: #ffffff !important;
    color: #11131a !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 16px 40px rgba(17, 17, 19, 0.1);
}

.light #p2p .orderbook-card .text-white {
    color: #1f2937 !important;
}

/* Цены покупки — насыщенный зелёный */
html.light .text-green-700,
html.light div.text-green-700,
html.light h3.text-green-700,
html.light span.text-green-700 {
    color: #15803d !important;
}

/* Цены продажи — насыщенный красный */
html.light .text-red-700,
html.light div.text-red-700,
html.light h3.text-red-700,
html.light span.text-red-700 {
    color: #b91c1c !important;
}

/* Фоны строк покупки */
html.light .bg-green-500\/20,
html.light div[class*="bg-green-500"] {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

html.light .border-green-500\/40 {
    border-color: rgba(34, 197, 94, 0.4) !important;
}

/* Фоны строк продажи */
html.light .bg-red-500\/15,
html.light div[class*="bg-red-500"] {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

html.light .border-red-500\/35 {
    border-color: rgba(239, 68, 68, 0.35) !important;
}

/* Live бейдж */
html.light .bg-green-600\/25 {
    background-color: rgba(22, 163, 74, 0.25) !important;
}

html.light .border-green-600\/50,
html.light .border-green-600\/40 {
    border-color: rgba(22, 163, 74, 0.5) !important;
}

.light #p2p .orderbook-card .border-primary\/30,
.light #p2p .orderbook-card .border-primary\/20 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}


/* Background Images for Cards */
.bg-case-office {
    background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuCj6l0Hde463B5dSxUqrZ3XuzMS9wzedsBa9UfMzOGv-hzWUehcZ0wcqGi5Vnr-ZYy1smH5cXded52QpLZYoVQPa4o1G9vGX2GSjlkDEgM-_gReGvK92AMQSyKjUGQB4UBeY2RcGuTDpSvueD2hHcfimWxjtg1x_jTm_HhE8w1hrhwpR2QcvKVEopiDBY4rsjrMJOM064twRIs2gAV7VwNQeVRRbLtJLfK58ypIN4zd8b-HdX3G8AwQbU8pah-q8h5TCis2Lxu9EdUD');
}

.bg-case-logistics {
    background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuDn13a951mdVbCkP1TEIQ6rvo3Kof6VqKuWHp7vTdMb8NJ-ArUfJjTYUD1AQO0TKxHMxakIOIsu2-Ddiw6yOuH2aIZKwkCmX9nI2r6mZdJ79OyzsP39oXrrIdnddhVPEH8qnFTggbf9Ji_jrobGF5BoOSwPDErki4UEThsnRhGMSHYWVFNAhb3aywJbgoaTUhCVbJocJGQf2Smawq2f33YYtEtA4EUDDDsEHRSIuTuCo139meelmXYDCWj5fdbXRwtyLUIZWMscmoWj');
}

.bg-case-mixed {
    background-image: url('https://lh3.googleusercontent.com/aida-public/AB6AXuBukNi6ip8r7Zn9kZukDQdiYLu_CYtoHe6plLo2EgIqyWLTK0QfV1tgHa-3LULEpx03fKDGhEp7up4NT_KZYc39gAH-0cIOz1I-movAMpU4VDwYruW4G_ibltKBXjvJWb8fdg_fEI5p0SPpVx7w_KM0wiJ0zCaqBLpgD8XAbogO-l3_7yjkKnQwMwTdcoOSAGrFj-qglJs8M-D4KHkXMBqGFOh8IDYrNiF1tLcEinKUEzFDZ8ka7Ya45PaSeL-EFupT0P0k644GEz9V');
}

/* ============================================
   HERO CARDS HOVER Z-INDEX
   ============================================ */
.hero-card-hover {
    transition: z-index 0s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease-out;
    will-change: transform;
    backface-visibility: hidden;
    box-shadow: 0 0 50px rgba(212, 165, 116, 0.2);
}

.hero-card-hover:hover {
    z-index: 100 !important;
    transform: translateY(-8px) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25), 0 0 60px rgba(212, 165, 116, 0.35);
}

.light .hero-card-hover:hover {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 40px rgba(200, 149, 96, 0.2) !important;
}

/* ============================================
   ENHANCED HERO ANIMATIONS
   ============================================ */
@keyframes hero-text-reveal {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes hero-badge-pop {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(-10px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes card-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.hero-title {
    animation: hero-text-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-description {
    animation: hero-text-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-buttons {
    animation: hero-text-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-badge {
    animation: hero-badge-pop 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-trust {
    animation: hero-text-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

/* ============================================
   CARD HOVER ENHANCEMENTS
   ============================================ */
.card-hover-lift {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover-lift:hover {
    transform: translateY(-12px);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(212, 165, 116, 0.2);
}

.light .card-hover-lift:hover {
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.15),
        0 0 40px rgba(200, 149, 96, 0.15);
}

/* Glow effect on hover */
.card-glow-hover {
    position: relative;
}

.card-glow-hover::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(10px);
    transition: opacity 0.4s ease;
}

.card-glow-hover:hover::before {
    opacity: 0.5;
}

/* ============================================
   BUTTON PULSE EFFECT
   ============================================ */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.btn-pulse {
    position: relative;
}

.btn-pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: -1;
}

/* ============================================
   ENHANCED NAVBAR
   ============================================ */
.navbar-blur {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.section-divider {
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 2px;
}

/* ============================================
   ORDERBOOK LIVE EFFECT
   ============================================ */
@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.live-indicator {
    animation: live-pulse 1.5s ease-in-out infinite;
}

/* ============================================
   ENHANCED FORM FOCUS STATES
   ============================================ */
.input-enhanced {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.input-enhanced:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.2), 0 4px 20px rgba(212, 165, 116, 0.15);
}

/* ============================================
   FOOTER LINKS FOCUS FIX
   ============================================ */
footer a {
    outline: none;
}

footer a:focus,
footer a:focus-visible {
    outline: none;
    box-shadow: none;
}

/* ============================================
   FOOTER WAVE EFFECT
   ============================================ */
.footer-wave {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    opacity: 0.1;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C200,120 400,0 600,60 C800,120 1000,0 1200,60 V120 H0 Z'/%3E%3C/svg%3E");
    mask-size: cover;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120'%3E%3Cpath d='M0,60 C200,120 400,0 600,60 C800,120 1000,0 1200,60 V120 H0 Z'/%3E%3C/svg%3E");
    -webkit-mask-size: cover;
}

/* ============================================
   COUNTER NUMBER ANIMATION
   ============================================ */
.count-up {
    display: inline-block;
}

/* ============================================
   SMOOTH ANCHOR SCROLLING INDICATOR
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
    opacity: 1;
}

@keyframes scroll-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(8px);
    }
}

.scroll-indicator .arrow {
    animation: scroll-bounce 1.5s ease-in-out infinite;
}

/* ============================================
   MARQUEE / TICKER EFFECT
   ============================================ */
@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker {
    animation: ticker 30s linear infinite;
}

/* ============================================
   STAT COUNTER BOXES
   ============================================ */
.stat-box {
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-box:hover::before {
    opacity: 1;
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */
@media (max-width: 768px) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        transform: none;
        opacity: 1;
    }
    
    .card-3d:hover {
        transform: translateY(-4px);
    }
    
    .hero-title,
    .hero-description,
    .hero-buttons,
    .hero-badge,
    .hero-trust {
        opacity: 1;
        animation: none;
    }
}

/* ============================================
   PREFERS REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
