/* ============================================================
   Telos marketing page: Night Watch, by lantern light.
   Type follows lib/theme/telos_theme.dart in the app, which is why
   this page doesn't use dahvio.css. The neutrals lean warm, toward
   the ink and paper of the camp illustration.
   Brass marks what's the player's: the road's stakes, the choice.
   ============================================================ */

:root {
    --ground: #14110E;
    --card: #211C16;
    --line: #40372B;
    --boundary: #6B5E4B;
    --dim: #BDB2A0;
    --text: #EDE6D6;
    --brass: #D3B779;
    --ember: 240 169 75;

    --display: 'IBM Plex Sans Condensed', 'Arial Narrow', sans-serif;
    --body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

    --gutter: clamp(16px, 4vw, 40px);
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; background: var(--ground); }

body {
    margin: 0;
    background: var(--ground);
    color: var(--text);
    font: 400 1.0625rem/1.6 var(--body);
    -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brass); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }

svg path { fill: none; stroke: currentColor; stroke-linecap: square; stroke-linejoin: miter; }

/* ── The title screen ───────────────────────────────────── */
.fold {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: max(24px, env(safe-area-inset-top)) var(--gutter) 16px;
}

.title-screen {
    flex: 1 0 auto;
    width: 100%;
    max-width: 1180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

/* The painting has no frame. It falls off into the dark around the lantern. */
.plate {
    position: relative;
    margin: 0;
    overflow: hidden;
}
.plate img { width: 100%; }

/* Turns the paper-coloured daylight of camp.webp to dusk, in CSS, so the same
   file still serves the app and the share image. Centred on the lantern. */
.dusk {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgb(20 17 14 / 1) 0, rgb(20 17 14 / 0) 16%),
        linear-gradient(to right, rgb(20 17 14 / 1) 0, rgb(20 17 14 / 0) 10%),
        linear-gradient(to left, rgb(20 17 14 / 1) 0, rgb(20 17 14 / 0) 10%),
        radial-gradient(ellipse 62% 72% at 52.7% 73%,
            rgb(20 17 14 / 0) 18%,
            rgb(20 17 14 / .42) 52%,
            rgb(20 17 14 / .82) 78%,
            rgb(20 17 14 / 1) 100%);
}

/* Sits on the lantern and breathes, the page's one movement. */
.lantern-glow {
    position: absolute;
    left: 52.7%;
    top: 73%;
    width: 46%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(var(--ember) / .5), rgb(var(--ember) / .14) 45%, rgb(var(--ember) / 0));
    mix-blend-mode: screen;
    animation: lantern 5.5s ease-in-out infinite;
}
@keyframes lantern {
    0%, 100% { opacity: .62; }
    42% { opacity: 1; }
    58% { opacity: .78; }
    70% { opacity: .95; }
}

/* On a phone the name comes first, then the picture, then the rest. */
.title-side { display: contents; }
.marquee { order: -1; }

h1 {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: clamp(3.5rem, 7vw, 5.5rem);
    letter-spacing: -0.005em;
    line-height: 1;
}
.mark {
    width: auto;
    height: 1em;
    flex: none;
    filter: drop-shadow(0 0 18px rgb(var(--ember) / .55));
}

.tagline {
    margin-top: 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(1.375rem, 2.2vw, 1.75rem);
    line-height: 1.25;
}
.about { color: var(--dim); max-width: 46ch; }

.get { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    padding: 12px 22px;
    background: var(--brass);
    color: var(--ground);
    font: 500 1rem/1.2 var(--body);
    text-decoration: none;
    box-shadow: 0 0 32px rgb(var(--ember) / .22);
    transition: background-color .15s ease;
}
.cta:hover { background: var(--text); color: var(--ground); }
.cta-note { color: var(--dim); font: 400 .8125rem/1.45 var(--mono); }

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 8px 4px;
    color: var(--dim);
    text-decoration: none;
    font: 400 .8125rem/1 var(--mono);
    letter-spacing: .04em;
}
.more-link svg { width: 12px; height: 12px; color: var(--brass); }
.more-link path { stroke-width: 1.5; }

@media (min-width: 960px) {
    .title-screen {
        flex-direction: row;
        align-items: center;
        gap: clamp(24px, 3vw, 48px);
    }
    .plate { flex: 1.5 1 0; }
    .title-side { display: flex; flex: 1 1 0; flex-direction: column; gap: 20px; }
}

/* ── The road ───────────────────────────────────────────── */
.road {
    max-width: 960px;
    margin: 32px auto 0;
    padding: 0 var(--gutter);
}

/* One rail down the left, drawn by the grid. Each stop plants a lit stake on it. */
.stop {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: clamp(14px, 3vw, 32px);
    position: relative;
    padding-bottom: 72px;
}
.stop::before {
    content: '';
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: 1px;
    background: var(--line);
    margin-bottom: -72px;
}
.stop:last-child { padding-bottom: 24px; }
.stop:last-child::before { margin-bottom: -24px; }

.stake {
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
    width: 3px;
    height: 26px;
    margin-top: 5px;
    background: var(--brass);
    box-shadow: 0 0 12px rgb(var(--ember) / .6);
}

.stop-body { grid-column: 2; grid-row: 1; min-width: 0; }
.stop-body > * + * { margin-top: 18px; }
.stop-body > p { color: var(--dim); max-width: 62ch; }
.stop-body > .sub { margin-top: 36px; }

h2 { font-size: clamp(1.625rem, 3.2vw, 2.125rem); }
h3 { font-size: 1.25rem; }

/* ── Screens: a row that swipes, with arrows for a mouse ── */
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.row-arrows { display: flex; flex: none; gap: 6px; }
.row-arrows[hidden] { display: none; }
.row-arrows button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--boundary);
    color: var(--brass);
    cursor: pointer;
}
.row-arrows button:hover:not(:disabled) { border-color: var(--brass); }
.row-arrows button:disabled { border-color: var(--line); color: var(--boundary); cursor: default; }
.row-arrows svg { width: 12px; height: 12px; }
.row-arrows path { stroke-width: 1.5; }

.screens {
    list-style: none;
    display: flex;
    gap: 18px;
    padding: 0 0 12px;
    margin-bottom: 0;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}
.screens li { flex: 0 0 190px; scroll-snap-align: start; }
.screens li.wide { flex-basis: 290px; }
/* Every picture gets the phone's height, so the captions line up across the row. */
.slot { display: flex; align-items: center; height: 412px; }
.phone { width: 100%; border: 1px solid var(--boundary); border-radius: 18px; background: #12181D; }
.lock { width: 100%; border: 1px solid var(--boundary); border-radius: 4.85% / 15.8%; }
.share { width: 100%; border: 1px solid var(--boundary); }
.screens p { margin-top: 12px; color: var(--dim); font-size: .875rem; line-height: 1.45; }

@media (max-width: 720px) {
    .screens { margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
}

/* ── The places: a strip on wide screens, a swipe on phones ─ */
.places {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 0;
}
.places img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border: 1px solid var(--line);
    filter: brightness(.84);
}
/* The sector's colour runs under its picture, as it does in the app. */
.places h3 {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--sector);
    font-size: 1.0625rem;
    color: var(--sector);
}
.minutes { display: block; margin-top: 4px; color: var(--dim); font: 400 .8125rem/1 var(--mono); }
.stop-body > .aside { color: var(--dim); font-style: italic; }

@media (max-width: 720px) {
    .places {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin-right: calc(-1 * var(--gutter));
        padding: 0 var(--gutter) 10px 0;
        scrollbar-width: thin;
        scrollbar-color: var(--line) transparent;
    }
    .places li { flex: 0 0 68%; scroll-snap-align: start; }
}

/* ── Squad and gear: radios and CSS, so choosing needs no script ─ */
.pickers { display: grid; gap: 24px; }
.inspect { position: relative; min-width: 0; }
.inspect > input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}
.choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.choices label {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    padding: 2px;
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--dim);
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}
.choices label:hover { border-color: var(--boundary); color: var(--text); }
.choices svg { width: 58%; height: 58%; }
.choices path { stroke-width: .055; }
.choices img { filter: brightness(.9); }

.dossier { margin-top: 14px; }
.dossier article { display: none; gap: 14px; grid-template-columns: 112px minmax(0, 1fr); align-items: start; }
.dossier article:not(:has(> img)) { grid-template-columns: minmax(0, 1fr); }
.dossier article > img { width: 100%; border: 1px solid var(--line); filter: brightness(.9); }
.label { color: var(--brass); font: 400 .75rem/1.3 var(--mono); letter-spacing: .04em; }
.dossier h3 { margin-top: 6px; font-size: 1.5rem; }
.flavor { color: var(--dim); font-style: italic; font-size: .9375rem; line-height: 1.45; margin-top: 4px; }
.stats { font-size: .875rem; line-height: 1.45; margin-top: 8px; }

@media (min-width: 760px) {
    .pickers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}

#who-recon:checked ~ .dossier .who-recon,
#who-vanguard:checked ~ .dossier .who-vanguard,
#who-archivist:checked ~ .dossier .who-archivist,
#who-artificer:checked ~ .dossier .who-artificer,
#who-quartermaster:checked ~ .dossier .who-quartermaster,
#find-rig:checked ~ .dossier .find-rig,
#find-lamp:checked ~ .dossier .find-lamp,
#find-charm:checked ~ .dossier .find-charm,
#find-optic:checked ~ .dossier .find-optic,
#find-cord:checked ~ .dossier .find-cord { display: grid; }

#who-recon:checked ~ .choices [for="who-recon"],
#who-vanguard:checked ~ .choices [for="who-vanguard"],
#who-archivist:checked ~ .choices [for="who-archivist"],
#who-artificer:checked ~ .choices [for="who-artificer"],
#who-quartermaster:checked ~ .choices [for="who-quartermaster"],
#find-rig:checked ~ .choices [for="find-rig"],
#find-lamp:checked ~ .choices [for="find-lamp"],
#find-charm:checked ~ .choices [for="find-charm"],
#find-optic:checked ~ .choices [for="find-optic"],
#find-cord:checked ~ .choices [for="find-cord"] { border-color: var(--brass); color: var(--brass); }

#who-recon:focus-visible ~ .choices [for="who-recon"],
#who-vanguard:focus-visible ~ .choices [for="who-vanguard"],
#who-archivist:focus-visible ~ .choices [for="who-archivist"],
#who-artificer:focus-visible ~ .choices [for="who-artificer"],
#who-quartermaster:focus-visible ~ .choices [for="who-quartermaster"],
#find-rig:focus-visible ~ .choices [for="find-rig"],
#find-lamp:focus-visible ~ .choices [for="find-lamp"],
#find-charm:focus-visible ~ .choices [for="find-charm"],
#find-optic:focus-visible ~ .choices [for="find-optic"],
#find-cord:focus-visible ~ .choices [for="find-cord"] {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* ── Also in Telos ──────────────────────────────────────── */
.also { display: grid; gap: 0; margin-bottom: 0; max-width: 62ch; }
.also div { padding: 12px 0; border-top: 1px solid var(--line); }
.also div:last-child { border-bottom: 1px solid var(--line); }
.also dt { font-weight: 500; }
.also dd { margin: 2px 0 0; color: var(--dim); }

/* ── No accounts, no ads, no streaks ────────────────────── */
.facts { list-style: none; padding: 0; max-width: 62ch; margin-bottom: 0; }
.facts li { padding: 12px 0; border-top: 1px solid var(--line); color: var(--dim); }
.facts li:last-child { border-bottom: 1px solid var(--line); }

/* ── Footer ─────────────────────────────────────────────── */
.colophon {
    margin-top: 48px;
    padding: 24px var(--gutter) max(24px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    color: var(--dim);
    font: 400 .75rem/1.6 var(--mono);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 32px;
}
.colophon nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; }
.colophon a { color: inherit; }
.colophon a:hover { color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .lantern-glow { animation: none; opacity: .85; }
    .choices label, .cta { transition: none; }
}
