/* The landing page: the Atlas map theme's paper and ink (static/themes.js),
   so the page and the sample map are one piece. */
:root {
    --paper: #efe6d2;
    --card: #f7f1e4;
    --ink: #3a2e22;
    --muted: #7a6a55;
    --accent: #8c2f1b;
    --line: #d8c9ab;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: var(--accent); }

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1080px;
    margin: 0 auto;
    padding: 14px 20px;
}

.mark {
    font-weight: 700;
    letter-spacing: 0.24em;
    font-size: 13px;
    color: var(--ink);
    text-decoration: none;
}

.mark::before { content: "▍"; color: var(--accent); margin-right: 6px; }

.bar nav { display: flex; align-items: center; gap: 16px; font-size: 14px; }

.go, .ghost {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.go { background: var(--accent); color: var(--card); }
.go.big { padding: 11px 20px; font-size: 16px; }
.ghost { color: var(--accent); }

main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.hero {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 440px);
    gap: 40px;
    align-items: center;
    padding: 28px 0 40px;
}

h1 { margin: 0 0 14px; font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -0.01em; }
.lead { margin: 0 0 12px; font-size: 17px; color: var(--muted); max-width: 34em; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* the sample map: a square box with its grid, the history bar under it */
.demo { margin: 0; }

.frame {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    box-shadow: 0 18px 50px rgba(58, 46, 34, 0.18);
}

#demo-map { display: block; width: 100%; height: 100%; }

#demo-status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    font-size: 13px;
    color: var(--muted);
    pointer-events: none;
}

#demo-status:empty { display: none; }

.history {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    margin-top: 10px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.chip {
    flex: none;
    padding: 3px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}

.chip small { margin-left: 4px; font-size: 10px; opacity: 0.75; }
.chip.here { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip.ahead { border-style: dashed; opacity: 0.55; }
.sep { flex: none; font-size: 12px; color: var(--muted); }

figcaption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--muted);
}

#demo-pause {
    width: 32px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--card);
    color: var(--ink);
    font-size: 11px;
    cursor: pointer;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    padding: 20px 0;
}

.features article {
    padding: 16px 18px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
}

.features h2 { margin: 0 0 6px; font-size: 17px; }
.features p { margin: 0; font-size: 14px; color: var(--muted); }

.sell {
    margin: 24px 0 40px;
    padding: 22px 24px;
    border: 1px solid var(--accent);
    border-radius: 12px;
    background: var(--card);
}

.sell h2 { margin: 0 0 6px; font-size: 20px; }
.sell p { margin: 0 0 14px; color: var(--muted); max-width: 40em; }

footer { max-width: 1080px; margin: 0 auto; padding: 10px 20px 30px; font-size: 12px; color: var(--muted); }

@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 8px; }
    .demo { order: -1; }          /* the map first on phones */
    .lead { font-size: 16px; }
}
