/* --- 1. DESIGN TOKENS & VARIABLES --- */
:root {
    /* Dark Theme (Primary DNA) */
    --bg: #0b0f1a;
    --surface: #151b27;
    --surface-accent: #1c2433;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #cbd5e1;
    --accent: #9333ea;
    --accent-glow: rgba(147, 51, 234, 0.45);
    --border: #1f2937;
    --nav-blur: rgba(11, 15, 26, 0.85);
    
    /* Modular Scale 2.19 (Based on 16px) */
    --h1: 3.75rem;   /* ~60px */
    --h2: 2.25rem;   /* ~36px */
    --h3: 1.125rem;  /* ~18px */
    --base: 1rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-accent: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #64748b;
    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.15);
    --border: #e5e7eb;
    --nav-blur: rgba(249, 250, 251, 0.85);
}

/* --- 2. BASE RESET & PERFORMANCE FIXES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    /* PERFORMANCE FIX: font-display swap priority with system fallbacks */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s ease;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* --- 3. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-blur);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

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

.nav-btn {
    background: #fff;
    color: #0b0f1a !important;
    padding: 0.6rem 1.4rem;
    border-radius: 99px;
    font-weight: 700 !important;
    transition: var(--transition);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

/* --- 4. HERO SECTION (EXPENSIVE GLOW EFFECT) --- */
.hero {
    padding: 12rem 5% 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.glow-bg {
    position: absolute;
    top: 45%; 
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 900px;
    height: 600px;
    z-index: -1;
    pointer-events: none;
}

.glow-bg::before {
    content: '';
    position: absolute;
    inset: -100px;
    background: radial-gradient(
        circle at center, 
        rgba(147, 51, 234, 0.55) 0%,   /* High-End Saturation */
        rgba(147, 51, 234, 0.25) 35%, 
        transparent 70%
    );
    filter: blur(100px);
    animation: pulseGlow 10s ease-in-out infinite;
}

.glow-bg::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 480px; height: 320px;
    background: radial-gradient(circle at center, rgba(168, 85, 247, 0.65) 0%, transparent 75%);
    filter: blur(50px);
    opacity: 0.95;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.1); opacity: 1; }
}

h1 {
    font-size: var(--h1);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.05em;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* --- 5. BUTTONS --- */
.hero-actions { display: flex; gap: 1.25rem; }

.btn-primary { 
    background: var(--accent); color: #fff; padding: 1rem 2.2rem; border-radius: 99px; 
    text-decoration: none; font-weight: 700; transition: var(--transition); 
    box-shadow: 0 10px 25px var(--accent-glow);
}

.btn-primary:hover { transform: translateY(-3px); background: #a855f7; }

.btn-secondary { 
    background: rgba(11, 15, 26, 0.5); backdrop-filter: blur(10px);
    border: 1px solid var(--border); color: var(--text-primary); 
    padding: 1rem 2.2rem; border-radius: 99px; text-decoration: none; font-weight: 600;
}

/* --- 6. FEATURES (PERFORMANCE OPTIMIZED) --- */
.features { padding: 2rem 5% 8rem; }
.section-intro { text-align: center; margin-bottom: 4rem; }
.section-intro h2 { font-size: var(--h2); margin-bottom: 0.75rem; font-weight: 800; }

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 3rem 2.5rem;
    border-radius: 16px;
    transition: var(--transition);
}

.feature-card:hover { border-color: var(--accent); transform: translateY(-10px); }

/* PERFORMANCE FIX: Reserved space for icons to prevent Layout Shift (CLS) */
.icon-box {
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px; 
    min-height: 56px;
}

.feature-card h3 { font-size: var(--h3); margin-bottom: 1rem; font-weight: 700; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* --- 7. SUBPAGES & PRICING --- */
.subpage-header {
    padding: 10rem 5% 5rem;
    text-align: center;
    background: linear-gradient(to bottom, var(--surface), var(--bg));
    border-bottom: 1px solid var(--border);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.price-card {
    padding: 3.5rem 2.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-align: center;
}

.price-card.featured { border-color: var(--accent); box-shadow: 0 0 40px var(--accent-glow); transform: scale(1.03); }
.price-card .amount { font-size: 3.5rem; font-weight: 800; margin: 1.5rem 0; }
.feature-list { list-style: none; margin: 2.5rem 0; text-align: left; }
.feature-list li { margin-bottom: 1rem; font-size: 0.95rem; display: flex; align-items: center; gap: 12px; color: var(--text-secondary); }
.feature-list i { color: var(--accent); }

/* --- 8. FAQ SECTION --- */
.faq-section { padding: 6rem 5% 8rem; max-width: 900px; margin: 0 auto; }
.faq-container { display: flex; flex-direction: column; gap: 1.5rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); padding: 2rem; border-radius: 16px; transition: var(--transition); }
.faq-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; display: flex; align-items: center; gap: 12px; }
.faq-item h3::before { content: 'Q:'; color: var(--accent); font-size: 0.9rem; }
.faq-item p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.7; }

/* --- 9. FOOTER --- */
footer { padding: 4rem 5%; border-top: 1px solid var(--border); text-align: center; background: var(--bg); }
.copyright { font-size: 0.85rem; color: var(--text-secondary); }

/* --- 10. MOBILE --- */
@media (max-width: 768px) {
    :root { --h1: 2.75rem; --h2: 1.85rem; }
    .nav-links { display: none; }
    .hero { padding: 10rem 5% 3rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .btn-primary, .btn-secondary { width: 100%; text-align: center; }
    .price-card.featured { transform: scale(1); }
}