/* RESET & VARIABLES */
:root {
  --bg-color: #030303;
  --surface: #0a0a0a;
  --surface-hover: #121212;
  --surface-border: rgba(255, 255, 255, 0.1);
  --surface-border-hover: rgba(255, 255, 255, 0.2);
  
  --text-primary: #f5f5f5;
  --text-secondary: #999999;
  
  --accent-gradient-start: #eaeaea;
  --accent-gradient-end: #666666;
  
  --neon-blue: #3b82f6;
  --neon-purple: #8b5cf6;
  --glow-opacity: 0.12;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --rad: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Prevent horizontal scroll at the root */
}

body { overflow-x: hidden; }

/* BACKGROUND GLOWS */
.bg-glow {
  position: fixed;
  top: -20%; left: 20%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(139, 92, 246, var(--glow-opacity)) 0%, rgba(59, 130, 246, var(--glow-opacity)) 40%, rgba(0,0,0,0) 70%);
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { color: var(--text-primary); letter-spacing: -0.02em; }
h2 { font-size: 2.75rem; font-weight: 600; margin-bottom: 1rem; }
a { color: var(--text-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.75rem 1.5rem;
  font-size: 0.875rem; font-weight: 500;
  border-radius: 8px; cursor: pointer; transition: var(--transition);
  text-decoration: none;
}
.btn-primary { background: var(--text-primary); color: var(--bg-color); border: 1px solid var(--text-primary); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(255,255,255,0.2); }
.btn-secondary { background: transparent; color: var(--text-primary); border: 1px solid var(--surface-border); }
.btn-secondary:hover { border-color: var(--text-primary); background: rgba(255,255,255,0.05); }
.btn-outline { background: transparent; border: 1px solid var(--surface-border); color: var(--text-secondary); padding: 0.5rem 1rem; }
.btn-outline:hover { border-color: var(--surface-border-hover); color: var(--text-primary); }

/* NAVBAR */
.navbar {
  position: fixed; top: 0; width: 100%; padding: 1rem;
  background: rgba(3, 3, 3, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--surface-border); z-index: 100;
}
.nav-container {
  max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: 1.1rem; }
.nav-links { display: flex; list-style: none; gap: 2.5rem; }
.nav-links a { font-size: 0.875rem; }

.nav-actions { display: flex; align-items: center; gap: 1.25rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}

.nav-toggle span {
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* HERO */
.hero { max-width: 900px; margin: 12rem auto 6rem; text-align: center; padding: 0 1rem; }
.badge { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.75rem; background: rgba(255,255,255,0.05); border: 1px solid var(--surface-border); margin-bottom: 2rem; color: var(--text-secondary); }
.hero-title { font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1.05; font-weight: 700; margin-bottom: 1.5rem; }
.hero-title span { background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end)); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.125rem; color: var(--text-secondary); max-width: 650px; margin: 0 auto 2.5rem; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 4rem; }

/* SOCIAL PROOF */
.social-proof { margin-top: 5rem; border-top: 1px solid var(--surface-border); padding-top: 3rem; }
.social-proof p { color: var(--text-secondary); font-size: 0.875rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.proof-logos { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; color: #555; font-weight: 700; font-size: 1.25rem; }

/* SECTIONS */
.section { max-width: 1100px; margin: 0 auto 10rem; padding: 0 1rem; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 4rem; }
.section-header p { color: var(--text-secondary); line-height: 1.6; font-size: 1.1rem; }
.text-left { text-align: left; margin: 0; margin-bottom: 3rem; }

/* TERMINAL */
.terminal-container {
  max-width: 800px; margin: 0 auto;
  border: 1px solid var(--surface-border); border-radius: 12px;
  background: #000; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  /* Prevent this block from ever exceeding its parent on mobile */
  width: 100%;
}
.terminal-container.small { max-width: 500px; text-align: center; border-radius: 8px; }
.terminal-header { display: flex; align-items: center; padding: 1rem; background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--surface-border); }
.terminal-dots { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; } .dot.yellow { background: #ffbd2e; } .dot.green { background: #27c93f; }
.terminal-title { flex-grow: 1; text-align: center; font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-secondary); }
.terminal-body { padding: 2rem; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; color: #a0aec0; overflow-x: auto; white-space: nowrap; }
.command { color: #f7fafc; margin-bottom: 0.25rem;}
.prompt { color: var(--neon-purple); margin-right: 8px; }
.output { color: #888; margin-top: 2px; }
.cursor { display: inline-block; width: 8px; height: 16px; background: #f7fafc; animation: blink 1s step-end infinite; vertical-align: middle; margin-left: 4px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* WORKFLOW STEPS */
.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; border-top: 1px solid var(--surface-border); padding-top: 3rem; }
.step { padding: 1rem 0; }
.step-num { font-family: var(--font-mono); color: var(--neon-blue); font-size: 0.875rem; margin-bottom: 1rem; font-weight: 600; }
.step h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.step p { color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }

/* BENTO GRID COMPLEX */
.bento-grid-complex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; grid-auto-rows: minmax(200px, auto); }
.bento { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); padding: 2rem; transition: var(--transition); position: relative; overflow: hidden; }
.bento:hover { border-color: var(--surface-border-hover); background: var(--surface-hover); }
.bento h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.bento p { color: var(--text-secondary); line-height: 1.6; font-size: 0.9rem; }
.bento-large { grid-column: span 2; grid-row: span 2; padding: 3rem; }
.bento-large h3 { font-size: 1.5rem; }
.bento-wide { grid-column: span 2; }

/* USE CASES GRID & ANIMATIONS */
.use-cases-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.use-case-card { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); padding: 1.5rem; display: flex; flex-direction: column; overflow: hidden; transition: var(--transition); }
.use-case-card:hover { border-color: var(--surface-border-hover); background: var(--surface-hover); transform: translateY(-3px); }
.uc-visual { height: 140px; background: rgba(0,0,0,0.3); border-radius: 8px; margin-bottom: 1.5rem; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px dashed rgba(255,255,255,0.1); }
.use-case-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.use-case-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* 1. Receipt */
.receipt { background: #fff; width: 60px; height: 85px; border-radius: 2px; padding: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.4); display: flex; flex-direction: column; z-index: 2;}
.r-line { height: 4px; background: #e2e8f0; margin-bottom: 6px; border-radius: 2px; }
.r-total { font-size: 10px; color: #0f172a; font-weight: 800; margin-top: auto; border-top: 1px dashed #cbd5e1; padding-top: 4px; text-align: right; }
.json-output { font-family: var(--font-mono); font-size: 0.70rem; color: #10b981; font-weight: 600; opacity: 0; animation: extractData 3s ease-in-out infinite alternate; padding-left: 15px;}
@keyframes extractData { 0%, 40% { opacity: 0; transform: translateX(-10px); } 60%, 100% { opacity: 1; transform: translateX(0); } }

/* 2. Plate */
.license-plate { border: 2px solid #000; background: #facc15; padding: 6px 12px; border-radius: 4px; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.6); }
.l-text { font-family: var(--font-sans); color: #000; font-weight: 900; font-size: 1.25rem; letter-spacing: 2px; display: inline-block; }
.plate-scanner { position: absolute; top:0; left: -100%; width: 25%; height: 100%; background: rgba(59, 130, 246, 0.5); box-shadow: 0 0 10px var(--neon-blue); animation: plateScan 2s infinite linear; }
@keyframes plateScan { 0% { left: -50%; } 100% { left: 150%; } }

/* 3. KYC Card */
.id-card { width: 100px; height: 65px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px; display: flex; gap: 8px; position: relative; box-shadow: 0 4px 15px rgba(0,0,0,0.5); animation: floatCard 4s ease-in-out infinite; overflow: hidden; }
.id-photo { width: 24px; height: 32px; background: #94a3b8; border-radius: 2px; border: 1px solid #cbd5e1; position: relative; display: flex; align-items: center; justify-content: center; }
.id-photo::after { content: ''; position: absolute; inset: -3px; border: 2px solid #10b981; border-radius: 4px; opacity: 0; animation: verifyScan 2s infinite; }
.id-details { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.id-line { height: 4px; border-radius: 2px; }
.id-line:nth-child(1) { background: #1e293b; width: 90%; }
.id-line:nth-child(2) { background: #64748b; width: 60%; }
.id-line:nth-child(3) { background: #94a3b8; width: 100%; }
@keyframes verifyScan { 0%, 50% { opacity: 0; transform: scale(1.1); } 60%, 100% { opacity: 1; transform: scale(1); } }
@keyframes floatCard { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

/* 4. Archive Docs */
.doc-stack { position: relative; width: 65px; height: 85px; }
.doc { position: absolute; width: 100%; height: 100%; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; box-shadow: -4px 4px 15px rgba(0,0,0,0.5); transition: all 0.3s; padding: 10px; background: #fff; border: 1px solid #e2e8f0; }
.doc-3 { top: -10px; left: -10px; transform: rotate(-8deg); z-index: 1; background: #f8fafc; }
.doc-2 { top: -5px; left: -5px; transform: rotate(-4deg); z-index: 2; background: #f1f5f9; }
.doc::before { content: ''; width: 80%; height: 2px; background: #cbd5e1; margin-bottom: 4px; box-shadow: 0 6px 0 #cbd5e1, 0 12px 0 #cbd5e1; }
.doc-1 { top: 0; left: 0; z-index: 3; background: rgba(59, 130, 246, 0.1); border: 2px solid var(--neon-blue); animation: convertPdf 3s infinite alternate; color: var(--neon-blue); font-size: 1.1rem; }
.doc-1::before { display: none; }
@keyframes convertPdf { 0%, 30% { background: #fff; border-color: #e2e8f0; color: transparent; } 70%, 100% { background: rgba(59, 130, 246, 0.1); border-color: var(--neon-blue); color: var(--neon-blue); } }

/* SPLIT SECTION */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-section.reverse .split-content { order: 2; }
.split-section.reverse .split-visual { order: 1; }
.split-content h2 { font-size: 2.25rem; margin-bottom: 1.5rem; }
.split-content p { color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.5rem; font-size: 1.05rem; }
.feature-list { list-style: none; margin-top: 2rem; }
.feature-list li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; color: var(--text-secondary); line-height: 1.5; }
.feature-list svg { width: 24px; height: 24px; color: var(--text-primary); flex-shrink: 0; }
.feature-list strong { color: var(--text-primary); }

.split-visual { background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad); aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; padding: 2rem; position: relative; }
.mock-ui { width: 100%; height: 100%; border: 1px dashed var(--surface-border-hover); padding: 2rem; display: flex; flex-direction: column; gap: 1rem; position: relative; overflow: hidden; background: rgba(0,0,0,0.2); }
.mock-line { height: 12px; background: #444; border-radius: 4px; z-index: 2; }
.mock-box { margin-top: auto; height: 60px; background: rgba(59, 130, 246, 0.1); border: 1px solid var(--neon-blue); border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--neon-blue); font-size: 0.75rem; font-weight: 600; font-family: var(--font-mono); letter-spacing: 0.05em; z-index: 2; }

.scanner-line {
    position: absolute; top: 0; left: 0; width: 100%; height: 2px;
    background: var(--neon-blue); box-shadow: 0 0 15px 2px var(--neon-blue);
    animation: scan 3s ease-in-out infinite alternate; z-index: 10;
}
@keyframes scan {
    0% { top: 5%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 95%; opacity: 0; }
}

/* WHY GRID */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; }
.why-grid h4 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.why-grid p { color: var(--text-secondary); line-height: 1.6; font-size: 0.95rem; }

/* FAQ ACCORDION */
.faq-accordion { max-width: 800px; margin: 0 auto; border-top: 1px solid var(--surface-border); }
.faq-item { border-bottom: 1px solid var(--surface-border); }
.faq-item summary { padding: 2rem 0; font-size: 1.1rem; font-weight: 500; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.5rem; color: var(--text-secondary); transition: transform 0.3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-content { padding-bottom: 2rem; color: var(--text-secondary); line-height: 1.6; }
.faq-content code { background: #222; padding: 0.2em 0.4em; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; }

/* CTA SECTION */
.cta-section { text-align: center; max-width: 800px; margin-bottom: 6rem; }
.cta-section h2 { font-size: 3rem; margin-bottom: 1rem; }
.cta-section p { color: var(--text-secondary); font-size: 1.25rem; margin-bottom: 2.5rem; }

/* FOOTER */
footer { border-top: 1px solid var(--surface-border); padding: 5rem 1rem 3rem; background: var(--bg-color); }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4rem; }
.footer-brand p { color: var(--text-secondary); margin-top: 1rem; max-width: 300px; font-size: 0.875rem; line-height: 1.6; }
.footer-links { display: flex; gap: 5rem; }
.link-group h4 { font-size: 0.875rem; margin-bottom: 1.5rem; color: var(--text-primary); }
.link-group a { display: block; font-size: 0.875rem; margin-bottom: 1rem; color: #888; }
.link-group a:hover { color: var(--text-primary); }
.footer-bottom { max-width: 1200px; margin: 5rem auto 0; padding-top: 2rem; border-top: 1px solid var(--surface-border); color: #666; font-size: 0.875rem; }

/* CHEATSHEET SECTION */
.cheatsheet-section { margin-top: 4rem; }
.cheatsheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.cheat-card {
    background: var(--surface); border: 1px solid var(--surface-border); border-radius: var(--rad);
    padding: 1.5rem; display: flex; flex-direction: column; transition: transform 0.3s ease, border-color 0.3s ease;
}
.cheat-card:hover { transform: translateY(-4px); border-color: rgba(139, 92, 246, 0.4); }
.cheat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; gap: 1rem; }
.cheat-header h3 { font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0; line-height: 1.2; }
.cheat-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.25rem; line-height: 1.5; flex-grow: 1; }
.cheat-code {
    background: #09090b; border: 1px solid rgba(255,255,255,0.05); padding: 0.75rem 1rem;
    border-radius: 6px; font-family: var(--font-mono); font-size: 0.82rem; color: var(--neon-blue);
    overflow-x: auto; white-space: nowrap; display: flex; align-items: center; gap: 0.5rem;
}
/* GUI SECTION & TABLES */
.table-wrapper {
  overflow-x: auto; margin-top: 2rem; background: var(--surface);
  border: 1px solid var(--surface-border); border-radius: var(--rad);
}
.comparison-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.95rem; }
.comparison-table th, .comparison-table td { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--surface-border); }
.comparison-table th {
  background: rgba(255, 255, 255, 0.03); font-weight: 600; color: var(--text-primary);
  text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.05em;
}
.comparison-table tbody tr { transition: background 0.2s ease; }
.comparison-table tbody tr:hover { background: rgba(139, 92, 246, 0.05); }
.comparison-table tbody tr:last-child th, .comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table a { color: var(--neon-blue); text-decoration: none; font-weight: 600; }
.comparison-table a:hover { text-decoration: underline; }
.comparison-table .badge.free { 
  background: rgba(16, 185, 129, 0.15); color: #10b981; padding: 0.3rem 0.6rem; 
  border-radius: 4px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
}
.gui-note { margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-secondary); text-align: center; }

/* INSTALL GRID & TABS */
.install-section { margin-top: 2rem; }
.os-pane { display: none; }
.os-pane.active { display: grid; }
.install-steps-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
#pane-windows { grid-template-columns: 1fr 2fr; }
.install-card {
    background: var(--surface); border: 1px solid var(--surface-border);
    border-radius: var(--rad); padding: 1.5rem; display: flex; flex-direction: column;
}
.install-card .step-title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.install-card .step-desc { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1.5rem; flex-grow: 1; }
.step-badge {
    display: inline-flex; align-self: flex-start; padding: 0.25rem 0.75rem; border-radius: 20px;
    font-size: 0.75rem; background: rgba(59, 130, 246, 0.1); color: var(--neon-blue);
    border: 1px solid rgba(59, 130, 246, 0.3); margin-bottom: 1rem; font-weight: 600;
}
.os-tabs { display: flex; gap: 1.5rem; margin-top: 1.5rem; }
.os-tab {
    font-size: 0.85rem; color: var(--text-secondary); padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent; cursor: pointer; transition: var(--transition);
}
.os-tab:hover { color: var(--text-primary); }
.os-tab.active { color: var(--text-primary); border-bottom-color: var(--neon-blue); font-weight: 500; }

.copy-btn {
    background: transparent; border: 1px solid var(--surface-border);
    color: var(--text-secondary); font-size: 0.7rem; border-radius: 4px;
    padding: 0.2rem 0.6rem; cursor: pointer; transition: var(--transition);
}
.copy-btn:hover { color: var(--text-primary); border-color: var(--surface-border-hover); background: rgba(255,255,255,0.05); }

/* LANGUAGE SUPPORT SECTION */

.lang-controls {
  display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem;
}
.lang-search-wrapper {
  position: relative; max-width: 640px;
}
.lang-search-wrapper svg {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--text-secondary); width: 18px; height: 18px; pointer-events: none;
}
#lang-search {
  width: 100%; padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 10px; color: var(--text-primary);
  font-size: 0.95rem; font-family: var(--font-sans);
  outline: none; transition: var(--transition);
}
#lang-search:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
#lang-search::placeholder { color: #555; }

.lang-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lang-filter {
  padding: 0.4rem 0.9rem; border-radius: 20px;
  border: 1px solid var(--surface-border); background: transparent;
  color: var(--text-secondary); font-size: 0.8rem; cursor: pointer;
  transition: var(--transition); font-family: var(--font-sans);
  white-space: nowrap;
}
.lang-filter:hover { border-color: var(--surface-border-hover); color: var(--text-primary); }
.lang-filter.active {
  background: rgba(139, 92, 246, 0.12); border-color: var(--neon-purple);
  color: var(--neon-purple); font-weight: 500;
}

.lang-count {
  font-size: 0.78rem; color: var(--text-secondary);
  margin-bottom: 1.25rem; font-family: var(--font-mono);
}

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.75rem;
}

.lang-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 10px; padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.25rem;
  transition: var(--transition); position: relative; overflow: hidden;
}
.lang-card::before {
  content: ''; position: absolute; top: 0; left: 0;
  width: 3px; height: 100%;
  background: linear-gradient(to bottom, var(--neon-purple), var(--neon-blue));
  opacity: 0; transition: opacity 0.3s;
}
.lang-card:hover { border-color: var(--surface-border-hover); background: var(--surface-hover); transform: translateY(-2px); }
.lang-card:hover::before { opacity: 1; }

.lang-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.lang-native { font-size: 0.85rem; color: var(--text-secondary); min-height: 1.2em; }
.lang-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 0.6rem; gap: 0.5rem;
}
.lang-code {
  font-family: var(--font-mono); font-size: 0.68rem;
  background: rgba(139, 92, 246, 0.1); color: var(--neon-purple);
  border: 1px solid rgba(139, 92, 246, 0.25); border-radius: 4px;
  padding: 0.15rem 0.45rem; flex-shrink: 0;
}
.lang-dl {
  font-size: 0.72rem; color: #666; text-decoration: none;
  display: flex; align-items: center; gap: 0.3rem;
  transition: color 0.2s;
}
.lang-dl:hover { color: var(--neon-blue); }
.lang-dl svg { width: 12px; height: 12px; flex-shrink: 0; }

.lang-no-results {
  grid-column: 1 / -1; text-align: center;
  padding: 4rem 1rem; color: var(--text-secondary);
}
.lang-no-results p { font-size: 1rem; margin-top: 0.5rem; }

.lang-tip {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: 10px; padding: 1.25rem 1.5rem; margin-top: 2rem;
  color: var(--text-secondary); font-size: 0.875rem; line-height: 1.7;
}
.lang-tip code {
  background: rgba(255,255,255,0.08); padding: 0.2em 0.5em;
  border-radius: 4px; font-family: var(--font-mono);
  font-size: 0.85em; color: #e5e5e5;
}

@media (max-width: 900px) {
  .lang-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
@media (max-width: 600px) {
  .lang-grid { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 0.5rem; }
  #lang-search { font-size: 0.875rem; }
}

/* COLLAPSIBLE LANGUAGE GRID WRAPPER (SEO-safe: overflow:hidden, NOT display:none) */
.lang-grid-wrapper {
  position: relative;
  max-height: 330px;     /* shows ~3 rows — all cards still in DOM for Google */
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.lang-grid-wrapper.expanded {
  max-height: 9999px;    /* effectively no limit when expanded */
}

/* Fade-out gradient at the bottom of the collapsed grid */
.lang-grid-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 110px;
  background: linear-gradient(to bottom, transparent 0%, #030303 90%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}
.lang-grid-wrapper.expanded .lang-grid-fade { opacity: 0; }

/* Show all / Show fewer button row */
.lang-toggle-row {
  display: flex; justify-content: center; margin-top: 1.25rem;
}
.lang-show-more {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.75rem;
  background: rgba(139, 92, 246, 0.07);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 8px; color: var(--neon-purple);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.lang-show-more:hover {
  background: rgba(139, 92, 246, 0.14);
  border-color: var(--neon-purple);
  transform: translateY(-1px);
}
.lang-show-more svg {
  width: 16px; height: 16px; flex-shrink: 0;
  transition: transform 0.35s ease;
}
.lang-show-more.is-expanded svg { transform: rotate(180deg); }
.lang-toggle-row.hidden { display: none; }

/* STATS SECTION */
.stats-section { margin-bottom: 6rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--rad);
  background: var(--surface);
  padding: 3rem 2rem;
  text-align: center;
}
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.stat-number {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-number span { font-size: 0.65em; font-weight: 500; color: var(--neon-purple); -webkit-text-fill-color: var(--neon-purple); }
.stat-label { font-size: 0.78rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); padding: 2rem 1rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* SKIP NAVIGATION (Accessibility + SEO) */
.skip-to-content {
  position: absolute; top: -999px; left: -999px;
  background: var(--neon-purple); color: #fff; padding: 0.75rem 1.5rem;
  border-radius: 8px; font-weight: 600; z-index: 9999;
  transition: none;
}
.skip-to-content:focus { top: 1rem; left: 1rem; }

/* ANIMATIONS & RESPONSIVE */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

@media (max-width: 900px) {
  .workflow-steps, .bento-grid-complex, .split-section, .why-grid, .install-steps-grid, #pane-windows { grid-template-columns: 1fr; }
  .use-cases-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .bento-large, .bento-wide { grid-column: span 1; grid-row: span 1; }
  .split-section.reverse .split-content { order: 1; }
  .split-section.reverse .split-visual { order: 2; }
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(3, 3, 3, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 6rem 2rem;
    gap: 2rem;
    transition: right 0.4s ease;
    border-left: 1px solid var(--surface-border);
    z-index: 99;
  }

  .nav-links.open { right: 0; }

  .nav-toggle { display: flex; }

  .hero-title { font-size: 2.5rem; }
  .hero { margin-top: 8rem; }
  .section { margin-bottom: 5rem; }
  .footer-links { flex-direction: column; gap: 2rem; }
  /* Ensure table-wrapper scrolls horizontally instead of pushing viewport */
  .table-wrapper { border-radius: 10px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2rem; }
  .use-cases-grid { grid-template-columns: 1fr; }
  .bento { padding: 1.5rem; }
  .split-visual { padding: 1rem; }
  .terminal-body { padding: 1rem; font-size: 0.8rem; }
  .os-tabs { flex-wrap: wrap; justify-content: center; gap: 1rem; }
  /* Prevent footer nav from causing overflow */
  .footer-content { flex-direction: column; gap: 2.5rem; }
  .footer-links { gap: 2rem; }
  /* Tighten hero section on very small screens */
  .hero { padding: 0 1rem; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  /* Proof logos: reduce font on tiny screens */
  .proof-logos { font-size: 1rem; gap: 1rem; }
  /* Stats grid on extra-small */
  .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 1.5rem; }
  /* Cheatsheet cards: wrap long code */
  .cheat-code { white-space: pre-wrap; word-break: break-all; }
  /* Section padding */
  .section { padding: 0 0.75rem; }
  h2 { font-size: 1.75rem; }
}
