/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS VARIABLES FOR DARK MODE ENGINE --- */
:root {
    --bg-main: #FAFAFA;
    --text-main: #0F172A;
    --text-muted: #475569;
    --border-color: #E2E8F0;
    --card-bg: #ffffff;
    --nav-bg: rgba(250, 250, 250, 0.8);
    --btn-bg: #0F172A;
    --btn-text: #ffffff;
    --gradient-1: #bae6fd;
    --gradient-2: #ddd6fe;
    --gradient-3: #fbcfe8;
}

[data-theme="dark"] {
    --bg-main: #0F172A;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #1E293B;
    --card-bg: #1E293B;
    --nav-bg: rgba(15, 23, 42, 0.8);
    --btn-bg: #F8FAFC;
    --btn-text: #0F172A;
    --gradient-1: #0369a1;
    --gradient-2: #4c1d95;
    --gradient-3: #be185d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    /* Hide default cursor for our custom trailing cursor */
    cursor: none !important; 
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- CUSTOM CURSOR --- */
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--text-main);
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--text-muted);
    position: fixed;
    top: 0; left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}

/* Cursor expanding on hover */
.cursor-hover .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(148, 163, 184, 0.1);
}

/* --- SCROLL PROGRESS BAR --- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background-color: var(--text-main);
    z-index: 10000;
    transition: width 0.1s;
}

/* --- NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

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

/* --- MAGNETIC BUTTONS --- */
.btn {
    background-color: var(--btn-bg);
    color: var(--btn-text) !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Removed standard transform transition to allow smooth JS magnetic math */
    transition: background-color 0.3s ease, color 0.3s ease; 
}

.btn:hover {
    opacity: 0.9;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    text-align: center;
    padding: 200px 5% 140px 5%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: var(--bg-main);
    transition: background-color 0.3s ease;
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    max-width: 900px;
    color: var(--text-main);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px auto;
}

/* Floating Animation Elements */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 1;
    animation: floatShape 20s infinite alternate ease-in-out;
    transition: background 0.5s ease;
}

.shape-1 { width: 500px; height: 500px; background: var(--gradient-1); top: -10%; left: -5%; }
.shape-2 { width: 600px; height: 600px; background: var(--gradient-2); bottom: -15%; right: -5%; animation-delay: -5s; animation-duration: 25s; }
.shape-3 { width: 400px; height: 400px; background: var(--gradient-3); top: 30%; left: 40%; animation-delay: -10s; animation-duration: 30s; }

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    33% { transform: translate(50px, -50px) scale(1.1) rotate(90deg); }
    66% { transform: translate(-30px, 50px) scale(0.9) rotate(180deg); }
    100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}

/* --- OTHER FOLDS --- */
.metrics-section { padding: 80px 5%; background: var(--card-bg); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); transition: all 0.3s ease; }
.metrics-grid { display: flex; justify-content: space-around; max-width: 1000px; margin: 0 auto; flex-wrap: wrap; gap: 40px; }
.metric-card { text-align: center; }
.metric-number { font-size: 4rem; font-weight: 700; color: var(--text-main); letter-spacing: -0.05em; margin-bottom: 8px; }
.metric-label { font-size: 1.1rem; color: var(--text-muted); font-weight: 500; }

/* Tabs */
.tabs-section { padding: 120px 5%; max-width: 1000px; margin: 0 auto; }
.tabs-header { display: flex; justify-content: center; gap: 16px; margin-bottom: 40px; }
.tab-btn { padding: 12px 24px; border-radius: 30px; border: 1px solid var(--border-color); background: var(--card-bg); font-size: 1rem; font-weight: 600; color: var(--text-muted); transition: all 0.3s ease; }
.tab-btn.active { background: var(--text-main); color: var(--bg-main); border-color: var(--text-main); }
.tab-content { display: none; background: var(--card-bg); padding: 40px; border-radius: 24px; border: 1px solid var(--border-color); box-shadow: 0 20px 40px rgba(0,0,0,0.03); transition: all 0.3s ease; }
.tab-content.active { display: block; animation: fadeUp 0.5s ease forwards; }
.tab-content h2 { color: var(--text-main); }

/* Marquee */
.marquee-wrapper { overflow: hidden; white-space: nowrap; padding: 60px 0; background: var(--bg-main); border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); display: flex; transition: all 0.3s ease; }
.marquee-content { display: inline-block; animation: scrollMarquee 20s linear infinite; }
.marquee-content span { font-size: 1.5rem; font-weight: 700; margin: 0 60px; color: var(--border-color); transition: color 0.3s ease;}
@keyframes scrollMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Bento Box */
.bento-section { padding: 120px 5%; max-width: 1200px; margin: 0 auto; }
.bento-section-header { text-align: center; margin-bottom: 60px; color: var(--text-main); }
.bento-section-header h2 { font-size: 3rem; letter-spacing: -0.03em; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(300px, auto); gap: 24px; }
.bento-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 32px; padding: 40px; box-shadow: 0 10px 40px rgba(0,0,0,0.03); display: flex; flex-direction: column; justify-content: flex-end; transition: all 0.3s ease; }
.bento-item h3 { color: var(--text-main); }
.bento-large { grid-column: span 2; background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-main) 100%); }

/* Testimonial Fold */
.testimonial-section { padding: 120px 5%; background-color: var(--text-main); color: var(--bg-main); text-align: center; transition: all 0.3s ease;}
.testimonial-content { max-width: 800px; margin: 0 auto; }
.testimonial-quote { font-size: 2.5rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 40px; }
.testimonial-author { font-size: 1.1rem; opacity: 0.8; }

/* Pricing Fold */
.pricing-section { padding: 120px 5%; max-width: 1200px; margin: 0 auto; text-align: center; }
.pricing-section h2 { color: var(--text-main); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 60px; text-align: left; }
.pricing-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 24px; padding: 40px; transition: all 0.3s ease; }
.pricing-card h3 { color: var(--text-main); }
.pricing-card.featured { border: 2px solid var(--text-main); box-shadow: 0 20px 40px rgba(0,0,0,0.08); position: relative; transform: scale(1.02); }
.price-amount { font-size: 3.5rem; font-weight: 700; margin: 20px 0; color: var(--text-main); }
.price-amount span { font-size: 1.2rem; color: var(--text-muted); font-weight: 400; }
.pricing-features { list-style: none; margin: 30px 0; }
.pricing-features li { margin-bottom: 15px; color: var(--text-muted); display: flex; align-items: center; }
.pricing-features li::before { content: "✓"; color: var(--text-main); font-weight: bold; margin-right: 10px; }

/* FAQ Fold */
.faq-section { padding: 100px 5%; max-width: 800px; margin: 0 auto; }
.faq-section h2 { color: var(--text-main); }
.faq-item { border-bottom: 1px solid var(--border-color); padding: 24px 0; transition: border-color 0.3s ease;}
.faq-item h4 { font-size: 1.25rem; margin-bottom: 10px; color: var(--text-main); }
.faq-item p { color: var(--text-muted); }

/* Dark CTA (Hardcoded dark to stand out, or inverted in dark mode) */
.dark-cta { background-color: var(--text-main); color: var(--bg-main); text-align: center; border-radius: 40px; margin: 40px 5% 80px 5%; padding: 120px 5%; transition: all 0.3s ease; }
.dark-cta h2 { font-size: 4rem; letter-spacing: -0.04em; margin-bottom: 24px; }
.dark-cta p { opacity: 0.8; font-size: 1.25rem; max-width: 600px; margin: 0 auto 40px auto; }
.btn-white { background-color: var(--bg-main); color: var(--text-main) !important; padding: 14px 32px; border-radius: 8px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* --- FOOTER --- */
footer { background-color: var(--card-bg); border-top: 1px solid var(--border-color); padding: 80px 5% 40px 5%; transition: all 0.3s ease;}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; max-width: 1200px; margin: 0 auto; }
.footer-logo { font-size: 24px; font-weight: 700; color: var(--text-main); text-decoration: none; display: block; margin-bottom: 20px; }
.footer-grid h5 { font-size: 1rem; color: var(--text-main); margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text-main); }
.footer-bottom { text-align: center; margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.9rem; }

/* Standard Scroll Animations */
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
/* =========================================
   RESPONSIVE OPTIMIZATIONS (TABLET & MOBILE)
   ========================================= */

/* 1. Disable custom cursor on touch devices (Mobile/Tablets) */
@media (pointer: coarse), (max-width: 768px) {
    * { 
        cursor: auto !important; 
    }
    .cursor-dot, 
    .cursor-outline { 
        display: none !important; 
    }
}

/* 2. Tablet Optimizations (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 4rem;
    }
    
    /* Convert 3-column bento to 2-column */
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bento-large {
        grid-column: span 2;
    }
    
    /* Convert 4-column footer to 2x2 grid */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
    }
}

/* 3. Premium Mobile Optimizations (max-width: 768px) */
@media (max-width: 768px) {
    
    /* --- THE FLOATING PILL NAVBAR --- */
    nav {
        width: 90% !important;
        left: 5% !important;
        top: 20px !important;
        padding: 12px 20px !important;
        border-radius: 100px !important;
        background-color: var(--card-bg) !important;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
        border: 1px solid var(--border-color) !important;
    }
    
    .logo {
        font-size: 1.2rem !important;
        letter-spacing: -0.04em !important;
    }
    
    .nav-links {
        gap: 12px !important;
    }
    
    /* Hide text links entirely to clean up the UI */
    .nav-links a:not(.btn) {
        display: none !important;
    }
    
    /* Compact CTA button */
    .nav-links .btn {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
        border-radius: 30px !important;
    }

    /* --- PERFECT HERO TYPOGRAPHY --- */
    .hero {
        /* Add more top padding to account for the floating navbar */
        padding: 180px 5% 80px 5%; 
    }
    
    .hero h1 {
        /* 
           8.5vw ensures "infrastructure" perfectly spans the width 
           without wrapping or breaking on narrow screens.
        */
        font-size: clamp(1.75rem, 8.5vw, 2.6rem) !important; 
        letter-spacing: -0.02em !important;
        line-height: 1.15 !important;
        word-wrap: normal !important; 
        hyphens: none !important;
    }
    
    .hero p {
        font-size: 1.05rem !important;
        padding: 0 15px;
        margin-top: 15px;
        opacity: 0.85;
    }

    /* --- LAYOUT REFINEMENTS --- */
    .metrics-grid {
        flex-direction: column;
        gap: 40px;
    }
    
    .metric-number {
        font-size: 3.5rem;
    }

    .tabs-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-btn {
        width: 100%;
        border-radius: 12px !important; /* Match mobile card radii */
    }

    .bento-section-header h2 {
        font-size: 2.2rem;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-large {
        grid-column: span 1;
    }
    
    .bento-item {
        padding: 30px;
        border-radius: 24px;
    }

    .testimonial-quote {
        font-size: 1.5rem;
    }
    
    .pricing-section h2 {
        font-size: 2.2rem !important;
    }
    
    .pricing-card.featured {
        transform: scale(1); /* Prevent horizontal scrolling */
    }

    .dark-cta {
        padding: 60px 8%;
        margin: 20px 5% 40px 5%;
        border-radius: 32px;
    }
    
    .dark-cta h2 {
        font-size: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: left; /* Left align looks cleaner on mobile than center */
    }
}