/* ═══════════════════════════════════════════════════
   LOCUS — Marathon Intelligence Bot
   Dark theme, Space Mono + Inter
   ═══════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────── */

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

:root {
    --bg:           #0a0a0a;
    --bg-subtle:    #111111;
    --bg-card:      #161616;
    --bg-elevated:  #1a1a1a;
    --border:       #222222;
    --border-light: #333333;

    --text:         #e8e8e8;
    --text-dim:     #888888;
    --text-muted:   #555555;

    --accent:       #4ac8c0;   /* teal — sci-fi / Marathon palette */
    --accent-warm:  #c87840;   /* amber — alchemist / fire theme */

    --font-display: 'Space Mono', monospace;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ── Navigation ────────────────────────────────── */

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--text);
    transition: color 0.3s;
}

.nav-logo:hover {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s var(--ease-out);
}

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

.nav-links a:hover::after {
    width: 100%;
}

/* ── Sections (shared) ─────────────────────────── */

.section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2.5rem;
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 3rem;
    position: relative;
    padding-left: 2rem;
}

.section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1.2rem;
    height: 1px;
    background: var(--accent);
}

/* ── Hero ──────────────────────────────────────── */

.section--hero {
    flex-direction: column;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(74, 200, 192, 0.04) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(200, 120, 64, 0.03) 0%, transparent 50%),
        var(--bg);
}

.hero-content {
    text-align: center;
    padding: 0 2rem;
}

.hero-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.4em;
    color: var(--text-muted);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) 0.2s forwards;
}

.hero-logo {
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1.2s var(--ease-out) 0.05s forwards;
}

.bot-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto;
    border: 1px solid var(--border-light);
    box-shadow:
        0 0 0 4px rgba(74, 200, 192, 0.06),
        0 0 40px rgba(74, 200, 192, 0.10);
    object-fit: cover;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.hero-title .line {
    display: block;
    font-size: clamp(4.5rem, 14vw, 11rem);
    letter-spacing: 0.15em;
    overflow: hidden;
}

.hero-sub {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.25em;
    color: var(--text-dim);
    margin-bottom: 2rem;
}

.hero-rule {
    width: 60px;
    height: 1px;
    background: var(--border-light);
    margin: 0 auto 1.5rem;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--accent);
}

.scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.3em;
    animation: bounce 2s ease-in-out infinite;
}

/* ── Hero Animations ───────────────────────────── */

[data-animate="slide-up"] {
    opacity: 0;
    transform: translateY(100%);
    animation: slideUp 1s var(--ease-out) 0.4s forwards;
}

[data-animate="fade"] {
    opacity: 0;
    animation: fadeIn 1s var(--ease-out) forwards;
}

[data-animate="fade"][data-delay="2"] { animation-delay: 0.7s; }
[data-animate="fade"][data-delay="4"] { animation-delay: 1.0s; }
[data-animate="fade"][data-delay="5"] { animation-delay: 1.3s; }

[data-animate="grow"] {
    width: 0;
    animation: growLine 0.8s var(--ease-out) 0.9s forwards;
}

@keyframes slideUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes growLine {
    to { width: 60px; }
}

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

/* ── Scroll Reveal ─────────────────────────────── */

[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── About ─────────────────────────────────────── */

.section--about {
    background: var(--bg-subtle);
    min-height: auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-lead {
    font-size: 1.35rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 0.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.stat:last-child {
    border-bottom: none;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

/* ── Features ──────────────────────────────────── */

.section--features {
    min-height: auto;
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: background 0.3s;
}

.feature-card:hover {
    background: var(--bg-elevated);
}

.feature-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 1.25rem;
    color: var(--accent);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.feature-desc {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.8;
    flex: 1;
    margin-bottom: 1.25rem;
}

.feature-cmd {
    font-family: var(--font-display);
    font-size: 0.62rem;
    color: var(--text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.feature-cmd code {
    color: var(--accent);
    background: none;
    font-size: inherit;
    font-family: inherit;
}

/* ── Commands ──────────────────────────────────── */

.section--commands {
    min-height: auto;
    background: var(--bg-subtle);
}

.commands-table {
    border: 1px solid var(--border);
}

.cmd-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
    transition: background 0.2s;
}

.cmd-row:last-child {
    border-bottom: none;
}

.cmd-row:hover:not(.cmd-row--header) {
    background: var(--bg-card);
}

.cmd-row--header {
    background: var(--bg-card);
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cmd-row code {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--accent);
    word-break: break-all;
}

.cmd-row span {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.6;
}

.cmd-row span em {
    color: var(--accent-warm);
    font-style: normal;
}

/* ── Pipeline ──────────────────────────────────── */

.section--pipeline {
    min-height: auto;
    background: var(--bg);
}

.pipeline-content {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.pipeline-intro p {
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.sources-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.source-card {
    background: var(--bg-card);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: background 0.2s;
}

.source-card:hover {
    background: var(--bg-elevated);
}

.source-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text);
}

.source-detail {
    font-size: 0.78rem;
    color: var(--text-dim);
    line-height: 1.5;
}

.source-cadence {
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.pipeline-steps {
    border: 1px solid var(--border);
}

.pipeline-step {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 2rem;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    align-items: start;
    transition: background 0.2s;
}

.pipeline-step:last-child {
    border-bottom: none;
}

.pipeline-step:hover {
    background: var(--bg-card);
}

.step-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--border-light);
    line-height: 1;
}

.step-title {
    font-family: var(--font-display);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.step-desc {
    font-size: 0.88rem;
    color: var(--text-dim);
    line-height: 1.8;
}

.step-desc code {
    font-family: var(--font-display);
    font-size: 0.78rem;
    color: var(--accent);
    background: rgba(74, 200, 192, 0.07);
    padding: 0.1em 0.4em;
    border-radius: 2px;
}

/* ── Footer ────────────────────────────────────── */

.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 2.5rem;
    background: var(--bg);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--accent);
}

.footer-copy {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.footer-domain {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ── Responsive ────────────────────────────────── */

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sources-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 5rem 1.5rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

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

    .cmd-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .cmd-row--header {
        display: none;
    }

    .pipeline-step {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .step-num {
        font-size: 1.5rem;
    }

    .nav-links {
        display: none;
    }
}
