:root {
    --bg-base: #050505;
    --bg-panel: #0a0a0a;
    --bg-glass: rgba(15, 15, 15, 0.6);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(245, 158, 11, 0.3);
    
    --accent: #FFB000; /* Custom BeezShield Amber */
    --accent-hover: #E69F00;
    --accent-glow: rgba(255, 176, 0, 0.15);
    --electric-blue: #38bdf8;
    --electric-blue-dim: rgba(56, 189, 248, 0.12);
    
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --text-dark: #000000;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    max-width: 100%;
}

main {
    max-width: 100%;
    overflow-x: clip;
}

.mono { font-family: var(--font-mono); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-green { color: #10b981; }
.text-amber { color: var(--accent); }
.text-red { color: #ef4444; }

.center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }

/* Brand Identity v4.1 */
.brand-icon-svg {
    filter: drop-shadow(0 0 8px var(--accent-glow));
}
.brand-text {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.core-node {
    filter: drop-shadow(0 0 15px var(--accent-glow));
    transition: all 0.5s ease;
}
.core-node:hover {
    filter: drop-shadow(0 0 25px var(--accent-glow));
}

.hive-svg text {
    user-select: none;
    pointer-events: none;
}

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.pt-2 { padding-top: 0.5rem; }
.border-top { border-top: 1px solid var(--border-light); }
.inline { display: inline-block; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Backgrounds */
.bg-abstract {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 0%, rgba(30, 20, 0, 0.4), transparent 70%);
}
#swarmCanvas {
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}
.section {
    padding: 8rem 0;
}
.bg-panel {
    background: linear-gradient(180deg, transparent, var(--bg-panel), transparent);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* Navigation */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 70px;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.25rem;
}
.brand-icon { width: 24px; height: 24px; }
.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}
.nav-links a:hover {
    color: var(--text-main);
}

.brand-logo-img {
    max-width: 36px;
    max-height: 36px;
    display: block;
    filter: drop-shadow(0 0 8px var(--accent-glow));
    transition: transform 0.2s ease;
}
.brand-logo-img:hover {
    transform: scale(1.05);
}

/* Hero */
.hero {
    padding-top: 14rem;
    padding-bottom: 6rem;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: 99px;
    background: var(--bg-glass);
    margin-bottom: 2rem;
}
.pulse-dot {
    width: 8px; height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

h1 {
    font-size: 4rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 90%;
}
.highlight {
    color: var(--text-main);
    font-weight: 500;
}
.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}
.btn-primary {
    background: var(--accent);
    color: var(--text-dark);
    box-shadow: 0 0 20px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-secondary {
    background: #fff;
    color: #000;
}
.btn-secondary:hover {
    background: #e5e7eb;
}
.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-light);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.2);
}
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}
.btn-xs {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.btn-block {
    width: 100%;
}
.icon-sm { width: 16px; height: 16px; }

/* Hero Visual Fallback */
.hero-visual {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hive-visual { position: relative; z-index: 2; }
.swarm-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; transition: filter 0.5s ease; }
.swarm-state-stable { filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.2)); }
.swarm-state-warning { filter: drop-shadow(0 0 15px rgba(245, 158, 11, 0.4)); }
.swarm-state-critical { filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.5)); }

.hive-svg {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}
.trust-links { opacity: 0.8; }

/* Proof Strip */
.proof-strip {
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    background: rgba(0,0,0,0.5);
    padding: 1.5rem 0;
}
.proof-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.proof-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}
.proof-item i { width: 16px; height: 16px; color: var(--accent); }

/* Section Headers */
.section-header { margin-bottom: 4rem; }
.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

/* How It Works */
.steps-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 4rem;
}
.step-card {
    flex: 1;
    background: var(--bg-glass);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    position: relative;
    z-index: 2;
}
.step-icon {
    width: 64px; height: 64px;
    margin: 0 auto 1.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}
.step-icon.active {
    background: var(--accent-glow);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}
.step-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.step-connector {
    flex: 0 0 40px;
    height: 1px;
    background: var(--border-light);
    position: relative;
}

/* Scan Layout */
.scan-layout {
    display: grid;
    grid-template-columns: 350px 1fr 280px;
    gap: 1.5rem;
}
.card {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-muted); }
.input-premium {
    width: 100%;
    background: #000;
    border: 1px solid var(--border-light);
    color: #fff;
    padding: 0.875rem;
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color 0.2s;
}
.input-premium:focus { border-color: var(--accent); }
.sim-box {
    background: #000;
    border: 1px dashed var(--border-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}
.status-text {
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.05);
}
.status-text.scanning {
    color: var(--accent);
    animation: pulse-bg 1.5s infinite;
}
@keyframes pulse-bg {
    0%, 100% { background: rgba(245, 158, 11, 0.05); }
    50% { background: rgba(245, 158, 11, 0.15); }
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.metric-box {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.metric-val {
    font-size: 1.5rem;
    font-family: var(--font-mono);
}
.full-width { grid-column: span 2; display: flex; flex-direction: row; justify-content: space-between; align-items: center; }
.code-snippet {
    background: #000;
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    margin-top: 0.5rem;
    color: #a1a1aa;
}

/* Fallback Panel */
.fallback-panel { text-align: center; padding: 2rem 1rem; }
.fallback-icon { color: var(--accent); margin-bottom: 1rem; display: flex; justify-content: center; }
.fallback-icon i { width: 32px; height: 32px; }
.fallback-actions { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.underline { text-decoration: underline; }
.icon-xs { width: 12px; height: 12px; }

/* Hive Status */
.status-list { display: flex; flex-direction: column; gap: 0.75rem; }
.status-item { display: flex; justify-content: space-between; }

/* Builder Handoff */
.code-showcase {
    background: #000;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.code-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255,255,255,0.03);
}
.code-tabs-buttons {
    display: flex;
    flex-wrap: wrap;
    flex: 1 1 auto;
    min-width: 0;
}
.code-tabs-note {
    flex: 1 1 100%;
    text-align: center;
    align-self: center;
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--border-light);
    line-height: 1.45;
}
.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    cursor: pointer;
    border-right: 1px solid var(--border-light);
}
.tab-btn.active {
    background: #000;
    color: var(--accent);
    border-bottom: 1px solid #000;
    margin-bottom: -1px;
}
.code-content {
    padding: 1.5rem;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    min-width: 0;
}
.code-content pre {
    margin: 0;
    color: #e4e4e7;
    min-width: 0;
    max-width: 100%;
}
.code-content .copy-btn {
    align-self: flex-start;
}

/* Pricing Lanes */
.lane-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.lane-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.lane-item strong { font-size: 1.5rem; color: #fff; }

/* SDK Preview */
.sdk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}
.sdk-card {
    border-left: 3px solid var(--accent);
}
.justify-center { justify-content: center; }

/* Discovery */
.discovery-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.d-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #000;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    transition: 0.2s;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.d-link i,
.d-link svg {
    flex-shrink: 0;
}
.d-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-light);
    padding: 4rem 0;
    margin-top: 4rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}
.footer-links {
    display: flex;
    gap: 2rem;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}
.footer-links a:hover { color: var(--text-main); }
.footer-claim-note {
    max-width: 28rem;
    line-height: 1.5;
}

/* Brand assets v12 */
.brand-link {
    text-decoration: none;
    color: inherit;
}
.brand-logo-img {
    display: block;
    flex-shrink: 0;
}


.section-compact {
    padding: 4rem 0;
}

.proof-item-accent a {
    color: var(--electric-blue);
    text-decoration: none;
}
.proof-item-accent a:hover {
    text-decoration: underline;
}

.proof-card-x402 {
    border-color: rgba(56, 189, 248, 0.25);
    background: linear-gradient(135deg, var(--bg-panel), rgba(56, 189, 248, 0.04));
}
.proof-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.proof-card-title {
    font-size: 1.5rem;
    margin: 0;
}

.api-quickstart-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 1.5rem;
    align-items: start;
}
.api-meta-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.api-meta-list code {
    color: var(--electric-blue);
    word-break: break-all;
}
.code-card pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    overflow-x: auto;
}
.code-card code {
    white-space: pre-wrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .scan-layout { grid-template-columns: 1fr; }
    .hero { padding-top: 10rem; padding-bottom: 4rem; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .cta-group { justify-content: center; }
    h1 { font-size: 3rem; }
    .steps-grid { flex-direction: column; }
    .step-connector { width: 1px; height: 40px; }
    .api-quickstart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .lane-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; gap: 2rem; text-align: center; align-items: center; }

    .code-tabs {
        flex-wrap: wrap;
    }

    #discovery .discovery-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    #discovery .d-link {
        justify-content: center;
        flex-wrap: wrap;
        text-align: center;
    }

    .sdk-preview-cta {
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100%;
    }
    .sdk-preview-cta .btn,
    .sdk-preview-cta a.btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .code-tabs {
        flex-wrap: nowrap;
        align-items: center;
    }
    .code-tabs-note {
        flex: 0 0 auto;
        width: auto;
        border-top: none;
        margin-left: auto;
        text-align: right;
        padding: 0 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #discovery .discovery-links {
        padding: 0;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
