/* ===== DESIGN TOKENS — THEMED ===== */
:root {
    --bg-primary: #0a0e17; --bg-secondary: #111827; --bg-tertiary: #1e293b;
    --bg-elevated: #334155; --bg-input: #1e293b;
    --text-primary: #f8fafc; --text-secondary: #cbd5e1; --text-tertiary: #94a3b8;
    --text-muted: #64748b; --text-inverse: #0f172a;
    --border-subtle: rgba(148, 163, 184, 0.15); --border-focus: rgba(99, 102, 241, 0.5);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5); --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.25);
    --accent-primary: #6366f1; --accent-secondary: #8b5cf6; --accent-tertiary: #06b6d4;
    --accent-success: #10b981;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    --radius-sm: 8px; --radius-md: 16px; --radius-lg: 24px; --radius-full: 9999px;
    --container-max: 1280px; --spacing-section: 6rem;
    --transition-fast: 150ms ease; --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f8fafc; --bg-secondary: #ffffff; --bg-tertiary: #f1f5f9;
    --bg-elevated: #e2e8f0; --bg-input: #ffffff;
    --text-primary: #0f172a; --text-secondary: #334155; --text-tertiary: #475569;
    --text-muted: #64748b; --text-inverse: #f8fafc;
    --border-subtle: rgba(15, 23, 42, 0.1); --border-focus: rgba(99, 102, 241, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12); --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

/* ===== BASE RESET & TYPOGRAPHY ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; overflow-x: hidden; transition: background-color var(--transition-base), color var(--transition-base); }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; letter-spacing: -0.025em; color: var(--text-primary); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1.25rem; color: var(--text-secondary); }
.text-gradient { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }

/* ===== UTILITIES ===== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 2rem; }
.section { padding: var(--spacing-section) 0; position: relative; }
.section::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.08) 0%, transparent 60%), radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.06) 0%, transparent 50%); pointer-events: none; z-index: 0; }
.section-content { position: relative; z-index: 1; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.section-header .badge { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.375rem 1rem; background: rgba(99, 102, 241, 0.15); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); font-size: 0.875rem; font-weight: 500; color: var(--accent-primary); margin-bottom: 1.25rem; }
.section-header p { font-size: 1.125rem; color: var(--text-tertiary); }

/* ===== BUTTONS ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.875rem 1.75rem; font-weight: 600; font-size: 1rem; border-radius: var(--radius-full); text-decoration: none; cursor: pointer; transition: var(--transition-base); border: none; position: relative; overflow: hidden; }
.btn-primary { background: var(--accent-gradient); color: white; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(99, 102, 241, 0.4); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-tertiary); border-color: var(--accent-primary); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--accent-primary); border: 1px solid var(--accent-primary); }
.btn-outline:hover { background: rgba(99, 102, 241, 0.1); }
.btn-sm { padding: 0.625rem 1.25rem; font-size: 0.9rem; }

/* ===== HEADER & NAVIGATION ===== */
header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 0; background: rgba(10, 14, 23, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); transition: var(--transition-base); }
[data-theme="light"] header { background: rgba(248, 250, 252, 0.9); }
header.scrolled { padding: 0.75rem 0; box-shadow: var(--shadow-md); }
nav { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.35rem; font-weight: 700; text-decoration: none; color: var(--text-primary); }
.logo-icon { width: 32px; height: 32px; background: var(--accent-gradient); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: white; }
.logo-text span { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-secondary); text-decoration: none; font-weight: 500; font-size: 0.95rem; position: relative; padding: 0.5rem 0; transition: var(--transition-fast); }
.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--accent-gradient); border-radius: 2px; transition: var(--transition-base); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 1rem; }
.theme-toggle { background: none; border: 1px solid var(--border-subtle); color: var(--text-primary); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition-fast); margin-right: 0.5rem; }
.theme-toggle:hover { background: var(--bg-tertiary); border-color: var(--accent-primary); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

/* ===== HERO SECTION ===== */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 5rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12) 0%, transparent 40%), radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 45%), linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); z-index: 0; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 4rem; align-items: center; position: relative; z-index: 1; }
.hero-content h1 { margin-bottom: 1.5rem; }
.hero-content h1 .highlight { position: relative; display: inline; }
.hero-content h1 .highlight::after { content: ''; position: absolute; bottom: 8px; left: 0; width: 100%; height: 12px; background: rgba(99, 102, 241, 0.25); border-radius: 8px; z-index: -1; }
.hero-content > p { font-size: 1.25rem; color: var(--text-tertiary); margin-bottom: 2.5rem; max-width: 580px; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }
.hero-stats { display: flex; gap: 2rem; padding-top: 2rem; border-top: 1px solid var(--border-subtle); }
.stat-item strong { display: block; font-size: 1.75rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.stat-item span { font-size: 0.9rem; color: var(--text-muted); }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.hero-card { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); position: relative; }
.hero-card::before { content: ''; position: absolute; inset: -1px; background: var(--accent-gradient); border-radius: var(--radius-lg); opacity: 0.15; z-index: -1; filter: blur(10px); }
.hero-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.hero-card-icon { width: 48px; height: 48px; background: rgba(99, 102, 241, 0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent-primary); font-size: 1.25rem; }
.hero-card-title { font-size: 1.25rem; font-weight: 600; }
.hero-card-list { list-style: none; }
.hero-card-list li { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0; color: var(--text-secondary); font-size: 0.95rem; }
.hero-card-list li::before { content: '✓'; color: var(--accent-success); font-weight: 700; margin-top: 2px; }

/* ===== VALUE PILLARS ===== */
.pillars { background: var(--bg-secondary); }
.pillars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.pillar-card { background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; transition: var(--transition-base); position: relative; overflow: hidden; }
.pillar-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--accent-gradient); opacity: 0; transition: var(--transition-base); }
.pillar-card:hover { transform: translateY(-4px); border-color: rgba(99, 102, 241, 0.4); box-shadow: var(--shadow-lg); }
.pillar-card:hover::before { opacity: 1; }
.pillar-icon { width: 56px; height: 56px; background: rgba(99, 102, 241, 0.12); border-radius: 16px; display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); }
.pillar-card h3 { margin-bottom: 1rem; }
.pillar-card p { font-size: 0.975rem; margin-bottom: 0; }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.service-card { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition-base); }
.service-card:hover { border-color: rgba(99, 102, 241, 0.4); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.service-header { padding: 1.75rem; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 1rem; }
.service-icon { width: 44px; height: 44px; background: rgba(99, 102, 241, 0.15); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--accent-primary); font-weight: 600; flex-shrink: 0; }
.service-header h3 { margin: 0; font-size: 1.35rem; }
.service-body { padding: 1.75rem; }
.service-body p { margin-bottom: 1.5rem; font-size: 0.975rem; }
.service-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.service-tag { padding: 0.25rem 0.75rem; background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); font-size: 0.8rem; color: var(--text-tertiary); }
.service-link { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--accent-primary); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: var(--transition-fast); }
.service-link:hover { gap: 0.6rem; }

/* ===== OPEN SOURCE BANNER ===== */
.opensource-banner { background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary)); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2.5rem; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 2.5rem; align-items: center; margin: 3rem 0; }
.opensource-content h3 { margin-bottom: 1rem; }
.opensource-content p { margin-bottom: 1.5rem; }
.opensource-visual { background: var(--bg-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); padding: 1.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-tertiary); line-height: 1.6; }
.opensource-visual .prompt { color: var(--accent-success); }
.opensource-visual .command { color: var(--accent-primary); }
.opensource-visual .output { color: var(--text-muted); opacity: 0.9; }

/* ===== METHODOLOGY ===== */
.methodology { background: var(--bg-secondary); }
.method-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 3rem; counter-reset: step; }
.method-step { position: relative; padding-left: 3.5rem; }
.method-step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; background: var(--accent-gradient); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; color: white; }
.method-step::after { content: ''; position: absolute; left: 18px; top: 36px; bottom: -2rem; width: 2px; background: var(--border-subtle); }
.method-step:last-child::after { display: none; }
.method-step h4 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.method-step p { font-size: 0.95rem; margin-bottom: 0; color: var(--text-tertiary); }

/* ===== CASE STUDIES ===== */
.case-studies { background: var(--bg-secondary); }
.studies-intro { text-align: center; max-width: 750px; margin: 0 auto 4rem; color: var(--text-tertiary); font-size: 1.1rem; }
.studies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.study-card { background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; transition: var(--transition-base); position: relative; }
.study-card:hover { border-color: rgba(99, 102, 241, 0.4); transform: translateY(-3px); }
.study-badge { display: inline-flex; align-items: center; padding: 0.25rem 0.875rem; background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: var(--radius-full); font-size: 0.8rem; font-weight: 500; color: var(--accent-success); margin-bottom: 1.25rem; }
.study-card h3 { margin-bottom: 0.75rem; font-size: 1.3rem; }
.study-card p { font-size: 0.95rem; margin-bottom: 1.5rem; }
.study-meta { display: flex; align-items: center; gap: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border-subtle); font-size: 0.9rem; color: var(--text-muted); }
.study-meta-item { display: flex; align-items: center; gap: 0.4rem; }

/* ===== INDUSTRIES ===== */
.industries-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.75rem; }
.industry-card { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 1.75rem; text-align: center; transition: var(--transition-base); }
.industry-card:hover { border-color: var(--accent-primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.industry-icon { width: 64px; height: 64px; background: rgba(99, 102, 241, 0.12); border-radius: 20px; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.25rem; font-size: 1.75rem; color: var(--accent-primary); }
.industry-card h4 { font-size: 1.2rem; margin-bottom: 0.75rem; }
.industry-card p { font-size: 0.925rem; margin-bottom: 0; color: var(--text-tertiary); }

/* ===== TESTIMONIALS ===== */
.testimonials { background: var(--bg-secondary); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.testimonial-card { background: var(--bg-tertiary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2rem; position: relative; }
.testimonial-card::before { content: '"'; position: absolute; top: 1.25rem; left: 1.5rem; font-size: 4rem; font-family: Georgia, serif; color: var(--accent-primary); opacity: 0.15; line-height: 1; }
.testimonial-content { position: relative; z-index: 1; margin-top: 1rem; }
.testimonial-content p { font-style: italic; margin-bottom: 1.5rem; font-size: 1.05rem; }
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.author-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--accent-primary); flex-shrink: 0; }
.author-info strong { display: block; font-size: 1rem; margin-bottom: 0.15rem; }
.author-info span { font-size: 0.875rem; color: var(--text-muted); }

/* ===== FORM STYLES ===== */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; font-size: 0.95rem; color: var(--text-secondary); }
.form-input, .form-select, .form-textarea { width: 100%; padding: 0.875rem 1rem; background: var(--bg-input); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); color: var(--text-primary); font-family: inherit; font-size: 1rem; transition: var(--transition-fast); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; }
.form-success { display: none; background: rgba(16, 185, 129, 0.1); border: 1px solid var(--accent-success); color: var(--accent-success); padding: 1rem; border-radius: var(--radius-sm); text-align: center; margin-top: 1rem; }
.form-success.visible { display: block; animation: fadeInUp 0.4s ease; }

/* ===== CONTACT SECTION ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-info h3 { margin-bottom: 1.5rem; }
.contact-details { list-style: none; margin-bottom: 2rem; }
.contact-details li { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; color: var(--text-secondary); }
.contact-details li svg { width: 20px; height: 20px; color: var(--accent-primary); flex-shrink: 0; }
.contact-form-wrapper { background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); padding: 2.5rem; box-shadow: var(--shadow-md); }

/* ===== FOOTER ===== */
footer { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); padding: 4rem 0 2rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 3rem 2rem; margin-bottom: 3rem; }
.footer-brand .logo { margin-bottom: 1.25rem; }
.footer-brand p { font-size: 0.95rem; color: var(--text-tertiary); margin-bottom: 1.5rem; }
.social-links { display: flex; gap: 0.75rem; }
.social-link { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-tertiary); border: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: center; color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; transition: var(--transition-fast); }
.social-link:hover { background: var(--accent-primary); border-color: var(--accent-primary); color: white; transform: translateY(-2px); }
.footer-col h4 { font-size: 1.05rem; margin-bottom: 1.25rem; position: relative; padding-bottom: 0.75rem; color: var(--text-primary); }
.footer-col h4::after { content: ''; position: absolute; bottom: 0; left: 0; width: 32px; height: 2px; background: var(--accent-gradient); border-radius: 2px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.75rem; }
.footer-col ul a { color: var(--text-tertiary); text-decoration: none; font-size: 0.95rem; transition: var(--transition-fast); display: inline-block; }
.footer-col ul a:hover { color: var(--text-primary); transform: translateX(3px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 2rem; border-top: 1px solid var(--border-subtle); font-size: 0.9rem; color: var(--text-muted); flex-wrap: wrap; gap: 1rem; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.animate-on-scroll { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.animate-on-scroll.visible { animation: fadeInUp 0.6s ease forwards; }
.animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.animate-on-scroll:nth-child(4) { transition-delay: 0.3s; }

/* ===== ACCESSIBILITY & RESPONSIVE ===== */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } html { scroll-behavior: auto; } }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 1024px) {
    .hero-grid, .contact-grid, .opensource-banner { grid-template-columns: 1fr; text-align: center; }
    .hero-content > p, .hero-cta, .contact-details { margin-left: auto; margin-right: auto; }
    .hero-stats, .contact-details li { justify-content: center; }
    .contact-details li { text-align: left; justify-content: flex-start; }
    .hero { padding-bottom: 4rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    :root { --spacing-section: 4.5rem; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-secondary); flex-direction: column; padding: 1.5rem; border-bottom: 1px solid var(--border-subtle); gap: 1rem; }
    .nav-links.active { display: flex; }
    .nav-cta { display: none; }
    .mobile-toggle { display: block; }
    .contact-form-wrapper { padding: 1.5rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
