@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,500&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --border: #e7e4dd;
  --ink: #17181c;
  --ink-soft: #55585f;
  --muted: #8a8d94;
  --accent: #e4572e;
  --accent-hover: #cf491f;
  --accent-soft: #fdeee7;
  --accent-ink: #ffffff;
  --success: #2f7a5c;
  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 24, 28, 0.04), 0 8px 24px -12px rgba(23, 24, 28, 0.12);
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.hidden { display: none !important; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------- Typografie ---------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 500;
}
.display-title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--ink);
}
.muted { color: var(--ink-soft); }
.section-head { margin-bottom: 28px; }

/* ---------------- Formulare & Buttons ---------------- */
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='datetime-local'],
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:focus, textarea:focus {
  border-color: var(--accent);
}
input::placeholder, textarea::placeholder { color: var(--muted); }

label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  margin-bottom: 8px;
}
.checkbox-row input { width: auto; margin-top: 3px; accent-color: var(--accent); }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 7px 14px; font-size: 13px; }

.error-text { color: #c23b23; font-size: 14px; }
.success-text { color: var(--success); font-size: 14px; }

/* ---------------- Zugangscode-Gate ---------------- */
.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
}
.gate-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
}
.gate-icon {
  margin: 0 auto 18px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate-logo { max-height: 52px; margin: 0 auto 18px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 100px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-logo { max-height: 56px; margin-bottom: 22px; }
.hero h1 { max-width: 760px; font-size: clamp(2.1rem, 5vw, 3.6rem); }
.hero p.subtitle { max-width: 560px; color: var(--ink-soft); margin: 0 0 36px; font-size: 17px; }

/* ---------------- Countdown ---------------- */
.countdown { display: flex; gap: 10px; justify-content: center; }
.countdown-cell { text-align: center; }
.countdown-cell .num {
  min-width: 3.4rem;
  font-family: var(--font-mono);
  font-size: 1.7rem;
  font-weight: 500;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.countdown-cell .lbl {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.divider {
  height: 1px;
  background: var(--border);
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------------- Galerie ---------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--accent-soft); }
.card-body { padding: 14px 16px; }
.card-title { font-family: var(--font-display); font-size: 17px; margin: 0 0 2px; font-weight: 600; }
.card-meta { font-size: 12.5px; color: var(--muted); margin: 0; }
.card-votes { font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin: 8px 0 0; font-weight: 500; }
.card-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--border);
  flex-wrap: wrap; row-gap: 8px;
}
.card-footer .btn-small { white-space: nowrap; }
.card-rank {
  position: absolute; margin: 10px;
  background: var(--ink); color: #fff;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  border-radius: 50%; min-width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
}
.card-image-wrap { position: relative; }
.link-btn { background: none; border: none; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 4px; font-family: var(--font-body); }
.link-btn:hover { color: #c23b23; }

/* ---------------- Lightbox ---------------- */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 10, 12, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 70px 20px 30px;
  overflow-y: auto;
}
.lightbox-content {
  max-width: 920px;
  width: 100%;
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 55vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.lightbox-caption { text-align: center; margin-top: 18px; max-width: 500px; }
.lightbox-caption .muted { color: rgba(255, 255, 255, 0.6); }
.lightbox-close, .lightbox-nav {
  position: fixed;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 71;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(23, 24, 28, 0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 380px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

/* ---------------- Karte für "Worum geht's" ---------------- */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

/* ---------------- Admin ---------------- */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.admin-layout {
  display: flex; flex-direction: column; gap: 24px;
  max-width: 1120px; margin: 0 auto; padding: 28px 24px;
}
@media (min-width: 768px) { .admin-layout { flex-direction: row; } }
.admin-nav { display: flex; gap: 6px; overflow-x: auto; flex-shrink: 0; }
@media (min-width: 768px) { .admin-nav { flex-direction: column; width: 200px; } }
.admin-nav button {
  white-space: nowrap; text-align: left; background: none; border: none;
  color: var(--ink-soft); font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
}
.admin-nav button.active { background: var(--ink); color: #fff; }
.admin-nav button:not(.active):hover { background: var(--accent-soft); color: var(--ink); }
.admin-panel { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.admin-panel h2 { font-family: var(--font-display); font-size: 22px; margin: 0 0 16px; font-weight: 600; }
.field { margin-bottom: 16px; max-width: 480px; }
.admin-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.admin-login-card { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px; }

.checkbox-editor-item { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-btn {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--ink-soft);
  font-size: 12.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.filter-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }

footer.site-footer {
  text-align: center; padding: 48px 24px;
  border-top: 1px solid var(--border); color: var(--muted); font-size: 14px;
}
