@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --brand-primary: #6366f1;
    --brand-hover: #4f46e5;
    --brand-accent: #ec4899;
    --border-light: #e2e8f0;
    --radius-lg: 24px;
    --radius-md: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-main); color: var(--text-primary); font-family: 'Plus Jakarta Sans', sans-serif; line-height: 1.6; overflow-x: hidden; }

/* Navigation */
nav { position: fixed; top: 0; width: 100%; padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; z-index: 1000; transition: all 0.3s ease; }
nav.scrolled { border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-primary); text-decoration: none; letter-spacing: -0.5px; z-index: 1001; }
.logo span { color: var(--brand-primary); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }

/* Mobile Menu Button */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; }
.menu-toggle span { width: 24px; height: 2px; background: var(--text-primary); transition: 0.3s; }

/* Buttons */
.btn { display: inline-block; padding: 12px 28px; border-radius: 100px; font-size: 0.95rem; font-weight: 600; text-decoration: none; transition: all 0.3s ease; cursor: pointer; border: none; text-align: center; }
.btn-primary { background: var(--brand-primary); color: #ffffff; box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39); }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23); }
.btn-secondary { background: #ffffff; color: var(--text-primary); border: 1px solid var(--border-light); }
.btn-secondary:hover { border-color: var(--text-primary); transform: translateY(-2px); }

/* Typography */
.text-gradient { background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 800; line-height: 1.1; letter-spacing: -2px; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
p.lead { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary); max-width: 600px; margin: 0 auto 2.5rem; }

/* Sections & Layouts */
section { padding: 120px 5%; max-width: 1400px; margin: 0 auto; }
.section-alt-wrapper { background: #ffffff; border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light); width: 100%; }
.hero { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 150px; }
.page-header { text-align: center; max-width: 800px; margin: 0 auto; padding-top: 160px; padding-bottom: 40px; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4rem; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.bento-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(280px, auto); gap: 1.5rem; margin-top: 4rem; }
.span-2 { grid-column: span 2; }
.span-4 { grid-column: span 4; }

/* UI Components */
.card { background: var(--bg-card); border-radius: var(--radius-lg); padding: 2.5rem; border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-xl); }

/* Logo Cloud */
.logo-cloud { display: flex; justify-content: center; align-items: center; gap: 4rem; flex-wrap: wrap; margin-top: 3rem; opacity: 0.6; }
.logo-cloud span { font-size: 1.5rem; font-weight: 800; font-family: monospace; letter-spacing: -1px; }

/* Feature Split */
.feature-split { display: flex; align-items: center; gap: 4rem; margin-bottom: 8rem; }
.feature-split.reverse { flex-direction: row-reverse; }
.feature-content { flex: 1; }
.feature-visual { flex: 1; background: var(--bg-card); border-radius: var(--radius-lg); min-height: 400px; width: 100%; border: 1px solid var(--border-light); box-shadow: var(--shadow-xl); display: flex; align-items: center; justify-content: center; padding: 2rem; }

/* Code Window */
.code-window { width: 100%; background: #0f172a; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xl); text-align: left; }
.code-header { background: #1e293b; padding: 10px 15px; display: flex; gap: 8px; }
.code-dot { width: 12px; height: 12px; border-radius: 50%; }
.code-body { padding: 20px; font-family: monospace; color: #38bdf8; font-size: 0.9rem; line-height: 1.5; overflow-x: auto; }

/* Comparison Table */
.comparison-table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); border: 1px solid var(--border-light); margin-top: 3rem; }
.comparison-table { width: 100%; min-width: 600px; border-collapse: collapse; background: var(--bg-card); }
.comparison-table th, .comparison-table td { padding: 1.5rem; text-align: left; border-bottom: 1px solid var(--border-light); }
.comparison-table th { background: #f8fafc; font-weight: 700; }
.comparison-table td:not(:first-child), .comparison-table th:not(:first-child) { text-align: center; }

/* Forms & FAQ */
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-control { width: 100%; padding: 12px 16px; border: 1px solid var(--border-light); border-radius: 8px; font-family: inherit; font-size: 1rem; transition: border-color 0.3s; background: var(--bg-main); }
.form-control:focus { outline: none; border-color: var(--brand-primary); }

.faq-item { border-bottom: 1px solid var(--border-light); padding: 1.5rem 0; cursor: pointer; }
.faq-question { font-weight: 700; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; }
.faq-answer { color: var(--text-secondary); margin-top: 1rem; display: none; line-height: 1.6; }
.faq-item.active .faq-answer { display: block; }

/* Footer */
footer { background: #ffffff; border-top: 1px solid var(--border-light); padding: 80px 5% 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; max-width: 1400px; margin: 0 auto 4rem; }
.footer-link { display: block; color: var(--text-secondary); text-decoration: none; margin-bottom: 0.8rem; font-size: 0.95rem; }
.footer-link:hover { color: var(--brand-primary); }

/* Animations */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* =========================================
   RESPONSIVE OPTIMIZATIONS
   ========================================= */

/* Tablet & Smaller Laptops */
@media (max-width: 1024px) {
    .grid-4, .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .span-4 { grid-column: span 2; }
    
    /* Mobile Menu Logic */
    .menu-toggle { display: flex; }
    .nav-links { 
        position: fixed; top: 0; left: 0; width: 100%; height: 100vh; 
        background: var(--bg-card); flex-direction: column; justify-content: center; 
        gap: 2rem; transform: translateY(-100%); 
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 1000; 
    }
    .nav-links.active { transform: translateY(0); }
    .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Mobile Devices */
@media (max-width: 768px) {
    section { padding: 80px 5%; }
    .hero { padding-top: 120px; }
    .page-header { padding-top: 120px; padding-bottom: 20px; }
    
    .grid-2, .grid-3, .grid-4, .bento-grid { grid-template-columns: 1fr; gap: 2rem; }
    .span-2, .span-4 { grid-column: span 1; }
    
    .feature-split, .feature-split.reverse { flex-direction: column; text-align: center; gap: 2rem; margin-bottom: 5rem; }
    .feature-visual { min-height: 250px; }
    
    .logo-cloud { gap: 2rem; }
    .logo-cloud span { font-size: 1.2rem; }
    
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .footer-grid > div:first-child { grid-column: span 2; text-align: center; margin-bottom: 1rem; }
    
    /* Fix Mockup Heights */
    .hero .card { flex-direction: column; height: auto; min-height: 500px; }
    .hero .card > div:first-child { width: 100%; border-right: none; border-bottom: 1px solid var(--border-light); display: flex; flex-direction: row; gap: 10px; padding: 15px; }
    .hero .card > div:first-child > div { margin-bottom: 0 !important; height: 12px !important; }
    .hero .card > div:last-child > div { flex-direction: column; }
}