/* lofiascii.com: one stylesheet for every page. The look follows the shows: night blues, warm
   window light, and the caption bar's ┤ framed ├ headings, in JetBrains Mono like the picture. */

:root {
  --bg: #0b0f1e;
  --bg2: #111830;
  --panel: #0e1427;
  --line: #24304f;
  --text: #ece6d6;
  --dim: #9aa3b8;
  --faint: #8790a8;
  --amber: #ffd27a;
  --teal: #62c8b4;
  --red: #e0262b;
  --radius: 10px;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--mono); }
a { color: var(--amber); text-underline-offset: 3px; }
a:hover { color: #fff0c4; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: 0.02em; text-wrap: balance; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* the site bar */
.top { border-bottom: 1px solid var(--line); background: rgba(11, 15, 30, 0.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(6px); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 54px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: 0.08em; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-left: auto; font-size: 14px; }
@media (max-width: 640px) { .top nav { margin-left: 0; padding-bottom: 8px; } .top nav a[href^="#"] { display: none; } }
.top nav a { color: var(--dim); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--amber); }

/* ┤ FRAMED ├ section headings, as on the show's caption bar */
.frame { display: flex; align-items: center; gap: 10px; color: var(--amber); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 14px; }
.frame::before { content: "┤"; color: var(--faint); }
.frame::after { content: "├"; color: var(--faint); }
.frame .rule { flex: 1; height: 1px; background: var(--line); order: 3; }

section { padding: 44px 0; }
section + section { border-top: 1px solid var(--line); }
.lede { color: var(--dim); max-width: 68ch; }

/* the live picture */
.screen { position: relative; aspect-ratio: 16 / 9; background: #05070f url("/img/share.png") center / cover; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.hero { padding-top: 28px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); }
.hero .sub { color: var(--amber); margin: 6px 0 20px; }
.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .live-grid { grid-template-columns: minmax(0, 1fr); } }

/* "now passing", laid out like the caption bar */
.now { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.now .place { font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.now .place::before { content: "● "; color: var(--amber); }
.now .country { color: var(--dim); }
.now .meta { color: var(--dim); font-size: 13px; margin: 4px 0 10px; }
.now .caption { color: var(--text); margin: 0 0 12px; }
.now .music { color: var(--teal); font-size: 13px; }
.now .next { color: var(--dim); font-size: 13px; margin-top: 10px; }
.now .next b { color: var(--amber); font-weight: 700; }
.now .stale { color: var(--faint); font-size: 12px; margin-top: 10px; }
.now[data-state="loading"] .body { opacity: 0.5; }

/* the map */
.mapbox { position: relative; height: min(64vh, 620px); min-height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #07080b; touch-action: none; }
.mapbox canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.mapbox canvas.drag { cursor: grabbing; }
.map-tip { position: absolute; display: none; pointer-events: none; background: #14182a; color: var(--text); border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; font-size: 12px; white-space: nowrap; z-index: 5; }
.map-tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; z-index: 6; }
.map-tools button { font: 600 13px var(--mono); color: var(--text); background: rgba(14, 20, 39, 0.9); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; cursor: pointer; min-width: 36px; }
.map-tools button:hover { border-color: var(--amber); color: var(--amber); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--dim); font-size: 13px; margin-top: 10px; }
.legend i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
#map-train-dot { position: absolute; left: 0; top: 0; width: 0; height: 0; display: none; pointer-events: none; z-index: 4; }
#map-train-dot::before, #map-train-dot::after { content: ""; position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; }
#map-train-dot::before { background: var(--amber); border: 2px solid #14110a; }
#map-train-dot::after { border: 2px solid var(--amber); animation: ping 2s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(3.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #map-train-dot::after { animation: none; opacity: 0.5; transform: scale(1.8); } }

/* how it's made */
.made { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.made div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.made h3 { font-size: 15px; color: var(--amber); margin-bottom: 8px; }
.made p { color: var(--dim); font-size: 14px; margin: 0; }

/* cards: shows on the home page, journeys on the train page */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; }
.card:hover { border-color: var(--amber); color: var(--text); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; height: auto; }
.card .txt { padding: 14px 16px 16px; }
.card h3 { font-size: 17px; margin-bottom: 4px; }
.card p { color: var(--dim); font-size: 14px; margin: 0; }
.card .tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.1em; color: #fff; background: var(--red); border-radius: 5px; padding: 1px 8px; margin-bottom: 8px; }
.card.soon { border-style: dashed; display: grid; place-items: center; min-height: 200px; color: var(--faint); text-align: center; padding: 20px; }

.banner { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 2560 / 640; background: url("/img/banner.png") center / cover; }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn { display: inline-block; font-weight: 700; border: 1px solid var(--amber); color: var(--amber); border-radius: 8px; padding: 8px 14px; text-decoration: none; }
.btn.solid { background: var(--amber); color: #1a1406; }
.btn:hover { background: #2a2412; color: #fff0c4; }
.btn.solid:hover { background: #ffe1a3; color: #1a1406; }

footer { border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; padding: 28px 0 40px; }
footer a { color: var(--dim); }
