/* Landing Page CSS */

:root {
    --bg-primary: #0a0f1a;
    --bg-secondary: #0d1320;
    --bg-card: #111827;
    --bg-card-hover: #1a2233;
    --border-color: #1e293b;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --gradient-1: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-2: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 15, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-blue);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-cta {
    padding: 0.625rem 1.25rem;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: all var(--transition-normal);
}

.nav-cta:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mobile-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.mobile-cta {
    padding: 0.75rem 1rem;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-blue);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-purple);
    bottom: 100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-cyan);
    top: 50%;
    right: 30%;
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--accent-blue);
    margin-bottom: 1.5rem;
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-blue);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Visual - Floating Cards */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 500px;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.float-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: cardFloat 6s ease-in-out infinite;
}

.card-math {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.card-physics {
    top: 35%;
    right: 5%;
    animation-delay: 1.5s;
}

.card-english {
    bottom: 25%;
    left: 5%;
    animation-delay: 3s;
}

.card-chem {
    bottom: 10%;
    right: 15%;
    animation-delay: 4.5s;
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.card-icon {
    font-size: 2rem;
}

.card-info {
    display: flex;
    flex-direction: column;
}

.card-subject {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
}

.card-badge.free {
    background: #10b981;
    color: white;
}

.card-badge.premium {
    background: #f59e0b;
    color: black;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    animation: bounce 2s ease-in-out infinite;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    animation: scroll 2s ease-in-out infinite;
}

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

@keyframes scroll {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(8px); }
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    background: var(--bg-secondary);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.feature-card {
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 2rem;
    background: var(--bg-primary);
}

.how-container {
    max-width: 1200px;
    margin: 0 auto;
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.step {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--border-color);
    line-height: 1;
    margin-bottom: 1rem;
}

.step-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-2);
    border-radius: var(--radius-lg);
    margin: 0 auto 1.5rem;
}

.step-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.step-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-arrow {
    color: var(--border-color);
    flex-shrink: 0;
}

.step-arrow svg {
    width: 32px;
    height: 32px;
}

/* CTA Section */
.cta-section {
    position: relative;
    padding: 6rem 2rem;
    background: var(--bg-secondary);
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.orb-cta {
    width: 500px;
    height: 500px;
    background: var(--accent-blue);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

.cta-container {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-cta {
    background: var(--gradient-1);
    color: white;
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.4);
}

/* Footer */
.footer {
    padding: 4rem 2rem 2rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
    opacity: 0.85;
}

.footer-column a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        margin: 0 auto 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 768px) {
    .nav,
    .nav-container {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .nav-container {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 6rem 1rem 4rem;
        min-height: auto;
    }
    
    .hero-bg {
        display: none; /* Hide heavy orbs on mobile */
    }
    
    .hero-title {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        padding: 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 3rem;
    }
    
    .stat {
        flex: 1 1 100px;
    }
    
    .stat-divider {
        display: none;
    }
    
    .hero-visual {
        display: none; /* Hide floating cards on small screens */
    }
    
    .features {
        padding: 4rem 1.25rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .how-it-works {
        padding: 4rem 1.25rem;
    }
    
    .cta-section {
        padding: 4rem 1.25rem;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   MOBILE FIXES (QA 2026-03-16)
   ============================================ */

@media (max-width: 768px) {
    /* Fix 1: Footer columns stacking + no overflow */
    .footer-links {
        flex-direction: column;
        gap: 2rem;
        width: 100%;
    }

    .footer-column {
        width: 100%;
    }

    /* Fix 2: gradient-orb clipping (decorative, not content) */
    .gradient-orb {
        max-width: 100vw;
        overflow: hidden;
    }

    /* Prevent orb from causing body overflow */
    .hero-section {
        overflow: hidden;
    }

    /* Fix 3: Landing nav container */
    .nav, .nav-container {
        max-width: 100vw;
        overflow-x: hidden;
        box-sizing: border-box;
    }
}
