/* =========================================================================
   Pension Markt Neustrelitz — design v4
   Tokens first, then layout, components, sections, utilities.
   Rebuilt from design-v4.md (§5 tokens, §6 components).
   ========================================================================= */

/* ---------- tokens ------------------------------------------------------- */
:root {
  --c-bg: #050505;
  --c-surface: rgb(10 14 22 / .86);
  --c-ink: #eef1ef;
  --c-ink-muted: #9aa5a1;
  --c-line: rgb(255 255 255 / .1);

  --c-brand: #e9c46a;
  --c-brand-dark: #f3d68f;
  --c-gold: #e9c46a;
  --c-gold-ink: #1b1305;
  --c-gold-edge: #b8913f;
  --c-accent: #f7e479;

  --radius: 0;
  --radius-sm: 0;
  --header-h: 56px;
  --bar-h: 56px;
  --safe: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.37, 1.95, .66, .56);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
  --wrap: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
  color-scheme: dark;
}

@media (min-width: 720px) { :root { --header-h: 64px; } }

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

html {
  background: var(--c-bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;         /* the fixed sky shows through */
  color: var(--c-ink);
  font: 400 17px/1.6 var(--font);
  padding-top: var(--header-h);
  padding-bottom: calc(var(--bar-h) + var(--safe));
}

h1, h2, h3, p, figure, dl, dd, ul { margin: 0; }

/* [hidden] must beat component display rules (.options label is display:flex) */
[hidden] { display: none !important; }

ul { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: var(--c-brand); text-underline-offset: .18em; }
a:hover { color: var(--c-brand-dark); }

:focus-visible {
  outline: 3px solid var(--c-brand);
  outline-offset: 2px;
  border-radius: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 720px) { .wrap { padding-inline: 24px; } }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--c-gold);
  color: var(--c-gold-ink);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top .15s;
}
.skip-link:focus { top: 12px; color: var(--c-gold-ink); }

/* ---------- magic buttons (§6.7) ---------------------------------------- */
.btn,
.bar-btn,
.lb-btn {
  --line: 3px;
  --rest-bg: transparent;
  --rest-fg: var(--c-gold);
  --hover-bg: var(--c-gold);
  --hover-fg: var(--c-gold-ink);
  position: relative;
  border: var(--line) solid currentColor;
  background: var(--rest-bg);
  color: var(--rest-fg);
  transition: background-color .3s, color .3s, box-shadow .3s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font: 600 15px/1.2 var(--font);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.btn-primary {
  --rest-bg: var(--c-gold);
  --rest-fg: var(--c-gold-ink);
  --hover-bg: transparent;
  --hover-fg: var(--c-gold);
}

.btn-ghost { --rest-bg: rgb(5 5 5 / .82); }

.btn:hover,
.bar-btn:hover,
.lb-btn:hover,
.btn:focus-visible,
.bar-btn:focus-visible,
.lb-btn:focus-visible {
  background: var(--hover-bg);
  color: var(--hover-fg);
  box-shadow: 0 0 25px rgb(233 196 106 / .5);
}

.btn-lg { min-height: 52px; padding: 14px 24px; font-size: 16px; width: 100%; }

/* sparkles: six four-point stars per button — positions, widths, durations and
   easings copied from code-button-magic.md; the fill is the page's gold instead
   of #fec195 and the stars fade instead of using z-index: -5 (§6.7) */
.btn .star,
.bar-btn .star,
.lb-btn .star {
  position: absolute;
  background: var(--c-accent);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 0 #fffdef);
  transition-property: top, left, width, height, opacity, filter;
  transition-timing-function: cubic-bezier(0, .4, 0, 1.01);
}
.s1 { top: 20%; left: 20%; width: 25px; height: 25px; transition-duration: 1s;
      transition-timing-function: cubic-bezier(.05, .83, .43, .96); }
.s2 { top: 45%; left: 45%; width: 15px; height: 15px; transition-duration: 1s; }
.s3 { top: 40%; left: 40%; width: 5px;  height: 5px;  transition-duration: 1s; }
.s4 { top: 20%; left: 40%; width: 8px;  height: 8px;  transition-duration: .8s; }
.s5 { top: 25%; left: 45%; width: 15px; height: 15px; transition-duration: .6s; }
.s6 { top: 5%;  left: 50%; width: 5px;  height: 5px;  transition-duration: .8s;
      transition-timing-function: ease; }

.btn:hover .star, .bar-btn:hover .star, .lb-btn:hover .star,
.btn:focus-visible .star, .bar-btn:focus-visible .star, .lb-btn:focus-visible .star {
  opacity: 1;
  filter: drop-shadow(0 0 10px #fffdef);
}

.btn:hover .s1, .bar-btn:hover .s1, .lb-btn:hover .s1,
.btn:focus-visible .s1, .bar-btn:focus-visible .s1, .lb-btn:focus-visible .s1
{ top: -80%; left: -30%; width: 25px; height: 25px; }
.btn:hover .s2, .bar-btn:hover .s2, .lb-btn:hover .s2,
.btn:focus-visible .s2, .bar-btn:focus-visible .s2, .lb-btn:focus-visible .s2
{ top: -25%; left: 10%; width: 15px; height: 15px; }
.btn:hover .s3, .bar-btn:hover .s3, .lb-btn:hover .s3,
.btn:focus-visible .s3, .bar-btn:focus-visible .s3, .lb-btn:focus-visible .s3
{ top: 55%; left: 25%; width: 5px; height: 5px; }
.btn:hover .s4, .bar-btn:hover .s4, .lb-btn:hover .s4,
.btn:focus-visible .s4, .bar-btn:focus-visible .s4, .lb-btn:focus-visible .s4
{ top: 30%; left: 80%; width: 8px; height: 8px; }
.btn:hover .s5, .bar-btn:hover .s5, .lb-btn:hover .s5,
.btn:focus-visible .s5, .bar-btn:focus-visible .s5, .lb-btn:focus-visible .s5
{ top: 25%; left: 115%; width: 15px; height: 15px; }
.btn:hover .s6, .bar-btn:hover .s6, .lb-btn:hover .s6,
.btn:focus-visible .s6, .bar-btn:focus-visible .s6, .lb-btn:focus-visible .s6
{ top: 5%; left: 60%; width: 5px; height: 5px; }

/* ---------- rotating CTA label ------------------------------------------ */
/* The box is as wide as its widest word, so the button never changes size
   while the stack turns. */
.btn-switch {
  display: inline-block;
  overflow: hidden;
  height: 1.2em;
  vertical-align: bottom;
}
.btn-switch__word {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  white-space: nowrap;
  animation: btn-switch 20s infinite;
}

/* 5 words, one every 4 s: hold, then move on */
@keyframes btn-switch {
  0%, 14%  { transform: translateY(0); }
  20%, 34% { transform: translateY(-100%); }
  40%, 54% { transform: translateY(-200%); }
  60%, 74% { transform: translateY(-300%); }
  80%, 94% { transform: translateY(-400%); }
  100%     { transform: translateY(-500%); }
}

/* ---------- rolling section subtitle ------------------------------------ */
.cycle { display: block; overflow: hidden; }
.cycle__text {
  display: flex;
  align-items: center;         /* a one-line text sits centred in a taller slot */
  animation: sub-cycle 16s infinite;
}

/* Two texts, 8 s each — the cycle stays 16 s, but the roll itself is slow:
   7.5 % of the cycle (1,2 s) instead of the 0,32 s it was. Hold ≈ 6,8 s. */
@keyframes sub-cycle {
  0%, 42.5%  { transform: translateY(0); }
  50%, 92.5% { transform: translateY(-100%); }
  100%       { transform: translateY(-200%); }
}

/* ---------- header ----------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--c-line);
  box-shadow: 0 1px 0 rgb(0 0 0 / .5), 0 6px 20px rgb(0 0 0 / .35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand { min-width: 0; overflow: hidden; }
.brand h1 {
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 13px;
  line-height: 1.25;
  color: var(--c-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

/* compact header on small screens */
@media (max-width: 720px) {
  .brand h1 { font-size: 17px; }
  .brand-sub { font-size: 12px; }
  .header-actions .btn {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }
}

/* The two header buttons do not fit next to the wordmark on a small phone, and
   truncating «Pension Markt Neustrelitz» is worse than a two-row header. */
@media (max-width: 560px) {
  :root { --header-h: 86px; }
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
  }
  .brand h1 { font-size: 18px; }
  .header-actions { gap: 6px; }
  .header-actions .btn {
    flex: 1 1 0;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* ---------- sections --------------------------------------------------- */
.section {
  padding-block: 48px;
  scroll-margin-top: calc(var(--header-h) + 12px);
}
.section-alt {
  background: var(--c-surface);
  border-block: 1px solid var(--c-line);
}

@media (min-width: 720px) { .section { padding-block: 72px; } }

.section-head { margin-bottom: 24px; }
.section-head h2 {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  line-height: 1.15;
  letter-spacing: -.015em;
}
.section-head h2::before {
  content: "";
  display: inline-block;
  width: .62em;
  height: .62em;
  margin-right: .45em;
  vertical-align: .06em;
  background: var(--c-gold);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
}
.section-sub { color: var(--c-ink-muted); font-size: 15px; margin-top: 6px; }

.note {
  font-size: 14px;
  color: var(--c-ink-muted);
  margin-top: 12px;
}

.price-tax-note {
  scroll-margin-top: calc(var(--header-h) + 12px);
  font-size: 14px;
  line-height: 1.5;
  color: var(--c-ink-muted);
  margin: 0 0 18px;
  max-width: 62ch;
}

/* ---------- toggle groups (measured glider) ---------------------------- */
.controls {
  display: grid;
  /* as many groups side by side as the width allows; the options inside a
     group stay vertical, which keeps the section short */
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: start;
  gap: 20px 24px;
  margin-top: 24px;
  margin-bottom: 28px;
}

.group {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.group legend {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  padding: 0 0 8px;
}

.options {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip;   /* keeps the glow inside the column, no scroll container */
}

/* visually hidden but keyboard-reachable */
.options input {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.options label {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  padding: 6px 10px 6px 18px;
  border-radius: var(--radius-sm);
  color: var(--c-ink-muted);
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  transition: color .25s;
}
@media (max-width: 379px) { .options label { min-height: 40px; } }

.options label .sub {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--c-ink-muted);
  margin-top: 2px;
}
.options input:checked + label {
  color: var(--c-ink);
  font-weight: 600;
  background: color-mix(in srgb, var(--c-brand) 7%, transparent);
}
.options input:checked + label .sub { color: var(--c-ink-muted); font-weight: 400; }

/* inset ring: clipping the glow can never clip the focus indicator */
.options input:focus-visible + label {
  outline: 3px solid var(--c-brand);
  outline-offset: -3px;
}

.rail {
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 3px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--c-line) 50%, transparent);
}
.glider {
  position: absolute;
  left: 0;
  width: 100%;
  height: 44px;              /* replaced with the label's box by syncGliders() */
  background: var(--c-brand);
  transition: top .45s var(--ease), height .45s var(--ease);
}
.glider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 60%;
  transform: translate(-50%, -50%);
  background: var(--c-accent);
  filter: blur(10px);
  opacity: .9;
}

.group:target {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-accent) 75%, transparent);
}

/* ---------- chart ------------------------------------------------------- */
.chart { margin: 0 0 8px; }
.chart-canvas svg { display: block; width: 100%; height: auto; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--c-ink-muted);
}
.chart-legend i {
  display: inline-block;
  width: 16px;
  height: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

.chart figcaption {
  font-size: 13px;
  color: var(--c-ink-muted);
  margin-top: 6px;
}

/* ---------- rate summary + CTA ------------------------------------------ */
.price-out {
  display: grid;
  gap: 20px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 860px) {
  .price-out { grid-template-columns: 1fr 320px; align-items: start; gap: 32px; padding: 24px; }
}

.breakdown {
  max-width: 520px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  font-size: 15px;
  align-content: start;
}
.breakdown dt { color: var(--c-ink-muted); }
.breakdown dd { text-align: right; font-variant-numeric: tabular-nums; }

.price-cta { display: grid; gap: 10px; align-content: start; }
.price-total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.price-total-label { font-size: 14px; color: var(--c-ink-muted); line-height: 1.35; }
.price-total strong {
  white-space: nowrap;
  font-size: clamp(1.6rem, 4vw, 2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.price-alt { font-size: 14px; color: var(--c-ink-muted); text-align: center; }

/* ---------- map band (Anreise) ------------------------------------------ */
/* Sits between the header and the first section, so it needs its own top gap
   and no bottom padding — the section below brings its own. */
.map-band { padding-top: 16px; }
.map-embed {
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  overflow: hidden;
}
/* consent state: one button filling the frame, disclosure inside it */
.map-consent { display: grid; }
.map-load {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  height: 100%;
  padding: 20px;
  font: inherit;
  color: var(--c-ink);
  background: none;
  border: 0;
  cursor: pointer;
  transition: color .2s;
}
.map-load-mark {
  width: 28px;
  height: 28px;
  background: var(--c-gold);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  transition: transform .3s var(--ease);
}
.map-load-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  max-width: 26ch;
  line-height: 1.4;
}
.map-load:hover { color: var(--c-gold); }
.map-load:hover .map-load-mark { transform: scale(1.15) rotate(45deg); }
.map-load:focus-visible { outline-offset: -6px; }

.map-note {
  margin-top: 2px;
  max-width: 44ch;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--c-ink-muted);
  text-align: center;
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* the map is the only bright surface on the page; dim it like the rail map */
  filter: brightness(.9) saturate(.92);
}
/* legend for the markers on the map (A–D) */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--c-ink-muted);
}
.map-legend span { display: inline-flex; align-items: baseline; gap: 7px; }
.map-legend b {
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--c-gold);
}

@media (min-width: 720px) {
  .map-band { padding-top: 24px; }
  .map-embed { aspect-ratio: 21 / 9; }
}

/* ---------- gallery ----------------------------------------------------- */
.gallery { column-count: 1; column-gap: 14px; }
@media (min-width: 620px) { .gallery { column-count: 2; } }
@media (min-width: 960px) { .gallery { column-count: 3; } }

.tile {
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: var(--radius);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.tile figcaption {
  font-size: 13px;
  color: var(--c-ink-muted);
  padding: 10px 12px;
  line-height: 1.4;
}
.tile-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.tile-open img { display: block; width: 100%; height: auto; }

.tile--map .tile-open { background: #0d131b; }
.tile--map .tile-open img { filter: brightness(.9) saturate(.95); }
.tile--map .tile-open::after {
  content: "Vergrößern";
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-gold-ink);
  background: var(--c-gold);
  border: 1px solid var(--c-gold-edge);
  padding: 4px 10px;
}

.ph-media {
  position: relative;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}
.ph-1 { background: linear-gradient(140deg, #101a26, #16243a 60%, #0d1620); }
.ph-2 { background: linear-gradient(140deg, #171029, #241a3d 60%, #12101f); }
.ph-3 { background: linear-gradient(140deg, #0f1c2a, #16283f 60%, #0b1622); }
.ph-4 { background: linear-gradient(140deg, #1a1424, #241a30 60%, #12101c); }
.ph-5 { background: linear-gradient(140deg, #0d1c25, #142c38 60%, #0a1820); }
.ph-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgb(255 255 255 / .5), transparent),
    radial-gradient(1px 1px at 70% 60%, rgb(255 255 255 / .35), transparent),
    radial-gradient(1.5px 1.5px at 45% 80%, rgb(255 255 255 / .3), transparent);
  background-size: 120px 120px, 90px 90px, 160px 160px;
}
.ph-label {
  position: relative;
  z-index: 1;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-gold);
  background: rgb(5 5 5 / .72);
  border: 1px solid var(--c-gold-edge);
  padding: 4px 10px;
}

/* ---------- lightbox ---------------------------------------------------- */
/* ------------------------------------------------------------------------
   Dialogs are full-screen shells: the lightbox and the legal texts fill the
   viewport.
   ------------------------------------------------------------------------ */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--c-surface);
  color: var(--c-ink);
  box-shadow: none;
  overflow: hidden;
}
/* `display` must stay scoped to [open]: an author `display` rule on dialog
   overrides the UA's `dialog:not([open]) { display: none }`, which makes every
   closed dialog render as an empty block at the end of the page. */
.lightbox[open] {
  display: flex;
  flex-direction: column;
}
.lightbox::backdrop { background: rgb(0 0 0 / .85); }
.lightbox-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--c-line);
}
.lb-btn {
  --line: 1px;
  --rest-bg: rgb(5 5 5 / .82);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 20px;
  line-height: 1;
  font-family: var(--font);
  cursor: pointer;
}
.lightbox-scroll {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px;
  background: #0d131b;
}
.lightbox-scroll img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 62vh;      /* JS grows it when zooming */
  margin-inline: auto;
}
.lightbox-cap {
  font-size: 13px;
  color: var(--c-ink-muted);
  padding: 10px 14px;
}

/* ---------- legal dialogs ---------------------------------------------- */
.legal-open {
  font: inherit;
  font-size: 14px;
  color: var(--c-ink);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}
.legal-open:hover { color: var(--c-brand); text-decoration: underline; }
.legal-open:focus-visible { outline-offset: 2px; }

.legal-body {
  flex: 1 1 auto;
  overflow: auto;
  /* readable measure even on a 1900px screen */
  padding: 12px max(20px, calc((100% - 72ch) / 2)) 48px;
  font-size: 15px;
  line-height: 1.6;
}
.legal-body h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 2px;
}
.legal-note {
  font-size: 13px;
  color: var(--c-ink-muted);
  margin-bottom: 6px;
}
.legal-body h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin: 20px 0 6px;
}
.legal-body p { color: var(--c-ink); }
.legal-body ul {
  display: grid;
  gap: 6px;
  padding-left: 18px;
  list-style: disc;
}
.legal-body li::marker { color: var(--c-brand); }

.legal-dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 6px 16px;
  margin: 0;
}
.legal-dl dt { color: var(--c-ink-muted); font-size: 14px; }
.legal-dl dd { margin: 0; }
.legal-dl a { color: var(--c-brand); }

/* ---------- legal links (between the sections) -------------------------- */
/* At the very end of the page, so they are found where legal links are looked
   for. The gallery section above already brings its own bottom padding. */
.legal-band { padding-block: 8px 16px; }
@media (min-width: 720px) { .legal-band { padding-block: 12px 24px; } }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }

/* ---------- bottom bar (Schnellkontakt) --------------------------------- */
.bottombar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  height: calc(var(--bar-h) + var(--safe));
  padding-bottom: var(--safe);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--c-line);
}
.bottombar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 760px;
}
.bar-btn {
  --line: 1px;
  --rest-bg: rgb(5 5 5 / .82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  min-width: 0;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.bar-btn svg { width: 25px; height: 25px; flex: 0 0 auto; }
.bar-btn:focus-visible { outline-offset: -3px; }

@media (min-width: 720px) {
  .bottombar-inner { gap: 10px; }
  .bar-btn {
    flex-direction: row;
    gap: 8px;
    font-size: 13px;
    padding: 0 14px;
  }
}

/* ---------- midnight sky (§6.8) ----------------------------------------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% -12%, #0e1624 0%, #050505 62%);
}
.sky::before {
  content: "";
  position: absolute;
  inset: -15%;
  background:
    radial-gradient(38% 30% at 22% 16%, rgb(58 66 150 / .5), transparent 70%),
    radial-gradient(34% 28% at 78% 10%, rgb(112 56 148 / .34), transparent 72%),
    radial-gradient(42% 34% at 62% 40%, rgb(34 104 124 / .3), transparent 74%);
  filter: blur(24px);
}

/* star fields, meteors and moon: values from code-background.md, only the
   keyframe names are namespaced so they cannot clash with components */
.stars {
  position: absolute;
  inset: 0;
  background-repeat: repeat;
  pointer-events: none;
  animation-name: sky-twinkle;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.stars-1 {
  background-image:
    radial-gradient(1px 1px at 10% 10%, #fff, transparent),
    radial-gradient(1px 1px at 30% 20%, #fff, transparent),
    radial-gradient(1px 1px at 50% 50%, #fff, transparent),
    radial-gradient(1px 1px at 70% 30%, #fff, transparent),
    radial-gradient(1px 1px at 90% 10%, #fff, transparent);
  background-size: 200px 200px;
  animation-duration: 3s;
}
.stars-2 {
  background-image:
    radial-gradient(1.5px 1.5px at 20% 40%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 60% 85%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 85% 65%, #fff, transparent);
  background-size: 300px 300px;
  animation-duration: 5s;
  animation-delay: 1s;
}
.stars-3 {
  background-image:
    radial-gradient(2px 2px at 40% 70%, #fff, transparent),
    radial-gradient(2px 2px at 10% 80%, #fff, transparent),
    radial-gradient(2px 2px at 80% 40%, #fff, transparent);
  background-size: 400px 400px;
  animation-duration: 7s;
  animation-delay: 2s;
}

.meteor {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px rgb(255 255 255 / .5);
  opacity: 0;
  pointer-events: none;
}
.meteor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, #fff, transparent);
}
.m1 { top: 10%; left: 110%; animation: sky-shoot 8s linear infinite; }
.m2 { top: 30%; left: 110%; animation: sky-shoot 12s linear infinite 4s; }
.m3 { top: 50%; left: 110%; animation: sky-shoot 10s linear infinite 2s; }

.moon {
  position: absolute;
  top: 15%;
  right: 15%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 15px 15px 0 0 #fdfbd3;
  filter: drop-shadow(0 0 15px rgb(253 251 211 / .4));
}
/* below 720 px the full-size crescent collided with the «Preise» heading */
@media (max-width: 720px) {
  .moon {
    top: 9%;
    right: 6%;
    width: 48px;
    height: 48px;
    box-shadow: 9px 9px 0 0 #fdfbd3;
    filter: drop-shadow(0 0 10px rgb(253 251 211 / .35));
  }
}

@keyframes sky-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: .2; }
}
@keyframes sky-shoot {
  0%        { transform: translateX(0) translateY(0) rotate(-35deg); opacity: 0; }
  5%        { opacity: 1; }
  15%, 100% { transform: translateX(-1500px) translateY(1000px) rotate(-35deg); opacity: 0; }
}

/* ---------- motion preferences ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glider, .btn, .site-header, .skip-link { transition: none !important; }
  .btn::before, .bar-btn::before, .lb-btn::before { transition: none !important; }
  .sky .stars { animation: none !important; }
  .sky .meteor { display: none; }
  .btn-switch__word, .cycle__text { animation: none !important; }
  .btn:active { transform: none; }
}
