/* ═══════════════════════════════════════════════════
   Argos — the hundred-eyed watcher
   Dark, precise, restrained. Star-atlas gold on near-black.
   ═══════════════════════════════════════════════════ */

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

:root {
    --bg:        #08080a;
    --bg-alt:    #0d0d10;
    --bg-card:   #111114;
    --border:    #1a1a20;
    --text:      #e8e4de;
    --muted:     #787268;
    --gold:      #c49a3c;
    --gold-dim:  rgba(196, 154, 60, 0.07);
    --radius:    8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-w: 800px;
    --nav-h: 56px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { opacity: 0.8; }

::selection { background: var(--gold-dim); color: var(--text); }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

h2 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: var(--radius);
    font-family: var(--font); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none;
    transition: all 0.2s;
}
.btn-primary { background: var(--gold); color: #08080a; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); padding: 8px 14px; }
.btn-ghost:hover { color: var(--text); background: var(--gold-dim); }

/* ─── Nav ─── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h); z-index: 1000;
    background: transparent; transition: all 0.3s;
}
.navbar.scrolled {
    background: rgba(8, 8, 10, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-size: 1rem; font-weight: 800; color: var(--text);
    text-decoration: none;
}
.nav-logo:hover { opacity: 1; }
.nav-logo svg { color: var(--gold); }
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
    color: var(--muted); padding: 6px 12px; border-radius: 6px;
    font-size: 0.82rem; font-weight: 500; transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--gold-dim); }

/* ─── Hero ─── */
.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 85%, rgba(196, 154, 60, 0.035) 0%, transparent 100%),
        radial-gradient(ellipse 60% 60% at 25% 18%, rgba(60, 90, 140, 0.045) 0%, transparent 100%),
        radial-gradient(ellipse 55% 55% at 78% 28%, rgba(196, 154, 60, 0.02) 0%, transparent 100%),
        var(--bg);
    pointer-events: none;
}

/* ─── Starfield: the hundred eyes ─── */
.hero-sky { position: absolute; inset: 0; pointer-events: none; }
.hero-sky .star {
    position: absolute;
    border-radius: 50%;
    background: var(--text);
    box-shadow: 0 0 4px rgba(232, 228, 222, 0.5);
}
.hero-sky .star.twinkle { animation: twinkle ease-in-out infinite; }
@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50%      { opacity: 0.95; }
}

/* ─── Light curve: a star watched over time ─── */
.hero-curve {
    position: absolute; left: 0; right: 0;
    top: 50%; transform: translateY(-50%);
    height: 340px;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.5;
    -webkit-mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
            mask: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}
.hero-curve svg {
    position: absolute; left: 0; top: 0;
    animation: lc-drift 38s linear infinite;
}
/* translate distance MUST equal periodPx in index.html */
@keyframes lc-drift {
    from { transform: translateX(0); }
    to   { transform: translateX(-360px); }
}
.hero-curve .lc-line {
    fill: none;
    stroke: var(--gold);
    stroke-width: 1.5;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px rgba(196, 154, 60, 0.55));
}
.hero-curve .lc-dot { fill: var(--gold); opacity: 0.85; }

/* ─── Hero content ─── */
.hero-content {
    position: relative; z-index: 1;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    padding: 5px 14px;
    background: var(--gold-dim);
    border: 1px solid rgba(196, 154, 60, 0.12);
    border-radius: 100px;
    font-size: 0.68rem; font-weight: 500;
    color: var(--gold);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 26px;
}
a.hero-badge-link {
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
    cursor: pointer;
}
a.hero-badge-link:hover {
    color: var(--text);
    border-color: rgba(196, 154, 60, 0.4);
    background: rgba(196, 154, 60, 0.12);
    opacity: 1;
}

.hero h1 {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(180deg, var(--text) 35%, rgba(232, 228, 222, 0.3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-myth {
    font-style: italic;
    font-size: clamp(0.82rem, 1.5vw, 0.95rem);
    color: var(--gold);
    opacity: 0.75;
    letter-spacing: 0.04em;
    margin-bottom: 22px;
}
.hero-sub {
    font-size: clamp(0.9rem, 1.6vw, 1.05rem);
    color: var(--muted);
    max-width: 440px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.hero-actions {
    display: flex; justify-content: center; gap: 10px;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute; left: 50%; bottom: 26px;
    transform: translateX(-50%);
    color: var(--muted); opacity: 0.5;
    z-index: 1;
    animation: bob 2.4s ease-in-out infinite;
}
.hero-scroll:hover { opacity: 0.9; }
@keyframes bob {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 6px); }
}

/* ─── Sections ─── */
.section { padding: 80px 0; }
.section-dark { background: var(--bg-alt); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header p { color: var(--muted); font-size: 0.9rem; }

/* ─── Intro / About ─── */
.intro { max-width: 600px; margin: 0 auto; text-align: center; }
.intro-lead {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700; letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--muted);
}
.intro-lead strong { color: var(--text); font-weight: 700; }
.intro-body {
    max-width: 520px; margin: 22px auto 0;
    color: var(--muted);
    font-size: 0.98rem; line-height: 1.75;
}
.intro-aside {
    max-width: 480px; margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-style: italic;
    font-size: 0.85rem; line-height: 1.7;
    color: var(--gold); opacity: 0.7;
}

/* ─── Showcase — the app at work ─── */
.container-wide { max-width: 1120px; }
.showcase .section-header { margin-bottom: 30px; }

.app-window {
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 40px 90px -30px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(196, 154, 60, 0.05),
        0 0 60px -20px rgba(196, 154, 60, 0.12);
}
.app-bar {
    position: relative;
    display: flex; align-items: center; gap: 8px;
    padding: 11px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}
.app-dot { width: 11px; height: 11px; border-radius: 50%; }
.app-dot:nth-child(1) { background: #ff5f56; }
.app-dot:nth-child(2) { background: #ffbd2e; }
.app-dot:nth-child(3) { background: #27c93f; }
.app-title {
    position: absolute; left: 0; right: 0;
    text-align: center;
    font-family: var(--mono); font-size: 0.72rem;
    color: var(--muted); letter-spacing: 0.04em;
    pointer-events: none;
}
.app-window img { display: block; width: 100%; height: auto; }
.showcase-cap {
    margin-top: 18px; text-align: center;
    font-family: var(--mono); font-size: 0.72rem;
    color: var(--muted); line-height: 1.7; letter-spacing: 0.01em;
}

/* ─── Pipeline — the signal path ─── */
.flow {
    display: flex; align-items: center; justify-content: space-between;
    gap: 6px;
    max-width: 660px; margin: 0 auto 50px;
    font-family: var(--mono);
    font-size: 0.66rem; letter-spacing: 0.03em;
    color: var(--muted);
}
.flow-step { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.flow-step:not(:last-child) { flex: 1; }
.flow-step:not(:last-child)::after {
    content: ""; flex: 1; height: 1px;
    background: linear-gradient(90deg, var(--border), rgba(196, 154, 60, 0.28));
}
.flow-node {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
    background: var(--gold); box-shadow: 0 0 8px rgba(196, 154, 60, 0.5);
}
.flow-node.end { background: var(--text); box-shadow: 0 0 8px rgba(232, 228, 222, 0.5); }

.pipe { position: relative; }
.pipe::before {
    content: ""; position: absolute;
    left: 17px; top: 17px; bottom: 34px; width: 1px;
    background: linear-gradient(180deg, rgba(196, 154, 60, 0.45), var(--border) 18%, var(--border) 82%, transparent);
}
.stage {
    display: grid; grid-template-columns: 34px 1fr;
    gap: 22px; padding-bottom: 34px;
}
.stage:last-child { padding-bottom: 0; }
.stage-num {
    position: relative; z-index: 1;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bg); border: 1px solid var(--border);
    font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
    color: var(--gold);
}
.stage-num.end {
    color: var(--bg); background: var(--gold); border-color: var(--gold);
    box-shadow: 0 0 16px rgba(196, 154, 60, 0.35);
}
.stage-name {
    font-size: 0.98rem; font-weight: 700; letter-spacing: -0.01em;
    padding-top: 6px;
}
.stage-name span {
    font-weight: 400; color: var(--muted);
    font-size: 0.82rem; letter-spacing: 0;
}
.stage-lead {
    margin: 6px 0 0; color: var(--muted);
    font-size: 0.9rem; line-height: 1.6;
    max-width: 560px;
}
.stage-items { display: flex; flex-direction: column; }
.item {
    display: grid; grid-template-columns: 150px 1fr; gap: 18px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
}
.item dt {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.8rem; font-weight: 600; color: var(--text);
    height: fit-content;
}
.item dd { font-size: 0.8rem; color: var(--muted); line-height: 1.55; }
.soon {
    font-family: var(--mono);
    font-size: 0.55rem; text-transform: uppercase; letter-spacing: 0.12em;
    color: var(--gold);
    padding: 2px 6px; border-radius: 100px;
    border: 1px solid rgba(196, 154, 60, 0.3);
    background: var(--gold-dim);
}

@media (max-width: 640px) {
    .flow { display: none; }
    .stage { grid-template-columns: 30px 1fr; gap: 16px; }
    .stage-num { width: 30px; height: 30px; }
    .pipe::before { left: 15px; }
    .item { grid-template-columns: 1fr; gap: 3px; }
}

/* ─── Handoff to Siril ─── */
.handoff {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 18px; flex-wrap: wrap;
    max-width: 720px; margin: 0 auto 40px;
}
.handoff-step {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-align: center;
}
.handoff-step b { font-size: 0.92rem; font-weight: 600; color: var(--text); }
.handoff-step.mid b {
    font-family: var(--mono); font-size: 0.82rem; color: var(--gold);
}
.handoff-step small {
    font-family: var(--mono); font-size: 0.62rem;
    letter-spacing: 0.02em; color: var(--muted);
}
.handoff-arrow {
    color: var(--gold); font-style: normal; opacity: 0.55;
    font-size: 1.05rem; line-height: 1.2; padding-top: 1px;
}

.chart-figure { margin: 0; }
.chart-card {
    max-width: 900px; margin: 0 auto;
    background: #0d0d10;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 34px 80px -34px rgba(0, 0, 0, 0.85);
}
.chart-card img { display: block; width: 100%; height: auto; border-radius: 6px; }
.chart-cap {
    max-width: 660px; margin: 18px auto 0;
    text-align: center;
    font-size: 0.8rem; color: var(--muted); line-height: 1.65;
}
.chart-cap code {
    font-family: var(--mono); font-size: 0.9em; color: var(--gold);
    background: var(--gold-dim); padding: 1px 5px; border-radius: 4px;
}
.chart-cap strong { color: var(--text); font-weight: 600; }

@media (max-width: 640px) {
    .handoff { gap: 12px; }
    .handoff-arrow { transform: rotate(90deg); }
}

/* ─── Code block ─── */
.code-wrap {
    max-width: 480px; margin: 0 auto 20px;
    background: #09090b;
    border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    text-align: left;
}
.code-bar {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.015);
    border-bottom: 1px solid var(--border);
}
.code-dot { width: 8px; height: 8px; border-radius: 50%; }
.code-dot:nth-child(1) { background: #ff5f56; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #27c93f; }
.code-label {
    margin-left: auto;
    font-size: 0.65rem; font-family: var(--mono);
    color: var(--muted); opacity: 0.3;
}
.code-wrap pre { padding: 14px 18px; overflow-x: auto; font-size: 0.78rem; line-height: 1.8; }
.code-wrap code { background: none; padding: 0; color: #a8a094; font-family: var(--mono); }
.code-wrap code .hl { color: var(--gold); }
.code-wrap code .cm { color: #4a4a4a; }

.start-links {
    display: flex; justify-content: center; gap: 14px;
    flex-wrap: wrap;
}

/* two-part start: Seestar vs simulator */
.start-split {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    max-width: 760px; margin: 14px auto 0;
}
.start-col-label {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
    font-family: var(--mono); font-size: 0.7rem;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold);
}
.start-col-label span { color: var(--muted); opacity: 0.7; }
.start-col { display: flex; flex-direction: column; }
.start-col .code-wrap { max-width: none; margin: 0; flex: 1; }
.start-col-link { align-self: center; margin-top: 12px; }
@media (max-width: 520px) { .start-split { grid-template-columns: 1fr; } }

/* ─── Contribute ─── */
.contribute-text {
    max-width: 520px; margin: 0 auto 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.98rem; line-height: 1.75;
}

/* ─── Footer ─── */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-content {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 16px;
    font-size: 0.82rem;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.footer-brand svg { color: var(--gold); }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--gold); opacity: 1; }
.footer-copy { color: var(--muted); }

@media (max-width: 640px) {
    .nav-links { display: none; }
    .footer-content { flex-direction: column; text-align: center; }
    .section { padding: 50px 0; }
}

/* ─── Respect reduced-motion ─── */
@media (prefers-reduced-motion: reduce) {
    .hero-curve svg,
    .hero-sky .star.twinkle,
    .hero-scroll { animation: none; }
}
