@font-face { font-family: "Barlow"; font-weight: 400; font-style: normal; font-display: swap; src: url("/schriften/barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-style: normal; font-display: swap; src: url("/schriften/barlow-600.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/schriften/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: normal; font-display: swap; src: url("/schriften/barlow-condensed-800.woff2") format("woff2"); }

:root {
  --kupfer: #A3561F;
  --kupfer-dunkel: #8A4617;
  --petrol: #1D4E59;
  --graphit: #22282B;
  --grund: #F8FAFA;
  --kalk: #EAF0EF;
  --r-s: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--graphit); font: 400 18px/1.55 "Barlow", system-ui, sans-serif; }
h1, h2 { font-family: "Barlow Condensed", "Barlow", sans-serif; font-weight: 800; text-transform: uppercase; color: var(--petrol); margin: 0; line-height: 1; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }

/* Kopf der Testseiten */
.kopf { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; padding: 12px 20px; background: var(--grund); border-bottom: 2px solid var(--petrol); position: relative; z-index: 5; }
.marke { font: 800 22px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--petrol); text-decoration: none; letter-spacing: 0.02em; }
.kopf nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-weight: 600; font-size: 16px; }
.kopf nav a { text-decoration: none; padding: 4px 0; border-bottom: 3px solid transparent; }
.kopf nav a[aria-current="page"] { border-bottom-color: var(--kupfer); }
.kopf nav a:hover { border-bottom-color: var(--petrol); }
.kopf .zustand { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--petrol); font-variant-numeric: tabular-nums; }

/* Schwarm-Fläche */
[data-swarm-host] { position: relative; overflow: hidden; background: var(--grund); isolation: isolate; }
[data-swarm-host] canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.8s ease-out; }
[data-swarm-host][data-swarm="live"] canvas,
[data-swarm-host][data-swarm="paused"] canvas,
[data-swarm-host][data-swarm="still"] canvas { opacity: 1; }
/* Ohne WebGL: ruhiger Verlauf aus den Hausfarben */
[data-swarm-host][data-swarm="fallback"] { background: linear-gradient(150deg, #F8FAFA 0%, #EAF0EF 55%, #CFDDE0 100%); }
[data-swarm-host][data-swarm="fallback"] canvas { display: none; }
@media (prefers-reduced-motion: reduce) { [data-swarm-host] canvas { transition: none; } }

/* Hero */
.hero { min-height: min(78vh, 720px); display: flex; align-items: center; }
.hero-inhalt { position: relative; z-index: 1; padding: 72px 20px 72px; width: 100%; max-width: 1240px; margin: 0 auto; }
.hero h1 { font-size: clamp(44px, 7.4vw, 80px); max-width: 11ch; }
.hero p { max-width: 34ch; margin: 20px 0 28px; }
.block { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 30px; border-radius: var(--r-s); background: var(--kupfer); color: #fff; text-decoration: none; font: 700 20px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 0.03em; transition: background-color 0.18s ease-out, transform 0.18s ease-out; }
.block:hover { background: var(--kupfer-dunkel); }
.block:active { transform: scale(0.98); }
.unten { background: var(--kalk); padding: 64px 20px; min-height: 90vh; }
.unten > div { max-width: 640px; margin: 0 auto; }
.unten h2 { font-size: 44px; margin-bottom: 16px; }
.anrufleiste { display: none; }

/* Sandbox */
body[data-modus="sandbox"] { display: flex; flex-direction: column; height: 100svh; }
.sandbox { flex: 1; min-height: 0; }
#hud { position: absolute; z-index: 2; left: 0; top: 0; max-width: 360px; padding: 18px 20px; background: rgba(248, 250, 250, 0.86); border-right: 2px solid var(--petrol); border-bottom: 2px solid var(--petrol); border-bottom-right-radius: var(--r-s); }
.hud-titel { font: 800 30px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--petrol); }
.hud-text { margin: 8px 0 10px; font-size: 16px; line-height: 1.45; }
#hud-werte { font-size: 13px; font-weight: 600; color: var(--petrol); font-variant-numeric: tabular-nums; }
#etiketten { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.etikett { position: absolute; left: 0; top: 0; font-weight: 600; font-size: 14px; line-height: 1; color: var(--graphit); padding: 4px 6px 4px; background: rgba(248, 250, 250, 0.88); border-bottom: 2px solid var(--kupfer); white-space: nowrap; transition: opacity 0.2s; }
#regler { position: absolute; z-index: 2; right: 0; bottom: 0; width: 320px; max-width: 100%; background: rgba(248, 250, 250, 0.9); border-left: 2px solid var(--petrol); border-top: 2px solid var(--petrol); border-top-left-radius: var(--r-s); }
#regler summary { cursor: pointer; padding: 12px 18px; font: 800 20px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--petrol); }
#regler-liste, .regler-extra { padding: 0 18px 12px; }
.regler-zeile { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin-bottom: 12px; font-size: 15px; font-weight: 600; }
.regler-zeile output { font-variant-numeric: tabular-nums; color: var(--petrol); }
.regler-zeile input { grid-column: 1 / -1; width: 100%; accent-color: var(--petrol); min-height: 28px; }
.regler-extra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 15px; font-weight: 600; border-top: 2px solid var(--kalk); padding-top: 12px; }
.regler-extra select { font: inherit; padding: 4px 6px; border: 2px solid var(--petrol); border-radius: var(--r-s); background: var(--grund); color: var(--graphit); }

/* Übersicht */
.uebersicht { max-width: 840px; margin: 0 auto; padding: 48px 20px 96px; }
.uebersicht h1 { font-size: clamp(44px, 8vw, 72px); margin-bottom: 16px; }
.uebersicht .hinweis { max-width: 60ch; }
.zeile { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; align-items: end; padding: 22px 0 16px; border-bottom: 2px solid var(--petrol); }
.zeile h2 { font-size: 34px; }
.zeile p { margin: 6px 0 0; grid-column: 1; }
.zeile .links { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-weight: 600; }
.zeile .links a { text-decoration-thickness: 3px; text-decoration-color: var(--kupfer); text-underline-offset: 4px; }
.uebersicht ul.pruef { padding-left: 1.1em; max-width: 60ch; }

@media (max-width: 820px) {
  body { padding-bottom: 60px; }
  .kopf { padding: 10px 16px; gap: 4px 16px; }
  .kopf nav { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; max-width: 100%; }
  .kopf .zustand { margin-left: 0; width: 100%; }
  .hero { min-height: 70svh; align-items: flex-start; }
  .hero-inhalt { padding: 36px 16px 56px; }
  .hero .block { display: none; }
  .hero p { margin-bottom: 0; }
  .anrufleiste { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: 60px; align-items: center; justify-content: center; background: var(--kupfer); color: #fff; font: 700 22px/1 "Barlow Condensed", sans-serif; text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; }
  #hud { max-width: 100%; right: 0; padding: 12px 16px; border-right: 0; border-bottom-right-radius: 0; }
  .hud-text { display: none; }
  #regler { width: 100%; border-left: 0; border-top-left-radius: 0; }
  .zeile { grid-template-columns: 1fr; }
  .zeile .links { grid-row: auto; grid-column: 1; flex-direction: row; gap: 18px; margin-top: 8px; }
}
