/* Design tokens */
:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary: #0EA5E9;
    --accent: #10B981;
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #475569;
    --text-tertiary: #64748B;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--secondary));
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* Import display font for hero (logo-like) */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;900&display=swap');

/* Base Styles */
body {
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 6rem 0 5rem 0;
    background: linear-gradient(180deg, rgba(8,15,38,0.95) 0%, rgba(8,15,38,0.92) 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(14, 165, 233, 0.1));
    z-index: 0;
}

.hero-grid {
    display: block;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
    padding: 1rem 0;
}

.eyebrow {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    display: inline-block;
    background: rgba(255,255,255,0.03);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
}

.hero-content h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 4rem;
    line-height: 1.05;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #ffffff 0%, #cfe4ff 40%, #b5d1ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 6px 18px rgba(12,18,45,0.45);
    display: inline-block;
    padding-bottom: 0.25rem;
}

/* CTA prominence tweak */
.hero-actions { justify-content: center; }
.button.primary { padding: 1rem 1.75rem; font-size: 1.05rem; border-radius: 12px; box-shadow: 0 12px 40px rgba(12,18,45,0.32); }
.button.primary:hover { transform: translateY(-3px); box-shadow: 0 18px 60px rgba(12,18,45,0.38); }
.button.secondary { padding: 0.9rem 1.4rem; border-radius: 10px; }

/* Soft backdrop for hero to ensure legibility */
.hero-section { background-attachment: fixed; }
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(2,6,23,0.45), rgba(2,6,23,0.35));
    z-index: 0;
    pointer-events: none;
}

/* Slight letter spacing for hero title and smaller size on narrow screens */
.hero-content h1 { letter-spacing: -0.01em; }
@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
}

/* Hero animations */
@keyframes logo-reveal {
    0% { opacity: 0; transform: translateY(18px) scale(0.995); filter: blur(6px); }
    60% { opacity: 1; transform: translateY(-6px) scale(1.01); filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes slide-fade-up {
    0% { opacity: 0; transform: translateY(18px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes float-slow {
    0% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(-2deg); }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero-content h1,
    .hero-content .eyebrow,
    .hero-content .subtitle,
    .hero-actions .button,
    .hero-viz .viz-card {
        animation: none !important;
        transition: none !important;
    }
}

/* Apply animations with subtle staggering */
.hero-content h1 {
    animation: logo-reveal 900ms cubic-bezier(.22,.9,.29,1) both 0.15s;
    background-size: 200% 100%;
    animation-delay: 0.15s;
}

.eyebrow { animation: slide-fade-up 550ms cubic-bezier(.25,.8,.25,1) both 0s; }
.subtitle { animation: slide-fade-up 650ms cubic-bezier(.25,.8,.25,1) both 0.08s; }
.hero-actions .button { animation: slide-fade-up 720ms cubic-bezier(.25,.8,.25,1) both 0.18s; }
.hero-stats { animation: slide-fade-up 720ms cubic-bezier(.25,.8,.25,1) both 0.26s; }

.hero-content h1 {
    /* moving gradient effect */
    background-image: linear-gradient(90deg, #ffffff 0%, #cfe4ff 40%, #b5d1ff 100%);
    background-size: 200% 100%;
    animation: logo-reveal 900ms cubic-bezier(.22,.9,.29,1) both 0.12s, gradient-shift 6s linear infinite;
}

.hero-section::before { animation: gradient-shift 14s linear infinite; background-size: 300% 300%; }

.hero-content h1::after {
    content: '';
    display: block;
    height: 4px;
    width: 72px;
    margin-top: 0.75rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(79,70,229,0.95), rgba(14,165,233,0.95));
}

.subtitle {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.88);
    margin: 1rem 0 1.75rem 0;
    line-height: 1.6;
    max-width: 60ch;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.button {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.button.primary {
    background: linear-gradient(90deg, #4F46E5 0%, #0EA5E9 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(14,23,70,0.35);
}

.button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.button.secondary {
    background: rgba(255,255,255,0.06);
    color: white;
    border: 1px solid rgba(255,255,255,0.08);
}

.button.secondary:hover {
    background: var(--primary);
    color: white;
}

.button.large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.trust-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.trust-badge {
    font-size: 0.875rem;
    font-weight: 500;
}

.separator {
    color: var(--border);
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: var(--background);
}

.features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20%, 1fr)); /* Adjusted minmax for better card sizing */
    gap: 2rem;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr; /* Stack items on mobile */
    }
}

.feature-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
}

/* How Section */
.how-section {
    padding: 6rem 0;
    background: var(--surface);
}

.how-section h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.how-card {
    position: relative;
    padding: 2rem;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.step {
    position: absolute;
    top: -1rem;
    left: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.how-card h3 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

/* Quiz Section */
.quiz-section {
    padding: 6rem 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.quiz-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.quiz-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.quiz-section .button.primary {
    background: white;
    color: var(--primary);
}

.quiz-section .button.secondary {
    background: transparent;
    border-color: white;
    color: white;
}

/* Get Started Section */
.get-started-section {
    padding: 6rem 0;
    text-align: center;
    background: var(--surface);
}

.get-started-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.get-started-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 768px;
    margin: 0 auto 2rem;
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    height: 400px;
}

.mock-card {
    position: absolute;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.card-a {
    width: 280px;
    height: 320px;
    top: 0;
    right: 0;
    background: var(--gradient-primary);
    z-index: 3;
    transform: rotate(5deg);
}

.card-b {
    width: 280px;
    height: 320px;
    top: 20px;
    right: 20px;
    background: var(--surface);
    border: 2px solid var(--border);
    z-index: 2;
    transform: rotate(-5deg);
}

.card-c {
    width: 280px;
    height: 320px;
    top: 40px;
    right: 40px;
    background: var(--background);
    border: 2px solid var(--border);
    z-index: 1;
    transform: rotate(-15deg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .trust-row {
        justify-content: center;
    }

    .hero-illustration {
        height: 300px;
        margin-top: 2rem;
    }

    .mock-card {
        right: 50%;
        transform: translateX(50%) !important;
    }

    .card-b {
        top: 10px;
    }

    .card-c {
        top: 20px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.125rem;
    }

    .features-section h2,
    .how-section h2,
    .quiz-section h2,
    .get-started-section h2 {
        font-size: 2rem;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .button {
        width: 100%;
        justify-content: center;
    }
}

/* Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.feature-card { animation: float 4s ease-in-out infinite; }
.feature-card:nth-child(2) { animation-delay: 0.5s; }
.feature-card:nth-child(3) { animation-delay: 1s; }
.feature-card:nth-child(4) { animation-delay: 1.5s; }





.teachers-section .split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.teachers-section .card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 2rem; /* Adjust padding as needed */
}

.teachers-section .card h3 {
    margin-bottom: 0.5rem;
}

.teachers-section .card p {
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Allow paragraph to take available space */
}

.teachers-section .card .btn {
    width: auto; /* Allow buttons to size naturally */
    align-self: stretch; /* Make buttons fill the width of the card */
}

@media (max-width: 768px) {
    .teachers-section .card .btn {
        width: 100%; /* Full width buttons on small screens */
    }
}

/* Enhanced Hover effects for buttons in the teachers-section */
.teachers-section .card .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary-dark)); /* A more dynamic gradient */
    transform: translateY(-2px);color: white;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4); /* Enhanced shadow */
}

.teachers-section .card .btn-outline:hover {
   
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.3); /* Shadow for outline */
}

.teachers-section .card .btn-secondary:hover {
    background: var(--primary-color); /* Use primary color for secondary hover */
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4); /* Enhanced shadow */
}

.teachers-section .card .btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all var(--transition-normal); /* Ensure smooth transition */
}

.teachers-section .card .btn-ghost:hover {
    /* background: var(--primary-light); Light primary background on hover */
    color: var(--white);
     background: linear-gradient(135deg, var(--primary), var(--primary-light));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Styles for keywords and highlights in CTA section */
.cta-section .highlight {
    color: var(--secondary); /* Use a distinct color for highlights */
    font-weight: 700;
}

.cta-section .keyword {
    font-weight: 600;
    color: var(--primary); /* Use primary color for keywords */
}

/* Further enhance CTA card layout */
.cta-card {
    padding: 3rem; /* Increase padding for a more spacious look */
    border-radius: var(--radius-xl); /* Larger border-radius */
    background: var(--surface); /* Ensure a clean background */
    box-shadow: var(--shadow-lg); /* More prominent shadow */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* Space between elements */
}

.cta-card h2 {
    font-size: 2.8rem; /* Larger heading */
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.cta-card p {
    max-width: 800px; /* Limit paragraph width for readability */
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 0; /* Reset default paragraph margin */
}

.cta-actions {
    margin-top: 1.5rem; /* Add space above buttons */
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 768px) {
    .cta-card {
        padding: 2rem;
        gap: 1rem;
    }

    .cta-card h2 {
        font-size: 2rem;
    }

    .cta-card p {
        font-size: 1rem;
    }

    .cta-actions {
        flex-direction: column;
        width: 100%;
    }

    .cta-actions .button {
        width: 100%;
    }
}

/* Hero Stats Section Styling */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    justify-content: center; /* Center align on smaller screens */
}

.hero-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    min-width: 150px; /* Ensure a minimum width for each stat */
}

.hero-stats .stat-item strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.hero-stats .stat-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-stats .stat-item {
        width: 100%;
        max-width: 250px; /* Limit width on very small screens */
        margin: 0 auto;
    }
}

/* Initial hidden state for scroll animations */
.animate-hidden {
    opacity: 0;
    transform: translateY(40px); /* Start slightly below */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Smoother, longer transition */
}

/* Animation classes (example: fade-in-up) */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out; /* Explicit transition */
}

.slide-in-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Explicit transition */
}

.slide-in-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out; /* Explicit transition */
}
