/* --- 1. CORE VARIABLES --- */
:root {
    --bg-deep: #030014;
    --bg-card: rgba(17, 25, 40, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.9);
    
    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #00C6FF 0%, #0072FF 100%);
    --accent-gradient: linear-gradient(135deg, #FF00CC 0%, #333399 100%);
    --text-gradient: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
    --glow-conic: conic-gradient(from 180deg at 50% 50%, #2a8af6 0deg, #a853ba 180deg, #e92a67 360deg);
    
    /* Text */
    --text-white: #ffffff;
    --text-gray: #94a3b8;
    
    /* Spacing & Radius */
    --container: 1200px;
    --radius-xl: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    
    /* Effects */
    --glow-blue: 0 0 30px -5px rgba(0, 198, 255, 0.3);
    --border-glass: 1px solid rgba(255, 255, 255, 0.08);
    --backdrop: blur(16px);
}

/* --- 2. RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* FIX: This ensures sections don't hide behind the fixed nav */
section {
    scroll-margin-top: 100px; 
}

/* Premium Noise Texture */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

/* --- 3. UTILITIES --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; position: relative; z-index: 2; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.grid { display: grid; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }

/* Fluid Typography */
h1 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-weight: 700; letter-spacing: -0.02em; font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-weight: 600; font-size: 1.25rem; }

.gradient-text {
    background: var(--text-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- 4. COMPONENTS --- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
    width: fit-content;
}
.btn:active { transform: scale(0.95); }
.btn-primary { background: var(--text-white); color: var(--bg-deep); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.2); }
.btn-glow { background: var(--primary-gradient); color: white; box-shadow: 0 0 20px rgba(0, 114, 255, 0.3); }
.btn-glow:hover { box-shadow: 0 0 30px rgba(0, 114, 255, 0.6); transform: translateY(-2px); }
.btn-outline { background: rgba(255, 255, 255, 0.03); color: var(--text-white); border: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(10px); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.3); }

/* --- 5. SECTIONS --- */

/* Preloader */
#preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-deep); z-index: 20000; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease, visibility 0.5s; }
.loader { width: 40px; height: 40px; border: 3px solid rgba(255,255,255,0.1); border-radius: 50%; border-top-color: #00C6FF; animation: spin 1s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Navbar */
nav { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: rgba(3, 0, 20, 0.7); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 20px 0; transition: all 0.3s ease; }
nav.scrolled { padding: 15px 0; background: rgba(3, 0, 20, 0.95); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: 10px; text-decoration: none; color: white; }
.logo i { color: #00C6FF; font-size: 1.8rem; text-shadow: 0 0 15px rgba(0,198,255,0.4); }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--text-gray); font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: white; }
.mobile-toggle { display: none; background: none; border: none; color: white; font-size: 2rem; cursor: pointer; padding: 5px; }

/* Hero */
#hero { padding-top: 160px; padding-bottom: 80px; position: relative; text-align: center; }
.ambient-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(124,58,237,0.2) 0%, rgba(3,0,20,0) 70%); top: -200px; left: 50%; transform: translateX(-50%); z-index: 0; filter: blur(80px); animation: pulseGlow 6s infinite alternate; }
@keyframes pulseGlow { 0% { opacity: 0.5; transform: translateX(-50%) scale(1); } 100% { opacity: 0.8; transform: translateX(-50%) scale(1.1); } }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 100px; margin-bottom: 24px; font-size: 0.8rem; color: #00C6FF; font-weight: 600; backdrop-filter: blur(4px); }
.pulse-dot { width: 8px; height: 8px; background: #00C6FF; border-radius: 50%; box-shadow: 0 0 10px #00C6FF; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }
#hero p { font-size: 1.1rem; color: var(--text-gray); max-width: 600px; margin: 0 auto 40px; }
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Stats */
#stats { padding: 40px 0; border-top: 1px solid var(--border-glass); border-bottom: 1px solid var(--border-glass); background: rgba(255,255,255,0.01); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; text-align: center; }

/* Features (Bento Grid) - WITH CSS VISUALS */
#features { padding: 100px 0; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
.section-header span { color: #00C6FF; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; display: block; margin-bottom: 10px; }

.bento-grid { display: grid; grid-template-columns: 1fr; grid-auto-rows: minmax(250px, auto); gap: 24px; }

.bento-item {
    background: var(--bg-card);
    border: var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 32px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    min-height: 300px;
}
.bento-item:hover { border-color: rgba(255, 255, 255, 0.2); background: var(--bg-card-hover); }
.bento-content { position: relative; z-index: 2; width: 100%; }
.bento-icon { width: 48px; height: 48px; background: rgba(255,255,255,0.05); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; color: #00C6FF; border: 1px solid rgba(255,255,255,0.05); }
.bento-content h3 { font-size: 1.4rem; margin-bottom: 8px; }
.bento-content p { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 20px; }

/* --- CSS ONLY VISUALS (Replacing Images) --- */
.bento-visual { position: absolute; bottom: 0; right: 0; width: 100%; height: 50%; z-index: 1; display: flex; justify-content: flex-end; align-items: flex-end; pointer-events: none; background: linear-gradient(to top, rgba(17,25,40,1) 0%, rgba(17,25,40,0) 100%); }

/* Visual 1: Dashboard UI */
.ui-dashboard {
    width: 90%; height: 180px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    display: flex; flex-direction: column; gap: 10px;
    transform: translateY(10px) rotate(-3deg);
    transition: transform 0.4s ease;
}
.bento-item:hover .ui-dashboard { transform: translateY(0) rotate(0deg); }
.ui-header { width: 40%; height: 10px; background: rgba(255,255,255,0.1); border-radius: 5px; }
.ui-body { flex: 1; display: flex; gap: 10px; }
.ui-sidebar { width: 20%; height: 100%; background: rgba(255,255,255,0.05); border-radius: 5px; }
.ui-content { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ui-bar { width: 100%; height: 8px; background: rgba(0, 198, 255, 0.2); border-radius: 4px; }

/* Visual 2: Shield Security */
.ui-shield {
    width: 150px; height: 150px;
    border-radius: 50%;
    border: 2px dashed rgba(0, 198, 255, 0.3);
    position: relative;
    display: flex; align-items: center; justify-content: center;
    animation: spin 10s linear infinite;
}
.ui-shield i { font-size: 60px; color: #00C6FF; animation: none; }
.ui-shield-inner {
    position: absolute; width: 120px; height: 120px;
    background: rgba(0, 198, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

/* Visual 3: Database Stack */
.ui-db { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; transform: rotate(-5deg); }
.db-disk { width: 140px; height: 20px; background: #1e293b; border: 1px solid #334155; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.db-disk:nth-child(1) { background: #00C6FF; }
.db-disk:nth-child(2) { transform: translateX(10px); }
.db-disk:nth-child(3) { transform: translateX(20px); }

/* Visual 4: Analytics Chart */
.ui-chart { width: 160px; height: 100px; display: flex; align-items: flex-end; gap: 8px; transform: rotate(-5deg); }
.chart-bar { width: 100%; background: linear-gradient(to top, #0072FF, #00C6FF); border-radius: 4px 4px 0 0; opacity: 0.8; }

/* Media Queries for Grid */
@media(min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .bento-large { grid-column: span 2; }
    .bento-tall { grid-row: span 2; min-height: 550px; }
}
@media(min-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 300px); }
    .bento-large { grid-column: span 2; grid-row: auto; }
    .bento-tall { grid-row: span 2; }
    .nav-links { display: flex; }
    .mobile-toggle { display: none; }
}
@media(max-width: 1023px) {
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
    .btn.nav-cta { display: none; }
}

/* Tabs */
#interactive { padding: 80px 0; background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.3)); }
.tab-container { display: flex; flex-direction: column; gap: 30px; }
.tab-nav { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tab-btn { background: rgba(255,255,255,0.02); border: 1px solid transparent; text-align: left; padding: 20px; border-radius: 16px; color: var(--text-gray); cursor: pointer; transition: all 0.3s; display: flex; align-items: center; gap: 15px; }
.tab-btn.active { background: rgba(0, 198, 255, 0.1); border-color: rgba(0, 198, 255, 0.3); color: white; }
.tab-btn i { font-size: 1.5rem; color: #00C6FF; min-width: 30px; }
.tab-content-area { background: #0d0d1a; border: 1px solid #333; border-radius: 16px; overflow: hidden; min-height: 300px; position: relative; }
.tab-pane { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; visibility: hidden; transition: all 0.4s ease; display: flex; flex-direction: column; }
.tab-pane.active { opacity: 1; visibility: visible; }
.code-header { background: #1a1a2e; padding: 12px 20px; border-bottom: 1px solid #333; display: flex; align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ff5f56; }
.dot:nth-child(2) { background: #ffbd2e; }
.dot:nth-child(3) { background: #27c93f; }
.code-body { padding: 20px; font-family: 'Fira Code', monospace; color: #a9b7c6; font-size: 0.85rem; flex-grow: 1; overflow-x: auto; white-space: pre; }
.token-k { color: #cc7832; } .token-s { color: #6a8759; } .token-f { color: #ffc66d; }
@media(min-width: 900px) { .tab-container { flex-direction: row; align-items: flex-start; } .tab-nav { flex: 1; } .tab-content-area { flex: 1.5; min-height: 400px; } }

/* Testimonials */
#testimonials { padding: 80px 0; overflow: hidden; }
.marquee-container { width: 100%; overflow: hidden; white-space: nowrap; position: relative; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-content { display: inline-block; animation: marquee 40s linear infinite; }
.testimonial-card { display: inline-flex; flex-direction: column; width: 300px; margin: 0 15px; background: var(--bg-card); border: var(--border-glass); padding: 24px; border-radius: 20px; vertical-align: top; white-space: normal; }
.user-row { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 15px; }
.user-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Pricing */
#pricing { padding: 80px 0; }
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 30px; max-width: 900px; margin: 0 auto; }
.pricing-card { background: var(--bg-card); border: var(--border-glass); padding: 30px; border-radius: 24px; text-align: left; transition: 0.3s; position: relative; }
.pricing-card.popular { border: 1px solid #00C6FF; background: rgba(0, 198, 255, 0.03); box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5); }
.price-tag { font-size: 2.5rem; font-weight: 700; margin: 20px 0; }
.price-tag span { font-size: 1rem; color: var(--text-gray); font-weight: 400; }
.features-list { list-style: none; margin: 30px 0; }
.features-list li { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; color: #cbd5e1; font-size: 0.9rem; }
.features-list li i { color: #00C6FF; flex-shrink: 0; }
@media(min-width: 768px) { .pricing-grid { grid-template-columns: repeat(3, 1fr); align-items: stretch; } }

/* FAQ */
#faq { padding: 60px 0; max-width: 800px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid var(--border-glass); }
.accordion-btn { width: 100%; background: none; border: none; padding: 20px 0; text-align: left; color: white; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.accordion-btn i { transition: transform 0.3s; }
.accordion-btn.active i { transform: rotate(180deg); color: #00C6FF; }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; color: var(--text-gray); }
.accordion-content p { padding-bottom: 20px; font-size: 0.95rem; }

/* Footer */
footer { background: #01010a; padding: 60px 0 30px; border-top: 1px solid var(--border-glass); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 40px; }
.footer-col h5 { color: white; margin-bottom: 20px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-gray); text-decoration: none; transition: 0.2s; font-size: 0.9rem; }
.footer-col ul li a:hover { color: #00C6FF; }
@media(min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; } }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 20000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: #0f111a; width: 90%; max-width: 450px; padding: 30px; border-radius: 24px; border: 1px solid #333; transform: translateY(20px); transition: 0.3s; position: relative; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal h2 { margin-bottom: 10px; font-size: 1.8rem; }
.modal input { width: 100%; padding: 14px; background: rgba(255,255,255,0.05); border: 1px solid #333; border-radius: 10px; color: white; margin-bottom: 16px; outline: none; transition: 0.3s; font-size: 1rem; }
.modal input:focus { border-color: #00C6FF; box-shadow: 0 0 10px rgba(0,198,255,0.2); }

/* Mobile Menu */
.mobile-menu { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--bg-deep); z-index: 999; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px; transform: translateX(100%); transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1); }
.mobile-menu.active { transform: translateX(0); }
.mobile-menu a { font-size: 1.5rem; color: white; text-decoration: none; font-weight: 600; }
.close-menu { position: absolute; top: 30px; right: 30px; font-size: 2rem; background: none; border: none; color: white; cursor: pointer; }

/* Animation Utility */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }