/* ========== ROOT VARIABLES ========== */
:root {
    --primary: #6c3bf1;
    --primary-dark: #5228c7;
    --secondary: #f0f4ff;
    --bg: #ffffff;
    --text: #0a0a0a;
    --text-muted: #475569;
    --glass: rgba(255, 255, 255, 0.15);
    --shadow: 0 20px 50px rgba(108, 59, 241, 0.15);
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius: 28px;
}
[data-theme="dark"] {
    --bg: #0b0b1a;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --secondary: #111128;
    --glass: rgba(255, 255, 255, 0.05);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}
body {
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    cursor: none;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.section-padding { padding: 100px 5%; }
.container { max-width: 1200px; margin: 0 auto; }

/* ========== PRELOADER ========== */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.8s, visibility 0.8s;
}
#preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-ring {
    width: 70px; height: 70px;
    border: 4px solid var(--secondary);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.loader-text { font-size: 2rem; font-weight: 800; margin-top: 20px; }
.loader-text span { color: var(--primary); }
.loader-progress {
    width: 200px; height: 4px;
    background: var(--secondary);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
}
.progress-bar {
    width: 0%; height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== CUSTOM CURSOR ========== */
.cursor-dot {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s;
}
.cursor-ring {
    width: 40px; height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, border-color 0.3s;
}
body:hover .cursor-dot { width: 12px; height: 12px; }
body:hover .cursor-ring { width: 50px; height: 50px; border-color: var(--primary); }

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 5%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}
[data-theme="dark"] .navbar { background: rgba(11, 11, 26, 0.8); }
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.logo { font-size: 1.8rem; font-weight: 800; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 2.5rem; }
.nav-links a {
    font-weight: 600;
    position: relative;
    transition: color 0.3s;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.theme-toggle {
    background: var(--secondary);
    border: none;
    border-radius: 50%;
    width: 44px; height: 44px;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}
.theme-toggle:hover { transform: rotate(30deg); }
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger span {
    width: 28px; height: 3px;
    background: var(--text);
    border-radius: 10px;
    transition: var(--transition);
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 5% 80px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}
#particlesCanvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
}
.floating-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: float 12s infinite alternate ease-in-out;
}
.shape1 { width: 400px; height: 400px; background: var(--primary); top: -10%; left: -5%; }
.shape2 { width: 500px; height: 500px; background: #ff6b6b; bottom: -20%; right: -10%; animation-delay: 3s; }
.shape3 { width: 300px; height: 300px; background: #48dbfb; top: 40%; left: 60%; animation-delay: 6s; }
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 10;
}
.badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 60px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(108, 59, 241, 0.3);
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero h1::after {
    content: '|';
    animation: blink 0.8s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.hero p {
    font-size: 1.3rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 40px;
}
.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* ========== BUTTONS ========== */
.btn-primary {
    padding: 16px 44px;
    border-radius: 60px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border: none;
    transition: var(--transition);
    display: inline-block;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(108, 59, 241, 0.3);
}
.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 45px rgba(108, 59, 241, 0.45);
}
.btn-secondary {
    padding: 16px 44px;
    border-radius: 60px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    border: 2px solid var(--text);
    transition: var(--transition);
    display: inline-block;
}
.btn-secondary:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-5px);
}

/* ========== SECTION HEADER ========== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
}
.section-header h2 span { color: var(--primary); }
.section-header p { color: var(--text-muted); font-size: 1.1rem; margin-top: 10px; }

/* ========== CARDS ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}
.premium-card {
    background: var(--bg);
    padding: 40px 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.premium-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(108, 59, 241, 0.2);
}
.premium-card .card-icon { font-size: 3.5rem; margin-bottom: 20px; display: block; }
.premium-card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.premium-card p { color: var(--text-muted); line-height: 1.6; }
.card-hover-line {
    position: absolute;
    bottom: 0; left: 0;
    width: 0%; height: 4px;
    background: var(--primary);
    transition: var(--transition);
}
.premium-card:hover .card-hover-line { width: 100%; }

/* ========== STATS ========== */
.stats { background: var(--secondary); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 40px;
    text-align: center;
}
.stat-item .counter {
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary);
    display: block;
}
.stat-item p { font-weight: 600; color: var(--text-muted); margin-top: 8px; }

/* ========== TESTIMONIALS ========== */
.testimonial-slider {
    position: relative;
    overflow: hidden;
}
.testimonial-track {
    display: flex;
    transition: transform 0.6s ease;
}
.testimonial-card {
    min-width: 100%;
    padding: 40px;
    background: var(--bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.testimonial-card p {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text);
}
.testimonial-card h4 { color: var(--primary); }
.slider-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}
.slider-controls button {
    background: var(--secondary);
    border: none;
    padding: 12px 20px;
    border-radius: 60px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text);
}
.slider-controls button:hover { background: var(--primary); color: #fff; }

/* ========== FAQ ACCORDION ========== */
.accordion-item {
    border-bottom: 1px solid var(--secondary);
    padding: 18px 0;
}
.accordion-header {
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    user-select: none;
}
.accordion-header::after {
    content: '+';
    font-size: 1.8rem;
    color: var(--primary);
    transition: var(--transition);
}
.accordion-item.active .accordion-header::after { transform: rotate(45deg); }
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s;
    color: var(--text-muted);
    line-height: 1.6;
}
.accordion-item.active .accordion-body {
    max-height: 200px;
    padding-top: 15px;
}

/* ========== CONTACT ========== */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
#contactForm input, #contactForm textarea {
    padding: 16px 20px;
    border-radius: 16px;
    border: 2px solid var(--secondary);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    transition: var(--transition);
}
#contactForm input:focus, #contactForm textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(108, 59, 241, 0.1);
}
.form-message { text-align: center; font-weight: 600; margin-top: 10px; }

/* ========== FOOTER ========== */
.footer {
    background: var(--secondary);
    padding: 50px 5% 20px;
    margin-top: 40px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-brand h3 { font-size: 2rem; }
.footer-brand h3 span { color: var(--primary); }
.footer-links { display: flex; gap: 30px; }
.footer-links a { font-weight: 600; transition: color 0.3s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 20px;
    color: var(--text-muted);
}

/* ========== SCROLL TOP ========== */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(108, 59, 241, 0.3);
}
.scroll-top.visible {
    opacity: 1;
    transform: scale(1);
}
.scroll-top:hover { transform: translateY(-5px) scale(1.05); }

/* ========== REVEAL ANIMATIONS ========== */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 30px;
        gap: 20px;
        border-bottom: 1px solid var(--secondary);
    }
    .nav-links.active { display: flex; }
    .hamburger { display: flex; }
    .hero h1 { font-size: 2.8rem; }
    .section-header h2 { font-size: 2.2rem; }
    .stat-item .counter { font-size: 2.8rem; }
    .testimonial-card p { font-size: 1.1rem; }
    .footer-content { flex-direction: column; text-align: center; }
}
