/* --- CSS VARIABLES & RESET --- */
:root {
    --primary: #811c6b;
    --primary-dark: #5e144d;
    --primary-light: #9d2d85;
    --secondary: #f8f9fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-color: #e5e7eb;
    --code-bg: #1e1e1e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--secondary);
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
ul { list-style: none; }

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section { padding: 100px 0; }

.text-center { text-align: center; }

/* --- BUTTON STYLES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--primary);
    color: var(--white);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow);
    border: 2px solid var(--primary);
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(129, 28, 107, 0.2);
}

/* White Button for Hero */
.btn-white {
    background-color: var(--white);
    color: var(--primary);
    border: 2px solid var(--white);
}

.btn-white:hover {
    background-color: #f3f4f6;
    border-color: #f3f4f6;
    color: var(--primary-dark);
}

/* Transparent/Outline Button for Hero */
.btn-outline-white {
    background-color: rgba(255,255,255,0.1);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary);
    border-color: var(--white);
}

/* Version Text Style */
.version-text {
    margin-top: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

/* --- HEADER --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a:not(.btn) { font-weight: 500; font-size: 0.95rem; color: var(--text-dark); position: relative; }
.nav-links a:not(.btn):hover { color: var(--primary); }

.nav-links a.active { color: var(--primary); font-weight: 700; }

.download-nav { padding: 10px 24px; font-size: 0.9rem; }

.mobile-toggle { display: none; cursor: pointer; color: var(--text-dark); }
.close-menu { display: none; position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 2rem; color: var(--text-dark); }

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #4a0f3d 100%);
    color: var(--white);
    text-align: center;
    padding: 120px 0 160px 0;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 { font-size: 3.5rem; margin-bottom: 24px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.hero p { font-size: 1.25rem; opacity: 0.9; margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- DASHBOARD MOCKUP --- */
.dashboard-preview {
    max-width: 900px;
    margin: 60px auto -220px; /* Negative margin to pull it up into hero */
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.browser-bar {
    background: #f1f5f9;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.mockup-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    height: 400px; /* Fixed height for illustration */
    background: #f8fafc;
}

/* Skeleton UI Elements */
.sk-sidebar { background: white; border-radius: 8px; height: 100%; border: 1px solid #e2e8f0; }
.sk-main { display: flex; flex-direction: column; gap: 20px; }
.sk-header { height: 60px; background: white; border-radius: 8px; border: 1px solid #e2e8f0; display: flex; align-items: center; padding: 0 20px; justify-content: space-between; }
.sk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sk-card { height: 100px; background: white; border-radius: 8px; border: 1px solid #e2e8f0; padding: 15px; }
.sk-chart { flex-grow: 1; background: white; border-radius: 8px; border: 1px solid #e2e8f0; position: relative; overflow: hidden; }

/* Simulated Chart Line */
.sk-chart::after {
    content: '';
    position: absolute;
    bottom: 20px; left: 20px; right: 20px; height: 100px;
    background: linear-gradient(to top, rgba(129, 28, 107, 0.1), transparent);
    border-top: 3px solid var(--primary);
    border-radius: 4px;
}

.sk-line { height: 8px; background: #e2e8f0; border-radius: 4px; margin-bottom: 8px; }
.w-50 { width: 50%; } .w-75 { width: 75%; } .w-30 { width: 30%; }

/* --- TRUST BAR (NEW) --- */
.trust-bar {
    padding-top: 260px; /* Account for dashboard negative margin overlap */
    padding-bottom: 40px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
}
.trust-logos {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    opacity: 0.5;
    align-items: center;
}
.trust-item {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    filter: grayscale(100%);
    transition: 0.3s;
}
.trust-item:hover { filter: grayscale(0%); opacity: 1; color: var(--primary); }

/* --- SECTIONS COMMON --- */
.section-title { text-align: center; margin-bottom: 60px; }
.section-title h2 { font-size: 2.2rem; color: var(--primary); margin-bottom: 12px; font-weight: 700; }
.section-title p { font-size: 1.1rem; color: var(--text-light); }

/* --- FEATURES SECTION --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 35px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: 0.3s;
    border: 1px solid transparent;
}
.feature-card:hover { 
    transform: translateY(-5px); 
    border-color: rgba(129, 28, 107, 0.1);
    box-shadow: var(--shadow-lg);
}
.icon {
    font-size: 2rem; color: var(--primary); margin-bottom: 20px;
    background: #fdf2fa; width: 70px; height: 70px;
    line-height: 70px; border-radius: 50%; margin-left: auto; margin-right: auto;
}

/* --- CODE PREVIEW SECTION (NEW) --- */
.code-section { background: #111; color: #fff; position: relative; overflow: hidden; }
.code-container { display: flex; flex-wrap: wrap; align-items: center; gap: 50px; }
.code-text { flex: 1; min-width: 300px; }
.code-text h2 { font-size: 2.2rem; margin-bottom: 20px; color: #fff; }
.code-text p { color: #aaa; margin-bottom: 30px; font-size: 1.1rem; }

.code-window {
    flex: 1;
    min-width: 300px;
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid #333;
    font-family: 'Fira Code', monospace;
    overflow: hidden;
}
.code-header { background: #252526; padding: 10px 15px; display: flex; gap: 6px; border-bottom: 1px solid #333; }
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-content { padding: 20px; font-size: 0.9rem; line-height: 1.6; color: #d4d4d4; overflow-x: auto; }
.token.keyword { color: #c586c0; }
.token.string { color: #ce9178; }
.token.function { color: #dcdcaa; }
.token.comment { color: #6a9955; }

/* --- PRICING SECTION --- */
.plans-section { background-color: var(--white); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: start;
}

.plan-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    transition: 0.3s;
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.plan-card.popular {
    border: 2px solid var(--primary);
    background: #fdfbfc;
    transform: scale(1.02);
    z-index: 2;
}

.plan-card.popular:hover { transform: scale(1.02) translateY(-10px); }

.plan-badge {
    position: absolute;
    top: 0; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.plan-name { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin-bottom: 10px; }
.plan-price { font-size: 3rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 5px; }
.plan-period { color: var(--text-light); font-size: 0.9rem; margin-bottom: 30px; }

.plan-features { text-align: left; margin: 0 auto; max-width: 240px; }
.plan-features li { margin-bottom: 15px; display: flex; align-items: flex-start; font-size: 0.95rem; }
.check { color: var(--primary); margin-right: 10px; font-weight: bold; min-width: 20px; }
.cross { color: #dc2626; margin-right: 10px; font-weight: bold; min-width: 20px; opacity: 0.5; }
.unavailable { opacity: 0.6; }
.feature-note { display: block; font-size: 0.8rem; color: var(--text-light); margin-top: 2px; font-style: italic; }

/* --- TECH SPECS SECTION --- */
.specs-section { background: var(--secondary); border-top: 1px solid var(--border-color); }
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.spec-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}
.spec-icon { color: var(--text-light); }
.spec-info h4 { font-size: 0.9rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.spec-info p { font-weight: 700; color: var(--text-dark); }

/* --- TESTIMONIALS SECTION --- */
.testimonials-section { background: var(--white); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.testimonial-card {
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    position: relative;
}
.quote-icon { font-size: 3rem; color: rgba(129, 28, 107, 0.1); position: absolute; top: 20px; right: 20px; font-family: serif; }
.testimonial-text { font-style: italic; color: var(--text-dark); margin-bottom: 20px; position: relative; z-index: 1; }
.user-info { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; background: #ddd; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #666; }
.user-details h5 { font-size: 0.95rem; font-weight: 700; }
.user-details span { font-size: 0.8rem; color: var(--text-light); }

/* --- INSTALL SECTION --- */
.install-section { background: var(--secondary); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; counter-reset: step-counter; }
.step { position: relative; padding: 25px; background: var(--white); border-radius: 12px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.step::before {
    counter-increment: step-counter; content: counter(step-counter);
    position: absolute; right: 20px; top: 10px;
    font-size: 3rem; font-weight: 800; color: rgba(129, 28, 107, 0.05); z-index: 0;
}
.step h3 { position: relative; z-index: 1; margin-bottom: 10px; color: var(--primary); font-size: 1.2rem; }
.step p { position: relative; z-index: 1; color: var(--text-light); font-size: 0.95rem; }
.step code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9rem; color: var(--primary-dark); }

/* --- FINAL CTA --- */
.cta-section {
    background: linear-gradient(135deg, #2d1b2e 0%, #1a0518 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
}
.cta-content h2 { font-size: 2.5rem; margin-bottom: 15px; }
.cta-content p { font-size: 1.1rem; opacity: 0.8; margin-bottom: 30px; max-width: 600px; margin: 0 auto 30px; }

/* --- FAQ SECTION --- */
.faq-item { background: var(--white); margin-bottom: 15px; border-radius: 8px; border: 1px solid var(--border-color); overflow: hidden; }
.faq-question { padding: 20px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; user-select: none; }
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--primary); font-weight: 300; }
.faq-item.active .faq-question::after { content: '-'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 20px; color: var(--text-light); }
.faq-item.active .faq-answer { padding-bottom: 20px; max-height: 300px; }
.faq-container { max-width: 800px; margin: 0 auto; }

/* --- FOOTER --- */
footer { background: var(--text-dark); color: var(--white); text-align: center; padding: 60px 0 30px; border-top: 1px solid #374151; }
.footer-links { margin-bottom: 30px; display: flex; justify-content: center; gap: 20px; }
.footer-links a { color: #9ca3af; font-size: 0.9rem; }
.footer-links a:hover { color: var(--white); }
.support-email { font-size: 1.2rem; color: #dcbce4; font-weight: bold; display: block; margin-bottom: 10px; }
.copyright { padding-top: 20px; font-size: 0.85rem; color: #6b7280; }

/* --- MODAL (NEW) --- */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.modal.open { display: flex; opacity: 1; }
.modal-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal.open .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 15px; right: 15px; font-size: 1.5rem; cursor: pointer; color: #999; }
.modal h3 { font-size: 1.5rem; color: var(--primary); margin-bottom: 10px; }
.modal p { color: #666; margin-bottom: 25px; }
.modal input { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; }

/* --- DARK MODE --- */
[data-theme="dark"] {
    --secondary: #0f172a;
    --text-dark: #f8fafc;
    --text-light: #94a3b8;
    --white: #1e293b;
    --border-color: #334155;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] header { background: rgba(30, 41, 59, 0.9); }
[data-theme="dark"] .browser-bar { background: #334155; border-color: #475569; }
[data-theme="dark"] .mockup-body { background: #0f172a; }
[data-theme="dark"] .sk-sidebar, [data-theme="dark"] .sk-header, [data-theme="dark"] .sk-card, [data-theme="dark"] .sk-chart { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .sk-line { background: #334155; }
[data-theme="dark"] .plan-card.popular { background: #1e293b; }
[data-theme="dark"] .testimonial-card { background: #1e293b; }
[data-theme="dark"] .step { background: #1e293b; }
[data-theme="dark"] .step code { background: #334155; color: #e2e8f0; }
[data-theme="dark"] .faq-item { background: #1e293b; }
[data-theme="dark"] .close-menu { background: #334155; color: #fff; }
[data-theme="dark"] .nav-links { background-color: rgba(15, 23, 42, 0.98); }
[data-theme="dark"] .mobile-toggle { color: #f8fafc; }

/* Theme Toggle Button */
.theme-toggle { background: transparent; border: none; cursor: pointer; color: var(--text-dark); padding: 5px; display: flex; align-items: center; justify-content: center; transition: color 0.3s; }
.theme-toggle:hover { color: var(--primary); }
.sun-icon { display: none; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero h1 { font-size: 2.8rem; }
    .dashboard-preview { display: block; margin-top: 40px; margin-bottom: -150px; }
    .trust-bar { padding-top: 200px; }
    .code-container { flex-direction: column; }
    .code-window { width: 100%; }
}

@media (max-width: 768px) {
    section { padding: 60px 0; }
    
    /* Mobile Nav */
    .mobile-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 100%; height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
        box-shadow: none;
    }
    .nav-links.nav-active { right: 0; }
    .nav-links a:not(.btn) { font-size: 1.3rem; margin: 10px 0; }
    .close-menu { display: flex; justify-content: center; align-items: center; background: #f1f5f9; width: 44px; height: 44px; border-radius: 50%; }
    
    /* Hero */
    .hero { padding: 100px 0 60px 0; text-align: center; }
    .hero h1 { font-size: 2.2rem; }
    .dashboard-preview { margin: 40px 10px 0; height: 300px; margin-bottom: -180px;}
    .mockup-body { grid-template-columns: 1fr; }
    .sk-sidebar { display: none; } 
    .trust-bar { padding-top: 220px; }
    
    /* Sections */
    .pricing-grid { gap: 20px; }
    .plan-card.popular { transform: none; }
    .plan-card.popular:hover { transform: translateY(-5px); }
}   section { padding: 60px 0; }
    
    /* Mobile Nav */
    .mobile-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 100%; height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(8px);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
        box-shadow: none;
    }
    .nav-links.nav-active { right: 0; }
    .nav-links a:not(.btn) { font-size: 1.3rem; margin: 10px 0; }
    .close-menu { display: flex; justify-content: center; align-items: center; background: #f1f5f9; width: 44px; height: 44px; border-radius: 50%; }
    
    /* Hero */
    .hero { padding: 100px 0 60px 0; text-align: center; }
    .hero h1 { font-size: 2.2rem; }
    .dashboard-preview { margin: 40px 10px 0; height: 300px; margin-bottom: -180px;}
    .mockup-body { grid-template-columns: 1fr; }
    .sk-sidebar { display: none; } 
    .trust-bar { padding-top: 220px; }
    
    /* Sections */
    .pricing-grid { gap: 20px; }
    .plan-card.popular { transform: none; }
    .plan-card.popular:hover { transform: translateY(-5px); }
}