/* Gleisplan website - "the map is the page": the game's own map print on its sea opens every
   page; text stands on printed paper sheets with one ink hairline, no UI shadows; Charter for
   names and text, Inter Bold spaced capitals for labels; the ink stamp is the one primary
   element. Map colours only as accents. No script. */

/* palette:begin - generated by tools/site/gen_site.py from src/ui/theme/Palette.gd; do not edit by hand */
:root {
  --paper: #F4ECD8;
  --paper-down: #E8DDC3;
  --land: #F7EFDD;
  --tile: #FFFDF8;
  --ink: #3A3229;
  --on-ink: #FBF4E2;
  --rule: rgba(58, 50, 41, 0.62);
  --rule-soft: rgba(58, 50, 41, 0.28);
  --accent: #0F766E;
  --warning-ink: #B02A2A;
  --sea: #B9CED2;
  --coast-glow: #DDE9E6;
  --locked: #DCDBD2;
  --ink-label: #544A3A;
  --line-0: #106887;
  --line-1: #814136;
  --line-2: #386D5A;
  --line-3: #61225A;
  --line-4: #3B3410;
  --line-5: #3D4949;
  --metro-0: #D19A14;
  --metro-1: #E0567A;
  --metro-2: #7A5AD0;
  --metro-3: #1E9FA0;
  --metro-4: #4E8A2A;
}
/* palette:end */

@font-face { font-family: "Charter"; src: url("fonts/Charter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Charter"; src: url("fonts/Charter-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --serif: "Charter", "Bitstream Charter", "Iowan Old Style", Georgia, serif;
  --caps: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --hair: 1.5px solid var(--rule);
  --gut: 16px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gut: 32px; } }
@media (min-width: 1024px) { :root { --gut: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper) url("img/grain.png");
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--serif);
  overflow-wrap: break-word;
}
@media (min-width: 720px) { body { font-size: 1.125rem; } }
img, svg { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p, ul, ol, dl, dd, address { margin: 0; }
address { font-style: normal; }
p, li, dd { text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 9; background: var(--tile); padding: 8px 14px; border: var(--hair); border-radius: 999px; }

/* labels: Inter Bold spaced capitals; small secondary text in the label ink (>= 4.5:1 on grain) */
.caps, .nav a, .stamp, .soon, th {
  font-family: var(--caps); font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.75rem;
}
.soft { color: var(--ink-label); }

/* --- the sea: the map's own ground, one grain over sea and print alike --- */
.sea { position: relative; isolation: isolate; background: var(--sea); }
.sea::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url("img/grain.png"); }
/* the grain lies over the print too (no visible edge); paper and navigation above it */
.sea .bar, .sea .card { position: relative; z-index: 2; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 80rem; margin: 0 auto; padding: 12px var(--gut); }
.brand { font-weight: 700; font-size: 1.9rem; line-height: 1; letter-spacing: -0.015em; text-decoration: none; padding: 6px 0; }
.nav ul { list-style: none; display: flex; margin: 0; padding: 0 6px; background: var(--tile); border: var(--hair); border-radius: 999px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 11px; text-decoration: none; color: var(--ink-label); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.5em; }
.nav a[lang] { color: var(--ink); }
.nav a:focus-visible { border-radius: 999px; outline-offset: -3px; }
@media (max-width: 599px) { .nav .wide { display: none; } }

/* --- start: the map is the hero; pitch above it, the beta right below it --- */
.home .bar { position: absolute; z-index: 2; top: 0; right: 0; left: 0; justify-content: flex-end; pointer-events: none; }
.home .bar > * { pointer-events: auto; }
.hero { max-width: 80rem; margin: 0 auto; padding: 12px var(--gut) 32px; }
.wordmark { font-weight: 700; font-size: clamp(2.3rem, 10.5vw, 4.2rem); line-height: 1.1; letter-spacing: -0.02em;
  min-height: 46px; animation: rise 700ms cubic-bezier(.2, .7, .2, 1) both; }
.lead { font-weight: 700; font-size: 1.45rem; line-height: 1.2; margin-top: 8px; }
.pitch { margin-top: 4px; max-width: 30rem; line-height: 1.45; }
.map { display: block; margin: 14px auto 0; }
/* the whole country, never cropped: its height gives way so the beta stays in a short first screen */
.map img { height: clamp(220px, calc(100svh - 400px), 560px); width: auto; margin: 0 auto;
  animation: settle 1100ms cubic-bezier(.2, .7, .2, 1) both; }
.card { max-width: 34rem; margin: 14px auto 0; padding: 16px; background: var(--tile); border: var(--hair); border-radius: 24px;
  animation: rise 700ms 200ms cubic-bezier(.2, .7, .2, 1) both; }
.act { display: flex; align-items: center; gap: 12px; }
.stamp { flex: 1; display: inline-flex; justify-content: center; align-items: center; min-height: 54px; padding: 0 20px; white-space: nowrap;
  border-radius: 999px; background: var(--ink); color: var(--on-ink); text-decoration: none; font-size: 0.82rem; letter-spacing: 0.16em;
  transition: transform 120ms ease-out; }
.stamp:hover { color: var(--on-ink); }
.stamp:active { transform: scale(0.96); }
.datestamp { flex: 0 0 auto; width: 46px; height: 46px; color: var(--warning-ink); opacity: 0.85; transform: rotate(-12deg);
  animation: thunk 420ms 700ms cubic-bezier(.3, 1.5, .5, 1) both; }
.datestamp .arc { font: 700 9px var(--caps); letter-spacing: 1.6px; fill: currentColor; }
.datestamp .mid { font: 700 26px var(--serif); fill: currentColor; }
.status { margin-top: 10px; color: var(--ink-label); font-size: 0.95rem; line-height: 1.4; }
@media (max-width: 380px) { .stamp { letter-spacing: 0.12em; padding: 0 14px; } }

@media (min-width: 1024px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: 1fr auto auto auto auto 1.3fr;
    column-gap: 48px; min-height: min(100svh, 1000px); padding-top: 0; padding-bottom: 0; }
  .wordmark { grid-column: 1; grid-row: 2; padding-top: 56px; white-space: nowrap; font-size: clamp(4rem, 6.4vw, 6.8rem); }
  .lead { grid-column: 1; grid-row: 3; font-size: 2.1rem; margin-top: 12px; }
  .pitch { grid-column: 1; grid-row: 4; font-size: 1.25rem; max-width: 27rem; }
  .card { grid-column: 1; grid-row: 5; align-self: start; margin: 28px 0 64px; max-width: 30rem; padding: 20px 22px; }
  .map { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; }
  .map img { height: min(calc(100svh - 24px), 980px); max-width: 100%; object-fit: contain; }
  .act .stamp { flex: 0 1 auto; padding: 0 28px; }
}

/* --- the route: on wide screens one line down the page, a dot for every section --- */
.route { position: relative; isolation: isolate; max-width: 64rem; margin: 0 auto; padding: 48px var(--gut) 8px; }
.leg { position: relative; padding-bottom: 64px; }
.leg:last-child { padding-bottom: 32px; }
@media (min-width: 1024px) {
  .route { padding-left: calc(var(--gut) + 44px); padding-top: 64px; }
  .leg::before { content: ""; position: absolute; left: -44px; top: 6px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--tile); border: 6px solid var(--line-0); }
  .leg:last-child::before { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 4px var(--tile); }
  .leg::after { content: ""; position: absolute; z-index: -1; left: -33px; top: 20px; bottom: -22px; width: 6px; background: var(--line-0); }
  .leg:first-child::after { top: -64px; }
  .leg:last-child::after { display: none; }
}
h2 { font-size: clamp(1.7rem, 6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 20px; }
h3 { font-size: 1.15rem; line-height: 1.3; }

.legend { list-style: none; padding: 0; display: grid; gap: 22px; }
.legend li { display: grid; grid-template-columns: 18px 1fr; column-gap: 14px; align-content: start; }
.legend li::before { content: ""; grid-row: 1 / span 2; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--dot); }
.legend .ring::before { background: transparent; border: 4.5px solid var(--dot); }
.legend p { grid-column: 2; margin-top: 2px; }
.legend li:nth-child(1) { --dot: var(--metro-0); } .legend li:nth-child(2) { --dot: var(--metro-1); }
.legend li:nth-child(3) { --dot: var(--metro-2); } .legend li:nth-child(4) { --dot: var(--metro-3); }
.legend li:nth-child(5) { --dot: var(--metro-4); }
@media (min-width: 720px) { .legend { grid-template-columns: 1fr 1fr; gap: 30px 40px; } }

/* pictures: phones swipe a scroll-snap strip (a sliver of the next card as the cue); wide screens see all */
.strip { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: min(calc(100% - 48px), 300px); gap: 16px;
  margin: 0 calc(var(--gut) * -1); padding: 4px var(--gut) 14px; scroll-padding-inline: var(--gut); overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--rule-soft) transparent; }
.strip li { scroll-snap-align: start; }
.strip img { border: var(--hair); border-radius: 24px; background: var(--tile); padding: 5px; }
.strip figcaption { margin-top: 10px; font-size: 0.95rem; line-height: 1.4; }
.strip figcaption .caps { display: block; color: var(--ink-label); margin-bottom: 2px; }
/* a picture opens large (popover: no script; Esc or a click beside it closes) */
.zoom { all: unset; display: block; cursor: zoom-in; border-radius: 24px; }
.zoom:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.lightbox { border: var(--hair); border-radius: 28px; background: var(--tile); padding: 8px; max-width: 94vw; overflow: visible; }
.lightbox::backdrop { background: color-mix(in srgb, var(--ink) 62%, transparent); }
.lightbox img { border: 0; padding: 0; display: block; height: min(86svh, 1494px); width: auto; max-width: calc(94vw - 16px); object-fit: contain; border-radius: 21px; }
.shut { all: unset; display: block; margin: 8px auto 2px; padding: 0 18px; min-height: 44px; line-height: 44px; cursor: pointer;
  font-family: var(--caps); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-label); }
.shut:focus-visible { outline: 2.5px solid var(--accent); outline-offset: -3px; border-radius: 999px; }
.swipe { margin: -12px 0 12px; color: var(--ink-label); font-size: 0.95rem; }
/* wide: 3 + 2, the second row centred as a pair (same card width); from 1400 px all five in a row */
@media (min-width: 720px) {
  .strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 24px; margin: 0; padding: 0; overflow: visible; }
  .strip li { flex: 0 0 calc((100% - 48px) / 3); }
  .swipe { display: none; }
}
@media (min-width: 1400px) { .route { max-width: 82rem; } .strip li { flex-basis: calc((100% - 96px) / 5); } }

.sheet { background: var(--tile); border: var(--hair); border-radius: 24px; padding: 22px 20px; }
@media (min-width: 720px) { .sheet { padding: 32px 36px; } }
.offline p + p { margin-top: 10px; }
.offline .plain { font-size: 1.2rem; line-height: 1.45; }

.stores { list-style: none; padding: 0; display: grid; gap: 14px; }
@media (min-width: 560px) { .stores { grid-template-columns: 1fr 1fr; } }
.stores li { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 80px; padding: 10px 96px 10px 20px;
  border: var(--hair); border-radius: 18px; background: var(--tile); font-weight: 700; font-size: 1.3rem; line-height: 1.2; }
.soon { position: absolute; top: 50%; right: 16px; margin-top: -18px; padding: 8px 12px; color: var(--accent);
  border: 2px solid var(--accent); border-radius: 10px; transform: rotate(-8deg); }
.aside { margin-top: 18px; color: var(--ink-label); }

/* --- inner pages: a short sea band, text on a paper sheet --- */
.band { padding-bottom: 30px; }
.band .bar { max-width: 48rem; }
.page { max-width: 48rem; margin: -18px auto 0; padding: 0 var(--gut); position: relative; z-index: 3; }
.prose { max-width: 66ch; }
.prose h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 14px; }
.prose h2 { font-size: 1.4rem; margin: 1.9em 0 0.5em; padding-top: 0.9em; border-top: 3px solid var(--ink); }
.prose h1 + h2 { margin-top: 0.6em; }
.prose h3 { margin: 1.4em 0 0.35em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose ol, .prose ul { padding-left: 1.3em; }
.date { color: var(--ink-label); margin: 0 0 6px; }
.card-data { border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); padding: 12px 0; margin: 0 0 1em; }
.card-data .last, .card-data p:last-child { margin-bottom: 0; }
.toc { margin: 0 0 1.4em; }
.toc ol { list-style: none; padding: 0; margin: 6px 0 0; border-top: 1px solid var(--rule-soft); }
.toc li { margin: 0; border-bottom: 1px solid var(--rule-soft); }
.toc a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.toc a:hover { text-decoration: underline; }
/* the gestures: one line each - what it does, where the finger starts */
.gestures { margin: 0 0 1.2em; border-top: 1px solid var(--rule-soft); }
.gestures div { padding: 10px 0; border-bottom: 1px solid var(--rule-soft); }
.gestures dt { font-family: var(--caps); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; color: var(--ink); }
.gestures dd { margin-top: 2px; }
@media (min-width: 600px) { .gestures div { display: grid; grid-template-columns: 11rem 1fr; column-gap: 16px; }
  .gestures dt { padding-top: 0.3em; } .gestures dd { margin: 0; } }
details { border-top: 1px solid var(--rule-soft); }
details:last-of-type { border-bottom: 1px solid var(--rule-soft); }
summary { cursor: pointer; font-weight: 700; padding: 11px 0; min-height: 44px; }
details > p { margin-bottom: 14px; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1em; }
th, td { text-align: left; vertical-align: top; padding: 9px 10px 9px 0; border-bottom: 1px solid var(--rule-soft); }
.gone .big { font-weight: 700; font-size: clamp(3.5rem, 18vw, 6rem); line-height: 1; color: var(--line-0); margin-bottom: 12px; }
.gone .stamp { flex: none; margin: 8px 0 18px; }
.gone .other { color: var(--ink-label); font-size: 0.95rem; margin: 0; }

/* --- footer --- */
.foot { max-width: 64rem; margin: 0 auto; padding: 28px var(--gut) 40px; color: var(--ink-label); font-size: 0.95rem; }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 8px 0 0; border-top: var(--hair); }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-label); }
.page + .foot { max-width: 48rem; margin-top: 40px; }
/* after the route the footer keeps the route's measure and its text edge */
@media (min-width: 1024px) { .route + .foot { padding-left: calc(var(--gut) + 44px); } }
@media (min-width: 1400px) { .route + .foot { max-width: 82rem; } }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes settle { from { opacity: 0; transform: scale(1.02); } }
@keyframes thunk { from { opacity: 0; transform: rotate(-12deg) scale(1.6); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
