:root {
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --primary: #0a2540;
    --accent: #4353ff;
    --accent-hover: #3240d6;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --transition: 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 { color: var(--primary); }

.accent-text { color: var(--accent); }

/* --- REVEAL ANIMATION (Intersection Observer) --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- HERO SECTION --- */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    background: var(--bg-white);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 10px;
    font-weight: 800;
}

.hero-subtitle {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 20px;
    font-weight: 600;
}

.cursor {
    animation: blink 1s infinite;
    color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.cta-button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition), transform 0.2s;
}

.cta-button:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 83, 255, 0.2);
}

/* --- QUIZ SECTION --- */
#quiz-section {
    padding: 100px 0;
    text-align: center;
    /* Полупрозрачный темный слой + ваша картинка */
    background: linear-gradient(rgba(10, 37, 64, 0.7), rgba(10, 37, 64, 0.7)), 
                url('priscilla-du-preez-XkKCui44iM0-unsplash.jpg') center/cover no-repeat;
}

/* Заголовок секции белым на темном фоне */
#quiz-section h2 {
    color: var(--bg-white);
}

.quiz-container {
    background: var(--bg-white);
    max-width: 600px;
    margin: 40px auto 0;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.05);
    min-height: 250px;
    position: relative;
    overflow: hidden;
    color: var(--text-main); /* Возвращаем темный текст внутри формы */
}

.quiz-container h3 {
    color: var(--primary);
}

.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}
.quiz-step.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.quiz-btn {
    background: var(--bg-light);
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}
.quiz-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- LEAD FORM (Используется и в квизе, и в модалке) --- */
.lead-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}
.lead-form input {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

/* --- BENEFITS (FLIP CARDS) --- */
#benefits {
    padding: 80px 0;
    text-align: center;
    background: var(--bg-white);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.flip-card {
    background-color: transparent;
    height: 200px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.flip-card-front {
    background-color: var(--bg-light);
    color: var(--primary);
}

.flip-card-back {
    background-color: var(--primary);
    color: white;
    transform: rotateY(180deg);
}

/* --- STATS SECTION --- */
#stats {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary), #163a61);
    color: white;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    position: relative;
    z-index: 2;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 10px;
}

.stat-text {
    font-size: 1.1rem;
    font-weight: 300;
}

/* --- MODAL STYLES --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(-30px);
    transition: transform 0.3s ease;
    text-align: center;
    color: var(--text-main);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-content h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.modal-content p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
    transition: color var(--transition);
}

.close-btn:hover {
    color: var(--accent);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    #hero { height: auto; padding: 120px 0 80px; }
    .quiz-container, .modal-content { padding: 20px; }
}

/* --- СТИЛИ ДЛЯ ТРЕНАЖЕРА ФРАЗ --- */
#vocabulary-trainer { 
    padding: 100px 0; 
    text-align: center; 
    background: var(--bg-white); 
}
.section-subtitle { 
    color: var(--text-muted); 
    margin-bottom: 35px; 
    font-size: 1.1rem;
}
.vocab-tabs { 
    display: flex; 
    justify-content: center; 
    gap: 15px; 
    margin-bottom: 30px; 
    flex-wrap: wrap; 
}
.tab-btn { 
    background: var(--bg-light); 
    border: 1px solid #ddd; 
    padding: 12px 24px; 
    border-radius: 30px; 
    cursor: pointer; 
    font-weight: 600; 
    font-family: inherit;
    transition: var(--transition); 
}
.tab-btn.active, .tab-btn:hover { 
    background: var(--accent); 
    color: white; 
    border-color: var(--accent); 
}
.vocab-card { 
    max-width: 700px; 
    margin: 0 auto; 
    background: var(--bg-light); 
    padding: 35px; 
    border-radius: 16px; 
    border-left: 6px solid var(--accent); 
    text-align: left; 
    transition: opacity 0.2s ease; 
}
.vocab-card h3 { 
    font-size: 1.6rem; 
    margin-bottom: 15px; 
    color: var(--accent); 
}
.vocab-card p { 
    margin-bottom: 12px; 
    font-size: 1.05rem;
}

/* --- СТИЛИ ДЛЯ ТАЙМЛАЙНА --- */
#timeline-section { 
    padding: 100px 0; 
    text-align: center; 
    background: var(--bg-light); 
}
.timeline-container { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    max-width: 800px; 
    margin: 40px auto 0; 
    position: relative;
}
.timeline-item { 
    display: flex; 
    align-items: center; 
    background: var(--bg-white); 
    padding: 25px; 
    border-radius: 12px; 
    cursor: pointer; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: left;
}
.timeline-item:hover, .timeline-item.active { 
    border-color: var(--accent); 
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(67, 83, 255, 0.08);
}
.timeline-badge { 
    background: var(--primary); 
    color: white; 
    font-weight: 800; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-right: 25px;
    transition: background 0.3s ease;
}
.timeline-item.active .timeline-badge {
    background: var(--accent);
}
.timeline-content h3 { 
    font-size: 1.25rem; 
    margin-bottom: 5px; 
    transition: color 0.3s ease;
}
.timeline-item.active .timeline-content h3 {
    color: var(--accent);
}
.timeline-content p { 
    color: var(--text-muted); 
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Адаптив под мобилки */
@media (max-width: 600px) {
    .timeline-item { flex-direction: column; text-align: center; gap: 15px; }
    .timeline-badge { margin-right: 0; }
    .timeline-item:hover, .timeline-item.active { transform: translateY(-5px); }
}

/* --- ФИНАЛЬНАЯ ФОРМА ЗАЯВКИ --- */
#final-contact {
    padding: 100px 0;
    background: var(--bg-white);
    display: flex;
    justify-content: center;
}

.contact-box {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-light);
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.contact-box h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* --- ФУТЕР --- */
.footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .contact-box {
        padding: 30px 20px;
    }
}