/* --- VARIABLES --- */
:root {
    /* Brand Colors */
    --color-primary: #10D0C3;       
    --color-primary-soft: #EAFBFB; 
    
    /* Light Theme Base (Default) */
    --bg-body: #FFFFFF;             
    --bg-surface: #FFFFFF;          
    --bg-input: #F3F4F6;            
    
    --text-main: #111827;           
    --text-body: #374151;           
    --border-color: #E5E7EB;        
    
    /* Shadows (Light Mode) */
    --shadow-brand-soft: 0 12px 30px rgba(16, 208, 195, 0.15), 0 4px 10px rgba(0,0,0,0.05);
    --shadow-brand-strong: 0 20px 50px rgba(16, 208, 195, 0.3), 0 10px 20px rgba(0,0,0,0.08);

    /* UI Specs */
    --radius-lg: 24px;
    --header-height: 80px;
    --container-width: 1200px;
}

/* --- DARK MODE CLASS (Controlled by JS) --- */
body.dark-mode {
    --bg-body: #121212;         
    --bg-surface: #1E1E1E;      
    --bg-input: #2C2C2C;        
    
    --text-main: #E5E7EB;       
    --text-body: #D1D5DB;       
    --border-color: #374151;
    --color-primary-soft: #163333; 
    
    /* ИСПРАВЛЕНО: Яркое неоновое свечение (Glow) для темной темы */
    /* Базовое состояние */
    --shadow-brand-soft: 0 0 30px rgba(16, 208, 195, 0.1);
    /* Состояние при наведении (ярче) */
    --shadow-brand-strong: 0 0 60px rgba(16, 208, 195, 0.3);
}

/* Применяем свечение к блокам в темной теме */
body.dark-mode .step-card, 
body.dark-mode .feature-card, 
body.dark-mode .phone-mockup, /* Телефон теперь тоже светится */
body.dark-mode .benefit-card,
body.dark-mode .zero-waste {
    border: 1px solid rgba(16, 208, 195, 0.15); /* Тонкая цветная рамка */
    box-shadow: var(--shadow-brand-soft); 
}

/* Эффект при наведении в темной теме (Парение + Яркое свечение) */
body.dark-mode .step-card:hover,
body.dark-mode .feature-card:hover,
body.dark-mode .benefit-card:hover,
body.dark-mode .phone-mockup:hover {
    box-shadow: var(--shadow-brand-strong);
    border-color: rgba(16, 208, 195, 0.5); /* Рамка загорается */
    transform: translateY(-10px);
}

body.dark-mode .feature-card.big, 
body.dark-mode .feature-card.small { 
    background: var(--bg-surface); 
}

body.dark-mode .benefit-icon-wrapper {
    background-color: rgba(16, 208, 195, 0.15);
}

/* --- RESET & BASE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* --- TYPOGRAPHY --- */
h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 8px; }
p { font-size: 1.125rem; color: var(--text-body); margin-bottom: 16px; }

.text-gradient {
    background: linear-gradient(135deg, #10D0C3 0%, #0D9E94 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- COMPONENTS --- */
.btn-primary-sm {
    background-color: var(--color-primary);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
}
.btn-primary-sm:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(16, 208, 195, 0.3); }

.store-buttons { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 32px; }
.store-btn img { height: 48px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.store-btn:hover img { transform: scale(1.08) translateY(-4px); filter: drop-shadow(0 10px 15px rgba(16, 208, 195, 0.3)); }

/* --- HEADER --- */
.navbar { height: var(--header-height); display: flex; align-items: center; position: sticky; top: 0; background: rgba(var(--bg-body), 0.85); backdrop-filter: blur(12px); z-index: 100; border-bottom: 1px solid var(--border-color); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 40px; width: auto; border-radius: 10px; } 
.logo-text { font-weight: 800; font-size: 1.5rem; }
.logo-text .highlight { color: var(--color-primary); }

.nav-actions { display: flex; gap: 16px; align-items: center; }

/* ИСПРАВЛЕНО: Переключатель языков (Cross-browser fix) */
.lang-select { 
    /* Отключаем стандартные стили браузера */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    padding: 8px 32px 8px 16px; /* Место справа для стрелки */
    border-radius: 20px; 
    border: 1px solid var(--border-color); 
    background-color: var(--bg-surface);
    color: var(--text-main);
    
    font-family: inherit; 
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer; 
    outline: none;
    transition: all 0.3s ease;
    
    /* Кастомная стрелочка (SVG) */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310D0C3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    
    min-width: 70px;
}

.lang-select:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(16, 208, 195, 0.2);
}

.lang-select option {
    background-color: var(--bg-surface);
    color: var(--text-main);
    padding: 10px;
}

/* Кнопка темы (Общий стиль для хедера и футера) */
.theme-btn {
    background: transparent; 
    border: 1px solid var(--border-color);
    width: 40px; height: 40px;
    border-radius: 50%; 
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-main);
    transition: 0.3s;
    font-size: 1.2rem;
    padding: 0;
}
.theme-btn:hover { 
    background: var(--bg-input); 
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: rotate(15deg);
}
.theme-label { display: none; }
.icon-moon { display: none; }
body.dark-mode .icon-sun { display: none; }
body.dark-mode .icon-moon { display: block; }


/* --- HERO SECTION --- */
.hero { padding: 80px 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.badge-new { display: inline-block; background: var(--color-primary-soft); color: #0EB0A5; padding: 6px 14px; border-radius: 20px; font-size: 0.875rem; font-weight: 600; margin-bottom: 24px; }

.phone-mockup { 
    position: relative; border-radius: 40px; overflow: hidden; 
    box-shadow: var(--shadow-brand-soft); 
    max-width: 320px; margin: 0 auto; z-index: 2; 
    border: 8px solid var(--bg-surface);
    transition: all 0.5s ease;
}
.glow-effect { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 120%; height: 80%; background: var(--color-primary); filter: blur(90px); opacity: 0.4; z-index: -1; border-radius: 50%; }

/* --- HOW IT WORKS --- */
.section { padding: 100px 0; }
.text-center { text-align: center; max-width: 600px; margin: 0 auto 60px; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

.step-card { 
    background: var(--bg-surface); padding: 40px 24px; border-radius: var(--radius-lg); text-align: center; 
    box-shadow: var(--shadow-brand-soft);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.step-card:hover { transform: translateY(-12px) scale(1.02); box-shadow: var(--shadow-brand-strong); }
.step-icon { font-size: 3rem; margin-bottom: 20px; }

/* --- BENEFITS --- */
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.benefit-card {
    background: var(--bg-surface); padding: 40px 30px; border-radius: var(--radius-lg); text-align: left;
    box-shadow: var(--shadow-brand-soft);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}
.benefit-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-brand-strong); }
.benefit-icon-wrapper {
    width: 64px; height: 64px; background-color: var(--color-primary-soft);
    border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px;
    transition: transform 0.3s ease;
}
.benefit-card:hover .benefit-icon-wrapper { transform: scale(1.1) rotate(5deg); }
.benefit-icon { font-size: 2rem; }
.benefit-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.benefit-card p { font-size: 1rem; color: var(--text-body); margin-bottom: 0; }

/* --- PHILOSOPHY & GRID 2 --- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; }
.label { color: var(--color-primary); font-weight: 700; letter-spacing: 0.05em; margin-bottom: 12px; display: block; text-transform: uppercase; font-size: 0.85rem; }

/* --- FEATURES --- */
.features-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.feature-card {
    background: var(--bg-surface); border-radius: var(--radius-lg); overflow: hidden; position: relative;
    padding: 40px 30px 0 30px; display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%;
    box-shadow: var(--shadow-brand-soft);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.feature-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-brand-strong); z-index: 10; }
.feature-card.big { background: linear-gradient(180deg, var(--bg-surface) 0%, var(--color-primary-soft) 100%); }
.feature-card.small { background: linear-gradient(180deg, var(--color-primary-soft) 0%, var(--bg-surface) 100%); }
.feature-card .text { margin-bottom: 30px; z-index: 2; }
.feature-img {
    width: 80%; max-width: 280px; border-top-left-radius: 20px; border-top-right-radius: 20px;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1); display: block; margin-top: auto;
    transform: translateY(10px); transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.feature-card:hover .feature-img { transform: translateY(0); }

/* --- ZERO WASTE --- */
.zero-waste {
    background: linear-gradient(135deg, #163333 0%, #0D2626 100%); color: #fff; padding: 80px 0;
    box-shadow: 0 20px 60px rgba(16, 208, 195, 0.15); border-radius: var(--radius-lg);
    margin: 100px auto; max-width: var(--container-width);
}
.zero-waste .container { padding: 0 40px; }
.zero-waste h2, .zero-waste p { color: #fff; }
.zero-waste .zw-subtitle { font-size: 1.5rem; font-weight: 300; margin-bottom: 24px; opacity: 0.9; }

/* --- FOOTER & THEME TOGGLE --- */
footer { padding: 60px 0; border-top: 1px solid var(--border-color); margin-top: 0; background: var(--bg-surface); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 32px; }
.footer-top { display: flex; align-items: center; gap: 30px; }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.9rem; color: var(--text-body); border-bottom: 1px solid transparent; }
.footer-links a:hover { color: var(--color-primary); border-color: var(--color-primary); }
.copyright { font-size: 0.8rem; color: #9CA3AF; }

/* --- MOBILE --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-grid, .grid-2, .steps-grid, .features-grid, .benefits-grid { grid-template-columns: 1fr; }
    .hero { text-align: center; }
    .hero-image { order: 2; } .hero-content { order: 1; }
    .phone-mockup { max-width: 280px; }
    .store-buttons { justify-content: center; }
    .nav-actions .btn-primary-sm { display: none; } 
    .zero-waste .image-wrapper { order: 1; margin-bottom: 30px; }
    .zero-waste .content-wrapper { order: 2; text-align: center; }
    .zero-waste { margin: 60px 20px; width: auto; border-radius: 24px; }
    .zero-waste .container { padding: 0; }
    .footer-links { flex-direction: column; align-items: center; gap: 16px; }
}

/* --- SCROLL ANIMATION --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    will-change: opacity, transform; 
}

.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

.hero-content, .hero-image { animation: fadeUp 1s ease-out forwards; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* --- SPLASH SCREEN STYLES --- */
body.splash-active { overflow: hidden; }
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-body); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s ease-out, visibility 0.8s;
}
#splash-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-content { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.splash-logo-wrapper { width: 160px; height: 160px; position: relative; animation: breathEffect 2s ease-in-out infinite; animation-delay: 3s; }
.splash-part { position: absolute; width: 85px; height: 85px; object-fit: fill; }
.part-tl { top: 0; left: 0; animation: flyInTL 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.part-tr { top: 0; right: 0; animation: flyInTR 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.part-bl { bottom: 0; left: 0; animation: flyInBL 2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.part-br { bottom: 0; right: 0; opacity: 0; animation: flyInBR 2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; animation-delay: 0.4s; }
@keyframes flyInTL { 0% { transform: translate(-100vw, -100vh) rotate(1800deg); } 100% { transform: translate(0, 0) rotate(0deg); } }
@keyframes flyInTR { 0% { transform: translate(100vw, -100vh) rotate(-1800deg); } 100% { transform: translate(0, 0) rotate(0deg); } }
@keyframes flyInBL { 0% { transform: translate(-100vw, 100vh) rotate(-1800deg); } 100% { transform: translate(0, 0) rotate(0deg); } }
@keyframes flyInBR { 0% { transform: translate(100vw, 100vh) rotate(1800deg); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(0, 0) rotate(0deg); opacity: 1; } }
@keyframes breathEffect { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.splash-text { margin-top: 50px; font-size: 34px; letter-spacing: 1.2px; font-weight: 800; font-family: 'Nunito', sans-serif; color: var(--text-main); opacity: 0; transform: translateY(20px); animation: textFadeUp 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; animation-delay: 1.8s; }
.splash-text .highlight { color: var(--color-primary); }
@keyframes textFadeUp { to { opacity: 1; transform: translateY(0); } }

/* --- LEGAL PAGES STYLES --- */
.legal-section {
    padding: 120px 20px 60px; /* Отступ сверху побольше, так как хедер фиксирован */
    background-color: var(--bg-color);
    min-height: 80vh;
}

.legal-container {
    max-width: 800px; /* Узкая колонка для удобного чтения */
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    color: var(--text-color);
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.legal-date {
    display: block;
    margin-bottom: 40px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.legal-content p, .legal-content li {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.legal-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .legal-container {
        padding: 20px;
    }
    .legal-content h1 {
        font-size: 2rem;
    }
}