/* Shared by the landing page in every language, PrivacyPolicy.html and the Lambda server's track and city pages.
   Phone first; system typeface; no script. */

/* Colour roles. Blue is the one accent, as on the icon and, in a nearby shade, on the
   app's cycleways. Each fill is paired with the colour for content on it. */
:root {
    --bg: #ffffff;
    --surface: #f2f6fc;
    --text: #14181f;
    --muted: #465060;
    --rule: #d3dae6;
    --primary: #0b57d0;
    --on-primary: #ffffff;
    --link: #0b57d0;
    --focus: #0b57d0;
    --on-cta: #ffffff;
    --shadow: 0 24px 48px -16px rgb(20 40 80 / 0.35);
    --card: #ffffff;
    --radius: 20px;
    /* The night map of the first screen and the city cards: the same in both schemes. */
    --hero-bg: #0b1a38;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1319;
        --surface: #171c25;
        --text: #e8ebf0;
        --muted: #b9c1ce;
        --rule: #333b49;
        --primary: #8ab4f8;
        --on-primary: #0a1a33;
        --link: #8ab4f8;
        --focus: #8ab4f8;
        --on-cta: #ffffff;
        --shadow: 0 24px 48px -16px rgb(0 0 0 / 0.6);
        --card: #1b212c;
    }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--link); text-underline-offset: 0.15em; }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

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

h1, h2 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 {
    font-weight: 800;
    font-size: clamp(2.5rem, 1.3rem + 5vw, 4.5rem);
    line-height: 1.04;
    letter-spacing: -0.015em;
}
h2 {
    font-weight: 700;
    font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.5rem);
    letter-spacing: -0.02em;
}
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; list-style: none; }
/* Korean breaks lines between words, not inside them. */
:lang(ko) { word-break: keep-all; }

.wrap {
    margin: 0 auto;
    max-width: 1160px;
    padding: 0 24px;
}
.wrap.narrow { max-width: 760px; }

/* A link that stands on its own line gets a full 48px touch target (TE-1). */
.block-link,
.footer-links a,
.footer-links span {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
}

.skip-link {
    position: absolute;
    left: 8px;
    top: -100px;
    z-index: 1;
    padding: 12px 16px;
    background: var(--bg);
}
.skip-link:focus { top: 8px; }

/* Header ------------------------------------------------------------------------ */

.site-header { border-bottom: 1px solid var(--rule); background: var(--bg); }
.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.1875rem;
    letter-spacing: -0.01em;
}
.brand img {
    flex: none;
    width: 34px;
    height: 34px;
}

/* The page's own sections; shown where there is room for them. */
.nav { display: none; gap: 4px; margin-left: auto; }
.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 24px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
}
.nav a:hover { background: var(--surface); color: var(--text); }

.button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    border-radius: 24px;
    background: var(--primary);
    color: var(--on-primary);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    padding: 0 22px;
    font-size: 0.9375rem;
}
.button:hover { filter: brightness(1.1); }
.button.secondary { border: 1.5px solid currentColor; background: transparent; color: var(--link); }
.button.secondary::after { content: "\2192"; margin-left: 8px; }

/* On a narrow phone the badge in the hero is the way to the store; the header keeps the name. */
@media (max-width: 479px) {
    .site-header .button { display: none; }
}

/* Sections ---------------------------------------------------------------------- */

section { padding: 56px 0; }
section h2 { margin-bottom: 32px; }
.band { background: var(--surface); }

/* The first screen: the tracks around one city, as they are on the map, under the promise. */
.hero {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: var(--hero-bg);
    color: #ffffff;
}
.hero-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 40%;
}
/* The picture stays bright where the tracks are and goes dark under the words. */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--hero-bg) 0%, var(--hero-bg) 26%, rgb(11 26 56 / 0.2) 48%, rgb(11 26 56 / 0.2) 80%, rgb(11 26 56 / 0.8) 100%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 32px; }
.hero .phone { justify-self: center; box-shadow: 0 30px 70px -20px rgb(0 0 0 / 0.7), 0 0 0 1px rgb(255 255 255 / 0.12); }
.lead {
    margin: 16px 0 24px;
    max-width: 36rem;
    font-size: clamp(1.125rem, 1rem + 0.7vw, 1.4375rem);
    line-height: 1.45;
    color: var(--muted);
    text-wrap: pretty;
}
.hero .lead { color: rgb(255 255 255 / 0.92); }
.hero :focus-visible { outline-color: #ffffff; }

/* The badge is 60px tall: above the 48px floor and the same image the track pages use. */
.store { display: inline-block; border-radius: 10px; }
.store img { display: block; width: 172px; height: 60px; }
.hero .store { box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5); }

/* What the map holds, in numbers. */
.proof {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    margin-bottom: 8px;
    border: 1px solid rgb(255 255 255 / 0.16);
    border-radius: var(--radius);
    background: rgb(255 255 255 / 0.16);
    overflow: hidden;
    backdrop-filter: blur(10px);
}
.proof li {
    padding: 12px 16px;
    background: rgb(11 26 56 / 0.72);
    color: rgb(255 255 255 / 0.85);
    font-size: 0.9375rem;
    line-height: 1.3;
}
.proof strong {
    display: block;
    color: #ffffff;
    font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* The map behind the first screen is credited on it (MP-8). */
.hero-credit { margin: 0 0 16px; color: rgb(255 255 255 / 0.6); font-size: 0.75rem; text-align: right; }

/* The three things the product is for, each beside a picture of it. */
.pillar-grid { display: grid; gap: 40px; align-items: center; }
.eyebrow {
    margin: 0 0 12px;
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.pillar h2 { margin-bottom: 16px; }
.pillar-lead { max-width: 34rem; color: var(--muted); font-size: 1.1875rem; }
.points { margin-top: 24px; }
.points li {
    position: relative;
    max-width: 34rem;
    padding: 10px 0 10px 36px;
    border-top: 1px solid var(--rule);
    font-weight: 500;
}
/* A tick, drawn: the item is something the product does. */
.points li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 16px;
    width: 14px;
    height: 7px;
    border-left: 2.5px solid var(--primary);
    border-bottom: 2.5px solid var(--primary);
    transform: rotate(-45deg);
}
.pillar-art { display: flex; justify-content: center; }

/* The app's own screen, in a plain phone outline. */
.phone {
    width: min(300px, 74vw);
    padding: 9px;
    border-radius: 44px;
    background: #0a1220;
    box-shadow: var(--shadow);
}
.phone picture { display: block; }
.phone img { display: block; width: 100%; border-radius: 36px; }

/* The pillars' drawings, in the hero's colours. */
.art { width: min(440px, 100%); height: auto; border-radius: 28px; box-shadow: var(--shadow); }
.art-bg { fill: var(--hero-bg); }
.art-road { fill: none; stroke: #27457c; stroke-width: 3; }
.art-tracks { fill: none; stroke: #ff7a66; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.art-route { fill: none; stroke: #ff7a66; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
/* The part of the route already ridden is white; what lies ahead keeps the track's colour. */
.art-route.done { stroke: #ffffff; stroke-width: 6; }
.art-cone { fill: rgb(138 180 248 / 0.35); }
.art-puck { fill: #8ab4f8; stroke: #ffffff; stroke-width: 5; }
.art-pin { stroke: #ffffff; stroke-width: 4; }
.art-pin.start { fill: #3ecf8e; }
.art-pin.end { fill: #ff7a66; }
.art-climb { fill: rgb(138 180 248 / 0.22); }
.art-climb-line { fill: none; stroke: #8ab4f8; stroke-width: 3; stroke-linejoin: round; }
.art-chip rect { fill: #ffffff; }
.art-chip path { fill: none; stroke: #0b57d0; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.art-chip .art-line { stroke: #c3cfe2; }

/* A few cities as examples: the shapes of the tracks around each, as the hero draws Munich's. */
.section-lead { max-width: 36rem; margin: -16px 0 32px; color: var(--muted); font-size: 1.1875rem; }
.city-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.city-cards a {
    display: block;
    padding: 12px 12px 14px;
    border-radius: var(--radius);
    background: var(--hero-bg);
    color: #ffffff;
    text-decoration: none;
}
.city-cards svg { display: block; width: 100%; height: auto; margin-bottom: 8px; }
.city-cards path { fill: none; stroke: #ff7a66; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.city-cards .name { display: block; font-weight: 700; font-size: 1.0625rem; }
.city-cards .meta { display: block; color: rgb(255 255 255 / 0.72); font-size: 0.875rem; }
.city-cards a:hover .name { text-decoration: underline; }
.city-cards :focus-visible { outline-offset: 3px; }
.cities .more { margin: 32px 0 0; }

.columns { display: grid; gap: 40px; }
.columns > div { padding: 28px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.columns h2 { margin-bottom: 12px; font-size: 1.5rem; }
.columns p { max-width: 34rem; }
/* How the tracks are chosen, and the limits of a search: said, but small. */
.fine, .limits { margin-top: 16px; color: var(--muted); font-size: 0.875rem; }
.limits { margin-top: 4px; }

.faq { border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 8px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    min-height: 64px;
    font-size: 1.1875rem;
}
.faq summary::-webkit-details-marker { display: none; }
/* A plus that becomes a minus: the two states differ in shape, not colour. */
.faq summary::after {
    content: "+";
    flex: none;
    width: 1em;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    text-align: center;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { max-width: 40rem; color: var(--muted); }
.faq details p:last-child { margin-bottom: 16px; }

.cta {
    padding: 0 0 72px;
    background: none;
    color: var(--on-cta);
    text-align: center;
}
.cta .wrap { max-width: 1112px; padding: 56px 24px; border-radius: 28px; background: linear-gradient(135deg, #0b57d0, #062e6f); }
.cta h2 { margin-bottom: 24px; }
.cta :focus-visible { outline-color: var(--on-cta); }

.site-footer {
    border-top: 1px solid var(--rule);
    color: var(--muted);
    font-size: 0.9375rem;
    padding: 40px 0 32px;
    background: var(--surface);
}
.site-footer p { margin: 0 0 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin-top: 8px; }
/* The page's own language in the list of languages: named, not a link. */
.footer-links [aria-current] { color: var(--text); font-weight: 600; }

/* Privacy policy, about page, track page and city pages --------------------------- */

.legal, .about, .track, .city { padding: 40px 20px 56px; }
.legal h1, .about h1, .track h1, .city h1 { margin-bottom: 16px; font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem); }
.legal h2, .about h2, .track h2, .city h2 { margin: 32px 0 8px; font-size: 1.25rem; }
/* Addresses are the longest words on the page; let them break on a narrow phone. */
.legal a, .about a, .site-footer a { overflow-wrap: anywhere; }
.about .lead { margin: 0 0 8px; }

/* The track page of the Lambda server (server_lambda/track_page.js). */
.track h1 { margin-bottom: 8px; overflow-wrap: anywhere; }
.track .lead { margin: 0 0 20px; }
.track-map {
    height: 60vh;
    min-height: 280px;
    max-height: 480px;
    border: 1px solid var(--rule);
    border-radius: 16px;
    background: var(--surface);
    /* Leaflet's panes stay under the skip link. */
    z-index: 0;
}
/* What is known of the track, as the city page's card says it: a chip each. */
.track-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.track-facts li { padding: 8px 14px; border: 1px solid var(--rule); border-radius: 14px; background: var(--card); color: var(--muted); font-size: 0.9375rem; }
.track-facts strong { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.track .note { color: var(--muted); font-size: 0.9375rem; }
/* The ways to see the track that work on every device, right under the map. */
.track-links { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 12px; }
/* The app's button leads on Android; elsewhere it opens nothing, so the page says where it works
   instead (the class is set by the page's script; without it, the button shows). */
.app-first { margin: 0 0 20px; }
.not-android .app-first { display: none; }
.app-later { display: none; }
.not-android .app-later { display: block; }
/* Leaflet's zoom buttons are 30px; a finger needs 48 (TE-1). */
.track-map .leaflet-bar a,
.track-map .leaflet-bar a:hover {
    width: 48px;
    height: 48px;
    font-size: 24px;
    line-height: 48px;
}

/* The city pages of the Lambda server (server_lambda/city_page.js). */
.wrap.narrow.city { max-width: 1000px; padding-top: 0; }
.city .note { margin-top: 8px; color: var(--muted); font-size: 0.9375rem; }
/* The top of a city's page, in the landing page's night colours, as wide as the window. */
body { overflow-x: clip; }
.city-hero {
    display: grid;
    gap: 16px;
    margin: 0 calc(50% - 50vw) 8px;
    padding: 8px calc(50vw - 50%) 28px;
    background: var(--hero-bg);
    color: #ffffff;
}
.city-hero h1 { margin-bottom: 12px; }
.city-hero .lead { margin: 0 0 20px; color: rgb(255 255 255 / 0.88); font-size: 1.125rem; }
.city-hero .crumbs, .city-hero .crumbs a { color: rgb(255 255 255 / 0.8); }
.city-hero :focus-visible { outline-color: #ffffff; }
/* On a phone the facts are rows of one panel; from 600px, chips side by side. */
.city-facts { border: 1px solid rgb(255 255 255 / 0.2); border-radius: 14px; background: rgb(255 255 255 / 0.08); }
.city-facts li {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 10px 14px;
    color: rgb(255 255 255 / 0.85);
    font-size: 0.875rem;
}
.city-facts li + li { border-top: 1px solid rgb(255 255 255 / 0.14); }
.city-facts strong { color: #ffffff; font-size: 1.0625rem; font-variant-numeric: tabular-nums; }
/* At phone width the header hides its store button (above), so the top carries the badge,
   clear of the facts above it. */
.hero-store { display: block; width: fit-content; margin-top: 16px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.5); }
@media (min-width: 480px) {
    .hero-store { display: none; }
}
/* What the city's list holds, in sentences: the first thing after the top. */
.city .summary { max-width: 46rem; margin-top: 24px; font-size: 1.0625rem; }
/* The city's tracks together, and each track's own shape in its row: the lines of the first screen. */
/* On a phone the map follows at once, so the sketch of them together is left out. */
.city-sketch { display: none; width: 100%; max-width: 480px; height: auto; justify-self: center; }
.city-sketch, .track-list svg { color: #ff7a66; }
.city-sketch path, .track-list svg path { stroke-linecap: round; stroke-linejoin: round; }
.city-sketch path { stroke-width: 3.5; filter: drop-shadow(0 0 5px rgb(255 122 102 / 0.55)); }
.track-list svg path { stroke-width: 3; }
/* Where the page is: the pages above it, then its own name, which is not a link. */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 8px; color: var(--muted); font-size: 0.9375rem; }
.crumbs li { display: inline-flex; align-items: center; min-height: 48px; }
.crumbs li + li::before { content: "\203A"; margin: 0 10px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 48px; }
/* One track or one city a row; the whole row is the link (TE-1). */
.track-list li, .city-list li {
    margin-bottom: 8px;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: var(--card);
}
.track-list a, .city-list a {
    min-height: 56px;
    text-decoration: none;
}
.city-list a { display: flex; flex-direction: column; justify-content: center; padding: 8px 16px; }
/* A track's row: its sketch on a night tile beside its name and length. */
.track-list a { display: grid; grid-template-columns: 96px 1fr; column-gap: 14px; align-content: center; padding: 8px 14px 8px 8px; }
.track-list svg { grid-column: 1; grid-row: 1 / span 4; align-self: center; width: 96px; height: 72px; border-radius: 10px; background: var(--hero-bg); }
.track-list .name, .track-list .meta, .track-list .more, .track-list .desc { grid-column: 2; }
.track-list .more { color: var(--muted); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
/* What a route's mappers wrote of it, quoted: set apart from the facts above it. */
.track-list .desc { margin-top: 4px; color: var(--muted); font-size: 0.875rem; font-style: italic; }
/* A route too long to be a track has no sketch: its words take the whole row. */
.track-list a.words { grid-template-columns: 1fr; padding: 10px 16px; }
.track-list .words > span { grid-column: 1; }
/* The countries of the city index. */
.city h3 { margin: 24px 0 8px; font-size: 1.0625rem; }
/* A length and its other unit stay on one line; the kind may go above them. */
.track-list .length { white-space: nowrap; }
.track-list .name, .city-list .name { font-weight: 600; overflow-wrap: anywhere; }
.track-list .meta, .city-list .meta { color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.track-list a:hover .name, .city-list a:hover .name { text-decoration: underline; }

/* Wider screens ----------------------------------------------------------------- */

@media (min-width: 600px) {
    .city-cards { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .proof { grid-template-columns: repeat(4, 1fr); }
    .city-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
    .track-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 12px; }
    .city-facts { display: flex; flex-wrap: wrap; gap: 8px; border: 0; background: none; }
    .city-facts li { display: block; border: 1px solid rgb(255 255 255 / 0.2); border-radius: 14px; background: rgb(255 255 255 / 0.08); }
    .city-facts li + li { border-top: 1px solid rgb(255 255 255 / 0.2); }
    .city-facts strong { display: block; font-size: 1.125rem; }
}

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

@media (min-width: 900px) {
    .city-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: 40px; padding-top: 16px; padding-bottom: 40px; margin-bottom: 16px; }
    .city .track-map { max-height: 520px; }
    .city-sketch { display: block; }
    .nav { display: flex; }
    .site-header .button { margin-left: 8px; }
    section { padding: 96px 0; }
    .hero::after { background: linear-gradient(90deg, var(--hero-bg) 0%, var(--hero-bg) 44%, rgb(11 26 56 / 0.15) 72%), linear-gradient(0deg, rgb(11 26 56 / 0.8) 0%, transparent 30%); }
    .hero-art img { object-position: 100% 40%; }
    .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); align-items: center; gap: 48px; padding-top: 44px; padding-bottom: 36px; }
    .hero .phone { width: 272px; }
    .hero h1 { max-width: 13em; }
    .pillar-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; }
    .pillar.band .pillar-art { order: -1; }
    .cta { padding: 0 24px 96px; }
    .cta .wrap { padding: 72px 24px; }
}
