/* climbwise.app: the public pages in the Wegweiser world (tokens from app/web/src/styles/tokens.css).
   Barlow and Barlow Semi Condensed are self-hosted (SIL Open Font License, fonts/OFL.txt); nothing loads from
   another host. */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/barlow-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/barlow-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/barlow-semi-condensed-latin-700-normal.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #e6e9e7;          /* cool stone */
  --surface: #ffffff;     /* sign white */
  --sunk: #d9dedb;
  --plate: #d9dedb;       /* stone plate: the trail end */
  --ink: #161a18;
  --muted: #4a514d;
  --line: #b9c0bc;
  --pole: #a9b1ac;
  --yellow: #f5c400;      /* Wanderweg */
  --yellow-ink: #161a18;
  --focus: #161a18;
  --halo: #f5c400;
  --selection: #f5c40080;
  --sign: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --arrow: 1.25rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121618;        /* night trail slate */
    --surface: #1d2326;
    --sunk: #0d1012;
    --plate: #2a3236;
    --ink: #eef1ef;
    --muted: #a8b1ac;
    --line: #353e42;
    --pole: #47525a;
    --focus: #f5c400;
    --halo: #121618;
    --selection: #f5c40066;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--body);
  font-variant-numeric: tabular-nums;
  caret-color: var(--yellow);
}
::selection { background: var(--selection); color: var(--ink); }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 5px var(--halo); border-radius: 0.125rem; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 0.75rem; max-width: 66ch; }
p, li, address, dd { overflow-wrap: break-word; hyphens: auto; text-wrap: pretty; }
strong { font-weight: 600; }

.page {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: max(0.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* the head row: home (small lockup) on the left, the other language on the right */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3rem; padding-top: 0.5rem; }
.bar .home { display: inline-flex; align-items: center; min-height: 2.75rem; }
.bar .home img { width: 96px; }
.lang {
  display: inline-flex; align-items: center; min-height: 2.75rem; margin-inline-start: auto;
  font: 600 0.875rem/1.2 var(--sign); letter-spacing: 0.02em;
}

/* ---------- home ---------- */
.home-grid { display: grid; gap: 2.5rem; margin-top: 1.5rem; }
.lockup { margin: 0; }
.lockup img { width: 176px; }
.line {
  margin: 1.25rem 0 1rem;
  font: 700 1.5rem/1.15 var(--sign);
  text-wrap: balance;
}
.intro > p:not(.line) { color: var(--ink); }

/* the closed test, said once and plainly: a small Wanderweg blaze before the words */
.closed {
  position: relative;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem 0.75rem 2.375rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
}
.closed::before {
  content: "";
  position: absolute;
  inset-inline-start: 1rem;
  top: 1.05rem;
  width: 0.875rem;
  height: 0.5rem;
  background: var(--yellow);
  border: 1px solid var(--yellow-ink);
  border-radius: 1px;
}
.closed strong { font-family: var(--sign); font-weight: 700; font-size: 1.0625rem; display: block; line-height: 1.2; margin-bottom: 0.125rem; }

/* the one way: a yellow direction plate on its pole stub, pointing to the app */
.go { position: relative; margin-top: 1.5rem; padding-inline-start: 1.5rem; }
.go::before {
  content: ""; position: absolute; inset-block: -0.75rem -1.25rem; inset-inline-start: 0;
  width: 0.75rem; background: var(--pole); border-radius: 0.125rem 0.125rem 0 0;
}
.way {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.125rem;
  min-height: 3.75rem;
  padding: 0.75rem calc(var(--arrow) + 1rem) 0.75rem 1rem;
  color: var(--yellow-ink);
  font: 700 1.25rem/1.15 var(--sign);
  text-decoration: none;
  --shape: polygon(0 0, calc(100% - var(--arrow)) 0, 100% 50%, calc(100% - var(--arrow)) 100%, 0 100%);
}
.way::before, .way::after { content: ""; position: absolute; border-radius: 0.25rem; clip-path: var(--shape); }
.way::before { inset: 0; z-index: -1; background: var(--yellow); }
.way::after { inset: -3px; z-index: -2; background: var(--ink); opacity: 0; transition: opacity 120ms var(--ease-out); }
@media (hover: hover) { .way:hover::after { opacity: 1; } }
.way:active::after { opacity: 1; }
.way:focus-visible { outline: none; box-shadow: none; }
.way:focus-visible::after { opacity: 1; inset: -4px; }
.way-meta { font: 400 0.875rem/1.25 var(--body); }
.go .way { max-width: 24rem; }

/* the signpost board: the topics as white Standort plates on one grey pole */
.board h2, .sheet h2 {
  margin: 0 0 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 3px solid var(--ink);
  font: 700 1.0625rem/1.15 var(--sign);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-wrap: balance;
}
.post { position: relative; margin: 0; padding: 0.25rem 0 0 1.5rem; list-style: none; display: grid; gap: 0.5rem; }
.post::before {
  content: ""; position: absolute; inset-block: 0 -1.5rem; inset-inline-start: 0;
  width: 0.75rem; background: var(--pole); border-radius: 0.125rem 0.125rem 0 0;
}
.plate {
  position: relative;
  padding: 0.75rem 1rem 0.8125rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
}
/* the bracket that holds each plate to the pole */
.plate::before {
  content: ""; position: absolute; inset-inline-start: calc(-0.75rem - 1px); top: 50%;
  width: 0.75rem; height: 0.375rem; margin-top: -0.1875rem; background: var(--pole);
}
.plate h3 { margin: 0; font: 700 1.0625rem/1.2 var(--sign); }
.plate p { margin: 0.125rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.tag {
  display: inline-block; margin-inline-start: 0.375rem; padding: 0.0625rem 0.375rem; vertical-align: 0.1em;
  border: 1px solid var(--muted); border-radius: 0.125rem;
  font: 600 0.75rem/1.3 var(--sign); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
}

/* ---------- foot ---------- */
.foot {
  margin-top: auto;
  padding-top: 3rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem;
  font: 600 0.875rem/1.2 var(--sign);
}
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.foot a[aria-current="page"] { text-decoration: none; color: var(--muted); }
.foot small { flex-basis: 100%; margin-top: 0.25rem; font: 400 0.875rem/1.4 var(--body); color: var(--muted); }

/* ---------- text pages ---------- */
.sign-post { position: relative; padding-inline-start: 1.5rem; margin: 1rem 0 1.5rem; }
.sign-post::before {
  content: ""; position: absolute; inset-block: -0.5rem -1.5rem; inset-inline-start: 0;
  width: 0.75rem; background: var(--pole); border-radius: 0.125rem 0.125rem 0 0;
}
.sign { padding: 0.875rem 1rem; background: var(--yellow); color: var(--yellow-ink); border-radius: 0.25rem; }
.sign h1 { margin: 0; font: 700 1.5rem/1.15 var(--sign); text-wrap: balance; }
.sign p { margin: 0.25rem 0 0; font-size: 0.875rem; }
.sign a { color: var(--yellow-ink); }
.sign :focus-visible { outline-color: var(--yellow-ink); box-shadow: none; }

.sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  padding: 1.25rem 1rem 1.5rem;
}
@media (min-width: 40rem) { .sheet { padding: 1.75rem 2rem 2rem; } }
.sheet > :first-child { margin-top: 0; }
.sheet h2 { margin: 2.25rem 0 0.75rem; }
.sheet h3 { margin: 1.25rem 0 0.25rem; font: 700 1.0625rem/1.2 var(--sign); }
.lead { margin: 0 0 1.25rem; }
.short { margin: 0 0 0.5rem; padding: 0.875rem 1rem; background: var(--sunk); border-radius: 0.25rem; }
.sheet .short h2 { margin-top: 0; }
.short ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.short li { position: relative; padding-inline-start: 1.375rem; }
.short li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.45em;
  width: 0.875rem; height: 0.5rem; background: var(--yellow); border: 1px solid var(--yellow-ink); border-radius: 1px;
}
ul.list { margin: 0 0 0.75rem; padding-inline-start: 1.25rem; }
ul.list li { margin-bottom: 0.375rem; }
ul.list li::marker { color: var(--muted); }
.contact { margin: 0.5rem 0 0.75rem; font-style: normal; }
.contact a { display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; overflow-wrap: anywhere; }
.note { color: var(--muted); font-size: 0.875rem; margin-top: 1.5rem; }
.emergency { margin: 0.75rem 0; padding: 0.75rem 1rem; border: 2px solid var(--ink); border-radius: 0.25rem; }
.emergency p { margin: 0; }
.emergency strong { font-family: var(--sign); font-weight: 700; }

/* ---------- dead end (404) ---------- */
.end { position: relative; margin: 2.5rem 0 0; padding-inline-start: 1.5rem; display: grid; gap: 0.5rem; }
.end::before {
  content: ""; position: absolute; inset-block: -1rem -2rem; inset-inline-start: 0;
  width: 0.75rem; background: var(--pole); border-radius: 0.125rem 0.125rem 0 0;
}
.trail-end { padding: 0.75rem 1rem; min-height: 3.75rem; background: var(--plate); border-radius: 0.25rem; }
.trail-end h1 { margin: 0; font: 700 1.5rem/1.15 var(--sign); }
.trail-end p { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--muted); }
.end .way { font-size: 1.0625rem; }

/* ---------- wide screens: the words on the left, the signpost on the right ---------- */
@media (min-width: 60rem) {
  .page.wide { max-width: 64rem; padding-inline: 2rem; }
  .bar .home img { width: 104px; }
  .home-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 4rem; align-items: start; margin-top: 4rem; }
  .lockup img { width: 208px; }
  .line { font-size: 1.5rem; margin-top: 1.5rem; }
  .board { padding-top: 0.5rem; }
}

@media (forced-colors: active) {
  .way { border: 2px solid LinkText; }
  .way:focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
  .plate, .sign, .trail-end { border: 1px solid CanvasText; }
}
@media (prefers-reduced-motion: reduce) { .way::after { transition: none; } }
@media print {
  .bar, .foot, .go { display: none; }
  body { background: #fff; color: #000; }
  .sheet { border: 0; padding: 0; }
}
