/* ==========================================================================
   KI After Hours — Themenumfrage
   Design-Tokens und Formensprache von event.spekt.ch, Schriften selbst
   ausgeliefert (keine externen Requests).
   ========================================================================== */

/* --- Schriften (variable Fonts, latin) ------------------------------------ */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/space-grotesk-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-var.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/jetbrains-mono-var.woff2') format('woff2');
}

/* --- Tokens von event.spekt.ch -------------------------------------------- */

:root {
  --tinte: #18121c;
  --tinte-weich: #2a1822;
  --papier: #fbe7d4;
  --pink: #ff4d97;
  --magenta: #d81b66;
  --senf: #ffce5a;
  --beere: #5a2440;
  --linie: rgba(24, 18, 28, .2);
  --linie-zart: rgba(24, 18, 28, .12);
  --linie-stark: rgba(24, 18, 28, .3);
  --karte: rgba(255, 255, 255, .5);
  --verlauf: linear-gradient(172deg, #fbe7d4 0%, #f9d4dc 12%, #f6a8be 27%, #ff8fa0 41%, #ff8a7e 53%, #ff8a5e 68%, #ffce5a 90%);

  --font-text: 'Inter', sans-serif;
  --font-titel: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-karte: 22px;
  --radius-feld: 14px;
  --radius-pille: 999px;
}

/* --- Grundgeruest ---------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-text);
  color: var(--tinte);
  min-height: 100vh;
  background: var(--papier);
}

/* Fixer Verlaufs-Hintergrund wie auf der Event-Seite (iOS-Safari-kompatibel) */
.bg {
  position: fixed; inset: 0; z-index: -1;
  background: var(--verlauf);
}
.dots {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(rgba(24, 18, 28, .09) 1.3px, transparent 1.3px);
  background-size: 30px 30px;
}

a { color: var(--magenta); text-decoration: none; }
a:hover { color: var(--pink); }
::selection { background: var(--tinte); color: var(--senf); }

.container {
  max-width: 760px;
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 56px);
  padding-right: clamp(20px, 5vw, 56px);
}

/* --- Nav (wie Event-Seite, reduziert) -------------------------------------- */

nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(251, 231, 212, .6);
  border-bottom: 1px solid rgba(24, 18, 28, .16);
}
.nav-inner {
  padding-top: 14px; padding-bottom: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 11px; color: var(--tinte); }
.logo:hover { color: var(--tinte); }
.logo-square { width: 17px; height: 17px; background: var(--tinte); display: inline-block; flex-shrink: 0; }
.logo-word { font-family: var(--font-titel); font-weight: 700; font-size: 20px; letter-spacing: -.03em; }

.sprachschalter {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--beere);
  border: 1px solid var(--linie-stark); border-radius: var(--radius-pille);
  padding: 8px 16px; white-space: nowrap;
}
.sprachschalter:hover { color: var(--magenta); border-color: var(--magenta); }

/* --- Kopf ------------------------------------------------------------------ */

main { position: relative; z-index: 1; }

.kopf {
  padding-top: clamp(40px, 7vw, 80px);
  padding-bottom: clamp(28px, 4vw, 44px);
}
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--beere);
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px; background: var(--pink);
  display: inline-block; flex-shrink: 0;
}

h1 {
  font-family: var(--font-titel); font-weight: 700; letter-spacing: -.03em;
  line-height: 1.05; font-size: clamp(32px, 6.5vw, 56px); margin: 18px 0 0;
}
.lead {
  font-size: clamp(17px, 2.2vw, 21px); line-height: 1.55; font-weight: 500;
  color: var(--tinte-weich); max-width: 620px; margin: 18px 0 0;
}

/* --- Fragen als Karten ------------------------------------------------------ */

.frage {
  background: var(--karte);
  border: 1px solid var(--linie-zart);
  border-radius: var(--radius-karte);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  padding: clamp(22px, 4vw, 32px);
  margin: 0 0 18px;
}
.nummer {
  font-family: var(--font-mono); font-weight: 700; font-size: 24px;
  color: var(--magenta); margin: 0;
}
.frage h2 {
  font-family: var(--font-titel); font-weight: 700; font-size: clamp(20px, 3vw, 24px);
  letter-spacing: -.02em; line-height: 1.2; margin: 12px 0 0;
}
.hinweis {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em;
  color: var(--beere); margin: 10px 0 0;
}
.zaehler { color: var(--magenta); font-weight: 700; }

/* --- Themenauswahl: farbige Zonen im Karten-Stil ---------------------------- */

.legende {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  margin-top: 20px;
}
@media (min-width: 640px) { .legende { grid-template-columns: 1fr 1fr; } }

.zone {
  display: flex; align-items: flex-start; gap: 14px;
  background: rgba(255, 255, 255, .45);
  border: 1.5px solid var(--linie-zart);
  border-radius: var(--radius-feld);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, opacity .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.zone:hover { border-color: var(--linie-stark); }

.zone input { position: absolute; opacity: 0; pointer-events: none; }

/* Farb-Patch: quadratisch wie das Logo-Quadrat der Event-Seite */
.zone .patch {
  width: 17px; height: 17px; flex-shrink: 0; margin-top: 3px;
  background: var(--zone);
  outline: 1px solid rgba(24, 18, 28, .25);
  transition: box-shadow .12s ease;
}
.zone .beschriftung { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.zone .titel {
  font-family: var(--font-titel); font-weight: 600; font-size: 16px;
  letter-spacing: -.01em; line-height: 1.25;
}
.zone .unter { font-size: 13px; line-height: 1.4; color: var(--beere); }

.zone:has(input:checked) {
  border-color: var(--tinte);
  background: rgba(255, 255, 255, .8);
}
.zone:has(input:checked) .patch {
  box-shadow: 0 0 0 3px var(--papier), 0 0 0 4.5px var(--tinte);
}

/* Limit erreicht: nicht gewaehlte Zonen zuruecknehmen */
.legende.voll .zone:not(:has(input:checked)) { opacity: .45; }

.zone:has(input:focus-visible) { outline: 2px solid var(--tinte); outline-offset: 2px; }

/* --- Chips (Formate, Bereitschaft): Pillen wie auf der Event-Seite ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.chip {
  display: inline-block;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  color: var(--tinte);
  border: 1px solid var(--linie-stark); border-radius: var(--radius-pille);
  padding: 10px 18px;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { border-color: var(--tinte); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) {
  background: var(--tinte); color: var(--papier); border-color: var(--tinte);
}
.chip:has(input:focus-visible) { outline: 2px solid var(--tinte); outline-offset: 2px; }

/* --- Felder ----------------------------------------------------------------- */

.feld { display: block; margin-top: 18px; }
.feldlabel {
  display: block; margin-bottom: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--beere);
}
.feld input,
.feld textarea {
  width: 100%;
  font-family: var(--font-text); font-size: 16px; /* 16px: kein iOS-Zoom */
  color: var(--tinte);
  background: rgba(255, 255, 255, .6);
  border: 1.5px solid var(--linie-zart);
  border-radius: var(--radius-feld);
  padding: 13px 16px;
  outline: none;
  transition: border-color .12s ease, background .12s ease;
}
.feld input::placeholder,
.feld textarea::placeholder { color: rgba(24, 18, 28, .38); }
.feld input:focus,
.feld textarea:focus { border-color: var(--tinte); background: rgba(255, 255, 255, .85); }
.feld textarea { resize: vertical; min-height: 110px; }

.ausklapp { margin-top: 6px; }
.ausklapp[hidden] { display: none; }

/* --- Senden ------------------------------------------------------------------ */

.senden {
  display: block; width: 100%;
  font-family: var(--font-titel); font-weight: 600; font-size: 17px;
  color: var(--papier); background: var(--tinte);
  border: none; border-radius: var(--radius-pille);
  padding: 17px 30px; cursor: pointer;
  transition: background .12s ease;
}
.senden:hover { background: var(--tinte-weich); }
.senden:focus-visible { outline: 2px solid var(--tinte); outline-offset: 3px; }

.fussnote {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7;
  letter-spacing: .02em; color: var(--beere);
  margin: 18px 0 0; text-align: center;
}

form { padding-bottom: clamp(40px, 6vw, 72px); }

/* Honeypot */
.hp { position: absolute; left: -9999px; top: -9999px; }

.visuell-versteckt {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* --- Danke-Seite ------------------------------------------------------------- */

.danke {
  padding-top: clamp(64px, 12vw, 140px);
  padding-bottom: clamp(64px, 10vw, 120px);
}
.danke h1 { font-size: clamp(40px, 8vw, 72px); letter-spacing: -.04em; }
.danke .lead { margin-top: 24px; }
.btn-outline {
  display: inline-block; margin-top: 34px;
  font-family: var(--font-titel); font-weight: 600; font-size: 17px;
  color: var(--tinte); background: transparent;
  padding: 15px 30px; border-radius: var(--radius-pille);
  border: 1.5px solid rgba(24, 18, 28, .4);
}
.btn-outline:hover { background: rgba(24, 18, 28, .07); color: var(--tinte); }

/* --- Auswertung --------------------------------------------------------------- */

.auswertung { padding-bottom: clamp(48px, 8vw, 96px); }
.auswertung .frage h2 { margin-top: 0; }

.kennzahlen { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.kennzahl {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  border: 1px solid var(--linie-stark); border-radius: var(--radius-pille);
  padding: 9px 16px;
}
.kennzahl strong { color: var(--magenta); }

.rang { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.rang-zeile { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; align-items: baseline; }
.rang-label { font-family: var(--font-titel); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.rang-wert { font-family: var(--font-mono); font-size: 14px; font-weight: 700; }
.rang-balken {
  grid-column: 1 / -1; height: 12px;
  background: rgba(24, 18, 28, .07);
  border-radius: 6px; overflow: hidden;
}
.rang-balken span {
  display: block; height: 100%; background: var(--zone, var(--magenta));
  border-radius: 6px; min-width: 3px;
}
.rang-balken.leer span { display: none; }

.tabelle { margin-top: 16px; font-family: var(--font-mono); }
.tabelle-zeile {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 12px 0; border-bottom: 1px solid rgba(24, 18, 28, .14);
}
.tabelle-zeile:last-child { border-bottom: none; }
.tabelle-label { font-size: 13px; letter-spacing: .04em; }
.tabelle-wert { font-size: 14px; font-weight: 700; }

.liste { margin: 16px 0 0; padding: 0; list-style: none; }
.liste li {
  padding: 12px 0; border-bottom: 1px solid rgba(24, 18, 28, .14);
  font-size: 15px; line-height: 1.5;
}
.liste li:last-child { border-bottom: none; }
.liste .meta {
  display: block; margin-top: 4px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--beere);
}
.leer-hinweis { color: var(--beere); font-size: 14px; margin: 16px 0 0; }

/* --- Footer (wie Event-Seite, reduziert) --------------------------------------- */

footer {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(24, 18, 28, .25);
}
.footer-main {
  padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px;
}
.footer-about { max-width: 360px; }
.footer-about p { font-size: 15px; line-height: 1.55; color: var(--tinte-weich); margin: 16px 0 0; }
.footer-links { font-family: var(--font-mono); font-size: 13px; line-height: 2; color: var(--beere); }
.footer-bottom {
  padding-bottom: 36px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  color: #7a5560;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
}
