/* --- 1. CORE VARIABLES & RESET --- */
:root {
    /* --- DARK THEME (PREMIUM BORDEAUX) --- */
    
    /* Основной фон (Градиент задается в body, здесь резервный цвет) */
    --color-bg: #1c0304; 
    
    /* Поверхности (Карточки): Полупрозрачный глубокий бордовый */
    --glass-bg: rgba(60, 10, 15, 0.4);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: blur(20px);
    
    /* Цвета бренда */
    --color-primary: #800000;       /* Насыщенный бордовый */
    --color-primary-light: #a3151a; /* Светлее для ховеров */
    
    /* ЗОЛОТО (Акценты) */
    --color-accent: #d4af37;        /* Основное золото */
    --color-accent-hover: #f1c85a;  /* Светлое золото */
    
    /* Текст */
    --color-text-main: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.7);
    
    /* Шрифты и анимации */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ease-apple: cubic-bezier(0.25, 1, 0.5, 1);
    --header-height: 70px;
}

/* --- LIGHT THEME (CLEAN & EXPENSIVE) --- */
body.light-theme {
    /* Фон: Теплый кремовый/белый */
    --color-bg: #F9F7F7;
    
    /* Поверхности: Чистый белый */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(128, 0, 0, 0.1);
    
    /* Бренд */
    --color-primary: #800000;
    --color-primary-light: #a3151a;
    
    /* Золото (чуть темнее для контраста на белом) */
    --color-accent: #b89628;
    --color-accent-hover: #d4af37;
    
    /* Текст: Темный шоколад/Бордо */
    --color-text-main: #2b0507;
    --color-text-muted: #6e5e5e;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Глубокий премиальный градиент по умолчанию */
    background: radial-gradient(circle at 50% 0%, #4a0e12 0%, #1c0304 60%, #0f0203 100%);
    background-color: var(--color-bg);
    background-attachment: fixed; /* Фиксируем фон для эффекта глубины */
    color: var(--color-text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.5;
    padding-top: var(--header-height);
    transition: background 0.4s ease, color 0.4s ease;
}

/* Переопределение фона для светлой темы */
body.light-theme {
    background: var(--color-bg) !important;
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
input, button { outline: none; font-family: inherit; }

/* --- 2. UTILITY CLASSES --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.section-padding { padding: 100px 0; }
.text-center { text-align: center; }

/* Текстовый градиент: от белого к серому (в темной) / от бордо к серому (в светлой) */
.text-gradient {
    background: linear-gradient(135deg, var(--color-text-main) 0%, var(--color-text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.accent-text { color: var(--color-accent); }
.primary-text { color: var(--color-primary); }

/* Icons */
.icon-svg {
    width: 32px; height: 32px;
    fill: var(--color-accent);
    margin-bottom: 20px;
    display: block;
}
.icon-sm { width: 20px; height: 20px; fill: currentColor; }
.icon-check { color: var(--color-accent); margin-right: 10px; }
.icon-inline { width: 24px; height: 24px; fill: currentColor; margin-right: 12px; flex-shrink: 0; }

/* --- 3. UI COMPONENTS --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 32px; font-size: 16px; font-weight: 600;
    border-radius: 100px;
    transition: transform 0.3s var(--ease-apple), box-shadow 0.3s ease, background 0.3s ease;
    cursor: pointer; letter-spacing: 0.02em; border: none;
    gap: 10px;
}

/* Primary Button: Bordeaux Gradient */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #4a0000 100%);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(128, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(128, 0, 0, 0.5);
    background: linear-gradient(135deg, #900000 0%, #600000 100%);
}

/* Secondary Button: Glass Outline */
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    color: var(--color-text-main);
    border: 1px solid var(--glass-border);
}
body.light-theme .btn-secondary {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: scale(1.03);
}

/* Gold Button: Solid Gold Gradient */
.btn-gold {
    background: linear-gradient(135deg, #d4af37 0%, #b89628 100%);
    color: #1c0304; /* Dark text for contrast on gold */
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-small { padding: 10px 20px; font-size: 13px; width: 100%; justify-content: center; }

/* --- GLASS CARDS (KEY ELEMENT) --- */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: 24px;
    padding: 32px;
    transition: transform 0.4s var(--ease-apple), border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column;
    height: 100%;
}
.glass-card:hover {
    transform: translateY(-5px);
    /* Gold glow on hover */
    border-color: rgba(212, 175, 55, 0.3); 
    background: rgba(80, 10, 20, 0.6);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Light Theme Card Overrides */
body.light-theme .glass-card {
    background: #FFFFFF;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.05);
}
body.light-theme .glass-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 20px 40px rgba(128,0,0,0.15);
    background: #FFFFFF;
}

/* Ambient Glow Spot (Decorative) */
.glow-spot {
    position: absolute; width: 500px; height: 500px;
    background: var(--color-primary); filter: blur(180px);
    border-radius: 50%; opacity: 0.4; z-index: 0; pointer-events: none;
}

/* --- 4. HEADER --- */
.header {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--header-height);
    background: rgba(28, 3, 4, 0.85); /* Dark Bordeaux Glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: all 0.3s ease;
}
body.light-theme .header { background: rgba(255, 255, 255, 0.95); border-color: rgba(0,0,0,0.05); }

.header-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}
.logo-header {
    width: 44px; height: 44px;
    border-radius: 50%; overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3); /* Gold border */
}
body.light-theme .logo-header { border-color: rgba(128, 0, 0, 0.2); }
.logo-header img { width: 100%; height: 100%; object-fit: cover; }

.nav-desk { display: flex; gap: 24px; align-items: center; }
.nav-link { font-size: 14px; color: var(--color-text-muted); font-weight: 500; }
.nav-link:hover { color: var(--color-accent); }

.promo-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--color-accent);
    color: var(--color-accent); font-size: 13px; font-weight: 600;
    padding: 8px 16px; border-radius: 20px;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
}
body.light-theme .promo-badge { background: var(--color-primary); color: white; border: none; }

.theme-toggle {
    cursor: pointer;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    transition: 0.3s;
}
body.light-theme .theme-toggle { background: rgba(0,0,0,0.05); border-color: rgba(0,0,0,0.1); }
.theme-toggle svg { width: 20px; height: 20px; fill: var(--color-text-main); }

.burger { display: none; cursor: pointer; color: var(--color-text-main); font-size: 24px; }

/* --- 5. ANIMATIONS --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s var(--ease-apple); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }

/* --- 6. SECTIONS --- */

/* HERO */
.hero {
    min-height: 90vh;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
    padding: 60px 0;
}
.hero-content {
    text-align: center; max-width: 900px;
    margin: 0 auto; z-index: 2;
}
.hero h1 {
    font-size: clamp(40px, 6vw, 76px);
    font-weight: 800; line-height: 1.1; margin-bottom: 24px;
}
.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--color-text-muted); margin-bottom: 40px;
    font-weight: 400; max-width: 700px; margin-left: auto; margin-right: auto;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }

/* HERO CARDS */
.hero-cards-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; margin-top: 40px;
}
.hero-info-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 24px; border-radius: 16px; text-align: left;
    backdrop-filter: blur(10px);
}
body.light-theme .hero-info-card { background: #FFFFFF; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }

.hic-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hic-icon { width: 24px; height: 24px; fill: var(--color-accent); }
.hic-title { color: var(--color-accent); font-weight: 700; font-size: 18px; }
.hic-sub { color: var(--color-text-main); font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.hic-text { color: var(--color-text-muted); font-size: 13px; line-height: 1.4; }

/* ADVANTAGES */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
h3 { font-size: 22px; margin-bottom: 12px; font-weight: 600; color: var(--color-text-main); }
p { color: var(--color-text-muted); font-size: 15px; line-height: 1.6; }

/* PRICING */
.pricing-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.price-header { border-bottom: 1px solid var(--glass-border); padding-bottom: 20px; margin-bottom: 20px; }
.price-name { font-size: 18px; font-weight: 700; color: var(--color-accent); text-transform: uppercase; letter-spacing: 1px; }
.price-val { font-size: 32px; font-weight: 700; margin: 10px 0; color: var(--color-text-main); }
.price-val span { font-size: 14px; color: var(--color-text-muted); font-weight: 400; display: block; text-decoration: line-through; }
.price-list { margin-bottom: 30px; flex-grow: 1; }
.price-list li { margin-bottom: 12px; font-size: 14px; color: var(--color-text-muted); display: flex; align-items: flex-start; }

.popular-badge {
    position: absolute; top: 20px; right: 20px;
    background: var(--color-primary); color: #ffffff;
    font-size: 10px; font-weight: 800; padding: 4px 10px;
    border-radius: 4px; text-transform: uppercase;
}

/* SERVICES TABLE */
.services-table { width: 100%; border-collapse: collapse; }
.services-table td { padding: 12px 0; border-bottom: 1px solid var(--glass-border); color: var(--color-text-muted); font-size: 15px; }
.services-table td:last-child { text-align: right; color: var(--color-text-main); font-weight: 600; }

.st-head-row td { padding-top: 24px !important; border-bottom: none !important; }
.st-head-content { display: flex; align-items: center; color: var(--color-accent); font-weight: 700; font-size: 18px; }
.st-icon { width: 24px; height: 24px; fill: var(--color-accent); margin-right: 10px; }

/* CATEGORIES */
.cat-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; }
.cat-item {
    width: 60px; height: 60px; border-radius: 12px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 18px; color: var(--color-text-main); transition: 0.3s;
}
body.light-theme .cat-item { background: #FFFFFF; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.cat-item:hover { background: var(--color-primary); border-color: var(--color-primary); color: #ffffff; }

/* IDL */
.idl-section { background: rgba(60, 10, 15, 0.2); border-top: 1px solid var(--glass-border); }
body.light-theme .idl-section { background: #FFFFFF; }

/* PDD TEST */
.test-container {
    max-width: 700px; margin: 0 auto; background: var(--glass-bg);
    border-radius: 30px; padding: 40px; border: 1px solid var(--glass-border);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); min-height: 400px;
    display: flex; flex-direction: column; justify-content: center;
    text-align: left;
}
body.light-theme .test-container { background: #FFFFFF; border-color: rgba(0,0,0,0.05); box-shadow: 0 20px 50px rgba(0,0,0,0.05); }

.question-text {
    font-size: 24px; font-weight: 600; margin-bottom: 40px;
    line-height: 1.4; color: var(--color-text-main);
}

.option-btn {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border);
    padding: 18px 24px; border-radius: 12px; color: var(--color-text-main);
    text-align: left; cursor: pointer; transition: all 0.2s ease;
    font-size: 16px; margin-bottom: 10px; display: flex; justify-content: space-between;
}
body.light-theme .option-btn { background: #F9F5F5; border-color: #E0E0E0; }
.option-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--color-accent); }
body.light-theme .option-btn:hover { background: #F0E6E6; border-color: var(--color-primary); }
.option-btn.correct { background: rgba(46, 204, 113, 0.2); border-color: #2ecc71; color: #2ecc71; }
.option-btn.wrong { background: rgba(231, 76, 60, 0.2); border-color: #e74c3c; color: #e74c3c; }

/* LOCATIONS */
.locations-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.location-info {
    color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; line-height: 1.6;
}
.loc-btns { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }

/* FOOTER */
footer { border-top: 1px solid var(--glass-border); padding: 60px 0 30px; background: #0f0203; }
body.light-theme footer { background: #FFFFFF; border-color: rgba(0,0,0,0.05); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
.foot-col h5 { color: var(--color-text-main); margin-bottom: 20px; font-weight: 700; }
.foot-col a { display: block; color: var(--color-text-muted); margin-bottom: 10px; font-size: 14px; }
.foot-col a:hover { color: var(--color-accent); }
.copy { border-top: 1px solid var(--glass-border); padding-top: 20px; color: var(--color-text-muted); font-size: 12px; text-align: center; }

/* MOBILE MENU */
.mob-menu {
    position: fixed; top: var(--header-height); left: 0; width: 100%; height: 0;
    background: rgba(28, 3, 4, 0.98); overflow: hidden; transition: 0.3s; z-index: 900;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
}
body.light-theme .mob-menu { background: rgba(255, 255, 255, 0.98); }
.mob-menu.open { height: calc(100vh - var(--header-height)); }
.mob-link { font-size: 24px; font-weight: 600; color: var(--color-text-main); }

@media (max-width: 900px) {
    .nav-desk { display: none; }
    .burger { display: block; }
    .header-promo { display: none; }
    .hero-cards-grid { grid-template-columns: 1fr; }
    .hero-content { text-align: left; }
    .hero-subtitle { margin-left: 0; margin-right: 0; }
    .hero-buttons { justify-content: flex-start; }
    h1 { font-size: 40px; }
}