/* ============================================
   GLARC Documentation Site
   Custom trading-terminal aesthetic
   ============================================ */

:root {
    /* Core palette — logo-matched: glacier navy + primary blue + ice-blue arc */
    --bg-primary: #0F172A;
    --bg-secondary: #111C33;
    --bg-card: #162241;
    --bg-elevated: #1B2A4E;

    --border-subtle: #1E3A5F;
    --border-medium: #2A4676;
    --border-bright: #3A5A96;

    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --logo-primary: #2563EB;
    --logo-navy-mid: #1E3A5F;
    --logo-ice: #38BDF8;
    --logo-ice-soft: #BAE6FD;
    --logo-snow: #F0F9FF;

    --accent-green: #38BDF8;
    --accent-green-dim: #1E40AF;
    --accent-green-glow: rgba(56, 189, 248, 0.12);

    --accent-amber: #FBBF24;
    --accent-amber-dim: #92400E;

    --accent-red: #F87171;
    --accent-blue: #60A5FA;
    --accent-purple: #A78BFA;
    --accent-cyan: #67E8F9;
    --accent-orange: #FB923C;

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--accent-green); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    color: var(--accent-green);
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===================== NAV ===================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    height: 56px;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-logo {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.nav-logo:hover { text-decoration: none; }
.logo-icon {
    color: var(--accent-green);
    font-size: 1.3rem;
}
.logo-mark {
    display: inline-flex;
    width: 32px;
    height: 24px;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 4px rgba(56, 189, 248, 0.25));
}
.logo-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}
.logo-mark-sm { width: 26px; height: 20px; }
.nav-links {
    display: flex;
    gap: 16px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.nav-links a {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover {
    color: var(--accent-green);
    text-decoration: none;
}

.nav-cta-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 16px;
}
.nav-cta {
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}
.nav-cta:hover {
    background: var(--accent-green);
    color: var(--bg-primary);
    text-decoration: none;
}

/* ===================== HERO ===================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

/* Animated grid background */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border-subtle) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
    opacity: 0.5;
    animation: gridPulse 8s ease-in-out infinite;
}
@keyframes gridPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.55; }
}

/* Decorative "candlestick" bars */
.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 58px,
            var(--accent-green-dim) 58px,
            var(--accent-green-dim) 60px
        );
    mask-image: linear-gradient(to top, rgba(0,0,0,0.08) 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.08) 0%, transparent 100%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 720px;
    height: 720px;
    background:
        radial-gradient(circle at 50% 45%, rgba(37, 99, 235, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-green);
    border: 1px solid var(--accent-green-dim);
    background: rgba(56, 189, 248, 0.06);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-primary) 55%, var(--logo-ice) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-green);
    line-height: 1;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    letter-spacing: 0.5px;
}
.btn-primary {
    background: linear-gradient(135deg, var(--logo-primary), var(--logo-ice));
    color: #F8FAFC;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3B82F6, #7DD3FC);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.35);
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-bright);
}
.btn-outline:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
    text-decoration: none;
    transform: translateY(-1px);
}

/* ===================== SECTIONS ===================== */
.section {
    padding: 100px 0;
}
.section-alt {
    background: var(--bg-secondary);
}
.section-header {
    text-align: center;
    margin-bottom: 64px;
}
.section-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent-green);
    display: block;
    margin-bottom: 12px;
}
.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.section-desc {
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.7;
}

.section-cta {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* ===================== COMPARISON ===================== */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.comp-card {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.3s;
}
.comp-card:hover {
    border-color: var(--border-bright);
}
.comp-header {
    padding: 28px 28px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
}
.comp-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 28px;
    right: 28px;
    height: 1px;
    background: var(--border-subtle);
}
.comp-header.lib { border-left: 3px solid var(--accent-blue); }
.comp-header.mm { border-left: 3px solid var(--accent-amber); }
.comp-icon {
    font-size: 1.5rem;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
}
.comp-header h3 {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 600;
}
.comp-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-secondary);
}
.comp-body {
    padding: 24px 28px 28px;
}
.comp-body p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}
.comp-list {
    list-style: none;
}
.comp-list li {
    padding: 6px 0;
    font-size: 0.92rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.check {
    color: var(--accent-green);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ===================== MODULES GRID ===================== */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 64px;
}
.module-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.25s;
    position: relative;
}
.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-green), transparent);
    opacity: 0;
    transition: opacity 0.25s;
}
.module-card:hover {
    border-color: var(--border-bright);
    transform: translateY(-2px);
}
.module-card:hover::before { opacity: 1; }

.module-icon {
    font-size: 1.3rem;
    margin-bottom: 12px;
}
.module-card h4 {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--accent-green);
}
.module-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 14px;
}
.module-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.module-files code {
    font-size: 0.72rem;
    padding: 2px 8px;
    background: var(--bg-primary);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

/* ===================== STRATEGIES ===================== */
.strategies-section, .signals-section {
    margin-top: 64px;
}
.strategies-section h3,
.signals-section h3,
.mm-modules h3,
.protocol-section h3,
.hierarchy-section h3,
.diff-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.strategies-section h3::before,
.signals-section h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-green);
    border-radius: 2px;
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: border-color 0.25s;
}
.strategy-card:hover { border-color: var(--border-bright); }

.strategy-type {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.mm-type { background: rgba(56, 189, 248, 0.12); color: var(--accent-green); }
.mom-type { background: rgba(66, 165, 245, 0.12); color: var(--accent-blue); }
.coint-type { background: rgba(171, 71, 188, 0.12); color: var(--accent-purple); }
.mr-type { background: rgba(240, 180, 41, 0.12); color: var(--accent-amber); }
.tb-type { background: rgba(255, 112, 67, 0.12); color: var(--accent-orange); }
.hyb-type { background: rgba(38, 198, 218, 0.12); color: var(--accent-cyan); }

.strategy-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}
.strategy-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 14px;
}
.strategy-params {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.strategy-params span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    background: var(--bg-primary);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

/* ===================== SIGNALS ===================== */
.signal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.signal-group {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
}
.signal-group h5 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.signal-group ul {
    list-style: none;
}
.signal-group li {
    font-size: 0.88rem;
    color: var(--text-secondary);
    padding: 4px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.signal-group li:last-child { border-bottom: none; }

/* ===================== STRIKE-MM SECTION ===================== */
.diff-section {
    margin-bottom: 48px;
}
.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.diff-card {
    border-radius: var(--radius-md);
    padding: 24px;
}
.diff-card.removed {
    background: rgba(239, 83, 80, 0.06);
    border: 1px solid rgba(239, 83, 80, 0.2);
}
.diff-card.added {
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.2);
}
.diff-card h5 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}
.diff-card.removed h5 { color: var(--accent-red); }
.diff-card.added h5 { color: var(--accent-green); }
.diff-card ul {
    list-style: none;
}
.diff-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 5px 0;
    line-height: 1.6;
}

/* Module List */
.mm-modules { margin-bottom: 48px; }
.module-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mod-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: start;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
    gap: 20px;
}
.mod-row:hover { border-color: var(--border-bright); }
.mod-name {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.mod-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mod-dot.exec { background: var(--accent-green); }
.mod-dot.exch { background: var(--accent-blue); }
.mod-dot.db { background: var(--accent-purple); }
.mod-dot.redis { background: var(--accent-red); }
.mod-dot.risk { background: var(--accent-amber); }
.mod-dot.mon { background: var(--accent-cyan); }
.mod-dot.api { background: var(--accent-orange); }
.mod-dot.cfg { background: #78909c; }
.mod-dot.orch { background: #aed581; }

.mod-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Protocol Code Block */
.protocol-section { margin-bottom: 48px; }
.protocol-section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.code-block {
    background: #0a0c10;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.78rem;
}
.code-lang {
    color: var(--accent-green);
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.code-file {
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.code-block pre {
    padding: 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.7;
}
.code-block code {
    background: none;
    padding: 0;
    font-size: inherit;
    color: var(--text-secondary);
}
.kw { color: #c792ea; }
.cls { color: #82aaff; }
.fn { color: #f0c674; }
.str { color: #c3e88d; }
.num { color: #f78c6c; }
.cmt { color: #546e7a; font-style: italic; }

/* Hierarchy */
.hierarchy-section { margin-bottom: 48px; }
.hierarchy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}
.h-level {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 520px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
}
.h-label {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 140px;
}
.h-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.h-client { border-left: 3px solid var(--accent-blue); }
.h-account { border-left: 3px solid var(--accent-green); }
.h-strategy { border-left: 3px solid var(--accent-amber); }
.h-orders { border-left: 3px solid var(--accent-purple); }
.h-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 4px 0;
}

/* ===================== ARCHITECTURE ===================== */
.arch-block {
    margin-bottom: 64px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
}
.arch-block h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.arch-block > p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

/* Venue Diagram */
.arch-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}
.arch-row {
    display: flex;
    justify-content: center;
}
.arch-row-3 { gap: 20px; }
.arch-box {
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
}
.arch-box small {
    display: block;
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.75rem;
}
.arch-strategy {
    background: rgba(66, 165, 245, 0.12);
    border: 1px solid rgba(66, 165, 245, 0.3);
    color: var(--accent-blue);
}
.arch-protocol {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-green);
}
.arch-backtest {
    background: rgba(171, 71, 188, 0.1);
    border: 1px solid rgba(171, 71, 188, 0.3);
    color: var(--accent-purple);
}
.arch-live {
    background: rgba(240, 180, 41, 0.1);
    border: 1px solid rgba(240, 180, 41, 0.3);
    color: var(--accent-amber);
}
.arch-queued {
    background: rgba(38, 198, 218, 0.1);
    border: 1px solid rgba(38, 198, 218, 0.3);
    color: var(--accent-cyan);
}
.arch-connector {
    color: var(--text-muted);
    font-size: 1.2rem;
    text-align: center;
}
.arch-connector-split {
    display: flex;
    justify-content: center;
    gap: 80px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Flow Diagram */
.flow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 20px 0;
}
.flow-step {
    display: flex;
    align-items: center;
}
.flow-box {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.5;
    white-space: nowrap;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
}
.flow-arrow {
    color: var(--accent-green);
    padding: 0 8px;
    font-size: 1.1rem;
}
.flow-exchange { border-color: rgba(66, 165, 245, 0.3); color: var(--accent-blue); }
.flow-redis { border-color: rgba(239, 83, 80, 0.3); color: var(--accent-red); }
.flow-strat { border-color: rgba(171, 71, 188, 0.3); color: var(--accent-purple); }
.flow-risk { border-color: rgba(240, 180, 41, 0.3); color: var(--accent-amber); }
.flow-queue { border-color: rgba(239, 83, 80, 0.3); color: var(--accent-red); }
.flow-exec { border-color: rgba(56, 189, 248, 0.3); color: var(--accent-green); }
.flow-api { border-color: rgba(66, 165, 245, 0.3); color: var(--accent-blue); }

/* DB Diagram */
.db-diagram {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 20px 0;
}
.db-box {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.db-header {
    padding: 12px 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.db-md { background: rgba(66, 165, 245, 0.12); color: var(--accent-blue); border-bottom: 1px solid rgba(66, 165, 245, 0.2); }
.db-td { background: rgba(56, 189, 248, 0.12); color: var(--accent-green); border-bottom: 1px solid rgba(56, 189, 248, 0.2); }
.db-title {
    padding: 12px 20px 4px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.db-box ul {
    list-style: none;
    padding: 4px 20px 16px;
}
.db-box li {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 3px 0;
}

/* Risk Pipeline */
.risk-pipeline {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 20px 0;
}
.risk-step { display: flex; align-items: center; }
.risk-arrow {
    color: var(--accent-amber);
    padding: 0 12px;
    font-size: 1.1rem;
}
.risk-box {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    text-align: center;
    font-size: 0.88rem;
}
.risk-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.82rem;
    color: var(--accent-amber);
}
.risk-checks { max-width: 280px; }
.risk-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}
.risk-items span {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 2px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}
.risk-cb { min-width: 200px; }
.risk-states {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}
.cb-closed { color: var(--accent-green); font-weight: 600; }
.cb-open { color: var(--accent-red); font-weight: 600; }
.cb-half { color: var(--accent-amber); font-weight: 600; }
.cb-arrow { color: var(--text-muted); }
.risk-result {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* ===================== TECH STACK ===================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.tech-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: border-color 0.25s;
}
.tech-card:hover { border-color: var(--border-bright); }
.tech-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-green);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
}
.tech-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.tech-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.tech-item span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ===================== BACKTEST ===================== */
.backtest-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.bt-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    position: relative;
    transition: border-color 0.25s;
}
.bt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: var(--accent-purple);
    border-radius: 2px;
}
.bt-card:hover { border-color: var(--border-bright); }
.bt-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}
.bt-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ===================== FOOTER ===================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-brand {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.footer-tagline {
    font-weight: 400;
    font-size: 0.82rem;
    color: var(--text-muted);
    letter-spacing: 0;
    margin-left: 8px;
}
.footer-info {
    font-size: 0.82rem;
    color: var(--text-muted);
}
.footer-legal {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
    text-align: center;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}
.footer-legal strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* ===================== INVESTORS ===================== */
.investors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 16px;
}
.investor-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
}
.investor-badge {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-green);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 5px 11px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.investor-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}
.investor-card > p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}
.investor-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.investor-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.investor-stat-value {
    font-family: var(--font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-green);
    margin-bottom: 2px;
}
.investor-stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.investor-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}
.investor-list li {
    position: relative;
    padding: 6px 0 6px 22px;
    font-size: 0.92rem;
    color: var(--text-secondary);
}
.investor-list li::before {
    content: '\2192';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}
.investor-actions {
    margin-top: auto;
    padding-top: 8px;
}
.investor-footnote {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===================== CAREER FORM ===================== */
.career-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
}
.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-row label {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="url"],
.form-row textarea {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm, 6px);
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus,
.form-row input[type="url"]:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.form-row textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.55;
}
.form-row input[type="file"] {
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}
.form-status {
    font-size: 0.88rem;
    color: var(--text-secondary);
    min-height: 1.2em;
}
.form-status.success { color: var(--accent-green); }
.form-status.error   { color: #e0615a; }

.form-row select {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm, 6px);
    padding: 11px 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--accent-green) 50%),
                      linear-gradient(135deg, var(--accent-green) 50%, transparent 50%);
    background-position: right 18px center, right 13px center;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 38px;
}
.form-row select:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

/* ===================== ALGORITHM AS A SERVICE ===================== */
.aaas-section {
    position: relative;
    overflow: hidden;
}
.aaas-section::before {
    content: '';
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse at center,
        rgba(37, 99, 235, 0.14) 0%,
        rgba(56, 189, 248, 0.06) 45%,
        transparent 75%);
    pointer-events: none;
    z-index: 0;
}
.aaas-section .container { position: relative; z-index: 1; }

.aaas-tag {
    color: var(--logo-ice) !important;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2), rgba(56, 189, 248, 0.2));
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 14px !important;
    border-radius: 999px;
    margin-bottom: 16px !important;
    display: inline-block !important;
}

.aaas-hero {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 64px;
    padding: 36px 28px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(56, 189, 248, 0.04));
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: var(--radius-lg);
}
.aaas-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--logo-ice);
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.aaas-headline {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}
.aaas-headline-accent {
    background: linear-gradient(135deg, var(--logo-ice) 0%, var(--logo-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.aaas-lede {
    font-size: 1.02rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto;
}

.aaas-trust {
    margin-bottom: 64px;
}
.aaas-trust-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--logo-ice);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
}
.aaas-trust-card h4 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}
.aaas-trust-card > p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 18px;
}
.aaas-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}
.aaas-bullets li {
    position: relative;
    padding: 8px 0 8px 28px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.aaas-bullets li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    top: 8px;
    color: var(--logo-ice);
    font-weight: 700;
    font-size: 1rem;
}
.aaas-bullets li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.aaas-why {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 72px;
}
.aaas-why-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.aaas-why-card:hover {
    transform: translateY(-3px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.4);
}
.aaas-why-icon {
    font-size: 1.9rem;
    margin-bottom: 14px;
}
.aaas-why-card h4 {
    font-size: 1.08rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.aaas-why-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}
.aaas-why-card strong { color: var(--logo-ice); font-weight: 600; }

.aaas-subhead {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 28px;
    letter-spacing: -0.3px;
}

.aaas-how {
    margin-bottom: 72px;
}
.aaas-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    counter-reset: step;
}
.aaas-step {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
}
.aaas-step-num {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--logo-ice);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 14px;
}
.aaas-step h5 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.aaas-step p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.aaas-proof {
    margin-bottom: 72px;
}
.aaas-proof-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 36px;
    background: linear-gradient(135deg,
        rgba(37, 99, 235, 0.14) 0%,
        rgba(30, 58, 95, 0.35) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    text-align: center;
}
.aaas-proof-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--logo-ice);
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.aaas-proof-quote {
    font-size: 1.08rem;
    color: var(--text-primary);
    line-height: 1.7;
    max-width: 720px;
    margin: 0 auto 28px;
}
.aaas-proof-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.aaas-proof-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.aaas-proof-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--logo-ice);
}
.aaas-proof-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-top: 4px;
}

.aaas-alt {
    margin-bottom: 72px;
}
.aaas-alt-desc {
    text-align: center;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 28px;
    line-height: 1.65;
}
.aaas-alt-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.aaas-alt-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
}
.aaas-alt-card {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.aaas-alt-card h5 {
    font-size: 1.02rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.aaas-alt-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.aaas-contact {
    margin-top: 24px;
}
.aaas-contact-inner {
    max-width: 720px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
}
.aaas-contact-desc {
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 28px;
}
.aaas-form { max-width: none; }
.aaas-contact-note {
    margin-top: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .aaas-why { grid-template-columns: 1fr; }
    .aaas-steps { grid-template-columns: repeat(2, 1fr); }
    .aaas-alt-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .aaas-steps { grid-template-columns: 1fr; }
    .aaas-proof-stats { gap: 24px; }
    .aaas-trust-card, .aaas-contact-inner, .aaas-proof-inner { padding: 24px; }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
    .comparison-grid { grid-template-columns: 1fr; }
    .signal-grid { grid-template-columns: 1fr 1fr; }
    .diff-grid { grid-template-columns: 1fr; }
    .db-diagram { grid-template-columns: 1fr; }
    .backtest-features { grid-template-columns: 1fr 1fr; }
    .mod-row { grid-template-columns: 1fr; }
    .mod-name { margin-bottom: 4px; }
    .flow-diagram { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); padding: 4px 0; }
    .risk-pipeline { flex-direction: column; }
    .risk-arrow { transform: rotate(90deg); padding: 4px 0; }
    .arch-connector-split { gap: 30px; }
    .arch-row-3 { flex-direction: column; gap: 10px; }
}
@media (max-width: 600px) {
    .hero-stats { gap: 24px; }
    .section { padding: 60px 0; }
    .section-header h2 { font-size: 1.8rem; }
    .modules-grid { grid-template-columns: 1fr; }
    .strategy-grid { grid-template-columns: 1fr; }
    .signal-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: 1fr; }
    .backtest-features { grid-template-columns: 1fr; }

    /* Mobile nav: 2-row layout (logo + CTA on row 1, scrollable links on row 2) */
    .nav { height: auto; }
    .nav-inner {
        flex-wrap: wrap;
        padding-top: 8px;
        padding-bottom: 8px;
        gap: 8px;
        row-gap: 6px;
    }
    .nav-logo { font-size: 0.95rem; }
    .nav-cta-wrap { margin-left: auto; }
    .nav-cta { font-size: 0.65rem; padding: 5px 10px; }
    .nav-links {
        display: flex;
        order: 3;
        flex-basis: 100%;
        overflow-x: auto;
        gap: 14px;
        padding: 4px 0 2px;
        font-size: 0.7rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links a { flex-shrink: 0; }

    .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
    .investors-grid { grid-template-columns: 1fr; }
    .investor-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px; }
    .investor-stat-value { font-size: 1.05rem; }
}

/* ===================== ANIMATIONS ===================== */
/* Subtle entrance animations via Intersection Observer (see script.js) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.06s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.12s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.18s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.24s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.30s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.36s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.42s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.48s; }
.stagger-children.visible > *:nth-child(10) { transition-delay: 0.54s; }
.stagger-children.visible > *:nth-child(11) { transition-delay: 0.60s; }
.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Ticker tape — scrolling symbols */
.ticker-tape {
    overflow: hidden;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
    margin-bottom: -1px;
}
.ticker-track {
    display: flex;
    gap: 48px;
    animation: tickerScroll 30s linear infinite;
    width: max-content;
}
.ticker-item {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ticker-item .ticker-symbol { color: var(--text-secondary); font-weight: 600; }
.ticker-item .ticker-up { color: var(--accent-green); }
.ticker-item .ticker-down { color: var(--accent-red); }

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===================== FOUNDERS ===================== */
.founders-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 64px;
}
.founder-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    display: flex;
    gap: 28px;
    transition: border-color 0.3s;
}
.founder-card:hover { border-color: var(--border-bright); }

.founder-photo {
    flex-shrink: 0;
}
.founder-initials {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-green-dim), rgba(56, 189, 248, 0.25));
    color: var(--accent-green);
    border: 2px solid var(--accent-green-dim);
}
.founder-initials.anon {
    background: linear-gradient(135deg, var(--accent-amber-dim), rgba(240, 180, 41, 0.2));
    color: var(--accent-amber);
    border-color: var(--accent-amber-dim);
    font-size: 1.1rem;
}

.founder-info h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.founder-linkedin {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--accent, #38BDF8);
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 4px;
    transition: background 0.2s, border-color 0.2s;
}

.founder-linkedin:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.6);
}
.founder-role {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-green);
    font-weight: 500;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}
.founder-bio p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}
.founder-bio p:last-child { margin-bottom: 16px; }

.founder-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}
.founder-tags span {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 3px 10px;
    background: var(--bg-primary);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
}
.founder-links a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    transition: color 0.2s;
}
.founder-links a:hover { color: var(--accent-green); }

/* Press Section */
.press-section {
    margin-top: 0;
}
.press-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.press-section h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-amber);
    border-radius: 2px;
}
.press-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    border-left: 3px solid var(--accent-amber);
    max-width: 700px;
    transition: border-color 0.3s;
}
.press-card:hover { border-color: var(--border-bright); border-left-color: var(--accent-amber); }
.press-source {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-amber);
    margin-bottom: 8px;
}
.press-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.5;
    transition: color 0.2s;
}
.press-title:hover {
    color: var(--accent-green);
    text-decoration: none;
}
.press-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.press-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Nav active link */
.nav-links a.active {
    color: var(--accent-green);
}

@media (max-width: 900px) {
    .founders-grid { grid-template-columns: 1fr; }
    .founder-card { flex-direction: column; align-items: center; text-align: center; }
    .founder-tags { justify-content: center; }
    .founder-links { text-align: center; }
}

/* ===================== APPROACH SECTION ===================== */
.approach-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.approach-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: border-color 0.3s;
}
.approach-card:hover { border-color: var(--border-bright); }
.approach-card-wide {
    grid-column: 1 / -1;
    border-left: 3px solid var(--accent-green);
}
.approach-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}
.approach-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.approach-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 16px;
}
.approach-list {
    list-style: none;
}
.approach-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}
.approach-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}

@media (max-width: 768px) {
    .approach-grid { grid-template-columns: 1fr; }
    .approach-card-wide { grid-column: auto; }
}

/* ===================== LIVE OPERATIONS ===================== */
.ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}
.ops-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.3s;
}
.ops-panel:hover { border-color: var(--border-bright); }

.ops-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}
.ops-title {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ops-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(56, 189, 248, 0.25);
}
.ops-body { padding: 24px; }

.ops-stats {
    display: flex;
    gap: 32px;
    margin-bottom: 24px;
}
.ops-stat {
    display: flex;
    flex-direction: column;
}
.ops-stat-value {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-green);
    line-height: 1;
}
.ops-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 6px;
}

.ops-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ops-strategy-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
}
.ops-strat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ops-strat-dot.active {
    background: var(--accent-green);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}
.ops-strat-name {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
}
.ops-strat-pairs {
    color: var(--text-muted);
    font-size: 0.82rem;
    flex: 1;
}
.ops-strat-status {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ops-strat-status.running { color: var(--accent-green); }

.ops-footnote {
    margin-top: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Live dot animation */
.live-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(56, 189, 248, 0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 4px rgba(56, 189, 248, 0.3); }
}

/* AI ops banner */
.ai-ops-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 32px;
    background: var(--bg-card);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--accent-green);
}
.ai-ops-icon { font-size: 2rem; flex-shrink: 0; }
.ai-ops-content { flex: 1; }
.ai-ops-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.ai-ops-content p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.ai-ops-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-green);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .ops-grid { grid-template-columns: 1fr; }
    .ai-ops-banner { flex-direction: column; text-align: center; }
}

.ops-updated {
    margin-top: 16px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted, #64748B);
    letter-spacing: 1px;
}

/* ===================== CAREERS ===================== */
.careers-grid {
    max-width: 800px;
    margin: 0 auto;
}
.career-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.career-header {
    padding: 32px 32px 24px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
}
.career-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-green);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 4px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.career-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.career-meta {
    display: flex;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.career-body {
    padding: 32px;
}
.career-body h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 12px;
    color: var(--accent-green);
}
.career-body h4:first-child { margin-top: 0; }
.career-body > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.75;
}
.career-list {
    list-style: none;
}
.career-list li {
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding: 5px 0;
    padding-left: 22px;
    position: relative;
    line-height: 1.6;
}
.career-list li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}
.career-apply {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}
.career-apply p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.career-email {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-green);
    padding: 12px 32px;
    border: 2px solid var(--accent-green);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}
.career-email:hover {
    background: var(--accent-green);
    color: var(--bg-primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
}

/* ===================== PRINT / PDF EXPORT ===================== */
@media print {
    @page { size: 1280px 1810px; margin: 0; }
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    html, body {
        background: var(--bg-primary) !important;
        color: var(--text-primary) !important;
    }
    /* Unfreeze fade/stagger animations so all content renders */
    .fade-in,
    .stagger-children > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    /* Nav: keep visible but not fixed */
    .nav {
        position: static !important;
        background: rgba(15, 23, 42, 0.95) !important;
        backdrop-filter: none !important;
    }
    /* Freeze ticker tape animation */
    .ticker-track {
        animation: none !important;
        transform: none !important;
    }
    /* Keep cards and sections intact across page breaks */
    .comp-card,
    .founder-card,
    .career-card,
    .approach-card,
    .press-card,
    .ops-panel,
    .aaas-why-card,
    .aaas-trust-card,
    .aaas-alt-card,
    .tech-card,
    .bt-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
