/* =========================================
   CSQuiz - Landing Page Light Theme
   ========================================= */

/* ── Base reset (self-contained — no longer depends on style.css) ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, sans-serif;
}

/* Base page layout (block flow, not the centered flex card layout auth pages use) */
body {
    display: block !important;
    min-height: auto;
    background-color: #f8fafc;
    color: #0f172a;
}

/* --- Navbar (Glassmorphism) --- */
.navbar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    letter-spacing: 1px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text; /* Cleared cross-browser compatibility warning */
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    margin-left: 15px;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-links a:not(.btn-outline):not(.btn-primary) {
    color: #475569;
}

.btn-outline {
    color: #38bdf8;
    border: 2px solid #38bdf8;
}

.btn-outline:hover {
    background-color: #38bdf8;
    color: #0f172a;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Primary button (moved from style.css — used on nav, hero CTA) */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* --- Hero Section --- */
.hero {
    background: radial-gradient(circle at top right, #ffffff, #eef2f7);
    padding: 160px 20px 100px;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text; /* Cleared cross-browser compatibility warning */
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #475569;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-buttons a {
    display: inline-block;
    text-decoration: none;
    margin: 10px;
    width: auto !important; /* Fixes the styling layout conflict with full-width authentication buttons */
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #0f172a;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.08);
}

/* --- Features Section --- */
.features {
    padding: 80px 20px;
    background-color: #f8fafc;
}

/* Alternate shade for a second .features block on the same page (Subjects/How It Works) */
.features-alt {
    background-color: #eef2f7;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: #0f172a;
}

.feature-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.feature-card h3 {
    color: #0f172a;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-card p {
    color: #64748b;
    line-height: 1.6;
}

/* --- Footer --- */
.main-footer {
    text-align: center;
    padding: 30px;
    background-color: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}
/* =========================================
   Landing Page - Enhanced Animations & UX
   ========================================= */

/* ── Particle canvas background ── */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.2;
}

/* Ensure all sections sit above canvas */
.navbar, .hero, .features, .stats-bar, .how-it-works, .main-footer {
    position: relative;
    z-index: 1;
}

/* ── Navbar shrink on scroll ── */
.navbar {
    transition: padding 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 40px rgba(15, 23, 42, 0.1);
}

.navbar.scrolled .nav-container {
    padding-top: 10px;
    padding-bottom: 10px;
}

/* ── Hero enhancements ── */
.hero {
    background: radial-gradient(ellipse at 70% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 20% 80%, rgba(129, 140, 248, 0.07) 0%, transparent 50%),
                radial-gradient(circle at top right, #ffffff, #eef2f7);
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 6px 16px;
    border-radius: 99px;
    margin-bottom: 28px;
    text-transform: uppercase;
}

.hero-badge .badge-dot {
    width: 7px;
    height: 7px;
    background: #38bdf8;
    border-radius: 50%;
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* CTA button glow pulse */
.btn-primary.btn-large {
    animation: glow-pulse 2.5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3); }
    50%       { box-shadow: 0 4px 35px rgba(56, 189, 248, 0.6), 0 0 60px rgba(56, 189, 248, 0.15); }
}

.btn-primary.btn-large:hover {
    animation: none;
}

/* ── Stats bar ── */
.stats-bar {
    background: linear-gradient(135deg, #eff6ff 0%, #f1f5f9 100%);
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 40px 20px;
}

.stats-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    padding: 10px;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* ── How it works section ── */
.how-it-works {
    padding: 90px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.steps-grid {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    position: relative;
}

.step-card {
    text-align: center;
    padding: 36px 24px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: rgba(129, 140, 248, 0.35);
    box-shadow: 0 20px 40px rgba(129, 140, 248, 0.08);
}

.step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.step-card h3 {
    color: #1e293b;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.step-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Scroll-reveal base state ── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.15s; }
.reveal-delay-5 { transition-delay: 0.3s; }
.reveal-delay-6 { transition-delay: 0.45s; }

/* ── Hero content entry animation ── */
.hero-badge    { animation: fadeSlideUp 0.7s ease both; animation-delay: 0.1s; opacity: 0; }
.hero-content h1 { animation: fadeSlideUp 0.7s ease both; animation-delay: 0.25s; opacity: 0; }
.hero-content p  { animation: fadeSlideUp 0.7s ease both; animation-delay: 0.4s; opacity: 0; }
.hero-buttons    { animation: fadeSlideUp 0.7s ease both; animation-delay: 0.55s; opacity: 0; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Feature icon bounce on hover ── */
.feature-card:hover .feature-icon {
    animation: icon-bounce 0.5s ease;
}

@keyframes icon-bounce {
    0%   { transform: translateY(0); }
    35%  { transform: translateY(-10px); }
    65%  { transform: translateY(-5px); }
    85%  { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

/* ── Section title underline accent ── */
.section-title {
    position: relative;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    border-radius: 99px;
    margin: 14px auto 0;
}

/* ── Footer enhancements ── */
.main-footer {
    padding: 40px 30px;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-logo {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-copy {
    color: #64748b;
    font-size: 0.85rem;
}

/* ── Subjects grid: slightly narrower minimum than the default steps-grid ── */
.steps-grid-subjects {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ── "Coming Soon" badge on subject cards ── */
.badge-coming-soon {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #b45309;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(217, 119, 6, 0.3);
    padding: 2px 8px;
    border-radius: 99px;
    vertical-align: middle;
    margin-left: 6px;
}