/**
 * WAY TO CODE - MAIN STYLESHEET
 * Pure CSS, No frameworks, Mobile-first, High performance
 */

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Kid-friendly palette */
    --primary: #6C63FF;
    --primary-dark: #574BDB;
    --secondary: #FF6B9D;
    --accent: #FFC93C;
    --success: #00D9A3;
    --text-dark: #2D3142;
    --text-light: #6C7293;
    --bg-light: #F8F9FE;
    --white: #FFFFFF;
    --shadow: rgba(108, 99, 255, 0.1);

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-heading: 'Comic Sans MS', 'Chalkboard SE', 'Comic Neue', cursive;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==================== 3D CHARACTER ==================== */
#character-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    height: 400px;
    z-index: 999;
    pointer-events: none;
    transition: var(--transition);
}

#character-container canvas {
    border-radius: 20px;

}

/* Mobile adjustments */
@media (max-width: 768px) {
    #character-container {
        width: 200px;
        height: 280px;
        bottom: 10px;
        right: 10px;
    }
}

/* ==================== NAVIGATION ==================== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-sm) 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--white);
}

.nav-cta {
    background: var(--secondary);
    color: var(--white);
    padding: var(--space-xs) var(--space-md);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile menu */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-md);
        box-shadow: 0 10px 20px var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.2rem;
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: var(--space-xl);
    opacity: 0.9;
    animation: fadeInUp 1s ease;
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== SECTIONS ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: var(--space-xl);
}

/* ==================== FEATURES GRID ==================== */
.features {
    background: var(--white);
    padding: var(--space-xl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.feature-card {
    background: var(--bg-light);
    padding: var(--space-lg);
    border-radius: 16px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
}

.feature-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--primary);
}

/* ==================== CLASSES GRID ==================== */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.class-card {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: 16px;
    border: 2px solid transparent;
    transition: var(--transition);
    cursor: pointer;
}

.class-card:hover {
    border-color: var(--primary);
    transform: scale(1.03);
    box-shadow: 0 10px 30px var(--shadow);
}

.class-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-xs);
}

.class-age {
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.class-focus ul {
    list-style: none;
    padding-left: 0;
    margin-top: var(--space-xs);
}

.class-focus li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: bold;
}

.class-languages {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--bg-light);
    color: var(--text-light);
}

/* ==================== FORMS ==================== */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--bg-light);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: var(--space-md);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.1);
}

/* ==================== MESSAGES ==================== */
.messages-container {
    max-width: 600px;
    margin: var(--space-md) auto;
    padding: 0 var(--space-md);
}

.message {
    padding: var(--space-md);
    border-radius: 12px;
    margin-bottom: var(--space-sm);
    animation: slideIn 0.4s ease;
}

.message-success {
    background: #00D9A3;
    color: var(--white);
}

.message-error {
    background: #FF6B9D;
    color: var(--white);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
}

.footer-section h3,
.footer-section h4 {
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--space-xs);
}

.footer-section a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    margin-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ==================== CTA SECTION ==================== */
.cta-section {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: var(--space-xl);
    border-radius: 20px;
    margin: var(--space-xl) var(--space-md);
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: var(--space-lg);
    opacity: 0.9;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    :root {
        --space-xl: 2rem;
        --space-lg: 1.5rem;
    }

    .hero {
        min-height: 60vh;
    }

    .hero-cta {
        flex-direction: column;
    }

    .classes-grid {
        grid-template-columns: 1fr;
    }
}