/* ============================================
   RESET
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

img, svg {
    display: block;
    max-width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    --bg: #050508;
    --bg-elevated: #0a0a12;
    --bg-card: #0f0f1a;
    --border: #141420;
    --border-glow: rgba(0, 229, 255, 0.08);
    --text: #c8c8d0;
    --text-muted: #6a6a7e;
    --text-dim: #3a3a4e;
    --cyan: #00b8d4;
    --cyan-dim: rgba(0, 229, 255, 0.08);
    --indigo: #6228c7;
    --indigo-dim: rgba(124, 58, 237, 0.08);
    --gradient: linear-gradient(135deg, #00b8d4, #6228c7);
    --gradient-subtle: linear-gradient(135deg, rgba(0, 229, 255, 0.04), rgba(124, 58, 237, 0.04));
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --container: 1200px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   UTILITIES
   ============================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

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

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

/* ============================================
   BACKGROUND
   ============================================ */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

.bg-glow-top {
    position: fixed;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(0, 229, 255, 0.03) 0%, rgba(124, 58, 237, 0.02) 40%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.05em;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn--sm {
    padding: 0.55rem 1.2rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.btn--lg {
    padding: 0.9rem 2rem;
    font-size: 0.9rem;
}

.btn--primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.btn--primary:hover {
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.15);
    transform: translateY(-2px);
}

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

.btn--outline:hover {
    border-color: var(--cyan);
    color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.05);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.nav__logo {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text);
    text-transform: uppercase;
    flex-shrink: 0;
    flex-basis: auto;
    min-width: 220px;
    white-space: nowrap;
}

.nav__logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    width: 220px;
    font-variant-numeric: tabular-nums;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav__link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--text);
}

.nav__link--human:hover {
    color: var(--cyan);
}

.nav__link--agent:hover {
    color: var(--indigo);
}

.nav__divider {
    color: var(--text-dim);
    margin: 0 0.25rem;
    font-size: 0.75rem;
}

.nav__hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav__hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    z-index: 1;
    padding: 10rem 0 6rem;
    text-align: center;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 184, 212, 0.06), transparent 60%), var(--bg-elevated);
}

.hero__badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #5a9fb5;
    background: var(--cyan-dim);
    border: 1px solid var(--border-glow);
    border-radius: 100px;
    margin-bottom: 2rem;
}

.hero__title {
    font-family: var(--font-body);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #d0d0d8;
    margin-bottom: 1.5rem;
}

.hero__title span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-family: var(--font-mono);
    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    min-height: 2.4em;
    line-height: 1.7;
}

.hero__subtitle .cursor-blink {
    display: inline-block;
    color: var(--cyan);
    animation: blink 1s step-end infinite;
}

.hero__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   SECTIONS (shared)
   ============================================ */
.section {
    position: relative;
    z-index: 1;
    padding: 6rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__title {
    font-family: var(--font-body);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #c8c8d0;
    margin-bottom: 1rem;
}

.section__desc {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
}

/* ============================================
   PROBLEM CARDS
   ============================================ */
.problem {
    background: radial-gradient(ellipse at 50% 50%, rgba(98, 40, 199, 0.04), transparent 70%), var(--bg);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.card--problem:hover {
    border-color: rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.06);
    transform: translateY(-4px);
}

.card__icon {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
}

.card__title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: #c8c8d0;
    margin-bottom: 0.8rem;
}

.card__text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   MARKETPLACE (Stalls)
   ============================================ */
.marketplace {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.stall {
    position: relative;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    transition: var(--transition);
    overflow: hidden;
}

.stall::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
    opacity: 0.2;
    transition: var(--transition);
}

.stall:hover {
    border-color: rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.06);
    transform: translateY(-4px);
}

.stall:hover::before {
    opacity: 1;
}

.stall__badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a9fb5;
    background: var(--cyan-dim);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.stall__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stall__title {
    font-family: var(--font-body);
    font-size: 1.3rem;
    font-weight: 700;
    color: #c8c8d0;
    margin-bottom: 0.6rem;
}

.stall__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.stall__link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cyan);
    transition: var(--transition);
}

.stall__link:hover {
    color: #fff;
    letter-spacing: 0.05em;
}

.stall__notice {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
}

/* ============================================
   HOW IT WORKS (Steps)
   ============================================ */
.how-works {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

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

.step {
    text-align: center;
    position: relative;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.step__number {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.step__title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: #c8c8d0;
    margin-bottom: 0.8rem;
}

.step__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.terminal-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
}

/* ============================================
   CAPABILITIES
   ============================================ */
.capabilities {
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.cap-card {
    display: flex;
    gap: 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    transition: var(--transition);
}

.cap-card:hover {
    border-color: rgba(0, 229, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.06);
}

.cap-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--cyan);
}

.cap-card__icon svg {
    width: 22px;
    height: 22px;
}

.cap-card__title {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    color: #c8c8d0;
    margin-bottom: 0.5rem;
}

.cap-card__text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   TERMINAL
   ============================================ */
.api-section {
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 184, 212, 0.04), transparent 70%), var(--bg-elevated);
    border-top: 1px solid var(--border);
}

.terminal {
    background: #0f0f1a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
}

.terminal__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.terminal__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-left: 0.5rem;
    letter-spacing: 0.05em;
}

.terminal__body {
    padding: 1.5rem;
    overflow-x: auto;
}

.terminal__body code {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.8;
    color: #5a5a6e;
    white-space: pre;
}

.terminal__notice {
    padding: 0.8rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    letter-spacing: 0.05em;
}

.terminal__link {
    margin: 1rem 1.5rem 1.5rem;
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cta-box {
    text-align: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 184, 212, 0.04);
}

.cta-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient);
}

.cta__title {
    font-family: var(--font-body);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: #c8c8d0;
    margin-bottom: 1rem;
}

.cta__desc {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.cta__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    position: relative;
    z-index: 1;
    padding: 3rem 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer__logo {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer__copy {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
}

.footer__links {
    display: flex;
    gap: 2rem;
}

.footer__link {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer__link:hover {
    color: var(--cyan);
}

.footer__notice {
    font-size: 0.7rem;
    color: var(--text-dim);
    max-width: 400px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal:nth-child(1) { transition-delay: 0s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
    .step:not(:last-child)::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }

    .nav__links {
        display: none;
    }

    .nav__hamburger {
        display: flex;
    }

    .nav__link--mobile {
        display: block;
    }

    .hero {
        padding: 8rem 0 4rem;
    }

    .section {
        padding: 4rem 0;
    }

    .section__header {
        margin-bottom: 2.5rem;
    }

    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .marketplace-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero__cta,
    .cta__actions {
        flex-direction: column;
    }

    .btn--lg {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero__title {
        font-size: 2rem;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .stall {
        padding: 1.5rem;
    }

    .cap-card {
        flex-direction: column;
        gap: 0.8rem;
    }
}
