/* Hell-Modus ist die Basis; Dunkel greift per System-Einstellung
   oder per Umschalter (data-theme am <html>-Element). */
:root {
  color-scheme: light;
  --bg: #f3f5fb;
  --bg-glow: rgba(37, 84, 214, 0.14);
  --bg-card: #ffffff;
  --border: #dde2ee;
  --text: #121a33;
  --muted: #5a6480;
  --accent: #1f4fd1;
  --accent-hover: #163ca6;
  --accent-soft: rgba(31, 79, 209, 0.1);
  --todo-bg: rgba(255, 190, 40, 0.3);
  --hover: rgba(0, 0, 0, 0.06);
  --shadow: 0 1px 2px rgba(18, 26, 51, 0.04), 0 8px 24px rgba(18, 26, 51, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f1f;
    --bg-glow: rgba(60, 110, 255, 0.22);
    --bg-card: #121a30;
    --border: #222c48;
    --text: #e7ebf5;
    --muted: #97a1bb;
    --accent: #6f9bff;
    --accent-hover: #9ab9ff;
    --accent-soft: rgba(111, 155, 255, 0.14);
    --todo-bg: rgba(255, 200, 60, 0.15);
    --hover: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f1f;
  --bg-glow: rgba(60, 110, 255, 0.22);
  --bg-card: #121a30;
  --border: #222c48;
  --text: #e7ebf5;
  --muted: #97a1bb;
  --accent: #6f9bff;
  --accent-hover: #9ab9ff;
  --accent-soft: rgba(111, 155, 255, 0.14);
  --todo-bg: rgba(255, 200, 60, 0.15);
  --hover: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background:
    radial-gradient(60rem 30rem at 50% -8rem, var(--bg-glow), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent-hover); text-decoration: underline; }

/* Kopfzeile: Marke mittig, Umschalter rechts */
header.site {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.5rem;
}

header.site .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
header.site .brand img { width: 30px; height: auto; }
header.site .brand:hover { text-decoration: none; color: var(--accent); }

header.site nav {
  position: absolute;
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.theme-toggle svg { width: 1.15rem; height: 1.15rem; transition: transform 0.3s ease; }
.theme-toggle:hover { color: var(--text); background: var(--hover); }
.theme-toggle:hover svg { transform: rotate(15deg); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main {
  flex: 1;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

h1 { font-size: 2.4rem; margin: 0 0 0.75rem; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.4rem; }
h3 { font-size: 1.02rem; margin: 0 0 0.3rem; }
p { margin: 0 0 1rem; }

.muted { color: var(--muted); }

/* Startseite */
main.home {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
}

.hero { text-align: center; }
.hero .logo {
  width: 112px;
  height: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 12px 28px rgba(31, 79, 209, 0.35));
}
.hero .eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero .lead {
  max-width: 34rem;
  margin: 0 auto 1.5rem;
  font-size: 1.1rem;
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
.pill .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .pill .dot { animation: none; } }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.feature { padding: 1.25rem 1.25rem 1.1rem; }
.feature .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
}
.feature .icon svg { width: 1.3rem; height: 1.3rem; }
.feature p { margin: 0; font-size: 0.94rem; color: var(--muted); }

/* Rechtstexte (Impressum, Datenschutz) */
main.legal { max-width: 760px; }
main.legal .card { padding: 2rem 2.25rem; }
main.legal h1 { font-size: 2rem; }
main.legal h2:first-of-type { margin-top: 1.25rem; }
main.legal .back { display: inline-block; margin-bottom: 1rem; font-size: 0.9rem; }

.todo { background: var(--todo-bg); padding: 0 0.25em; border-radius: 3px; }

footer.site {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.25rem;
  padding: 1.25rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--text); }

@media (max-width: 760px) {
  .features { grid-template-columns: 1fr; }
  h1 { font-size: 1.8rem; }
  .hero .lead { font-size: 1rem; }
  main.legal .card { padding: 1.4rem 1.25rem; }
  main.legal h1 { font-size: 1.6rem; }
}

@media (max-width: 560px) {
  header.site nav { right: 1rem; }
  main { padding: 1.5rem 1rem 2rem; }
}
