/* =========================================================================
   Gamer's HQ - Messe-Anmeldeseite
   Markenfarben aus Logo & Maskottchen. Alles zentral hier im :root anpassbar.
   ========================================================================= */
:root {
  /* --- Markenpalette (aus Logo/Avataren abgeleitet) --- */
  --cream:        #f4edda;   /* warmes Papier - Seitenhintergrund */
  --surface:      #fffdf6;   /* warmes Weiss - Karten */
  --brown:        #3f2a17;   /* Haupttext */
  --brown-strong: #4a2e18;   /* Ueberschriften, ausgewaehlte Chips */
  --brown-soft:   #75634b;   /* gedeckter Text */
  --green:        #94a22b;   /* Oliv-Gruen (Logo-Kreis, Spielbrett) */
  --green-deep:   #7c8a22;
  --orange:       #e8862b;   /* Orange (HQ, Meeple, Wuerfel) - Aktion/Belohnung */
  --orange-deep:  #d26f18;
  --gold:         #f0c230;   /* Gold (Kopfleiste, Akzente) */
  --line:         #e6d9bd;   /* warme Raender */
  --danger:       #bb3a2b;
  --on-orange:    #3a2411;   /* dunkles Braun als Text auf Orange */

  --radius:    18px;
  --radius-sm: 12px;
  --shadow:    0 12px 34px rgba(63, 42, 23, 0.12);
  --shadow-sm: 0 4px 14px rgba(63, 42, 23, 0.08);
  --font-display: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tap: 52px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--brown);
  background:
    radial-gradient(760px 340px at 12% -60px, rgba(148, 162, 43, 0.28), transparent 70%),
    radial-gradient(680px 320px at 92% -40px, rgba(232, 134, 43, 0.22), transparent 72%),
    var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Schmale Gold-Kopfleiste wie im Shop */
body::before {
  content: "";
  position: fixed; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--orange) 60%, var(--gold));
  z-index: 10;
}

a { color: var(--orange-deep); }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 26px 16px calc(44px + env(safe-area-inset-bottom));
}
.page--center { min-height: 100dvh; display: flex; align-items: center; }

.view { animation: rise .45s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* -------- Marke / Kopf -------- */
.brand { text-align: center; margin: 4px 0 18px; }
.brand .logo {
  display: block;
  width: min(320px, 82%);
  height: auto;
  margin: 0 auto 6px;
}
.brand .tagline {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--green-deep);
  font-size: 15px;
  letter-spacing: 0.02em;
  margin: 0;
}
.brand .tagline::before,
.brand .tagline::after { content: "\00a0\2022\00a0"; color: var(--orange); }

/* -------- Karte -------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 22px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600; font-size: 12px; letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #5c6614;
  background: rgba(148, 162, 43, 0.18);
  padding: 5px 12px; border-radius: 999px;
  margin: 0 0 14px;
}

h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 6.6vw, 33px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--brown-strong);
  margin: 0 0 12px;
  overflow-wrap: break-word;
  hyphens: auto;
}

.lead { color: var(--brown-soft); margin: 0 0 14px; font-size: 16px; }
.lead strong { color: var(--brown); }

/* -------- Formularfelder -------- */
form { margin-top: 22px; }
.field { margin-bottom: 16px; }
.field > label,
.interests legend {
  display: block;
  font-family: var(--font-display);
  font-weight: 500; font-size: 15px;
  color: var(--brown-strong);
  margin-bottom: 7px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  min-height: var(--tap);
  padding: 13px 15px;
  font-size: 16px;                 /* verhindert iOS-Auto-Zoom */
  font-family: inherit;
  color: var(--brown);
  background: #fffefb;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus,
input[type="email"]:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(232, 134, 43, 0.18);
}
input::placeholder { color: #b6a684; }

/* -------- Interessen-Chips (Signature) -------- */
.interests { border: 0; padding: 0; margin: 24px 0 16px; }
.interests .hint { margin: 0 0 12px; font-size: 13.5px; color: var(--brown-soft); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; }

.chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 46px;
  padding: 10px 15px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fffefb;
  color: var(--brown);
  cursor: pointer; user-select: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.chip span { font-size: 14.5px; font-weight: 600; }
.chip input {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer;
}
.chip::before {
  content: "";
  width: 16px; height: 16px; flex: 0 0 auto;
  border: 1.5px solid #cbb98f; border-radius: 5px;
  transition: background .15s, border-color .15s;
}
.chip:has(input:checked) {
  background: var(--brown-strong);
  border-color: var(--brown-strong);
  color: #fdf6e6;
}
.chip:has(input:checked)::before {
  background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff8e6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l2.8 2.8L12.5 5'/%3E%3C/svg%3E") center/13px no-repeat;
  border-color: var(--orange);
}
.chip:active { transform: scale(0.97); }
.chip:has(input:focus-visible) { outline: 3px solid rgba(232, 134, 43, 0.4); outline-offset: 2px; }

.field--anderes { margin-top: 14px; margin-bottom: 0; }

/* -------- Einwilligung -------- */
.consent { margin-top: 20px; }
.consent__label {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14.5px; color: var(--brown-soft); line-height: 1.45; cursor: pointer;
}
.consent__label input {
  flex: 0 0 auto; width: 24px; height: 24px; margin: 1px 0 0;
  accent-color: var(--orange);
}
.consent__label a { font-weight: 700; color: var(--orange-deep); }

/* -------- Button -------- */
.btn {
  position: relative; width: 100%;
  min-height: 58px; margin-top: 22px;
  border: 0; border-radius: var(--radius-sm);
  background: var(--orange);
  color: var(--on-orange);
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 0 rgba(178, 92, 18, 0.55);   /* leichter "Spielstein"-Tiefeneffekt */
  transition: background .15s, transform .06s, box-shadow .06s;
}
.btn:hover { background: var(--orange-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(178, 92, 18, 0.55); }
.btn:focus-visible { outline: 3px solid var(--brown-strong); outline-offset: 3px; }
.btn[disabled] { opacity: .8; cursor: progress; }

.btn__spinner {
  display: none; position: absolute; top: 50%; right: 18px;
  width: 18px; height: 18px; margin-top: -9px;
  border: 2.5px solid rgba(58, 36, 17, .35);
  border-top-color: var(--on-orange); border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.is-loading .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.microcopy { text-align: center; font-size: 12.5px; color: var(--brown-soft); margin: 12px 0 0; }

.form-error {
  margin: 16px 0 0; padding: 12px 14px;
  background: rgba(187, 58, 43, 0.09);
  border: 1px solid rgba(187, 58, 43, 0.3);
  border-radius: var(--radius-sm);
  color: #97281c; font-size: 14px; font-weight: 600;
}

/* -------- Danke / Bestaetigung -------- */
.confirm-card { text-align: center; }
.confirm-card .badge {
  display: block; width: min(300px, 78%); height: auto; margin: 0 auto 6px;
}
.confirm-emoji { font-size: 46px; margin-bottom: 4px; }
.confirm-card .lead { font-size: 16px; }

.shop-card {
  margin-top: 22px; padding: 18px 16px;
  background: linear-gradient(180deg, rgba(148,162,43,0.10), rgba(148,162,43,0.03));
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-align: center;
}
.shop-name {
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--brown-strong); margin: 0 0 2px;
}
.shop-line { margin: 3px 0; color: var(--brown-soft); font-size: 15px; }
.shop-line--hours { font-variant-numeric: tabular-nums; }
.shop-tel {
  display: inline-block; margin-top: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  color: var(--orange-deep); text-decoration: none;
}

/* -------- Rechtstext-Unterseiten (Impressum / Datenschutz) -------- */
.card--legal { text-align: left; }
.legal h1 {
  font-size: clamp(24px, 6.5vw, 30px);
  margin: 0 0 6px;
}
.legal h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 19px; color: var(--brown-strong);
  margin: 26px 0 8px; line-height: 1.25;
}
.legal h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 16px; color: var(--brown-strong);
  margin: 18px 0 4px;
}
.legal h4 {
  font-family: var(--font-body); font-weight: 700;
  font-size: 15px; color: var(--brown);
  margin: 14px 0 2px;
}
.legal p { color: var(--brown); font-size: 15px; margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 20px; color: var(--brown); font-size: 15px; }
.legal li { margin: 2px 0; }
.legal a { color: var(--orange-deep); font-weight: 600; word-break: break-word; }
.legal .updated { color: var(--brown-soft); font-size: 13.5px; margin-bottom: 18px; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 4px 0 16px; font-weight: 600; font-size: 14.5px;
  color: var(--orange-deep); text-decoration: none;
}
.back-link::before { content: "\2190"; font-size: 17px; }

/* -------- Footer mit Rechtslinks (auf allen Seiten) -------- */
.site-footer {
  margin: 18px auto 0; text-align: center;
  font-size: 13.5px; color: var(--brown-soft);
}
.site-footer a { color: var(--brown-soft); font-weight: 600; text-decoration: none; }
.site-footer a:hover { color: var(--orange-deep); }
.site-footer .sep { margin: 0 8px; opacity: .6; }

/* -------- Demo-/Trockenlauf-Hinweis (nur Vorschau-Version) -------- */
.demo-hint {
  margin: 18px 0 4px; padding: 11px 14px;
  background: rgba(240, 194, 48, 0.16);
  border: 1px dashed var(--gold);
  border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--brown); text-align: left;
}
.demo-hint__tag {
  display: inline-block; margin-right: 6px;
  font-family: var(--font-display); font-weight: 600; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #6b4a10; background: rgba(240, 194, 48, 0.5);
  padding: 2px 8px; border-radius: 999px;
}
.demo-hint a { font-weight: 700; color: var(--orange-deep); white-space: nowrap; }

/* -------- Animierte Crew-Muenze (Team-Avatare) --------
   Zentriert zwischen Text und Formular. Gesamtgroesse zentral ueber --crew-w. */
.crew { --crew-w: 112px; margin: 20px auto 6px; text-align: center; }
.crew__stage {
  position: relative;
  width: var(--crew-w);
  height: calc(var(--crew-w) * 1.0);
  margin: 0 auto;
}
.crew__hole {
  position: absolute; left: 50%;
  top: calc(var(--crew-w) * 0.845);
  width: calc(var(--crew-w) * 0.742);
  height: calc(var(--crew-w) * 0.177);
  transform: translateX(-50%);
  border-radius: 50%;
  /* Ruhezustand: nur ein zarter, angedeuteter Schatten */
  background: radial-gradient(ellipse at center,
     rgba(58,36,17,.30) 0%, rgba(58,36,17,.13) 55%, transparent 72%);
  z-index: 0;
}
/* Der dunkle Kern wird beim Aufprall kurz sichtbar -> aus dem Schatten wird ein Loch */
.crew__hole-core {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
     rgba(10,5,0,.98) 0%, rgba(22,11,2,.9) 40%, rgba(58,36,17,.28) 74%, transparent 86%);
  opacity: 0;
}
/* Kurzer dunkler Rand = die "Lippe" des Lochs, wenn es aufreisst */
.crew__hole-rim {
  position: absolute; inset: -2px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
     transparent 56%, rgba(16,8,1,.62) 69%, rgba(16,8,1,.24) 80%, transparent 88%);
  opacity: 0;
}
.crew__avatar {
  position: absolute; left: 50%; top: 0;
  width: var(--crew-w); height: auto;
  margin-left: calc(var(--crew-w) / -2);
  z-index: 1;
  transform-origin: 50% 90%;   /* Standard-Drehpunkt (per Variante angepasst) */
  filter: drop-shadow(0 4px 4px rgba(58,36,17,.18));
  -webkit-user-drag: none; user-drag: none; user-select: none;
}

/* Groessere Handys: Muenze darf groesser sein */
@media (min-width: 430px) { .crew { --crew-w: 124px; } }
/* Kleine Displays: Muenze etwas kleiner, Ueberschrift feiner */
@media (max-width: 359px) {
  .crew { --crew-w: 96px; }
  h1 { font-size: 22px; }
}

/* -------- Honeypot verstecken -------- */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* -------- Barrierefreiheit -------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
