/* ============================================================
   D5S9 — Webvisitenkarte
   Eigenständig, systemschriften, keine externen Abhängigkeiten.
   ============================================================ */

:root {
  --ink: #0c0e10;
  --muted: #5b6168;
  --faint: #8b9097;
  --line: #e7e9e8;
  --bg: #fbfcfb;
  --acc: #22a647;          /* sparsamer D5S9-Signalakzent */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Helvetica Neue", sans-serif;
  --maxw: 640px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% 0%, #ffffff 0%, var(--bg) 55%, #f4f6f5 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }

/* ---- Ambient background canvas (birds + seeds) ---- */
#bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
/* ---- Foreground effects canvas (Blatt-Funken, Nuss, Eichhörnchen) ---- */
#fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
}

/* ---- Nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 48px);
}
.nav .brand {
  font-weight: 700; letter-spacing: 0.14em; font-size: 15px;
  text-decoration: none;
}
.nav nav { display: flex; gap: clamp(16px, 3vw, 30px); }
.nav nav a {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  transition: color 180ms ease;
}
.nav nav a:hover { color: var(--ink); }

/* ---- Hero ---- */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 84px 24px 48px;
}

.stage {
  position: relative;
  width: min(310px, 50vh, 64vw);
  line-height: 0;
  margin-bottom: 20px;
}
.stage .tree {
  width: 100%; height: auto; display: block;
  position: relative; z-index: 1;
  user-select: none; -webkit-user-drag: none;
}
.stage .treefx {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 2; pointer-events: none;
}

.wordmark {
  margin: 0; font-size: clamp(42px, 8vw, 66px);
  font-weight: 800; letter-spacing: 0.04em; line-height: 1;
}
.claim {
  margin: 14px 0 0; font-size: clamp(16px, 2.6vw, 20px);
  font-weight: 500; letter-spacing: 0.01em; color: var(--ink);
}
.lead {
  margin: 16px auto 0; max-width: 52ch;
  font-size: clamp(14px, 2vw, 16px); line-height: 1.65; color: var(--muted);
}

/* ---- Contact ---- */
.contact { margin-top: 38px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--ink); border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  text-decoration: none; color: var(--ink); background: transparent;
  transition: background-color 200ms ease, color 200ms ease, transform 120ms ease;
}
.cta:hover { background: var(--ink); color: #fff; }
.cta:active { transform: translateY(1px); }
.cta .arrow { width: 16px; height: 16px; transition: transform 200ms ease; }
.cta:hover .arrow { transform: translateX(3px); }

.contact-lines {
  margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px;
  font-size: 12.5px; color: var(--faint); letter-spacing: 0.02em;
}
.contact-lines a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-lines a:hover { color: var(--ink); border-color: var(--ink); }

/* ---- Footer ---- */
.foot {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 14px 22px; flex-wrap: wrap;
  padding: 26px 24px 30px;
  font-size: 12px; letter-spacing: 0.04em; color: var(--faint);
  border-top: 1px solid var(--line);
}
.foot nav { display: flex; gap: 18px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .sep { color: var(--line); }

.soundbtn {
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: border-color 180ms ease, color 180ms ease;
}
.soundbtn:hover { border-color: var(--ink); color: var(--ink); }
.soundbtn .ind { width: 6px; height: 6px; border-radius: 999px; background: var(--faint); transition: background-color 180ms ease; }
.soundbtn[aria-pressed="true"] .ind { background: var(--acc); }

/* ---- Legal pages ---- */
.doc {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 140px 24px 80px;
}
.doc h1 { font-size: clamp(28px, 6vw, 40px); letter-spacing: 0.02em; margin: 0 0 8px; }
.doc .kicker { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin-bottom: 28px; }
.doc h2 { font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 36px 0 10px; }
.doc p { margin: 0 0 6px; color: var(--ink); font-size: 15px; }
.doc p.m { color: var(--muted); }
.doc .ph { color: var(--acc); font-weight: 600; }   /* Platzhalter, klar erkennbar */
.doc .back { display: inline-block; margin-top: 40px; font-size: 13px; letter-spacing: 0.04em; color: var(--muted); text-decoration: none; }
.doc .back:hover { color: var(--ink); }
.doc address { font-style: normal; line-height: 1.7; }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .hero { padding: 96px 18px 56px; }
  .stage { width: min(270px, 46vh, 74vw); }
  .lead { font-size: 14px; }
  .nav { padding: 14px 18px; }
  .nav nav { gap: 18px; }
  .nav nav a { padding: 8px 4px; }
  .foot { padding: 22px 18px 28px; gap: 12px 18px; }
}

@media (pointer: coarse) {
  body { background-attachment: scroll; }
  .soundbtn { min-height: 44px; padding: 10px 18px; }
  .nav nav a { min-height: 36px; display: inline-flex; align-items: center; }
  .cta { padding: 15px 30px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #bg { display: none; }
}
