/* ============================================================
   FAX-ZENTRALE – ALPENPARK
   Design übernommen von der Alpenpark-Website (styles.css):
   Burgund, Brygada 1918 + Inter, warme Flächen.
   ============================================================ */

/* ===== FONTS ===== */
@font-face {
  font-family: 'Brygada 1918';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/brygada-1918-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, picture, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { overflow-wrap: break-word; }
p { overflow-wrap: break-word; }

/* ===== TOKENS (wie Website) ===== */
:root {
  --brand: #6C143C;
  --brand-hover: #742e52;
  --brand-veil: rgba(108,20,60,.05);
  --brand-veil-2: rgba(108,20,60,.16);
  --bg: #fff;
  --bg-alt: #f6f5f4;
  --bg-warm: #faf8f5;
  --text: #4a4843;
  --text-soft: #7a7770;
  --border: #e2e1df;
  --border-soft: #efece8;
  --accent: #5C8A7A;
  --accent-veil: rgba(92,138,122,.1);
  --warn: #a16207;
  --warn-veil: rgba(161,98,7,.1);
  --fehler: #b3261e;
  --fehler-veil: rgba(179,38,30,.08);
  --font-headings: "Brygada 1918", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --container: 960px;
}

/* ===== BASE ===== */
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-warm);
  line-height: 1.7;
  font-size: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }

h1, h2, h3, h4 {
  font-family: var(--font-headings);
  color: var(--brand);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: .75rem; }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: var(--brand);
  display: inline-block;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2.5rem;
}
.eyebrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.75rem;
  height: 1px;
  background: var(--brand);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 48px);
  width: 100%;
}

.lade-hinweis { color: var(--text-soft); }

/* ===== HEADER (wie Website) ===== */
.site-header {
  background: var(--brand);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(20px, 5vw, 48px);
  max-width: 1200px;
  margin: 0 auto;
}
.site-header .logo-link { flex-shrink: 0; }
.site-header .logo-link img { height: clamp(44px, 5vw, 56px); width: auto; }

.nav-list { display: flex; gap: 26px; flex-wrap: wrap; }
.nav-knopf {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: .75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  padding: 6px 0;
  border-bottom: 1.5px solid transparent;
  transition: border-color 250ms ease;
  white-space: nowrap;
}
.nav-knopf:hover, .nav-knopf:focus-visible { border-bottom-color: rgba(255,255,255,.7); }
.nav-knopf.aktiv { border-bottom-color: #fff; }

/* ===== BUTTONS (wie Website) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border: 1.5px solid var(--brand);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .75rem;
  padding: 14px 28px;
  cursor: pointer;
  transition: background 300ms ease, color 300ms ease;
  min-height: 44px;
  border-radius: 2px;
}
.btn:hover { background: transparent; color: var(--brand); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--brand); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--brand);
}
.btn-ghost:hover { background: var(--brand); color: #fff; }

.btn-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.btn-light:hover { background: #fff; color: var(--brand); border-color: #fff; }

.btn-klein { padding: 8px 16px; min-height: 36px; letter-spacing: .14em; }
.btn-ganz { width: 100%; }

/* ===== KARTEN ===== */
.karte {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  padding: 28px;
}
.karte + .karte { margin-top: 20px; }
.karte-titel {
  font-size: .6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--text-soft);
  margin-bottom: 14px;
}

/* ===== LISTE (wie download-list der Website) ===== */
.liste {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 2px;
  overflow: hidden;
}
.zeile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  background: var(--bg);
  padding: 16px 22px;
  transition: background 250ms ease, padding-left 300ms ease;
  min-height: 44px;
}
a.zeile, button.zeile { cursor: pointer; text-align: left; border: none; font: inherit; color: inherit; width: 100%; }
.zeile:hover { background: var(--bg-warm); padding-left: 30px; }
.zeile-name { font-weight: 600; font-size: .9375rem; overflow-wrap: anywhere; }
.zeile-nummer { color: var(--text-soft); font-size: .875rem; white-space: nowrap; }
.zeile-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 2px;
  background: var(--brand-veil);
  color: var(--brand);
  white-space: nowrap;
}
.badge-gruppe { background: var(--brand-veil); color: var(--brand); }
.badge-warn { background: var(--warn-veil); color: var(--warn); }
.badge-fehler { background: var(--fehler-veil); color: var(--fehler); }
.badge-ok { background: var(--accent-veil); color: var(--accent); }

/* ===== SUCHFELD ===== */
.suchzeile { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.suchfeld { position: relative; flex: 1; min-width: 220px; }
.suchfeld input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 200ms, box-shadow 200ms;
}
.suchfeld input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-veil);
}

/* ===== FORMULARE (wie funnel-field) ===== */
.feld { margin-top: 18px; }
.feld label {
  display: block;
  font-weight: 600;
  font-size: .9375rem;
  margin-bottom: 7px;
  color: var(--text);
}
.feld input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  transition: border-color 200ms, box-shadow 200ms;
}
.feld input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-veil);
}
.feedback { min-height: 1.5em; font-size: .875rem; margin-top: 6px; }
.feedback.ok { color: var(--accent); }
.feedback.fehler { color: var(--fehler); }
.hinweis-fehler {
  border: 1px solid rgba(179,38,30,.35);
  background: var(--fehler-veil);
  color: var(--fehler);
  padding: 12px 16px;
  border-radius: 6px;
  margin: 14px 0 0;
  font-size: .9375rem;
  white-space: pre-line;
}

/* ===== GRUPPEN-AUSWAHL (wie funnel-option) ===== */
.gruppen-gitter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gruppen-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 200ms, background 200ms, box-shadow 200ms;
  font-size: .9375rem;
  color: var(--text);
}
.gruppen-option:hover {
  border-color: var(--brand-veil-2);
  background: var(--brand-veil);
  box-shadow: 0 2px 8px rgba(108,20,60,.06);
}
.gruppen-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-veil);
  box-shadow: 0 2px 8px rgba(108,20,60,.1);
}
.gruppen-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  flex-shrink: 0;
}
.gruppen-option .name { font-weight: 600; }
.gruppen-option .anzahl { margin-left: auto; color: var(--text-soft); font-size: .8125rem; }

/* ===== AKTIONSZEILE ===== */
.aktionszeile {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

/* ===== VERLAUF ===== */
.verlauf-tag {
  font-family: var(--font-headings);
  color: var(--brand);
  font-size: 1.125rem;
  margin: 26px 0 10px;
}
.verlauf-tag:first-child { margin-top: 0; }
.verlauf-zeile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  background: var(--bg);
  padding: 12px 20px;
}
.verlauf-zeit { color: var(--text-soft); font-size: .8125rem; white-space: nowrap; }
.verlauf-name { font-weight: 600; font-size: .9375rem; }
.verlauf-nummer { color: var(--text-soft); font-size: .8125rem; white-space: nowrap; }
.verlauf-fehler {
  color: var(--fehler);
  font-size: .8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ===== MODAL ===== */
#modal-wurzel[hidden], #toast-wurzel[hidden] { display: none; }
#modal-wurzel {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(74,72,67,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--bg);
  border-radius: 2px;
  max-width: 480px;
  width: 100%;
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}
.modal h3 {
  font-size: 1.75rem;
  margin-bottom: .5rem;
  overflow-wrap: anywhere;
}
.modal-adresse {
  font-size: 1.0625rem;
  color: var(--text);
  margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.modal-schritte {
  border-top: 1px solid var(--border-soft);
  padding-top: 16px;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: .875rem;
  margin-bottom: 24px;
}
.modal-schritte strong { color: var(--text); }

/* ===== TOAST ===== */
#toast-wurzel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  padding: 14px 18px;
  font-size: .9375rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  animation: toastRein 250ms ease-out;
}
.toast.fehler { border-left-color: var(--fehler); }
@keyframes toastRein {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--brand);
  color: #fff;
  padding: 20px 0;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
  text-align: center;
}
.footer-copy { font-size: .8125rem; letter-spacing: .04em; opacity: .85; }

/* ===== SAISONSCHMUCK ===== */
/* Weihnachten: Muetze auf dem Logo · Silvester: Raketen · Ostern: Hasenohren */
.logo-link { position: relative; display: inline-flex; }

.logo-schmuck {
  display: none;
  position: absolute;
  width: 42px;
  pointer-events: none;
  z-index: 2;
}
.schmuck-weihnachten {
  top: -12px;
  left: -8px;
  transform: rotate(-14deg);
}
.schmuck-ostern {
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 38px;
}
.saison-weihnachten .schmuck-weihnachten { display: block; }
.saison-ostern .schmuck-ostern { display: block; }

.silvester-schmuck { display: none; }
.saison-silvester .silvester-schmuck {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.knall {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
  opacity: 0;
  animation: knall 2.8s ease-out infinite;
}
.knall.k1 {
  top: 16%;
  left: 14%;
  box-shadow:
    0 -13px 0 #ffd54f, 0 13px 0 #ffd54f,
    -13px 0 0 #ff8a65, 13px 0 0 #ff8a65,
    -9px -9px 0 #fff, 9px -9px 0 #fff,
    -9px 9px 0 #4fc3f7, 9px 9px 0 #4fc3f7;
}
.knall.k2 {
  top: 34%;
  left: 52%;
  animation-delay: 1.1s;
  box-shadow:
    0 -13px 0 #4fc3f7, 0 13px 0 #4fc3f7,
    -13px 0 0 #f06292, 13px 0 0 #f06292,
    -9px -9px 0 #ffd54f, 9px -9px 0 #ffd54f,
    -9px 9px 0 #fff, 9px 9px 0 #fff;
}
.knall.k3 {
  top: 12%;
  left: 82%;
  animation-delay: 2s;
  box-shadow:
    0 -13px 0 #f06292, 0 13px 0 #f06292,
    -13px 0 0 #ffd54f, 13px 0 0 #ffd54f,
    -9px -9px 0 #ff8a65, 9px -9px 0 #ff8a65,
    -9px 9px 0 #fff, 9px 9px 0 #4fc3f7;
}
@keyframes knall {
  0%   { transform: scale(.15); opacity: 0; }
  6%   { opacity: 1; }
  16%  { transform: scale(1); opacity: 1; }
  38%  { transform: scale(2); opacity: 0; }
  100% { transform: scale(2); opacity: 0; }
}

/* ===== LEERE ZUSTAENDE ===== */
.leer {
  color: var(--text-soft);
  padding: 28px 22px;
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 2px;
  text-align: center;
}

/* ===== FOKUS / MOTION ===== */
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms;
    transition-duration: 0.01ms;
  }
}

/* ===== LOGIN (nur PHP-Version) ===== */
#login-wurzel[hidden] { display: none; }
#login-wurzel {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(74,72,67,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-karte {
  background: var(--bg);
  border-radius: 2px;
  max-width: 400px;
  width: 100%;
  padding: 36px 32px;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}
.login-karte h3 { font-size: 1.75rem; }

/* ===== PDF-AUSWAHL ===== */
.feld input[type="file"] {
  padding: 9px 12px;
  cursor: pointer;
}
.feld input[type="file"]::file-selector-button {
  border: 1.5px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font: inherit;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .6875rem;
  padding: 7px 14px;
  margin-right: 12px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 250ms ease, color 250ms ease;
}
.feld input[type="file"]::file-selector-button:hover {
  background: var(--brand);
  color: #fff;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; gap: 10px; padding: 10px 20px; }
  .nav-list { gap: 14px 18px; order: 3; width: 100%; justify-content: center; }
  .nav-knopf { font-size: .6875rem; }
  .gruppen-gitter { grid-template-columns: 1fr; }
  .zeile { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .zeile-badges { justify-content: flex-start; }
  .verlauf-zeile { grid-template-columns: auto minmax(0, 1fr); }
  .verlauf-nummer { display: none; }
  .btn { width: 100%; }
  .aktionszeile { flex-direction: column; }
}
