/* Reset & Variables */
:root {
    --primary: #4f46e5;     /* Indigo 600 */
    --primary-hover: #4338ca;
    --success: #10b981;     /* Emerald 500 */
    --error: #ef4444;       /* Red 500 */
    
    /* Light Theme */
    --bg-main: #ffffff;
    --bg-secondary: #f8fafc; /* Slate 50 */
    --bg-card: #ffffff;
    --text-main: #0f172a;    /* Slate 900 */
    --text-muted: #64748b;   /* Slate 500 */
    --border-color: #e2e8f0; /* Slate 200 */
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg-main: #0f172a;      /* Slate 900 */
    --bg-secondary: #020617; /* Slate 950 */
    --bg-card: #1e293b;      /* Slate 800 */
    --text-main: #f8fafc;    /* Slate 50 */
    --text-muted: #94a3b8;   /* Slate 400 */
    --border-color: #334155; /* Slate 700 */
    
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
p { margin-bottom: 1rem; color: var(--text-muted); }

.text-gradient {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.success-text { color: var(--success); }

/* Layout & Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container-sm { max-width: 800px; }

section { padding: 6rem 0; }
.bg-secondary { background-color: var(--bg-secondary); }
.mt-4 { margin-top: 2rem; }
.mt-auto { margin-top: auto; }

.grid {
    display: grid;
    gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.align-center { align-items: center; }

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}
.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}
.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--text-muted);
    background-color: var(--bg-secondary);
}
.btn-lg { padding: 1rem 2rem; font-size: 1.125rem; }
.btn-xl { padding: 1.25rem 2.5rem; font-size: 1.25rem; }
.btn-block { width: 100%; }

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.badge-success, .badge-popular {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
}
.badge-popular {
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}

.icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(var(--bg-main-rgb), 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
}
.logo svg { stroke: var(--primary); }
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-main); }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
}

/* Hero Section */
.hero {
    padding-top: 10rem;
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(0,0,0,0) 50%);
    z-index: -1;
}
.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-subtitle { font-size: 1.25rem; margin-bottom: 2rem; }
.hero-ctas { display: flex; gap: 1rem; }
.dashboard-img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}
.glass {
    position: relative;
}
.glass::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    pointer-events: none;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin-top: 2rem;
}
.feature-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Code Block */
.solution-code pre {
    background-color: #0f172a; /* Force dark mode for code */
    color: #f8fafc;
    padding: 1.5rem;
    border-radius: 1rem;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.875rem;
    border: 1px solid #334155;
}

/* Bento Grid */
.bento-grid {
    grid-auto-rows: minmax(200px, auto);
}
.bento-large {
    grid-column: span 2;
}

/* Compare Table */
.table-container {
    overflow-x: auto;
}
.compare-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.compare-table th, .compare-table td {
    padding: 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
.compare-table th {
    background-color: var(--bg-secondary);
    font-weight: 600;
}
.compare-table .highlight {
    background-color: rgba(79, 70, 229, 0.05);
    font-weight: 600;
}
.compare-table .highlight-col {
    background-color: rgba(79, 70, 229, 0.05); 
}

/* Pricing */
.pricing-card ul {
    list-style: none;
    margin: 2rem 0;
}
.pricing-card li {
    margin-bottom: 0.75rem;
}
.price {
    font-size: 3rem;
    font-weight: 800;
    margin: 1rem 0;
    color: var(--text-main);
}
.price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}
.popular {
    border-color: var(--primary);
    position: relative;
    transform: scale(1.05);
}
.popular:hover { transform: scale(1.05) translateY(-5px); }

/* FAQ */
.faq-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child { border-bottom: none; }
.faq-question { margin-bottom: 0.5rem; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-ctas { justify-content: center; flex-direction: column; }
    .bento-large { grid-column: span 1; }
    .popular { transform: none; }
    .popular:hover { transform: translateY(-5px); }
    section { padding: 4rem 0; }
}
/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-title {
    margin-bottom: 0.5rem;
}
.modal-desc {
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-main);
}
.required {
    color: var(--error);
}
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
textarea.form-input {
    resize: vertical;
    min-height: 100px;
}
