/* Wanderbench — visual style matched to saguaro/. Dark editorial,
   max 1100px, Avenir → Inter, light-weight headlines, tracked eyebrow. */

:root {
    --bg: #0a0a0a;
    --bg-2: #111111;
    --fg: #f5f5f5;
    --muted: #8a8a8a;
    --rule: #1f1f1f;
    --max: 1100px;

    /* Runner / difficulty palette — borrowed from saguaro's class colors */
    --c-human:  #65d697;
    --c-rl:     #c084fc;
    --c-base:   #facc15;
    --c-easy:   #65d697;
    --c-medium: #facc15;
    --c-hard:   #f87171;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: 'Avenir', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0; padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:not(.link-card):hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 400; letter-spacing: -0.01em; margin: 0; }
code, pre {
    font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.85em;
    color: #e2e8f0;
}
em { color: #f5f5f5; font-style: italic; }
strong { color: #f5f5f5; font-weight: 500; }

/* ---------- HERO ---------- */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 24px 60px;
    position: relative;
    text-align: center;
}

.eyebrow {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin: 0 0 14px;
    font-weight: 400;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3rem);
    font-weight: 300;
    line-height: 1.05;
    margin: 0;
}

.tagline {
    max-width: 720px;
    margin: 14px auto 0;
    color: #cfcfcf;
    font-size: 0.92rem;
    font-weight: 300;
    line-height: 1.6;
}

/* ---------- INTERACTIVE TASK PLAYER ---------- */

.player-stage {
    margin-top: 28px;
    width: 100%;
    max-width: 660px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Prominent runner badge — sits above the player frame */
/* Runner badge — compact bottom-right tag on the frame. */
.runner-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    background: rgba(8, 8, 8, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 5;
    pointer-events: none;
}

.runner-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 3px;
    overflow: hidden;
    /* SVG fill color when no img inside */
    color: #0a0a0a;
}
.runner-icon svg { width: 80%; height: 80%; fill: currentColor; }
.runner-icon img { width: 84%; height: 84%; object-fit: contain; display: block; }
/* Human silhouette: muted green on the white tile, brand-recognizable. */
.runner-badge.runner-human .runner-icon { color: #1e8b54; }

.runner-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--fg);
    letter-spacing: 0.02em;
    line-height: 1;
}

.player-frame {
    position: relative;
    background: #050505;
    border: 1px solid var(--rule);
    aspect-ratio: 1024 / 768;
    overflow: hidden;
}

.player-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

/* small caption-ish overlay in the lower-left of the frame */
.stage-overlay {
    position: absolute;
    left: 12px; bottom: 12px;
    background: rgba(10,10,10,0.78);
    color: #e5e5e5;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    padding: 6px 9px;
    letter-spacing: 0.02em;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.player-controls button {
    font-family: inherit;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #f5f5f5;
    background: transparent;
    border: 1px solid var(--rule);
    padding: 7px 14px;
    cursor: pointer;
    transition: border-color 0.18s ease, color 0.18s ease;
}

.player-controls button:hover { border-color: #555; }
.player-controls button:disabled {
    color: var(--muted);
    cursor: default;
    border-color: var(--rule);
}
.player-controls button.play {
    background: #f5f5f5;
    color: #0a0a0a;
    border-color: #f5f5f5;
    min-width: 96px;
}
.player-controls button.play:hover { background: #d4d4d4; border-color: #d4d4d4; }

.scrubber {
    flex: 1;
    min-width: 200px;
    -webkit-appearance: none;
    appearance: none;
    height: 2px;
    background: var(--rule);
    outline: none;
}
.scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #f5f5f5;
    cursor: pointer;
}
.scrubber::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #f5f5f5;
    border: 0;
    cursor: pointer;
}

.step-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--muted);
    min-width: 64px;
    text-align: right;
}

.player-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.player-meta select {
    background: var(--bg-2);
    color: var(--fg);
    border: 1px solid var(--rule);
    padding: 7px 10px;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.chip {
    display: inline-flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 9px;
    color: #0a0a0a;
    background: var(--c-base);
}
.chip.subtle {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--rule);
}

/* ---------- HERO CTA ROW ---------- */

.cta-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 22px;
}

.cta {
    display: inline-block;
    padding: 11px 22px;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg);
    background: transparent;
    border: 1px solid var(--rule);
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.cta:hover { border-color: #555; text-decoration: none; }
.cta.primary {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
}
.cta.primary:hover { background: #d4d4d4; border-color: #d4d4d4; }

.contact-note {
    max-width: 720px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
}
.contact-note a {
    color: var(--fg);
    border-bottom: 1px dotted #555;
}
.contact-note a:hover { text-decoration: none; border-bottom-color: var(--fg); }

/* ---------- SCROLL CUE (unused on LostBench, kept for compat) ---------- */

.scroll-cue {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.85;
    transition: opacity 0.18s ease;
}
.scroll-cue:hover { opacity: 1; text-decoration: none; }

/* ---------- MAIN ---------- */

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

section {
    padding: 80px 0;
    border-top: 1px solid var(--rule);
}

section:first-child { border-top: none; }

.prose h2 {
    font-size: 1.6rem;
    margin: 0 0 24px;
    font-weight: 400;
}

.prose h3 {
    font-size: 1.05rem;
    margin: 24px 0 12px;
    font-weight: 500;
    color: var(--fg);
}

.prose p {
    font-size: 1rem;
    color: #dcdcdc;
    margin: 0 0 18px;
    max-width: 720px;
    line-height: 1.7;
    font-weight: 300;
}

.prose ul { padding-left: 22px; margin: 0 0 18px; max-width: 720px; }
.prose ul li {
    color: #dcdcdc;
    font-weight: 300;
    line-height: 1.65;
    margin-bottom: 10px;
}

.prose pre {
    background: var(--bg-2);
    border: 1px solid var(--rule);
    padding: 14px 18px;
    overflow-x: auto;
    margin: 0 0 18px;
    max-width: 720px;
}

.prose code:not(pre code) {
    background: var(--bg-2);
    color: #e5e5e5;
    padding: 1px 5px;
    border: 1px solid var(--rule);
}

.caption {
    font-size: 0.85rem !important;
    color: var(--muted) !important;
    margin-top: 16px !important;
    font-style: italic;
}

/* ---------- STATS ---------- */

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat { display: flex; flex-direction: column; gap: 8px; }

.stat-num {
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1;
}

.stat-label {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

/* ---------- DATA TABLES ---------- */

table.data {
    width: 100%;
    max-width: 720px;
    border-collapse: collapse;
    margin: 0 0 24px;
    font-size: 0.92rem;
}

table.data th, table.data td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--rule);
    font-weight: 300;
    color: #dcdcdc;
}

table.data th {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom-color: #2a2a2a;
}

table.data td code {
    color: #e5e5e5;
    background: var(--bg-2);
    padding: 0 4px;
    font-size: 0.85em;
    border: 1px solid var(--rule);
}

table.data em { color: var(--muted); font-style: italic; }
table.data tbody tr:hover td { color: var(--fg); }

/* ---------- PLACEHOLDER FIGURE ---------- */

.placeholder-figure {
    border: 1px dashed #2a2a2a;
    background: var(--bg-2);
    padding: 60px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    font-style: italic;
    max-width: 720px;
    margin: 0 0 18px;
}

/* ---------- LINKS ---------- */

.links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    border-top: 1px solid var(--rule);
    padding: 80px 0;
}

.link-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 22px 24px;
    border: 1px solid var(--rule);
    background: var(--bg-2);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.link-card:hover {
    border-color: #444;
    transform: translateY(-1px);
}

.link-eyebrow {
    grid-column: 1;
    grid-row: 1;
    color: var(--muted);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.link-title {
    grid-column: 1;
    grid-row: 2;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--fg);
}

.link-arrow {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    color: var(--muted);
    font-size: 1.2rem;
}

/* ---------- FOOTER ---------- */

.page-footer {
    padding: 36px 0 60px;
    border-top: 1px solid var(--rule);
    text-align: center;
    color: var(--muted);
    font-size: 0.78rem;
}

/* ---------- RESPONSIVE ---------- */

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

@media (max-width: 600px) {
    .hero { padding: 28px 18px 60px; }
    section { padding: 56px 0; }
    .player-stage { margin-top: 22px; }
    .player-controls { gap: 8px; }
    .player-controls button { padding: 6px 11px; font-size: 0.72rem; }
    .step-count { min-width: 50px; }
}

