/* ------------------------------------------------------------------
   Schrift: Gotham – lokal eingebunden (keine Google Fonts, DSGVO).
   Leg deine Gotham-Dateien in assets/fonts/ (Namen siehe unten).
   Fehlen sie, greift automatisch eine Systemschrift.
------------------------------------------------------------------- */
@font-face { font-family: "Gotham"; src: url("../fonts/Gotham-Book.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/Gotham-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/Gotham-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Gotham"; src: url("../fonts/Gotham-Black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --bg: #13111c;          /* Grundfarbe djfives.com */
  --bg-2: #1a1825;
  --surface: #1e1c2a;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .22);
  --text: #f3f2f7;
  --muted: #8e8b9e;
  --accent: #ffffff;      /* Buttons: weiß auf dunkel */
  --error: #ff6b6b;
  --ok: #5fd3a6;
  --radius: 14px;
  --font: "Gotham", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, #241f38 0%, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: #fff; }
code { font-size: .9em; background: var(--bg-2); padding: .1em .35em; border-radius: 4px; }

.shell { width: 100%; max-width: 720px; margin: 0 auto; padding: 72px 24px 48px; flex: 1; }
.shell.narrow { max-width: 460px; }
.shell.wide { max-width: 1400px; padding-top: 48px; }

/* ---------- Kopfbereich ---------- */
.hero { margin-bottom: 40px; }
.logo { display: block; height: 44px; width: auto; margin-bottom: 40px; }
.eyebrow {
  margin: 0 0 14px;
  font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span { margin: 0 .4em; opacity: .6; }
h1 {
  margin: 0;
  font-size: clamp(44px, 9vw, 84px);
  font-weight: 900; line-height: .95;
  letter-spacing: -.01em; text-transform: uppercase;
}
.h-mid { font-size: clamp(32px, 5vw, 48px); }
.h-small { font-size: 15px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.lead { margin: 20px 0 0; max-width: 46ch; color: var(--muted); font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.strong { font-weight: 700; }

/* ---------- Karte / Formular ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
}
.form { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
label, legend {
  font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: #cfcde0; padding: 0;
}
legend { margin-bottom: 8px; }
.req { color: var(--muted); }
.opt { color: var(--muted); letter-spacing: .08em; text-transform: none; font-weight: 400; margin-left: 4px; }

input[type="text"], input[type="tel"], input[type="password"], input[type="search"], select {
  width: 100%;
  font: inherit; font-size: 16px; color: var(--text);
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input::placeholder { color: #5f5c70; }
input:hover, select:hover { border-color: rgba(255,255,255,.35); }
input:focus, select:focus { outline: none; border-color: #fff; background: rgba(0,0,0,.4); box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
[aria-invalid="true"] input, input[aria-invalid="true"] { border-color: var(--error); }
.field-error { margin: 0; color: var(--error); font-size: 13px; }

/* Radio-Auswahl als Kacheln */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-item {
  position: relative; display: block; cursor: pointer;
  text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text);
}
.choice-item input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice-item > span {
  display: grid; gap: 2px;
  padding: 16px 16px 16px 48px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: rgba(0,0,0,.2);
  transition: border-color .15s, background .15s;
  position: relative;
}
.choice-item > span::before {
  content: ""; position: absolute; left: 16px; top: 18px;
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line-strong);
  transition: all .15s;
}
.choice-item small { color: var(--muted); font-size: 13px; }
.choice-item:hover > span { border-color: rgba(255,255,255,.4); }
.choice-item input:checked + span { border-color: #fff; background: rgba(255,255,255,.06); }
.choice-item input:checked + span::before { border-color: #fff; background: #fff; box-shadow: inset 0 0 0 4px var(--bg); }
.choice-item input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,255,255,.2); }

.js .verein[data-hidden] { display: none; }
.verein:not([data-hidden]) { animation: reveal .25s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(-6px); } }

/* Checkbox Einwilligung */
.check { display: flex; gap: 12px; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--muted); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: #fff; cursor: pointer; }
.check a { color: var(--text); }

/* Honeypot – für Menschen unsichtbar */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-size: 13px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; text-decoration: none;
  color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px;
  padding: 17px 32px; cursor: pointer;
  transition: transform .15s, background .15s, color .15s;
}
.btn:hover { color: var(--bg); background: #e6e4ee; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }
.btn span { transition: transform .15s; }
.btn:hover span { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
.btn-sm { padding: 11px 20px; font-size: 11px; }
.btn-danger { background: transparent; color: var(--error); border-color: rgba(255,107,107,.5); }
.btn-danger:hover { background: rgba(255,107,107,.1); color: var(--error); }
.form > .btn { justify-self: start; margin-top: 6px; }
.note { margin: -8px 0 0; font-size: 12px; color: var(--muted); }

.alert { padding: 14px 18px; border-radius: 10px; border: 1px solid rgba(255,107,107,.4); background: rgba(255,107,107,.08); color: #ffc9c9; font-size: 14px; margin-bottom: 4px; }
.alert.ok { border-color: rgba(95,211,166,.4); background: rgba(95,211,166,.08); color: #bff0dc; margin-bottom: 20px; }
.done p { margin: 0 0 24px; font-size: 17px; }

/* ---------- Footer ---------- */
.site-footer { display: flex; gap: 12px; justify-content: center; padding: 28px 24px 36px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Rechtstexte ---------- */
.legal h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; margin: 36px 0 10px; }
.legal p, .legal li { color: #cfcde0; }
.legal .ph { background: rgba(255, 200, 0, .15); color: #ffe08a; padding: 0 .3em; border-radius: 3px; }

/* ---------- Backend ---------- */
.admin-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.inline { display: inline; margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); background: rgba(255,255,255,.02); }
.stat span { display: block; font-size: 34px; font-weight: 900; letter-spacing: 0; color: var(--text); line-height: 1.1; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input { max-width: 300px; padding: 11px 14px; }
.toolbar select { width: auto; padding: 11px 14px; }
.grow { flex: 1; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data th, .data td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data th {
  position: sticky; top: 0; background: var(--bg-2);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; user-select: none;
}
.data th[data-sort] { cursor: pointer; }
.data th[data-sort]:hover { color: var(--text); }
.data th[aria-sort="ascending"]::after { content: " ↑"; color: var(--text); }
.data th[aria-sort="descending"]::after { content: " ↓"; color: var(--text); }
.data tbody tr:hover { background: rgba(255,255,255,.025); }
.data tbody tr:last-child td { border-bottom: 0; }
.data td.num { font-weight: 900; font-variant-numeric: tabular-nums; width: 1%; }
.nowrap { white-space: nowrap; }
.empty td { text-align: center; color: var(--muted); padding: 48px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); }
.tag-liga { background: #fff; color: var(--bg); border-color: #fff; }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: 13px; }
.icon-btn:hover { color: var(--error); border-color: rgba(255,107,107,.4); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.settings { margin-top: 40px; padding: 0; }
.settings summary { padding: 20px 28px; cursor: pointer; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 8px 28px 28px; }
.settings .form { gap: 14px; align-content: start; }
.settings .btn { justify-self: start; }

/* ---------- Mobil ---------- */
@media (max-width: 640px) {
  .shell { padding-top: 48px; }
  .card { padding: 24px 20px; }
  .grid-2, .choice, .settings-grid { grid-template-columns: 1fr; }
  .form > .btn { justify-self: stretch; }
  .admin-top { align-items: flex-start; }
  .toolbar input { max-width: none; flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------------
   v1.1 – Hinweis WhatsApp
------------------------------------------------------------------- */
.hint { display: flex; gap: 12px; align-items: flex-start; margin: -8px 0 0; padding: 14px 16px; border-radius: 10px; font-size: 14px; line-height: 1.5; color: #cfcde0; background: rgba(37, 211, 102, .07); border: 1px solid rgba(37, 211, 102, .28); }
.hint svg { flex: none; width: 20px; height: 20px; margin-top: 1px; color: #25d366; }
.hint strong { color: #fff; font-weight: 700; }

/* ------------------------------------------------------------------
   v1.1 – Passwortabfrage
------------------------------------------------------------------- */
.gate { display: grid; place-items: center; max-width: 520px; }
.gate-card { width: 100%; text-align: center; padding: 8px 0; }
.gate .lead { margin-left: auto; margin-right: auto; }
.lock { width: 64px; height: 74px; margin: 0 auto 32px; color: #fff; filter: drop-shadow(0 10px 30px rgba(255,255,255,.12)); }
.lock svg { width: 100%; height: 100%; overflow: visible; }
.lock .keyhole { fill: var(--bg); }
.lock .shackle { transform-origin: 34px 24px; transition: transform .45s cubic-bezier(.3,1.6,.5,1); }
.gate-form { margin-top: 36px; }
.gate-input { position: relative; max-width: 380px; margin: 0 auto; }
.gate-input input { padding: 18px 70px 18px 22px; border-radius: 999px; text-align: left; font-size: 17px; letter-spacing: .04em; }
.gate-input .btn { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 52px; padding: 0; font-size: 18px; letter-spacing: 0; }
.gate-input .btn:hover { transform: none; }
.gate .field-error { margin-top: 14px; min-height: 1.5em; }

.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  20%, 60% { transform: translateX(-9px); }
  40%, 80% { transform: translateX(9px); }
}

/* Entsperren: Bügel springt auf, Karte zoomt weg */
.unlocking .lock .shackle { transform: translateY(-7px) rotate(28deg); }
.unlocking .lock { animation: lockGlow .9s ease forwards; }
.unlocking .gate-card > :not(.lock) { animation: gateFade .45s .2s ease forwards; }
.unlocking .gate-card { animation: gateOut .55s .4s cubic-bezier(.6,0,.4,1) forwards; }
@keyframes lockGlow { 40% { filter: drop-shadow(0 0 28px rgba(255,255,255,.55)); } 100% { filter: drop-shadow(0 0 0 transparent); } }
@keyframes gateFade { to { opacity: 0; transform: translateY(8px); } }
@keyframes gateOut { to { opacity: 0; transform: scale(1.18); filter: blur(10px); } }

/* Formular fährt herein, Felder nacheinander */
.reveal .hero { animation: riseIn .7s cubic-bezier(.2,.8,.2,1) both; }
.reveal .card { animation: cardIn .8s .1s cubic-bezier(.2,.8,.2,1) both; }
.reveal .form > * { animation: riseIn .55s cubic-bezier(.2,.8,.2,1) both; }
.reveal .form > *:nth-child(1) { animation-delay: .25s; }
.reveal .form > *:nth-child(2) { animation-delay: .29s; }
.reveal .form > *:nth-child(3) { animation-delay: .33s; }
.reveal .form > *:nth-child(4) { animation-delay: .37s; }
.reveal .form > *:nth-child(5) { animation-delay: .41s; }
.reveal .form > *:nth-child(6) { animation-delay: .45s; }
.reveal .form > *:nth-child(7) { animation-delay: .49s; }
.reveal .form > *:nth-child(8) { animation-delay: .53s; }
.reveal .form > *:nth-child(9) { animation-delay: .57s; }
.reveal .form > *:nth-child(10) { animation-delay: .61s; }
.reveal .form > *:nth-child(n+11) { animation-delay: .65s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) scale(.97); filter: blur(6px); } }

/* Backend: Status Zugangsschutz */
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.on { color: var(--ok); border-color: rgba(95,211,166,.4); }
.pill.warn { color: #ffcf5c; border-color: rgba(255,207,92,.4); }
.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.wa-link { margin-left: 8px; color: #25d366; text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.wa-link:hover { color: #5ee88f; text-decoration: underline; }
.settings-grid.three { grid-template-columns: repeat(3, 1fr); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) { .settings-grid.three { grid-template-columns: 1fr; } }
