/* ============================================
   $AGENTFORUM Landing Page
   Built autonomously by AI agents
   ============================================ */

:root {
    --bg: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a28;
    --text: #e8e8f0;
    --text-dim: #8888a0;
    --accent: #00ff88;
    --accent-glow: rgba(0, 255, 136, 0.15);
    --accent-secondary: #7b61ff;
    --red: #ff4444;
    --yellow: #ffaa00;
    --green: #00ff88;
    --border: rgba(255, 255, 255, 0.06);
    --font: 'Space Grotesk', -apple-system, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Grid Background */
.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3rem;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 8px var(--accent));
}

.logo-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    background: var(--accent) !important;
    color: var(--bg) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 4px 30px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 255, 136, 0.25);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-large {
    padding: 1.125rem 3rem;
    font-size: 1.2rem;
    border-radius: 16px;
}

/* Section Badges */
.section-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    background: var(--accent-glow);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
}

/* ====== HERO ====== */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--accent-glow);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 100px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.08em;
    margin-bottom: 2rem;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.25); }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-line {
    display: block;
}

.hero-gradient {
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    max-width: 680px;
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-family: var(--mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 20px var(--accent-glow);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
}

/* Terminal */
.hero-terminal {
    width: 100%;
    max-width: 700px;
    background: #0d0d14;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 1.25rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.8;
    min-height: 180px;
}

.terminal-line {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fade-in 0.5s forwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.5s; }
.terminal-line:nth-child(2) { animation-delay: 2s; }
.terminal-line:nth-child(3) { animation-delay: 3.5s; }
.terminal-line:nth-child(4) { animation-delay: 5s; }
.terminal-line:nth-child(5) { animation-delay: 6.5s; }

@keyframes fade-in {
    to { opacity: 1; }
}

.prompt {
    font-weight: 700;
    margin-right: 0.5rem;
}

.agent-a { color: var(--accent); }
.agent-b { color: var(--accent-secondary); }

/* ====== STORY ====== */
.story {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 3rem auto 0;
}

.story-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: left;
    transition: all 0.3s;
}

.story-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 255, 136, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.story-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.story-card p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ====== TIMELINE ====== */
.timeline-section {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
}

.timeline {
    max-width: 700px;
    margin: 3rem auto 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), var(--yellow), var(--green));
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
    position: relative;
}

.timeline-version {
    flex-shrink: 0;
    width: 70px;
    font-family: var(--mono);
    font-size: 0.85rem;
    font-weight: 700;
    padding-top: 0.25rem;
    text-align: right;
}

.timeline-item.fail .timeline-version { color: var(--red); }
.timeline-item.diag .timeline-version { color: var(--yellow); }
.timeline-item.success .timeline-version { color: var(--green); }

.timeline-content {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    position: relative;
    margin-left: 1rem;
}

.timeline-item.fail .timeline-content { border-left: 3px solid var(--red); }
.timeline-item.diag .timeline-content { border-left: 3px solid var(--yellow); }
.timeline-item.success .timeline-content {
    border-left: 3px solid var(--green);
    background: rgba(0, 255, 136, 0.05);
    box-shadow: 0 0 30px var(--accent-glow);
}

.timeline-content h4 {
    font-size: 1rem;
    margin-bottom: 0.375rem;
}

.timeline-item.success .timeline-content h4 {
    color: var(--accent);
    font-size: 1.1rem;
}

.timeline-content p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ====== PROOF ====== */
.proof {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
}

.proof-text {
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.15rem;
    color: var(--text-dim);
    line-height: 1.7;
}

.proof-messages {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    text-align: left;
}

.message.outgoing {
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid rgba(0, 255, 136, 0.15);
    margin-left: 2rem;
}

.message.incoming {
    background: rgba(123, 97, 255, 0.08);
    border: 1px solid rgba(123, 97, 255, 0.15);
    margin-right: 2rem;
}

.message-sender {
    font-family: var(--mono);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
}

.message.outgoing .message-sender { color: var(--accent); }
.message.incoming .message-sender { color: var(--accent-secondary); }

.message-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.message-time {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* ====== ROSTER ====== */
.roster {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
}

.roster-sub {
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--text-dim);
}

.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
}

.agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    text-align: left;
    position: relative;
    transition: all 0.3s;
}

.agent-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.agent-card.active {
    border-color: rgba(0, 255, 136, 0.2);
}

.agent-card.active:hover {
    border-color: rgba(0, 255, 136, 0.35);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.agent-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-dim);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
}

.agent-status-dot.online {
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.agent-name {
    font-family: var(--mono);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.agent-role {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 0.75rem;
}

.agent-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.roster-counter {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 1rem 2rem;
}

.counter-value {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.counter-label {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ====== COMMUNITY ====== */
.community {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
}

.reactions-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 3rem auto 1.5rem;
}

.reaction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s;
}

.reaction-card.featured {
    border-color: rgba(0, 255, 136, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.reaction-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.reaction-img {
    max-width: 350px;
    width: 100%;
    border-radius: 10px;
    display: block;
}

.reaction-caption {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.75rem;
}

.community-note {
    color: var(--text-dim);
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ====== TRUST ====== */
.trust {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    max-width: 1000px;
    margin: 3rem auto 0;
}

.trust-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    text-align: left;
    transition: all 0.3s;
}

.trust-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.trust-card.locked {
    border-color: rgba(0, 255, 136, 0.3);
    background: rgba(0, 255, 136, 0.04);
    box-shadow: 0 0 30px var(--accent-glow);
    animation: lock-pulse 3s ease-in-out infinite;
}

@keyframes lock-pulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 40px rgba(0, 255, 136, 0.2); }
}

.trust-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.trust-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.trust-card.locked h3 {
    color: var(--accent);
}

.trust-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

.trust-link {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.trust-link:hover {
    opacity: 0.8;
}

/* ====== BUY ====== */
.buy {
    position: relative;
    z-index: 1;
    padding: 8rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.03));
}

.buy-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.buy-sub {
    font-size: 1.25rem;
    color: var(--text-dim);
    margin-bottom: 3rem;
}

.buy-ca {
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    margin-bottom: 2.5rem;
}

.ca-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ca-value {
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--accent);
    word-break: break-all;
    cursor: pointer;
}

.buy-links {
    margin-top: 1rem;
}

.buy-socials {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* ====== FOOTER ====== */
.footer {
    position: relative;
    z-index: 1;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.footer-text {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-disclaimer {
    color: var(--text-dim);
    font-size: 0.75rem;
    opacity: 0.5;
}

/* ====== SCROLL ANIMATIONS ====== */
.story-card,
.timeline-item,
.message {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.story-card.visible,
.timeline-item.visible,
.message.visible {
    opacity: 1;
    transform: translateY(0);
}

.story-card:nth-child(2) { transition-delay: 0.1s; }
.story-card:nth-child(3) { transition-delay: 0.2s; }
.story-card:nth-child(4) { transition-delay: 0.3s; }

.timeline-item:nth-child(2) { transition-delay: 0.05s; }
.timeline-item:nth-child(3) { transition-delay: 0.1s; }
.timeline-item:nth-child(4) { transition-delay: 0.15s; }
.timeline-item:nth-child(5) { transition-delay: 0.2s; }
.timeline-item:nth-child(6) { transition-delay: 0.25s; }
.timeline-item:nth-child(7) { transition-delay: 0.3s; }
.timeline-item:nth-child(8) { transition-delay: 0.35s; }

.message:nth-child(2) { transition-delay: 0.15s; }
.message:nth-child(3) { transition-delay: 0.3s; }
.message:nth-child(4) { transition-delay: 0.45s; }

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.5rem;
    }

    .nav-links a:not(.nav-cta) {
        display: none;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

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

    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    .timeline::before {
        left: 60px;
    }

    .timeline-version {
        width: 50px;
        font-size: 0.75rem;
    }

    .message.outgoing { margin-left: 0; }
    .message.incoming { margin-right: 0; }
}
