:root {
  color-scheme: light;

  /* Kühles Seegrau, abgeleitet vom monochromen Logo */
  --sky: #f7f8f9;
  --bg: #f1f3f4;
  --lake: #e7eaec;
  --bg-center: #ffffff;
  --ink: #14181c;
  --ink-soft: #2c3339;
  --muted: #59626a;
  --rule: #dce0e3;
  --select: #cfd6db;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: #b9c0c6 var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--select); color: var(--ink); }

img,
svg { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

a:hover { text-decoration-color: currentColor; }

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Landing ---------- */

.home {
  /* Heller Himmel oben, minimal dunklere Seefläche unten, Licht hinter dem Logo */
  background:
    radial-gradient(ellipse 60% 55% at 50% 46%, var(--bg-center) 0%, transparent 100%),
    linear-gradient(to bottom, var(--sky) 0%, var(--bg) 55%, var(--lake) 100%);
}

.stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(2rem, 8vh, 4rem) 1rem 1rem;
}

.stage .logo {
  width: min(72vmin, 30rem);
  filter: drop-shadow(0 18px 28px rgb(20 24 28 / 0.10)) drop-shadow(0 3px 6px rgb(20 24 28 / 0.06));
  /* Nur opacity + translate animieren: Filter- und Scale-Animationen
     lassen das Logo in iOS Safari unscharf bzw. unvollstaendig stehen. */
  animation: arrive 900ms var(--ease-out) both;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

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

.site-footer {
  padding: 1rem 1rem max(1.5rem, env(safe-area-inset-bottom));
  text-align: center;
}

.site-footer nav {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 1.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer a {
  display: inline-block;
  padding: 0.85rem 0.25rem;
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] { color: var(--ink); }

.site-footer a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.5em;
}

/* ---------- Legal pages ---------- */

.legal-header {
  padding: 2.25rem 1rem 0;
  display: flex;
  justify-content: center;
}

.legal-header a {
  display: block;
  border-radius: 50%;
  outline-offset: 6px;
}

.legal-header img {
  width: 4.5rem;
  filter: drop-shadow(0 4px 8px rgb(20 24 28 / 0.10));
  transition: transform 500ms var(--ease-out);
}

.legal-header a:hover img { transform: rotate(-6deg) scale(1.04); }

.legal {
  flex: 1;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
  color: var(--ink-soft);
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
}

.legal h1 {
  margin: 0 0 2.25rem;
  color: var(--ink);
  font-size: clamp(1.875rem, 1.45rem + 1.6vw, 2.5rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
  hyphens: manual;
}

.legal h2 {
  margin: 2.75rem 0 0.6rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.005em;
  text-wrap: balance;
  hyphens: manual;
}

.legal h1 + h2 { border-top: 0; padding-top: 0; margin-top: 0; }

.legal p,
.legal ul,
.legal address { margin: 0 0 1rem; }

.legal p { text-wrap: pretty; }

.legal address { font-style: normal; }

.legal strong { color: var(--ink); font-weight: 600; }

.legal ul { padding-left: 1.25rem; }
.legal li { margin-bottom: 0.3rem; padding-left: 0.25rem; }
.legal li::marker { color: var(--muted); }

/* Impressum: Angaben als Liste aus Begriff und Wert */

.facts {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.facts > div {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  margin-bottom: 0.35rem;
  /* Normale Schreibweise: Versalien würden „gemäß“ zu „GEMÄSS“ machen */
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  hyphens: manual;
  text-wrap: balance;
}

.facts dd { margin: 0; }
.facts dd > * { margin: 0; }

.facts .tabular { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

@media (min-width: 40em) {
  .facts > div {
    display: grid;
    grid-template-columns: 13rem 1fr;
    column-gap: 2rem;
    align-items: baseline;
  }

  .facts dt { margin-bottom: 0; }
}

.legal .home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: none;
}

.legal .home-link svg {
  width: 1rem;
  transition: transform 300ms var(--ease-out);
}

.legal .home-link:hover { color: var(--ink); }
.legal .home-link:hover svg { transform: translateX(-3px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media print {
  body, .home { background: #fff; }
  .legal { color: #000; max-width: none; }
  .site-footer, .legal-header, .home-link { display: none; }
}
