:root {
  --bg: #f6f5f2;
  --text: #1c1d21;
  --muted: #6b6e76;
  --accent: #3b5bdb;
  --surface: #ffffff;
  --border: #e3e1dc;
  color-scheme: light;
}

/* Dark design: only when chosen with the light/dark switch (see /theme.js).
   The device's own light/dark setting is deliberately ignored. */
:root[data-theme="dark"] {
  --bg: #111318;
  --text: #e9eaee;
  --muted: #8e93a0;
  --accent: #7c96ff;
  --surface: #181b22;
  --border: #2a2e38;
  color-scheme: dark;
}

/* Light/dark switch button (shown by /theme.js; stays hidden without JavaScript) */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
/* On pages without a top bar the switch floats in the top-right corner. */
.theme-toggle.floating {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 1rem);
  right: 1rem;
  z-index: 20;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
}

.domain {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

/* Footer on the coming-soon page */
body:not(.legal) { grid-template-rows: 1fr auto; }

.site-footer {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  padding-block: 1rem;
  font-size: 0.9rem;
}

a { color: var(--accent); }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* Legal pages (Impressum, Datenschutz) */
body.legal {
  display: block;
  text-align: left;
  line-height: 1.6;
}

body.legal main {
  max-width: 44rem;
  margin: 0 auto;
  padding-block: 2rem 4rem;
}

body.legal h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin-bottom: 0.25rem; }
body.legal h2 { font-size: 1.15rem; margin: 2.25rem 0 0.5rem; }
body.legal p, body.legal li, body.legal dd { color: var(--text); }
body.legal ul { padding-left: 1.25rem; }
body.legal .meta { color: var(--muted); margin-top: 0; }
body.legal .back { margin: 0 0 2rem; }
body.legal .back a { text-decoration: none; }
body.legal .links { margin-top: 3rem; }

body.legal dl { margin: 0; }
body.legal dt { font-weight: 600; margin-top: 0.75rem; }
body.legal dd { margin: 0; }
