/* Buzzer-Quiz Mitteldeutschland: "Pop" look. Yellow ground, ink outlines, hard shadows. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --yellow: #FFE14D;
  --yellow-soft: #FFF3B0;
  --ink: #111111;
  --ink-soft: #3A3A3A;
  --red: #FF4D2E;
  --white: #FFFFFF;
  --error: #B3140C;
  --ok: #0B6B3A;
  --display: "Bricolage Grotesque", "Arial Black", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 16px;
  --border: 2px solid var(--ink);
  --line: 1.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --gutter: clamp(16px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
/* Elements with a display rule (e.g. .btn) would otherwise stay visible when JS sets hidden. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--ink-soft); }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }


h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.95; margin: 0; }
h2 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -1.5px; }
h3 { font-size: 24px; letter-spacing: -0.3px; line-height: 1.1; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px;
  font: 650 18px/1.2 var(--body); color: var(--ink); text-decoration: none;
  background: var(--red); border: var(--border); border-radius: 12px; box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer; transition: transform 80ms ease, box-shadow 80ms ease;
}
.btn:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn--white { background: var(--white); }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: 16px; font-weight: 600; box-shadow: 3px 3px 0 var(--ink); }

.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  background: var(--white); border: var(--line); border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none;
}
.pill:hover { background: var(--yellow-soft); color: var(--ink); }

/* ---------- Header ---------- */

.site-header { padding: 20px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nav { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.nav .icon-link { width: 44px; height: 44px; padding: 0; justify-content: center; }
.nav svg { width: 20px; height: 20px; }
.nav .nav-icon, .nav .nav-short { display: none; }
/* Phones: icon tiles with a short word, all items 52px high, Anmelden on the right. */
@media (max-width: 640px) {
  .site-header { padding: 14px 0; }
  .nav { width: 100%; flex-wrap: nowrap; justify-content: flex-start; gap: 6px; margin-left: 0; }
  .nav .pill--text {
    flex: 0 1 62px; min-width: 52px; height: 52px; padding: 0; border-radius: 12px;
    flex-direction: column; justify-content: center; gap: 3px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.2px; line-height: 1.1; white-space: nowrap;
  }
  .nav .nav-icon { display: block; width: 19px; height: 19px; }
  .nav .nav-long { display: none; }
  .nav .nav-short { display: inline; }
  .nav .icon-link { display: none; } /* Instagram stays in the footer and the "Über uns" text */
  .nav .btn { flex: none; height: 52px; margin-left: auto; padding: 0 14px; }
}

/* ---------- Hero: the warm-up question ---------- */

.hero { padding: clamp(24px, 5vw, 64px) 0 clamp(48px, 8vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

.hero-text { display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(44px, 6.2vw, 72px); letter-spacing: -2px; line-height: 0.95; hyphens: manual; }
.nowrap { white-space: nowrap; }
@media (max-width: 400px) { .hero h1 .nowrap { white-space: normal; } }
.hero-lead { font-size: clamp(18px, 2vw, 20px); font-weight: 500; max-width: 30em; margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; }
.hero-facts { font-weight: 600; font-size: 15px; }

.quiz {
  background: var(--white); border: var(--border); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink);
  padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; gap: 18px;
}
.quiz-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
}
.quiz-points { background: var(--ink); color: var(--yellow); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.quiz-question {
  margin: 0; font-family: var(--display); font-weight: 800;
  font-size: clamp(24px, 3vw, 31px); line-height: 1.1; letter-spacing: -0.5px;
}
.quiz-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 520px) { .quiz-answers { grid-template-columns: minmax(0, 1fr); } }
.answer {
  width: 100%; height: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 10px 14px; font: 500 16px/1.3 var(--body); color: var(--ink);
  background: var(--yellow-soft); border: var(--line); border-radius: 12px; cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease, background 120ms ease;
}
.answer:hover:not([disabled]) { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 2px 2px 0 var(--ink); }
.answer[disabled] { cursor: default; }
.answer-letter {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; border: var(--line); background: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 800; font-size: 16px;
}
.answer.is-right { background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-weight: 600; }
.answer.is-right .answer-letter { background: var(--ink); color: var(--yellow); }
.answer.is-wrong { background: #EDEDED; text-decoration: line-through; color: var(--ink-soft); }
.answer.is-right:not(.is-picked), .answer.is-wrong { opacity: 1; }
.answer.is-picked.is-right { animation: pop 380ms ease-out; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }
.answer.is-picked.is-wrong { animation: shake 320ms ease-in-out; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .answer.is-picked { animation: none !important; } }

.quiz-result {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap;
  border-top: var(--line); padding-top: 16px;
}
.quiz-result[hidden] { display: none; }
.quiz-feedback { margin: 0; font-weight: 600; font-size: 16px; flex: 1 1 260px; }

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--ink { background: var(--ink); color: var(--yellow); }
.section--ink a { color: var(--yellow); }
.section--white { background: var(--white); border-top: var(--border); border-bottom: var(--border); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.section-head p { margin: 0; max-width: 40em; font-size: 18px; }

/* ---------- Locations ---------- */

.locations { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .locations { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .locations { grid-template-columns: minmax(0, 1fr); } }

.location {
  display: flex; flex-direction: column; gap: 10px; padding: 18px 20px;
  background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; transition: transform 80ms ease, box-shadow 80ms ease;
}
a.location:hover { color: var(--ink); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.location-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.location-name { font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1; }
.location-meta { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.location-count {
  flex-shrink: 0; background: var(--ink); color: var(--yellow);
  font-weight: 600; font-size: 14px; padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.location.is-full { background: #EDEDED; box-shadow: none; }
.location.is-full .location-count { background: var(--red); color: var(--ink); }
.location.is-few-left .location-count { background: var(--red); color: var(--ink); }
.location-count[hidden] { display: none; }
.location-cta { font-weight: 600; font-size: 15px; }
.locations-status { font-weight: 600; }

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; align-items: start; }
@media (max-width: 860px) { .about { grid-template-columns: minmax(0, 1fr); } }
.about-text { font-size: 19px; display: flex; flex-direction: column; gap: 16px; }
.about-text p { margin: 0; }

/* ---------- Registration form ---------- */

.form-card {
  max-width: 820px; background: var(--white); border: var(--border); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink);
  padding: clamp(20px, 4vw, 40px); scroll-margin-top: 24px; position: relative;
}
.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .legend { font-weight: 600; font-size: 15px; }
.optional { font-weight: 500; color: var(--ink-soft); }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: 500 17px/1.3 var(--body); color: var(--ink);
  background: var(--white); border: var(--line); border-radius: 10px;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus { outline: 2px solid var(--red); outline-offset: 1px; }
.field [aria-invalid="true"] { border-color: var(--error); background: #FFF1EF; }
.field-error { color: var(--error); font-size: 14px; font-weight: 600; margin: 0; }
.field-error:empty { display: none; }
.hint { font-size: 14px; color: var(--ink-soft); margin: 0; }

.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: minmax(0, 1fr); } }
.row-2.row-1 { grid-template-columns: minmax(0, 1fr); }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.members { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.member {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  border: var(--line); border-radius: 14px; padding: 16px; background: var(--yellow-soft);
}
.member-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.member-title { font-family: var(--display); font-weight: 800; font-size: 20px; }
.member-remove {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--white); border: var(--line); border-radius: 999px; cursor: pointer; color: var(--ink);
}
.member-remove svg { width: 18px; height: 18px; }
.member-remove:hover { background: var(--yellow); }
.add-member { align-self: flex-start; margin-top: 18px; }

.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.check input { flex-shrink: 0; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--ink); }
.checks { display: flex; flex-direction: column; gap: 14px; }

.form-summary {
  border: 2px solid var(--error); border-radius: 12px; padding: 14px 16px; background: #FFF1EF; color: var(--error); font-weight: 600;
}
.form-summary[hidden] { display: none; }
.form-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Honeypot: off screen for people, still in the DOM for bots. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.success { display: flex; flex-direction: column; gap: 14px; max-width: 560px; padding: 8px 0 4px; }
.success[hidden] { display: none; }
.success:focus { outline: none; }
.success-head { display: flex; align-items: center; gap: 18px; margin-bottom: 10px; }
.success h3 { font-size: clamp(32px, 5vw, 44px); }
.success p { margin: 0; }
.success-lead { font-size: 19px; font-weight: 600; line-height: 1.4; }
.success .btn { align-self: flex-start; margin-top: 32px; }

/* Pop sticker + confetti when a team is in. JS adds .is-celebrating once the card is in view. */
.success-badge {
  flex: none; display: grid; place-items: center; width: 72px; height: 72px;
  color: var(--ink); background: var(--yellow); border: 3px solid var(--ink); border-radius: 50%;
  box-shadow: 4px 4px 0 var(--ink); transform: scale(0);
}
.success.is-celebrating .success-badge { animation: badge-pop 650ms cubic-bezier(0.2, 1.6, 0.4, 1) forwards; }
.success.is-celebrating h3 { animation: title-in 450ms 120ms ease-out both; }
.success-badge svg { width: 50%; height: 50%; }
@media (max-width: 480px) { .success-badge { width: 56px; height: 56px; } .success-head { gap: 14px; } }
@keyframes badge-pop { from { transform: scale(0) rotate(-45deg); } to { transform: scale(1) rotate(-8deg); } }
@keyframes title-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.confetti { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.confetti i {
  position: absolute; width: 10px; height: 16px; margin: -8px 0 0 -5px;
  border: 2px solid var(--ink); border-radius: 2px; opacity: 0;
  animation: confetti 1300ms cubic-bezier(0.15, 0.7, 0.3, 1) forwards;
}
.confetti i.is-round { width: 12px; height: 12px; border-radius: 50%; }
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.4); }
  55% { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
  100% { opacity: 0; transform: translate(var(--x), calc(var(--y) + 90px)) rotate(calc(var(--r) * 1.6)) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .success-badge { transform: rotate(-8deg); }
  .success.is-celebrating .success-badge, .success.is-celebrating h3 { animation: none; }
}
.closed-note { font-weight: 600; margin: 0; }

/* ---------- Rules ---------- */

.rules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rules { grid-template-columns: minmax(0, 1fr); } }
.rule {
  background: var(--white); color: var(--ink); border: var(--border); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--yellow);
  padding: 20px; display: flex; flex-direction: column; gap: 10px;
}
.rule p, .rule ul { margin: 0; }
.rule ul { padding-left: 20px; }
.schedule { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 4px; }
.schedule li { display: flex; gap: 12px; }
.schedule time { font-weight: 700; min-width: 5.5ch; font-variant-numeric: tabular-nums; }
.rules-footer { margin-top: 32px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.section--ink .btn { color: var(--ink); box-shadow: 4px 4px 0 var(--yellow); }

/* ---------- Footer ---------- */

.site-footer { padding: 40px 0 48px; font-size: 15px; overflow-wrap: anywhere; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- Legal pages ---------- */

.legal { max-width: 760px; overflow-wrap: anywhere; }
.legal h1 { font-size: clamp(40px, 7vw, 64px); letter-spacing: -1.5px; margin-bottom: 24px; }
.legal h2 { font-size: 28px; letter-spacing: -0.5px; margin: 32px 0 8px; }
