/* ═══════════════════════════════════════════════
   CRANDALL LABS — Redesigned Portfolio
   Aesthetic: Industrial-terminal meets modern editorial
   Font: JetBrains Mono (code) + Plus Jakarta Sans (body)
   ═══════════════════════════════════════════════ */

/* ── 1. VARIABLES & RESET ── */
:root {
    --bg-base: #0a0e14;
    --bg-elevated: #111820;
    --bg-card: #151c27;
    --bg-hover: #1a2332;

    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.15);
    --accent-glow: rgba(0, 255, 136, 0.3);
    --accent-red: #ff4d6a;
    --accent-amber: #ffb836;
    --accent-blue: #38bdf8;

    --text-primary: #e8edf4;
    --text-secondary: #8899aa;
    --text-muted: #556677;
    --border: #1e2a3a;
    --border-accent: #2a3a4a;

    --mono: 'JetBrains Mono', monospace;
    --sans: 'Plus Jakarta Sans', -apple-system, sans-serif;

    --radius: 8px;
    --radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--sans);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }

/* Subtle noise texture on body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px;
}


/* ── 2. NAVIGATION ── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 4%;
    position: sticky;
    top: 0;
    background: rgba(10, 14, 20, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}
.logo-bracket { color: var(--text-muted); font-weight: 400; }
.logo-dot { color: var(--accent); }

.nav-links { display: flex; gap: 1.8rem; align-items: center; font-size: 0.88rem; }
.nav-links a { color: var(--text-secondary); font-weight: 500; }
.nav-links a:hover { color: var(--text-primary); }

.btn-nav {
    border: 1px solid var(--accent);
    color: var(--accent) !important;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-nav:hover {
    background: var(--accent);
    color: var(--bg-base) !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 4%;
    z-index: 999;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 1rem; }
.mobile-nav a { font-size: 1rem; color: var(--text-secondary); font-weight: 500; }
.mobile-nav a:hover { color: var(--accent); }


/* ── 3. HERO ── */
#hero {
    min-height: 100vh;
    padding: 8rem 4% 4rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
}

.hero-bg-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.25;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    width: fit-content;
    font-weight: 500;
    letter-spacing: 0.03em;
    animation: fadeInUp 0.6s ease-out both;
}

.hero-headline {
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.highlight-word {
    color: var(--accent);
    position: relative;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-cta-row {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.6rem;
    background: var(--accent);
    color: var(--bg-base);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: 1px solid var(--accent);
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.02em;
}
.btn-primary:hover {
    background: transparent;
    color: var(--accent);
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.6rem;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid var(--border-accent);
    cursor: pointer;
    transition: all 0.25s;
}
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Hero Metrics — Authority signals */
.hero-metrics {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.metric {
    display: flex;
    flex-direction: column;
}
.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}
.metric-suffix {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
}
.metric-label {
    font-size: 0.72rem;
    color: var(--text-primary);
    margin-top: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.metric-detail {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}
.metric-divider {
    width: 1px;
    background: var(--border);
    align-self: stretch;
}


/* ── Hero Panel (Terminal) ── */
.hero-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 4px 30px rgba(0,0,0,0.4),
        0 0 60px rgba(0, 255, 136, 0.04);
    animation: fadeInUp 0.6s ease-out 0.35s both;
}

.panel-chrome {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}
.panel-dots { display: flex; gap: 6px; }
.dot-red { width: 10px; height: 10px; border-radius: 50%; background: #ff5f56; }
.dot-yellow { width: 10px; height: 10px; border-radius: 50%; background: #ffbd2e; }
.dot-green { width: 10px; height: 10px; border-radius: 50%; background: #27c93f; }
.panel-title { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }

.panel-body {
    padding: 1.2rem 1.2rem;
    font-size: 0.8rem;
    line-height: 1.8;
}

.panel-line {
    color: var(--text-secondary);
}
.panel-line.output {
    color: var(--accent);
    padding-left: 1.2rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.prompt { color: var(--accent); font-weight: 700; margin-right: 0.5rem; }

.cursor {
    animation: blink-caret 1s step-end infinite;
    color: var(--accent);
}
@keyframes blink-caret {
    50% { opacity: 0; }
}


/* ── 4. TICKER ── */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
    padding: 0.8rem 0;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.ticker-track {
    display: inline-flex;
    animation: ticker-scroll 30s linear infinite;
}

.ticker-content {
    display: inline-flex;
    gap: 0;
    font-size: 0.82rem;
    font-weight: 600;
    padding-right: 1rem;
}
.ticker-content span { color: var(--text-secondary); padding: 0 0.6rem; }
.ticker-content .sep { color: var(--text-muted); font-weight: 400; padding: 0 0.3rem; }

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


/* ── 5. PROOF BAR ── */
.proof-bar {
    padding: 5rem 4%;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.proof-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.proof-title {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.proof-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.proof-card {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.25s;
}
.proof-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
    transform: translateY(-2px);
}
.proof-icon { font-size: 1.6rem; margin-bottom: 0.8rem; }
.proof-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}
.proof-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}


/* ── 6. ABOUT / STORY ── */
#about {
    padding: 6rem 4%;
}

.about-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.section-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: -1.5rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.about-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

.about-lead {
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}
.about-lead strong { color: var(--accent); }

.about-narrative p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    line-height: 1.75;
}
.about-narrative em { color: var(--text-primary); font-style: normal; font-weight: 600; }

.about-quote {
    margin-top: 2rem;
    padding: 1.2rem 1.5rem;
    border-left: 3px solid var(--accent);
    background: var(--accent-dim);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Timeline */
.tl-track {
    position: relative;
    padding-left: 2rem;
}
.tl-track::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.tl-node {
    position: relative;
    margin-bottom: 2rem;
}
.tl-dot {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--border-accent);
    background: var(--bg-base);
    z-index: 2;
    transition: 0.3s;
}
.tl-node.active .tl-dot {
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}
.tl-node.current .tl-dot {
    border-color: var(--accent);
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.tl-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
}
.tl-label {
    font-size: 0.68rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.3rem;
    display: block;
}
.tl-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.tl-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}


/* ── 7. PROJECTS ── */
#projects {
    padding: 6rem 4%;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.projects-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    transition: all 0.25s;
    position: relative;
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent);
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    border-color: var(--border-accent);
}

.card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}
.status-live {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
    animation: pulse-anim 2s infinite;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.card-narrative {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.card-section p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    margin-bottom: 0.3rem;
}
.card-tag.pain {
    color: var(--accent-red);
    background: rgba(255, 77, 106, 0.1);
    border: 1px solid rgba(255, 77, 106, 0.2);
}
.card-tag.think {
    color: var(--accent-amber);
    background: rgba(255, 184, 54, 0.1);
    border: 1px solid rgba(255, 184, 54, 0.2);
}
.card-tag.result {
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.card-stack {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: auto;
}
.card-stack span {
    background: rgba(255,255,255,0.04);
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
}


/* ── 8. TESTIMONIALS ── */
#testimonials {
    padding: 6rem 4%;
}

.test-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.test-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.test-quote {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1.2rem;
    border-left: 2px solid var(--accent);
}

.test-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.test-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-dim);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
}
.test-author strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.test-role {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.test-note {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    border: 1px dashed var(--border);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
}


/* ── 9. FOOTER ── */
#contact {
    padding: 5rem 4% 0;
    border-top: 1px solid var(--border);
    background: var(--bg-base);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-cta {
    text-align: center;
    padding-bottom: 4rem;
    border-bottom: 1px solid var(--border);
}
.footer-cta h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}
.footer-cta p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.footer-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a:hover { color: var(--accent); }

.footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
}

.footer-avail {
    color: var(--accent-amber);
    font-weight: 500;
}


/* ── 10. ANIMATIONS ── */
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-anim 2s infinite;
    flex-shrink: 0;
}
.pulse-dot-sm {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-anim 1.5s infinite;
    flex-shrink: 0;
}

@keyframes pulse-anim {
    0% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { opacity: 0.7; box-shadow: 0 0 0 6px transparent; }
    100% { opacity: 1; box-shadow: 0 0 0 0 transparent; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animation */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ── 10b. FEATURED PROJECT CARD ── */
.featured-card {
    border-color: var(--accent) !important;
    position: relative;
    overflow: visible;
}
.featured-card::after {
    content: '★ INTERACTIVE DEMO';
    position: absolute;
    top: -10px;
    right: 16px;
    font-family: var(--mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: var(--accent);
    color: var(--bg-base);
    padding: 2px 10px;
    border-radius: 3px;
}
.featured-card .card-status { color: var(--accent-amber); }


/* ── 10c. LIVE DEMO SECTION ── */
#demo {
    padding: 6rem 4%;
    background: var(--bg-base);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.demo-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.demo-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--bg-base);
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0.1em;
}

.demo-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Demo Controls */
.demo-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.demo-mode-switcher {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.demo-mode-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}
.demo-mode-btn:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}
.demo-mode-btn.active {
    background: var(--accent);
    color: var(--bg-base);
}

.demo-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Ticker Demo */
.demo-ticker-wrap {
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1e1e1e;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.demo-ticker-chrome {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}

.demo-drag-hint {
    margin-left: auto;
    font-size: 0.65rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.demo-ticker-track {
    height: 54px;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.ticker-scroll-inner {
    display: inline-flex;
    align-items: center;
    height: 54px;
    animation: demo-scroll 28s linear infinite;
    gap: 0;
}

.ticker-game {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    height: 54px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}
.ticker-game:hover {
    background: rgba(255,255,255,0.04);
}

.ticker-emoji {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ticker-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 2px;
}

.pill-team-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.ticker-teams {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.ticker-score-live { color: #ffffff; }
.ticker-score-pre { color: #00ffcc; }

.ticker-status {
    font-family: var(--mono);
    font-size: 0.72rem;
    color: #888888;
}
.ticker-status.alert {
    color: #ffcc00;
}
.ticker-status.final-tag {
    color: #888888;
}

.ticker-sep {
    width: 1px;
    height: 30px;
    background: #333333;
    flex-shrink: 0;
    margin: 0 5px;
}

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

/* Pill Demo */
.demo-pill-wrap {
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #1e1e1e;
    max-width: 460px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.demo-pill-body {
    padding: 1.2rem 2rem;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pill-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1.5rem;
    animation: pillFadeIn 0.4s ease-out;
}

.pill-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 60px;
}
.pill-team-emoji { font-size: 1.8rem; }
.pill-team-abbr {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #888888;
}

.pill-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 100px;
}

.pill-scores {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.05em;
}
.pill-dash { color: #888888; margin: 0 4px; }

.pill-status {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: #888888;
}
.pill-status.live { color: #00ffcc; }
.pill-status.alert { color: #ffcc00; }

.pill-odds {
    font-family: var(--mono);
    font-size: 0.95rem;
    color: #00ffcc;
    font-weight: 700;
}

.pill-counter {
    position: absolute;
    bottom: 6px;
    right: 12px;
    font-family: var(--mono);
    font-size: 0.6rem;
    color: #555555;
}

@keyframes pillFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Architecture Diagram */
.demo-architecture {
    margin-top: 1rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.demo-architecture h4 {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.arch-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.arch-node {
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    text-align: center;
    min-width: 140px;
}
.arch-node.small {
    padding: 0.6rem 0.8rem;
    min-width: 120px;
    margin-bottom: 0.4rem;
}

.arch-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.arch-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.2rem;
}
.arch-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.arch-arrow {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 300;
}

.arch-node-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.arch-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.72rem;
    color: var(--text-muted);
}
.arch-features span {
    white-space: nowrap;
}


/* ── 10d. SAR ARCHITECTURE DIAGRAM ── */
.sar-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2.5rem 0 1.5rem;
}
.sar-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.sar-divider-label {
    font-size: 0.78rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.sar-arch {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Layer Stack */
.sar-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.sar-layer {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: border-color 0.2s;
}
.sar-layer:hover {
    border-color: var(--border-accent);
}

.sar-layer-badge {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.sar-layer-content {
    flex: 1;
    min-width: 0;
}
.sar-layer-content h4 {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}
.sar-layer-content p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.sar-layer-arrow {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.15rem 0;
    line-height: 1;
}

/* Layer Colors */
.layer-client { background: rgba(136, 153, 170, 0.06); }
.layer-client .sar-layer-badge { background: rgba(136,153,170,0.15); color: var(--text-secondary); }

.layer-middleware { background: rgba(128, 90, 213, 0.06); }
.layer-middleware .sar-layer-badge { background: rgba(128,90,213,0.15); color: #a78bfa; }

.layer-auth { background: rgba(239, 68, 68, 0.05); }
.layer-auth .sar-layer-badge { background: rgba(239,68,68,0.12); color: var(--accent-red); }

.layer-controllers { background: rgba(56, 189, 248, 0.05); }
.layer-controllers .sar-layer-badge { background: rgba(56,189,248,0.12); color: var(--accent-blue); }

.layer-services { background: rgba(0, 255, 136, 0.04); }
.layer-services .sar-layer-badge { background: var(--accent-dim); color: var(--accent); }

.layer-data { background: rgba(34, 197, 94, 0.05); }
.layer-data .sar-layer-badge { background: rgba(34,197,94,0.12); color: #4ade80; }

.layer-background { background: rgba(255, 184, 54, 0.05); }
.layer-background .sar-layer-badge { background: rgba(255,184,54,0.12); color: var(--accent-amber); }

/* Layer Chips */
.sar-layer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.4rem 0;
}
.sar-layer-chips span {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Service Grid (inside services layer) */
.sar-service-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-top: 0.5rem;
}
.sar-service-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.sar-group-label {
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Split row (data + workers side by side) */
.sar-layer-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

/* Feature Highlights */
.sar-features {
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.sar-features h4 {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 600;
}

.sar-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.sar-feature {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.7rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}
.sar-feature:hover {
    border-color: var(--border-accent);
}
.sar-feature-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.sar-feature strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}
.sar-feature p {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}


/* ── 11. RESPONSIVE ── */
@media (max-width: 1024px) {
    #hero {
        grid-template-columns: 1fr;
        padding: 6rem 4% 3rem;
        min-height: auto;
    }
    .hero-panel { max-width: 500px; }
    .proof-grid { grid-template-columns: repeat(2, 1fr); }
    .about-layout { grid-template-columns: 1fr; gap: 3rem; }
    .arch-flow { flex-direction: column; }
    .arch-arrow { transform: rotate(90deg); }
    .sar-service-grid { grid-template-columns: 1fr; }
    .sar-layer-split { grid-template-columns: 1fr; }
    .sar-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: flex; }

    .hero-headline { font-size: 1.9rem; }
    .hero-sub { font-size: 1rem; }
    .hero-metrics { flex-direction: column; gap: 1.2rem; }
    .metric-divider { width: 100%; height: 1px; }
    .hero-cta-row { flex-direction: column; }
    .btn-primary, .btn-ghost { width: 100%; justify-content: center; }

    .proof-grid { grid-template-columns: 1fr; }
    .project-grid { grid-template-columns: 1fr; }
    .test-grid { grid-template-columns: 1fr; }

    .footer-cta h2 { font-size: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-actions { flex-direction: column; align-items: center; }

    .demo-pill-wrap { max-width: 100%; }
    .demo-controls { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .hero-headline { font-size: 1.6rem; }
    .about-lead { font-size: 1.1rem; }
    .panel-body { font-size: 0.72rem; }
}