/* ═══════════════════════════════════════════════════════
   main.css  –  Layout & Komponenten
   Komplett theme-agnostisch: benutzt nur var(--*)
   aus colors.css. Keine Farben hart kodiert.
   ═══════════════════════════════════════════════════════ */

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Body ── */
body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem 3rem;
  position: relative;

  /* Dezente Körnung als Hintergrundtextur */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");

  /* Theme-Transition: alle Farben gleiten weich */
  transition:
    background-color .7s ease,
    color            .7s ease;
}

/* Light Mode: etwas weniger Körnung */
body.light {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.02'/%3E%3C/svg%3E");
}

/* ── Skip-Link (Barrierefreiheit) ── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 1rem;
  background: var(--text);
  color: var(--bg);
  padding: .5rem 1rem;
  font-size: .85rem;
  font-weight: 400;
  border-radius: 2px;
  text-decoration: none;
  z-index: 999;
}
.skip-link:focus { top: 1rem; }

/* ── Hero-Wrapper (Logo + Kontakt) ── */
/* Mobile: unsichtbarer Wrapper, null Einfluss auf Layout */
.hero, .contact-col { display: contents; }

@media (min-width: 1150px) {
  .hero {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 5rem;
    max-width: 1180px;
    width: 100%;
  }
  .contact-col {
    display: flex;
    flex-direction: column;
    max-width: 580px;
    width: 100%;
  }
  .logo-wrap {
    margin-bottom: 0;
    flex-shrink: 0;
    position: sticky;
    top: 1.5rem;
  }
}

/* ── Logo ── */
.logo-wrap {
  margin-bottom: 4rem;
  opacity: 0;
  animation: fadeUp .7s ease forwards;
}
.logo-wrap img {
  max-width: 520px;
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(1);
}

/* ── Trennlinie ── */
.divider {
  width: 100%;
  max-width: 580px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  opacity: 0;
  animation: fadeUp .7s ease .15s forwards;
}
.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  transition: background .7s ease;
}
.divider span {
  font-family: 'Bebas Neue', sans-serif;
  font-size: .75rem;
  letter-spacing: .2em;
  color: var(--muted);
  transition: color .7s ease;
}

/* ── Kontakt-Liste ── */
.contacts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  max-width: 580px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .7s ease .25s forwards;
  transition: background .7s ease, border-color .7s ease;
}

/* ── Einzelne Zeile ── */
.contact-row {
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  transition: background .15s, background-color .7s ease;
}
.contact-row:hover { background: var(--row-hover); }

/* ── Link-Bereich ── */
.contact-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  min-width: 0;
}

/* ── Icon-Kreis ── */
.icon-circle {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
  transition: border-color .7s ease;
}
.icon-circle svg {
  width: 20px;
  height: 20px;
  fill: var(--text);
  transition: fill .7s ease;
}

/* ── Plattform-Label & Handle ── */
.contact-label { min-width: 0; }
.contact-label .platform {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.05rem;
  letter-spacing: .1em;
  line-height: 1;
}
.contact-label .handle {
  font-size: .78rem;
  color: var(--muted);
  margin-top: .2rem;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .7s ease;
}

/* ── QR-Code Button (Desktop) ── */
.qr-btn {
  flex-shrink: 0;
  background: #fff;
  border: none;
  border-radius: 3px;
  padding: 7px;
  cursor: pointer;
  line-height: 0;
  transition: transform .15s, box-shadow .15s;
}
.qr-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 0 0 2px var(--text);
}
.qr-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
.qr-btn img,
.qr-btn svg {
  display: block;
  width: 110px;
  height: 110px;
}

/* Light Mode: QR-Button bekommt sichtbaren Rand */
body.light .qr-btn {
  box-shadow: 0 0 0 1px var(--border);
}

/* Scan-Hinweis unter QR */
.qr-hint {
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  margin-top: .4rem;
  letter-spacing: .06em;
  transition: color .7s ease;
}

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

/* ── Pfeil (nur Mobil) ── */
.arrow {
  display: none;
  flex-shrink: 0;
}
.arrow svg {
  width: 18px;
  height: 18px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.85);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
}
.lightbox.open {
  display: flex;
  animation: lbIn .2s ease;
}
body.light .lightbox {
  background: rgba(0,0,0,.6);
}

.lightbox-inner {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: default;
  max-width: 320px;
  width: 100%;
  animation: lbScale .2s ease;
}
.lightbox-inner img,
.lightbox-inner svg {
  width: 260px;
  height: 260px;
  display: block;
}
.lightbox-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: .12em;
  color: #111;
}
.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  transition: background .15s;
}
.lightbox-close:hover { background: rgba(255,255,255,.1); }

/* ── Lightbox Navigation ── */
.lb-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: .25rem;
}
.lb-arrow {
  background: none;
  border: 1px solid #ccc;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, opacity .15s;
}
.lb-arrow:hover:not(:disabled) { background: #f0f0f0; }
.lb-arrow:disabled { cursor: default; }
.lb-counter {
  font-family: 'DM Sans', sans-serif;
  font-size: .8rem;
  color: #888;
  min-width: 3rem;
  text-align: center;
}

/* ── Footer ── */
footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  transition: color .15s, border-color .15s;
}
footer a:hover {
  color: var(--text);
  border-color: var(--text);
}

footer {
  margin-top: 3rem;
  font-size: .75rem;
  color: var(--muted);
  letter-spacing: .1em;
  opacity: 0;
  animation: fadeUp .7s ease .4s forwards;
  transition: color .7s ease;
}

/* ── Animationen ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes lbIn    { from { opacity: 0; }            to { opacity: 1; } }
@keyframes lbScale { from { transform: scale(.92); } to { transform: scale(1); } }

/* ── Responsive / Mobil ── */
@media (max-width: 640px) {
  .qr-wrap     { display: none; }
  .arrow       { display: flex; margin-left: auto; }
  .contact-row { padding: 1rem 1.25rem; }
}

/* ── Termine-Hinweis ── */
.termine-hinweis {
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .7rem 1.5rem;
  font-family: 'Bebas Neue', sans-serif;
  font-size: .95rem;
  letter-spacing: .18em;
  color: var(--text);
  text-align: center;
  transition: background-color .7s ease, color .7s ease, border-color .7s ease;
}

/* ── Anfahrt ── */
.anfahrt-divider {
  margin-top: 1.5rem;
}

.anfahrt-block {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp .7s ease .35s forwards;
  transition: border-color .7s ease;
}

.anfahrt-map {
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
}
.anfahrt-map img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
  transition: filter .3s ease, transform .3s ease;
}
.anfahrt-map:hover img,
.anfahrt-map:focus-visible img {
  filter: grayscale(.6);
  transform: scale(1.02);
}
.anfahrt-map:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

.anfahrt-overlay {
  position: absolute;
  bottom: .9rem;
  right: .9rem;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: .75rem;
  letter-spacing: .15em;
  padding: .35rem .75rem .35rem .55rem;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: .4rem;
  pointer-events: none;
  transition: opacity .3s;
}
.anfahrt-overlay svg { width: .9rem; height: .9rem; flex-shrink: 0; }
.anfahrt-map:hover .anfahrt-overlay { opacity: .85; }

.anfahrt-details {
  background: var(--surface);
  padding: 1.1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  transition: background-color .7s ease;
}

.anfahrt-address {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.anfahrt-address svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  stroke: var(--muted);
  transition: stroke .7s ease;
}
.anfahrt-street {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  letter-spacing: .08em;
}
.anfahrt-city {
  font-size: .78rem;
  color: var(--muted);
  letter-spacing: .04em;
  transition: color .7s ease;
}
.anfahrt-parking {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1.85rem;
  transition: color .7s ease;
}
.anfahrt-attribution {
  font-size: .68rem;
  color: var(--muted);
  padding: .4rem .6rem;
  text-align: right;
  transition: color .7s ease;
}
.anfahrt-attribution a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* ── Cookie-Info Overlay ── */
.cookie-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0,0,0,.75);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  cursor: pointer;
  animation: lbIn .2s ease;
}
.cookie-overlay.open {
  display: flex;
}

.cookie-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem 2.25rem;
  max-width: min(90vw, 520px);
  width: 100%;
  cursor: default;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: lbScale .2s ease;
  position: relative;
}

.cookie-inner .cookie-unicorn {
  width: 400px;
  height: 400px;
  object-fit: contain;
  align-self: center;
}

.cookie-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: .12em;
  color: var(--text);
  text-align: center;
}

.cookie-body {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.65;
  text-align: center;
}

.cookie-body strong {
  color: var(--text);
  font-weight: 400;
}

/* Checkmark-Liste */
.cookie-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  font-size: .85rem;
  color: var(--muted);
}
.cookie-list li::before {
  content: '✓  ';
  color: var(--text);
  font-weight: 400;
}

.cookie-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  transition: color .15s, border-color .15s;
}
.cookie-close:hover {
  color: var(--text);
  border-color: var(--text);
}

/* Light Mode Anpassungen */
body.light .cookie-inner {
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}