/* style.css */
:root {
    --bg-main: #050505;
    --bg-alt: #0a0a0a;
    --bg-card: #0f0f0f;
    --border: #222222;
    
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --accent: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --nav-height: 118px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-family: var(--font-main); }
body { background-color: var(--bg-main); color: var(--text-main); line-height: 1.7; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-padding { padding: 120px 0; }
.alt-bg { background-color: var(--bg-alt); }
.border-y { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Branding */
.brand-logo { height: 97.5px; width: auto; display: block; object-fit: contain; }
.hero-logo { height: 210px; width: auto; margin-bottom: 24px; display: block; object-fit: contain; }
.product-logo { height: 40px; width: auto; margin-bottom: 24px; opacity: 0.9; object-fit: contain; }
.footer-logo { height: 36px; width: auto; margin-bottom: 16px; opacity: 0.9; object-fit: contain; }

/* Typography */
h1 { font-size: 3.5rem; letter-spacing: -0.02em; color: var(--text-main); font-weight: 600; margin-bottom: 1.2rem; line-height: 1.1; }
h2 { font-size: 2.2rem; font-weight: 500; margin-bottom: 1rem; color: var(--text-main); }
h3 { font-size: 1.5rem; font-weight: 500; margin-bottom: 1rem; color: var(--text-main); }
h4 { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.5px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.5rem; }

.section-header { margin-bottom: 60px; max-width: 800px; margin-left: auto; margin-right: auto; }

/* Buttons */
.btn { display: inline-block; padding: 12px 28px; border-radius: 6px; font-weight: 500; font-size: 0.95rem; transition: all 0.2s ease-in-out; cursor: pointer; border: none; text-align: center; font-family: inherit; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.btn-primary { background: var(--primary); color: #000; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* Common Utilities */
.text-allowed { color: var(--accent); font-weight: 500; }
.text-review { color: var(--warning); font-weight: 500; }
.text-blocked { color: var(--danger); font-weight: 500; }
.sim-note { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }

/* Navbar */
.navbar { position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height); background-color: rgba(5, 5, 5, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); z-index: 1000; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; justify-content: space-between; align-items: center; }
.logo a { display: flex; align-items: center; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-link { font-size: 0.9rem; font-weight: 400; color: var(--text-muted); transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-download { padding: 8px 16px; font-size: 0.85rem; margin-left: 16px; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.mobile-menu-btn .bar { display: block; width: 24px; height: 2px; margin: 5px 0; background-color: var(--text-main); transition: 0.3s; }

/* Hero Section */
.hero-section { min-height: 85vh; display: flex; align-items: center; padding-top: calc(var(--nav-height) + 10px); }
.hero-content { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 80px; align-items: center; }
.demo-badge-hero { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 1px; color: var(--primary); margin-bottom: 24px; }
.hero-text p { font-size: 1.15rem; max-width: 480px; margin-bottom: 40px; }
.hero-buttons { display: flex; gap: 16px; }
.simple-shield-wrapper { display: flex; justify-content: flex-end; align-items: center; height: 300px; opacity: 0.7; }
.shield-icon { width: 300px; height: 300px; max-width: 100%; }

/* Product Layout (Landscape) */
.product-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 80px; align-items: start; }
.product-left h2 { font-size: 2.4rem; margin-bottom: 40px; }
.feat-list { display: flex; flex-direction: column; gap: 32px; }
.feat-item { border-left: 2px solid var(--border); padding-left: 24px; }
.feat-item h4 { font-size: 0.9rem; color: var(--text-main); margin-bottom: 6px; }
.feat-item p { font-size: 0.95rem; margin-bottom: 0; }

/* Dashboard UI */
.dash-status-strip { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 32px; background: rgba(255, 255, 255, 0.01); border: 1px solid var(--border); padding: 16px 32px; border-radius: 6px; margin-bottom: 24px; max-width: 900px; margin-left: auto; margin-right: auto; }
.d-status-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.d-status-item.fw-brand { font-weight: 600; color: var(--text-main); font-size: 0.95rem; letter-spacing: 0.5px; }
.st-label { color: var(--text-muted); font-weight: 600; letter-spacing: 0.5px; }
.st-val { color: var(--primary); font-weight: 500; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background-color: var(--primary); display: inline-block; }
.demo-badge { display: inline-block; background: rgba(56, 189, 248, 0.05); color: var(--primary); padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px; border: 1px solid rgba(56, 189, 248, 0.2); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); padding: 20px; border-radius: 8px; text-align: center; }
.stat-card h4 { font-size: 0.75rem; }
.stat-value { font-size: 1.8rem; font-weight: 600; margin-top: 8px; }
.stat-value.total { color: var(--primary); }
.stat-value.allowed { color: var(--accent); }
.stat-value.review { color: var(--warning); }
.stat-value.blocked { color: var(--danger); }

.dash-panel { background: var(--bg-card); border: 1px solid var(--border); padding: 32px; border-radius: 8px; }

/* Simulator & Errors */
.simulator-container { display: flex; gap: 12px; margin-top: 24px; }
.simulator-input { flex: 1; background: var(--bg-main); border: 1px solid var(--border); color: var(--text-main); padding: 12px 16px; border-radius: 6px; font-size: 0.95rem; font-family: var(--font-main); }
.simulator-input:focus { outline: none; border-color: var(--primary); }
.sim-loading { margin-top: 16px; font-size: 0.9rem; color: var(--text-muted); font-style: italic; }
.sim-loading.hidden { display: none; }

.inline-error { margin-top: 16px; padding: 12px 16px; background: rgba(248, 113, 113, 0.05); border-left: 3px solid var(--danger); color: var(--text-main); font-size: 0.9rem; border-radius: 4px; }
.inline-error.hidden { display: none; }
.inline-error span.err-label { font-weight: 600; color: var(--danger); margin-right: 8px; }

.simulator-result { margin-top: 24px; padding: 20px; border-radius: 6px; background: rgba(255,255,255,0.02); border-left: 3px solid var(--border); transition: 0.3s ease; }
.simulator-result.hidden { display: none; }
.result-header { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 600; }
.result-reason { font-size: 0.9rem; color: var(--text-muted); }
.simulator-result.res-allow { border-left-color: var(--accent); }
.simulator-result.res-allow .result-decision { color: var(--accent); }
.simulator-result.res-review { border-left-color: var(--warning); }
.simulator-result.res-review .result-decision { color: var(--warning); }
.simulator-result.res-block { border-left-color: var(--danger); }
.simulator-result.res-block .result-decision { color: var(--danger); }

/* Schema & Inspector */
.schema-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 32px; }
.schema-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; }
.schema-item { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.02); font-size: 0.9rem; font-family: monospace; }
.sch-key { color: var(--text-muted); }
.sch-val { color: var(--text-main); }
.sch-bool { color: var(--primary); }
.sch-review { color: var(--warning); }
.future-note { font-size: 0.85rem; color: var(--text-muted); border-left: 2px solid var(--border); padding-left: 12px; margin-top: 24px; }
.btn-link { background: none; border: none; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; padding: 8px 0; transition: color 0.2s; font-family: var(--font-main); }
.btn-link:hover { color: var(--text-main); }
.btn-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
.json-inspector { margin-top: 16px; background: rgba(0,0,0,0.3); border: 1px solid var(--border); padding: 16px; border-radius: 6px; font-family: monospace; font-size: 0.85rem; color: #c9d1d9; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.json-inspector.hidden { display: none; }
.json-inspector pre { margin: 0; }

/* Events Table */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.clean-table { width: 100%; border-collapse: collapse; }
.clean-table th { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.5px; }
.clean-table td { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.02); font-size: 0.95rem; color: var(--text-main); white-space: nowrap; }
.clean-table tr:last-child td { border-bottom: none; }
.tool-code { background: rgba(255,255,255,0.05); padding: 4px 8px; border-radius: 4px; font-family: monospace; font-size: 0.85rem; color: var(--text-main); border: 1px solid var(--border); }

/* Architecture Flow */
.workflow-timeline { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1000px; margin: 40px auto; position: relative; }
.workflow-timeline::before { content: ''; position: absolute; top: 16px; left: 0; right: 0; height: 1px; background: var(--border); z-index: 0; }
.wt-step { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; flex: 1; text-align: center; padding: 0 8px; }
.wt-node { font-size: 0.85rem; font-weight: 600; letter-spacing: 1px; color: var(--text-main); background: var(--bg-main); border: 1px solid var(--border); padding: 8px 16px; border-radius: 4px; margin-bottom: 16px; }
.wt-step p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; margin: 0; }

/* Tabs & Code Window */
.code-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 16px; background: var(--bg-card); border-radius: 8px 8px 0 0; }
.code-tab { background: transparent; border: none; color: var(--text-muted); padding: 16px 24px; cursor: pointer; font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; transition: color 0.2s; }
.code-tab:hover { color: var(--text-main); }
.code-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.code-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.code-window { background: #000; border-radius: 0 0 8px 8px; border: 1px solid var(--border); border-top: none; }
.code-header { background: var(--bg-card); padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.code-header-left { display: flex; align-items: center; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.copy-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 4px 12px; border-radius: 4px; font-size: 0.75rem; cursor: pointer; transition: 0.2s; }
.copy-btn:hover { color: var(--text-main); border-color: var(--text-muted); }
.copy-btn:focus-visible { outline: 2px solid var(--primary); }

.code-body { padding: 32px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.code-body pre { margin: 0; }
.code-body code { font-family: 'Courier New', Courier, monospace; font-size: 0.9rem; color: #c9d1d9; line-height: 1.6; }
.code-body .key { color: #7ee787; }
.code-body .string { color: #a5d6ff; }
.code-body .info { color: #79c0ff; }

/* Documentation List */
.doc-list { list-style: none; padding: 0; }
.doc-list li { border-bottom: 1px solid var(--border); }
.doc-list li:first-child { border-top: 1px solid var(--border); }
.doc-list a { display: flex; justify-content: space-between; align-items: center; padding: 24px 16px; font-size: 1.05rem; color: var(--text-main); transition: padding 0.2s, color 0.2s, background 0.2s; }
.doc-list a:hover { color: var(--primary); padding-left: 24px; background: rgba(255,255,255,0.01); }
.doc-list a:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.doc-list span { color: var(--text-muted); transition: transform 0.2s; }
.doc-list a:hover span { transform: translateX(5px); color: var(--primary); }

/* FAQ */
.faq-accordion { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question { width: 100%; background: none; border: none; color: var(--text-main); font-size: 1rem; font-weight: 500; text-align: left; padding: 24px 16px; cursor: pointer; transition: color 0.2s; font-family: inherit; }
.faq-question:hover { color: var(--primary); }
.faq-question:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.faq-item.active .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; padding-bottom: 0; }
.faq-item.active .faq-answer-inner { padding-bottom: 24px; padding-left: 16px; }
.faq-answer-inner p { margin: 0; font-size: 0.95rem; }

/* Download CTA Msg */
.dl-msg { margin-top: 32px; font-size: 0.95rem; color: var(--warning); border-top: 1px solid var(--border); padding-top: 16px; font-weight: 500; }
.dl-msg.hidden { display: none; }

/* Footer Links */
.footer-link { color: var(--text-muted); text-decoration: none; transition: color 0.2s; font-size: 0.9rem; }
.footer-link:hover { color: var(--text-main); }
.footer-link:focus-visible { outline: 2px solid var(--primary); border-radius: 2px; }

/* Animations */
.reveal { opacity: 0; transform: translateY(15px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { 
    .reveal { transition: none; opacity: 1; transform: none; } 
    .simulator-result { transition: none; }
    .faq-answer { transition: none; }
    .doc-list a { transition: none; }
    .doc-list span { transition: none; }
}
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* Responsive */
@media (max-width: 992px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-text p { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }
    .hero-logo { margin-left: auto; margin-right: auto; }
    .simple-shield-wrapper { justify-content: center; height: auto; }
    
    .product-layout { grid-template-columns: 1fr; gap: 40px; }
    .product-left { text-align: center; }
    .product-logo { margin-left: auto; margin-right: auto; }
    .feat-list { align-items: center; }
    .feat-item { text-align: left; max-width: 400px; width: 100%; }
    
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    h1 { font-size: 3rem; }
    .nav-links { gap: 16px; }
    .nav-download { margin-left: 0; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .nav-links { position: absolute; top: var(--nav-height); left: 0; width: 100%; background-color: rgba(5, 5, 5, 0.98); flex-direction: column; padding: 24px; gap: 24px; border-bottom: 1px solid var(--border); transform: translateY(-150%); transition: 0.3s ease-in-out; opacity: 0; pointer-events: none; }
    .nav-links.active { transform: translateY(0); opacity: 1; pointer-events: auto; }
    
    .brand-logo { height: 60px; }
    .hero-logo { height: auto; width: auto; max-width: 160px; object-fit: contain; }
    .section-padding { padding: 80px 0; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .dash-status-strip { flex-direction: column; gap: 16px; text-align: center; align-items: stretch; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    
    .workflow-timeline { flex-direction: column; align-items: center; gap: 32px; padding: 0; }
    .workflow-timeline::before { top: 0; bottom: 0; left: 50%; right: auto; width: 1px; height: 100%; transform: translateX(-50%); }
    .wt-step { width: 100%; max-width: 280px; padding: 0; background: var(--bg-main); }
    .trust-polish .trust-item { justify-content: center; width: 100%; text-align: center; }
    
    .simulator-container { flex-direction: column; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; }
    
    .schema-grid { grid-template-columns: 1fr; gap: 8px; }
    
    .platform-buttons { flex-direction: column; }
    .platform-buttons .btn { width: 100%; }
}
