/* 40C3 Model Citizens: tokens from the official styleguide. */
@font-face {
  font-family: "Jersey 10";
  src: url("assets/fonts/jersey-10-latin-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jersey 10";
  src: url("assets/fonts/jersey-10-latin-ext-400-normal.woff2") format("woff2");
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: "Hack"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/Hack-Regular.woff2") format("woff2"); }
@font-face { font-family: "Hack"; font-weight: 400; font-style: italic; font-display: swap; src: url("assets/fonts/Hack-Italic.woff2") format("woff2"); }
@font-face { font-family: "Hack"; font-weight: 700; font-style: normal; font-display: swap; src: url("assets/fonts/Hack-Bold.woff2") format("woff2"); }

:root {
  --color-dark: #001300;
  --color-neutral: #ebedf0;
  --color-primary: #75b44b;
  --color-additional-01: #15ada3;
  --color-additional-02: #9fa4e8;
  --color-additional-03: #c892d6;
  --color-additional-04: #ee5da2;
  --color-additional-05: #ea6f82;
  --color-additional-06: #f88a30;
  --color-additional-07: #ffbc40;

  --bg: var(--color-dark);
  --fg: var(--color-neutral);
  --accent: var(--color-primary);
  --focus: var(--color-additional-07);

  --display: "Jersey 10", "Hack", ui-monospace, monospace;
  --text: "Hack", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 76rem;
  --line: 3px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.65 var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: var(--line) solid var(--focus); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gutter); top: 0.75rem; z-index: 10;
  padding: 0.4rem 0.8rem;
  background: var(--fg); color: var(--bg);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

.h-display {
  font: 400 clamp(3rem, 1.8rem + 4.6vw, 6rem)/0.9 var(--display);
  color: var(--accent);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* Styleguide subhead: Hack Bold, underlined. */
.sub, .call h3, .slot-label, .field-label {
  font: 700 1rem/1.4 var(--text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.lead { font-size: 1.125rem; }
.small { font-size: 0.875rem; }

.section-head { display: grid; gap: 1.25rem; align-content: start; max-width: 38rem; }
.section-head p { max-width: 62ch; }
/* Every section heading sits 1.75rem above its text; paragraphs are 1.25rem apart. */
.section-head > .h-display { margin-bottom: 0.5rem; }

/* ---------- Buttons: the styleguide's loud and quiet headers ---------- */

.btn {
  --btn-fg: var(--bg);
  --btn-bg: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem;
  padding: 0.15em 0.6em 0.2em;
  border: var(--line) solid var(--btn-bg);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 400 1.75rem/1 var(--display);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, transform 120ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-quiet { background: transparent; color: var(--btn-bg); }
.btn-ink { --btn-bg: var(--color-dark); --btn-fg: var(--color-primary); }
/* The small size keeps the 44 px target; it sits beside text in lists. */
.btn-s { font-size: 1.25rem; padding-inline: 0.5em; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { --btn-bg: var(--fg); }
  .btn-quiet:hover { background: color-mix(in srgb, var(--accent) 16%, transparent); --btn-bg: var(--accent); }
  .btn-ink:hover, .ticket .btn:hover, .menu-body .btn:hover { --btn-bg: var(--color-dark); --btn-fg: var(--color-neutral); }
}
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* A button that reads as a link: for actions inside running text. */
.link {
  min-height: 44px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
  font: inherit; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}

/* ---------- Ticket: the yellow surface, torn off along the top ---------- */

.ticket {
  --focus: var(--color-dark);
  --muted: color-mix(in srgb, var(--color-dark) 70%, var(--color-additional-07));
  background: var(--color-additional-07); color: var(--color-dark);
  /* The perforated top edge of a torn-off ticket. */
  mask: radial-gradient(circle at 7px 0, transparent 5px, #000 5.5px) -7px 0 / 14px 100% repeat-x;
}
/* Buttons on the ticket are ink: dark on yellow. */
.ticket .btn { --btn-bg: var(--color-dark); --btn-fg: var(--color-additional-07); }
.ticket .btn-quiet { background: transparent; color: var(--color-dark); }

/* ---------- Ruler: a line down the left edge, a tick per item ---------- */

.ruler { border-left: var(--line) solid var(--accent); }
.ruler > li {
  position: relative;
  display: grid; gap: 0.35rem;
  padding: 1.1rem 0 1.1rem 1.75rem;
}
.ruler > li::before {
  content: ""; position: absolute; left: 0; top: 1.75rem;
  width: 1rem; height: var(--line); background: var(--accent);
}

/* ---------- Top bar ---------- */

.bar {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 1rem var(--gutter);
}
.bar-home img { width: 1.75rem; height: auto; }
.bar nav { flex: 1; min-width: 0; }
.bar ul { display: flex; gap: 0.25rem 1.5rem; flex-wrap: wrap; }
.bar nav a, .bar-info {
  display: inline-block; padding-block: 0.5rem;
  text-decoration: none; font-size: 0.9375rem;
}
.bar nav a:hover { color: var(--accent); }
.bar-info {
  padding-inline: 0.75rem;
  border: 2px solid var(--accent); color: var(--accent);
  white-space: nowrap;
}
.bar-info:hover { background: var(--accent); color: var(--bg); }

/* Narrow: the section links get their own row that scrolls sideways and
   runs to the screen edge, so a clipped last link shows there is more. */
@media (max-width: 44rem) {
  .bar { flex-wrap: wrap; gap: 0.25rem 1rem; padding-bottom: 0.25rem; }
  .bar nav {
    order: 3; flex-basis: calc(100% + 2 * var(--gutter));
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter) 0;
    padding-block: 0.25rem;
    overflow-x: auto; scrollbar-width: none;
  }
  /* max-content plus end padding keeps room after the last link when scrolled to the end. */
  .bar ul { flex-wrap: nowrap; gap: 0 1.25rem; width: max-content; padding-inline-end: var(--gutter); }
  .bar li { flex: none; }
  .bar-info { margin-left: auto; }
}

/* ---------- Mobile menu: the ticket stub (menu.js) ---------- */

.stub { display: none; }
@media (max-width: 44rem) {
  .has-menu .bar nav { display: none; }
  .has-menu body { padding-bottom: 10.5rem; }
  .menu-open { overflow: hidden; }
  .stub {
    display: block; position: fixed; inset: auto 12px 12px; z-index: 10;
    padding: 15px 16px 12px;
    touch-action: none;
    transition: translate 260ms var(--ease-out);
  }
  /* On Mein Fahrplan the stub waits until the now card has scrolled away. */
  .stub[data-away] { translate: 0 calc(100% + 24px); }
}
@media (prefers-reduced-motion: reduce) { .stub { transition: none; } }
.stub-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stub-date { display: grid; gap: 2px; font-size: 0.6875rem; line-height: 1.5; }
.stub-label { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.stub-mark { width: 32px; height: 40px; object-fit: contain; }
/* During the congress: the stub torn in two, now | next. */
.stub-halves { flex: 1; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; }
.stub-half { display: grid; align-content: start; gap: 2px; min-width: 0; font-size: 0.75rem; line-height: 1.4; }
.stub-half + .stub-half { padding-left: 12px; margin-left: 12px; border-left: 2px dashed var(--color-dark); }
.stub-big { font: 400 1.75rem/1 var(--display); }
.stub-hall { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stub-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.stub-actions { display: flex; gap: 10px; margin-top: 10px; }
.stub-actions .btn { flex: 1; gap: 0.35em; }
.stub-actions .stub-go { flex: 1.45; }
.stub-toggle { touch-action: none; }
.stub-arrow { display: inline-block; }

.menu { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; overscroll-behavior: contain; }
.menu::backdrop { background: transparent; }
.menu-dim { position: absolute; inset: 0; background: var(--color-dark); opacity: 0; }
/* Same box as the page stub, so the foot lands exactly where the stub was. */
.menu-sheet { position: absolute; inset: 12px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; pointer-events: none; }
.menu-sheet > * { pointer-events: auto; }
.menu-body {
  --focus: var(--color-dark);
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column;
  /* Overscan behind the foot: pulling past open shows more sheet, not a gap. */
  margin-bottom: -80px; padding-bottom: 80px;
  background: var(--color-primary); color: var(--color-dark);
  transform: translateY(100%); will-change: transform;
}
.menu-body .btn { --btn-bg: var(--color-dark); --btn-fg: var(--color-primary); }
.menu-body .btn-quiet { color: var(--color-dark); }
.menu-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 12px; touch-action: none; }
.menu-title { font: 400 2.25rem/1 var(--display); }
.menu-close { font-size: 1.4375rem; padding-inline: 10px; }
.menu-nav { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 20px 22px; touch-action: pan-y; }
.menu-nav a:not(.btn) {
  display: flex; align-items: center; min-height: 60px; padding-block: 7px;
  border-bottom: 2px solid var(--color-dark);
  font: 400 clamp(2rem, 9.6vw, 2.5625rem)/1 var(--display); text-decoration: none;
}
.menu-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
.menu-info { margin-top: 22px; font-size: 1.5625rem; }
.menu-sticker { position: absolute; width: 67px; right: 29px; bottom: 120px; rotate: 13deg; pointer-events: none; opacity: 0; }
/* Once the sheet has landed, the sticker is slapped on. */
.menu[data-landed] .menu-sticker { opacity: 1; animation: menu-slap 180ms var(--ease-out); }
@keyframes menu-slap { from { opacity: 0; scale: 1.12; rotate: 4deg; } }
.menu-foot.stub { display: block; position: relative; inset: auto; flex: none; z-index: 1; translate: none; }
.menu-foot .stub-toggle { cursor: ns-resize; }
@media (max-height: 40rem) {
  .menu-top { padding-block: 10px; }
  .menu-nav a:not(.btn) { min-height: 48px; font-size: 2rem; }
  .menu-sticker { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .menu[data-landed] .menu-sticker { animation: none; }
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 8vw, 6rem);
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.hero-stage {
  max-width: 62rem;
  margin-inline: auto;
  display: grid;
  grid-template-columns: clamp(6rem, 9vw, 8rem) minmax(0, 1fr) clamp(6rem, 9vw, 8rem);
  align-items: center;
  gap: clamp(1rem, 3vw, 3rem);
}

.frames { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.frame {
  aspect-ratio: 1;
  display: grid;
  min-height: 0;
  padding: 0.6rem;
  border: var(--line) solid var(--fg);
}
.frame-green { border-color: var(--accent); }
.frame img, .frame .mask { width: 100%; height: 100%; min-height: 0; object-fit: contain; }

.mask {
  background: var(--accent);
  mask: var(--icon) center / contain no-repeat;
}
.mask-x { --icon: url("assets/Icons_Deco/Square1.svg"); }

.lockup { display: grid; justify-items: center; gap: clamp(1.25rem, 2.5vw, 2rem); color: var(--accent); }
.rule-top { width: min(30rem, 80%); }
.rule-bottom { width: min(30rem, 80%); height: 1.2rem; }

.lockup-title {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1rem, 3vw, 2.25rem);
}
.cube { width: clamp(7rem, 14vw, 12rem); height: auto; }
.wordmark {
  font: 700 clamp(2rem, 1rem + 3.6vw, 4.25rem)/1.22 var(--text);
  color: var(--fg);
  letter-spacing: 0.02em;
}
.wm-line { display: block; width: max-content; }

.hero-facts {
  display: grid; justify-items: center; gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 2.5rem);
  text-align: center;
}
.facts { display: grid; gap: 0.35rem; }
.facts span:first-child { font-weight: 700; }
.facts span:nth-child(n + 2) {
  font: 400 clamp(2rem, 1.4rem + 1.8vw, 2.875rem)/1 var(--display);
  color: var(--accent);
}
/* Equal-width pair; stacks as two full-width buttons when they no longer fit. */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; width: min(100%, 30rem); }
.hero-actions .btn { flex: 1 1 12rem; }

.presale {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 0.25rem 0.75rem;
  font-size: 0.9375rem;
}
.presale-label::after { content: ":"; }
.presale-when { font-weight: 700; }
.presale-count {
  padding: 0.05rem 0.5rem;
  background: var(--fg); color: var(--bg);
  font-weight: 700; font-variant-numeric: tabular-nums;
}

/* The page's one motion moment, played once on load (about 1.2 s):
   the cube settles, the name is typed one monospace cell at a time,
   the monitors on either side switch on like CRTs, and the cursor
   blinks three times and then rests. Dates and buttons never wait. */
@media (prefers-reduced-motion: no-preference) {
  .cube { animation: settle 320ms var(--ease-out) both; }

  /* Hack is monospaced, so steps(n) reveals exactly one character per step. */
  .wm-line { animation: type 300ms steps(6, end) 160ms both; }
  .wm-line + .wm-line { animation-duration: 400ms; animation-timing-function: steps(8, end); animation-delay: 520ms; }
  .cursor { animation: blink 0.9s steps(1, end) 1.1s 3; }

  .frame { animation: frame-on 1ms 700ms both; }
  .frame > * { animation: crt-on 220ms var(--ease-out) 700ms both; }
  .frames-right .frame:nth-child(1), .frames-right .frame:nth-child(1) > * { animation-delay: 770ms; }
  .frames-left .frame:nth-child(2), .frames-left .frame:nth-child(2) > * { animation-delay: 840ms; }
  .frames-right .frame:nth-child(2), .frames-right .frame:nth-child(2) > * { animation-delay: 910ms; }
  .frames-left .frame:nth-child(3), .frames-left .frame:nth-child(3) > * { animation-delay: 980ms; }
  .frames-right .frame:nth-child(3), .frames-right .frame:nth-child(3) > * { animation-delay: 1050ms; }
}
@keyframes settle { from { opacity: 0; transform: scale(0.96); } }
@keyframes type { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes frame-on { from { opacity: 0; } }
/* A tube switching on: a bright line that opens to the full picture. */
@keyframes crt-on {
  from { opacity: 0; transform: scale(1, 0.04); }
  40% { opacity: 1; transform: scale(1, 0.04); }
}

@media (max-width: 52rem) {
  .hero-stage { grid-template-columns: 1fr; }
  .frames { display: none; }
}
@media (max-width: 30rem) {
  .lockup-title { flex-direction: column; gap: 1rem; }
  .wm-line { margin-inline: auto; }
}

/* ---------- Motto ---------- */

.motto { position: relative; overflow: hidden; padding-block: clamp(4rem, 10vw, 8rem); border-top: var(--line) solid var(--accent); }
.motto-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.motto-text { display: grid; gap: 1.25rem; max-width: 64ch; }
.motto-text .h-display { margin-bottom: 0.5rem; }

/* The citizens page of the styleguide: Adam large and low, Barbara small and
   high, each named by a hand-drawn arrow that starts at the name. */
.motto-cast { display: grid; gap: 1.5rem; }
.cast-stage { position: relative; aspect-ratio: 4 / 3; }
.cast-stage img { position: absolute; height: auto; }
.cast-adam { left: 6%; top: 30%; width: 44%; }
.cast-barbara { left: 66%; top: 4%; width: 25%; }
.cast-arrows { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.cast-arrows path { fill: none; stroke: var(--fg); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.cast-name { position: absolute; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.cast-name-adam { left: 0; top: 6%; }
.cast-name-barbara { left: 76%; top: 58%; }
.motto-cast figcaption { font-size: 0.875rem; max-width: 40ch; }
/* The arrows draw themselves once, when the figure first scrolls into view (page.js). */
@media (prefers-reduced-motion: no-preference) {
  .js .cast-arrows path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .motto-cast.is-seen .cast-arrows path { transition: stroke-dashoffset 600ms var(--ease-out); stroke-dashoffset: 0; }
  .js .motto-cast.is-seen .cast-arrows path + path { transition-delay: 150ms; }
}

@media (max-width: 52rem) {
  .motto-grid { grid-template-columns: 1fr; }
  .motto-cast { max-width: 32rem; }
}

/* ---------- Was dich erwartet: the styleguide's asset collage ---------- */

.expect { padding-block: clamp(4rem, 9vw, 7rem); border-top: var(--line) solid var(--accent); }
.expect-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); align-items: end; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.expect-head p { max-width: 52ch; }
.expect-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); grid-auto-rows: clamp(7rem, 11vw, 10rem); gap: clamp(1rem, 2.2vw, 1.75rem);
  grid-template-areas:
    "video video kbd rec key"
    "video video kbd btx key"
    "friends friends kbd btx key";
}
.expect-grid li { min-height: 0; grid-area: var(--a); }
.expect-box { display: flex; flex-direction: column; gap: 0.6rem; height: 100%; min-height: 0; color: inherit; text-decoration: none; }
.expect-box:focus-visible { outline-offset: 6px; }
.expect-art { flex: 1; min-height: 0; }
.expect-art :is(img, svg) { width: 100%; height: 100%; object-fit: contain; object-position: left bottom; overflow: visible; }
.expect-cap { display: grid; gap: 0.1rem; font-size: 0.8125rem; line-height: 1.4; }
.expect-cap b { font-weight: 700; font-size: 0.9375rem; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: text-decoration-color 150ms ease; }
.expect-box.is-on .expect-cap b { text-decoration-color: var(--accent); }
/* The inline drawings (expect.js) in palette colours, and the parts that move. */
.expect .g { fill: var(--color-primary); }
.expect .l { fill: var(--color-neutral); }
.expect .d { fill: var(--color-dark); }
.expect .screen, .expect .part { transform-box: fill-box; transform-origin: center; }
.expect .receiver { transform-origin: 85% 100%; }
.expect .turn { transform-origin: 50% 0; }
/* Power-on, once, like the hero's monitors; captions never wait. */
.expect[data-reveal="wait"] .screen { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .expect[data-reveal="on"] .screen { animation: crt-on 220ms var(--ease-out) calc(var(--d) * 70ms) both; }
  .expect .receiver { transition: transform 200ms var(--ease-out); }
  .expect .is-on .receiver { transform: translateY(-7px) rotate(-5deg); transition-duration: 240ms; }
  .expect .play { transition: d 200ms cubic-bezier(0.77, 0, 0.175, 1); }
}
/* Reduced: the drawings fade in, and the part that would move dims instead. */
@media (prefers-reduced-motion: reduce) {
  .expect[data-reveal="on"] .screen { animation: expect-fade 200ms ease calc(var(--d) * 40ms) both; }
  .expect .part { transition: opacity 200ms ease; }
  .expect .is-on .part:not(.play) { opacity: 0.45; }
}
@keyframes expect-fade { from { opacity: 0; } }
@media (max-width: 52rem) {
  .expect-head { grid-template-columns: 1fr; }
  .expect-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: none; grid-auto-rows: 8rem; }
  .expect-grid li { grid-area: auto; }
}

/* ---------- Mitmachen ---------- */

.join { padding-block: clamp(4rem, 10vw, 8rem); border-top: var(--line) solid var(--accent); }
.join-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
}

/* Calls sit on a ruler, ordered by deadline. */
.call h3 a { text-decoration: inherit; text-decoration-thickness: inherit; }
.call-date { font-size: 0.875rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.call-state:empty { display: none; }
.call-state { font-weight: 700; }
.call[data-status="closed"] { color: color-mix(in srgb, var(--fg) 62%, var(--bg)); }
.call[data-status="closed"]::before { background: color-mix(in srgb, var(--accent) 50%, var(--bg)); }
/* Closed calls shrink to title and deadline. */
.call[data-status="closed"] { padding-block: 0.5rem; }
.call[data-status="closed"]::before { top: 1.15rem; }
.call[data-status="closed"] > p:not(.call-date) { display: none; }
.call:not([data-status="closed"]) + .call[data-status="closed"] { margin-top: 1.25rem; }
.call[data-status="open"] .call-state { padding: 0 0.4rem; background: var(--accent); color: var(--bg); }

/* Styleguide: "On zero days we wear pink". The call that closes next
   (page.js sets data-urgent) becomes a loud pink box on the ruler. */
.call[data-urgent] {
  margin-block: 0.5rem;
  padding-block: 1.35rem;
  background: var(--color-additional-04);
  color: var(--color-dark);
  --focus: var(--color-dark);
}
.call[data-urgent]::before { background: var(--color-dark); }
.call[data-urgent] .call-state { background: var(--color-dark); color: var(--color-additional-04); }

@media (max-width: 52rem) { .join-grid { grid-template-columns: 1fr; } }

/* ---------- Tickets: green colour variant ---------- */

.tickets {
  --fg: var(--color-dark);
  --accent: var(--color-dark);
  --focus: var(--color-dark);
  background: var(--color-primary);
  color: var(--fg);
  padding-block: clamp(4rem, 10vw, 8rem);
}
.tickets .h-display { color: var(--color-dark); }
.tickets a:hover { text-decoration-color: currentColor; }
.tickets-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 6rem);
}
.tickets .section-head .btn { justify-self: start; margin-top: 0.5rem; }
.tickets-side { display: grid; gap: 1.25rem; align-content: start; }

.prices { width: 100%; border-collapse: collapse; }
.prices tr { border-bottom: 2px solid var(--color-dark); }
.prices tr:first-child { border-top: 2px solid var(--color-dark); }
.prices th { text-align: left; font-weight: 400; padding: 0.55rem 1rem 0.55rem 0; }
.prices td { text-align: right; font-weight: 700; white-space: nowrap; }
.tickets-side .sub { margin-top: 1.25rem; }

.sales { display: grid; gap: 0.6rem; }
.sales li { display: flex; flex-wrap: wrap; gap: 0 0.75rem; align-items: baseline; }
.sale-state:empty { display: none; }
/* Strike only the date, so the state label of a past date stays readable. */
.sales li[data-status="past"] time { text-decoration: line-through; text-decoration-thickness: 2px; }
.sales li[data-status="next"] { font-weight: 700; }
.sales li[data-status="next"] .sale-state { padding: 0 0.4rem; background: var(--color-dark); color: var(--color-primary); }

@media (max-width: 52rem) { .tickets-grid { grid-template-columns: 1fr; } }

/* ---------- Anreise: a schematic plan, not a map ---------- */

.travel { padding-block: clamp(4rem, 10vw, 8rem) 0; }
.plan-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.plan-intro { display: grid; gap: 1.75rem; align-content: start; }
.plan-intro .place { display: block; font-weight: 700; font-size: 1.25rem; }
.plan-links { display: grid; gap: 0.25rem; justify-items: start; }
.plan-diagram { position: relative; height: clamp(22rem, 32vw, 27rem); }
.plan-diagram svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plan-diagram svg :is(path, rect, circle) { vector-effect: non-scaling-stroke; stroke-width: 3px; stroke-linecap: square; stroke-linejoin: miter; }
.plan-hall { fill: none; stroke: var(--accent); }
.plan-gate { fill: var(--bg); stroke: var(--accent); }
.plan-gate.is-target { fill: var(--accent); }
.plan-diagram svg .plan-tower { fill: none; stroke: var(--fg); stroke-width: 2px; }
.plan-route { fill: none; stroke: var(--fg); opacity: 0.35; }
.plan-route.is-selected { stroke: var(--accent); opacity: 1; }
/* The chosen route draws itself from the station to the entrance (travel.js). */
.plan-station {
  position: absolute; min-height: 44px; padding: 0.4rem 0.6rem;
  border: 2px solid var(--fg); background: var(--bg); color: var(--fg);
  font: 700 0.875rem/1.4 var(--text); cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.plan-station:active { transform: scale(0.97); }
.plan-station[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--bg); }
@media (hover: hover) and (pointer: fine) { .plan-station:hover { border-color: var(--accent); } }
.station-sternschanze { top: 0; left: 0; }
.station-messehallen { bottom: 0; left: 49%; translate: -50% 0; }
.station-dammtor { top: 40%; right: 0; }
.station-stephansplatz { bottom: 0; right: 0; }
.plan-label { position: absolute; pointer-events: none; font-size: 0.75rem; line-height: 1.35; }
.plan-label b { font-weight: 700; }
.label-hall-a { left: 37.7%; top: 31%; translate: -50% 0; }
.label-hall-b { left: 65%; top: 51%; translate: -50% 0; rotate: 45deg; }
.label-mitte { left: 50.5%; top: 18%; }
/* Below the Dammtor path, right of the Messehallen path, left of the shared one. */
.label-ost { left: 76.5%; top: 78%; width: 4.5em; }
.label-tower { left: 61%; top: 3%; }
.label-park { left: 78%; top: 30%; opacity: 0.7; }
.plan-choice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 14rem); gap: 1rem 1.5rem; align-items: start; min-height: 9rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: var(--line) solid var(--accent); }
.plan-what { display: grid; gap: 0.6rem; justify-items: start; }
.plan-what p:last-child { font-size: 0.875rem; max-width: 40ch; }
.plan-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: var(--line) solid var(--fg); }
.plan-photo figcaption { margin-top: 0.35rem; font-size: 0.6875rem; }
.plan-note { margin-top: 1rem; font-size: 0.875rem; }
.arrival-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.25rem; border-top: var(--line) solid var(--accent); }
.arrival-facts dd { margin: 0.5rem 0 0; font-size: 0.875rem; }
.lines { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.line {
  min-width: 2.5rem; padding: 0.1rem 0.4rem;
  border: 2px solid var(--fg);
  font-weight: 700;
  text-align: center;
}
.line-wide { font-weight: 400; font-size: 0.8125rem; }
.skyline {
  width: min(40rem, calc(100% - 2 * var(--gutter)));
  margin: clamp(4rem, 9vw, 7rem) auto 0;
}
@media (max-width: 52rem) {
  .plan-layout { grid-template-columns: 1fr; gap: 1.75rem; }
  .plan-links { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
  .plan-diagram { height: 21rem; }
  .label-park, .label-tower { display: none; }
  .plan-station { padding: 0.3rem 0.4rem; font-size: 0.75rem; }
  .label-ost { left: 76%; font-size: 0.6875rem; }
  .plan-choice { grid-template-columns: 1fr; }
  .plan-photo { max-width: 18rem; }
  .arrival-facts { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */

.foot { border-top: var(--line) solid var(--accent); padding-block: 3rem 2rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 2.5rem; }
.foot-grid > div { display: grid; gap: 1.25rem; align-content: start; max-width: 40ch; }
.foot-logo { width: 9rem; height: auto; }
.foot nav { display: grid; gap: 0.75rem; align-content: start; }
.foot ul { display: grid; gap: 0.35rem; }
.foot ul a { display: inline-block; padding-block: 0.2rem; }
.foot-end { margin-top: 3.5rem; text-align: center; font-size: 0.875rem; }

@media (max-width: 52rem) { .foot-grid { grid-template-columns: 1fr; } }
