/*
 * PrimeTradeBot marketing site — PBS dark theme, electric blue accent.
 * Blue is the only accent color used anywhere on this site. Dark mode only, no toggle.
 *
 * Zero inline styles anywhere in the HTML — the CSP (see
 * deploy/nginx-security-headers.conf) is `style-src 'self' <google fonts>`,
 * so every rule that matters lives in this one file. Google Fonts is loaded
 * via a <link rel="stylesheet"> in each page's <head>, not @import here —
 * keeps the two external origins (fonts.googleapis.com, fonts.gstatic.com)
 * visible to scripts/verify_site.py's HTML link scan instead of buried in CSS.
 */

:root {
    /* === PBS COLOR SYSTEM === */
    --bg-primary: #010101;
    --bg-secondary: #0a0b10;
    --bg-card: #10121a;
    --bg-card-hover: #161825;

    --accent: #3B82F6;
    --accent-light: #60A5FA;
    --accent-dim: #1E3A5F;
    --accent-glow: rgba(59, 130, 246, 0.15);

    --text-primary: #E8EAED;
    --text-secondary: #8B8F96;
    --text-dim: #4A4D55;

    --border: #1A1C25;
    --border-accent: #2A3A5F;

    --gradient: linear-gradient(135deg, #3B82F6, #60A5FA);
    --gradient-subtle: linear-gradient(135deg, #1E3A5F, #2A4A7F);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

    --max-width: 1180px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === SKIP LINK (a11y) === */
.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--accent);
    color: #010101;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 6px 0;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

/* === NAV === */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(1, 1, 1, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo-link { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 28px; height: 28px; color: var(--accent); }
.logo-text {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}
.logo-text .accent { color: var(--accent); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links a {
    padding: 8px 16px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 6px;
    transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--text-primary);
    background: var(--bg-card);
}
.nav-links a.nav-cta {
    color: var(--accent-light);
    border: 1px solid var(--border-accent);
}
.nav-links a.nav-cta:hover {
    background: var(--accent-glow);
    color: var(--accent-light);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

/* === HERO === */
.hero {
    position: relative;
    padding: 120px 0 96px;
    overflow: hidden;
    text-align: center;
}
.grid-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000 0%, transparent 75%);
    opacity: 0.6;
}
.hero-glow {
    position: absolute;
    top: -220px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}
.hero > * { position: relative; z-index: 1; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-light);
    background: var(--accent-glow);
    border: 1px solid var(--border-accent);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 28px;
}
.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}
.hero h1 {
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
.hero h1 .accent { color: var(--accent); }
.tagline {
    margin-top: 22px;
    font-size: clamp(1.1rem, 2.4vw, 1.4rem);
    color: var(--text-primary);
    font-weight: 600;
}
.subtitle {
    margin-top: 10px;
    font-size: 1rem;
    color: var(--text-secondary);
}
.hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
    border: 1px solid transparent;
}
.btn-primary {
    background: var(--gradient);
    color: #010101;
}
.btn-primary:hover { box-shadow: 0 0 24px var(--accent-glow); transform: translateY(-1px); }
.btn-secondary {
    background: transparent;
    border-color: var(--border-accent);
    color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-card); border-color: var(--accent); }

/* === SECTIONS === */
section { padding: 88px 0; }
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}
.section-kicker {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-light);
    margin-bottom: 12px;
    display: block;
}
.section-header h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.section-header p {
    margin-top: 14px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* === FEATURE CARDS === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    background: var(--bg-card-hover);
    box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px rgba(59, 130, 246, 0.05);
}
.feature-index {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-light);
    letter-spacing: 0.05em;
}
.feature-card h3 {
    margin-top: 14px;
    font-size: 1.2rem;
    font-weight: 700;
}
.feature-card p {
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.feature-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
    margin-bottom: 18px;
}

/* === ARCHITECTURE / LAYER STACK === */
.arch-diagram {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 720px;
    margin: 0 auto;
}
.arch-layer {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 26px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.arch-layer:hover {
    border-color: var(--border-accent);
    box-shadow: 0 0 15px var(--accent-glow), inset 0 0 15px var(--accent-glow);
}
.arch-layer .arch-num {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-light);
    width: 28px;
    flex-shrink: 0;
}
.arch-layer .arch-body h4 {
    font-size: 1.02rem;
    font-weight: 700;
}
.arch-layer .arch-body p {
    margin-top: 4px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.arch-connector {
    width: 2px;
    height: 26px;
    margin: 0 auto;
    background: linear-gradient(var(--accent-dim), var(--accent));
    position: relative;
}
.arch-connector::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

/* === NUMBERS STRIP === */
.numbers-strip {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}
.number-item .number {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    color: var(--accent);
}
.number-item .number-label {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

/* === GENERIC CONTENT (about/technology pages) === */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.prose h2:first-child { margin-top: 0; }
.prose p {
    color: var(--text-secondary);
    font-size: 1.02rem;
    margin-bottom: 16px;
}
.prose p strong { color: var(--text-primary); font-weight: 600; }
.prose ul { margin: 16px 0; }
.prose li {
    color: var(--text-secondary);
    padding-left: 22px;
    position: relative;
    margin-bottom: 10px;
    font-size: 1.02rem;
}
.prose li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.callout {
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 32px 0;
    box-shadow: inset 0 0 20px var(--accent-glow);
}
.callout p { color: var(--text-primary); margin: 0; font-size: 0.98rem; }
.callout p + p { margin-top: 10px; }

.page-hero {
    padding: 72px 0 24px;
    text-align: center;
}
.page-hero .section-kicker { justify-content: center; display: block; }
.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-hero p {
    margin-top: 16px;
    color: var(--text-secondary);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.05rem;
}

/* === TECH GRID (technology.html venues / AI cards) === */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 32px 0;
}
.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}
.tech-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.tech-card .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    flex-shrink: 0;
}
.tech-card .status-dot.status-dim { background: var(--text-dim); box-shadow: none; }
.tech-card p {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* === REVEAL ANIMATION === */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* === FOOTER === */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 56px 0 40px;
    background: var(--bg-secondary);
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    flex-wrap: wrap;
}
.footer-brand .logo-text { display: block; margin-bottom: 10px; }
.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 320px;
}
.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}
.footer-col h5 {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 14px;
}
.footer-col a, .footer-col span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
}
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom .copyright {
    font-size: 0.82rem;
    color: var(--text-dim);
}
.disclaimer {
    font-size: 0.8rem;
    color: var(--text-dim);
    max-width: 640px;
    line-height: 1.5;
}

/* === 404 PAGE === */
.not-found {
    text-align: center;
    padding: 140px 0;
}
.not-found .code {
    font-family: var(--font-mono);
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    text-shadow: 0 0 30px var(--accent-glow);
}
.not-found h1 { margin-top: 12px; font-size: 1.5rem; }
.not-found p { margin-top: 12px; color: var(--text-secondary); }
.not-found .btn { margin-top: 32px; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
    .site-nav.is-open .nav-links {
        display: flex;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        padding: 12px 24px 20px;
        gap: 4px;
    }
    .site-nav.is-open .nav-links a { width: 100%; }
    .features-grid { grid-template-columns: 1fr; }
    .numbers-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
    .tech-grid { grid-template-columns: 1fr; }
    .footer-grid { flex-direction: column; }
    .footer-links { gap: 32px; }
    .hero { padding: 88px 0 64px; }
    section { padding: 64px 0; }
}

@media (max-width: 375px) {
    .container { padding: 0 16px; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
    .footer-links { gap: 24px; }
}
