@import url('https://fonts.googleapis.com/css2?family=Datatype:ital,wght@0,300;0,400;0,600;1,300&family=VT323:ital,wght@0,300;0,400;0,600;1,300&display=swap');

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

:root {
  --bg:          #050f05;
  --surface:     #071407;
  --accent:      #33ff33;
  --accent-dark: #00cc00;
  --ink:         #39ff14;
  --ink-mid:     #22cc22;
  --ink-light:   #148814;
  --border:      rgba(51,255,51,.35);
  --font-body:   'Datatype', Georgia, serif;
  --font-head:   'VT323', Georgia, serif;
  --radius:      3px;
  --content-w:   900px;
  --img-h:       320px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink-mid);
  font-family: var(--font-body);
  font-size: 16px;
}

/* Zeilenlinien-Textur */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent, transparent 28px,
    rgba(51,255,51,.010) 28px,
    rgba(51,255,51,.010) 29px
  );
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Teaser-Bild ── */
.scene-image {
  width: 100%;
  max-width: calc(var(--content-w) + 100px);
  height: var(--img-h);
  object-fit: cover;
  filter: sepia(0%)
          brightness(75%)
          contrast(108%);
  display: block;
}

/* Wenn Pixelate aktiv: img.pix wird vom JS versteckt,
   der Canvas-Wrapper übernimmt die Darstellung. */
img.pix { display: block; }

.scene-image-placeholder {
  width: 100%;
  max-width: calc(var(--content-w) + 100px);
  height: var(--img-h);
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scene-image-placeholder span { font-size: 80px; color: var(--bg); opacity: .25; }

/* ── Textbereich ── */
.content {
  width: 100%;
  max-width: var(--content-w);
  padding: 32px 28px 0;
}

h1 {
  font-family: var(--font-head);
  font-size: clamp(20px, 5vw, 30px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
  margin-bottom: 16px;
  line-height: 1.25;
}

.description {
  font-size: clamp(15px, 2.5vw, 17px);
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-mid);
  margin-bottom: 28px;
}

.rule { border: none; border-top: 1px solid var(--border); margin-bottom: 22px; }

.options-label {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 14px;
}

.options {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 48px;
  width: 100%;
}

.options a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: clamp(15px, 2.5vw, 16px);
  color: var(--ink);
  transition: background .15s, border-color .15s, padding-left .15s;
}
.options a:hover {
  background: rgba(51,255,51,.12);
  border-color: var(--accent-dark);
  padding-left: 22px;
}
.options a .arrow { color: var(--accent); font-size: 18px; flex-shrink: 0; }

footer {
  width: 100%;
  max-width: var(--content-w);
  padding: 0 28px 60px;
  text-align: center;
}

/* Ungestylte Links + .btn: invers zur Schrift (kein Browser-Blau) */
a:not([class]), a.btn {
  color: var(--bg);
  background: var(--ink-light);
  padding: 0 3px;
  border-radius: 2px;
  text-decoration: none;
}
a:not([class]):hover, a.btn:hover { background: var(--ink); }

footer a { font-size: 12px; letter-spacing: .05em; opacity: .6; }
footer a:hover { opacity: 1; }

/* ── [ooo]-Navigation ──
   z-index 7000: über dem Inhalt, unter Impressum-Modal (8500),
   Preloader (9000) und GLightbox (999999) – Lightbox deckt sie ab. */
#nav-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 7000;
  background: var(--bg);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 14px;
  letter-spacing: .08em;
  padding: 4px 10px;
  cursor: pointer;
  opacity: .85;
  transition: opacity .15s, background .15s;
}
#nav-toggle:hover { opacity: 1; background: var(--surface); }
#nav-panel {
  position: fixed;
  top: 50px;
  left: 14px;
  z-index: 7000;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 15px;
  min-width: 240px;
  max-width: calc(100vw - 28px);
  padding: 8px 0 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
}
#nav-panel.hidden { display: none; }
#nav-head {
  padding: 4px 16px 8px;
  font-size: 12px;
  color: var(--ink-light);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
  white-space: nowrap;
}
#nav-panel a.nav-link {
  display: block;
  padding: 6px 16px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#nav-panel a.nav-link::before { content: '> '; color: var(--accent); }
#nav-panel a.nav-link:hover { background: var(--surface); }
#nav-panel a.nav-current { color: var(--accent); }
#nav-panel a.nav-current::before { content: '» '; }

/* ── Media-Block ── */
.media-wrap {
  width: 100%;
  max-width: var(--content-w);
  padding: 0 28px 48px;
}
.media-title {
  font-family: var(--font-head);
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}
.media-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.media-trigger:hover { background: var(--surface); border-color: var(--accent-dark); }
.media-trigger .arrow { color: var(--accent); }
.media-trigger .media-count { color: var(--ink-light); font-size: 13px; }

/* Terminal-Panel (Kontextmenü an Klickposition) – z-index unter Lightbox/Modal */
.media-term {
  position: fixed;
  z-index: 7000;
  width: min(420px, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: 'Courier New', monospace;
  box-shadow: 0 6px 28px rgba(0,0,0,.55);
  overflow: hidden;
}
.media-term.hidden { display: none; }
.media-term-head { flex-shrink: 0; }
.media-term-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.media-term-path {
  font-size: 12px;
  color: var(--ink-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-term-close {
  background: none;
  border: none;
  color: var(--ink-light);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  flex-shrink: 0;
}
.media-term-close:hover { color: var(--ink); }
.media-term-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 6px 0; }
.media-row {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-row::before { content: '> '; color: var(--accent); }
.media-row:hover { background: var(--surface); }
.media-kind { color: var(--ink-light); font-size: 12px; }
.media-empty { padding: 10px 14px; color: var(--ink-light); font-size: 13px; }
.media-back {
  display: inline-block;
  margin: 4px 0 8px 10px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  padding: 3px 10px;
  cursor: pointer;
}
.media-back:hover { background: var(--surface); }
.media-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 4px;
}
.media-stage img, .media-stage video {
  display: block;
  max-width: 100%;
  max-height: 60vh;
}
.media-cap {
  padding: 8px 14px 2px;
  font-size: 13px;
  color: var(--ink-light);
  word-break: break-word;
}
.media-credit {
  padding: 0 14px 6px;
  font-size: 11px;
  color: var(--ink-light);
  opacity: .8;
  word-break: break-word;
}
.media-credit a { color: var(--accent); text-decoration: none; }
.media-credit a:hover { text-decoration: underline; }

/* ── Block-Sections ── */
.block-section { animation: blockIn .25s ease both; }
.block-section:not(.content) { width: 100%; display: flex; flex-direction: column; align-items: center; }
@keyframes blockIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ── Galerie ── */
.gallery-wrap {
  width: 100%;
  max-width: var(--content-w);
  padding: 0 28px 48px;
}
.gallery-title {
  font-family: var(--font-head);
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}

.gallery-grid { margin: 0 -6px; }
.gallery-item { float: left; padding: 6px; box-sizing: border-box; width: 33.333%; }
.gallery-cols-2 .gallery-item { width: 50%; }
.gallery-cols-3 .gallery-item { width: 33.333%; }
.gallery-cols-4 .gallery-item { width: 25%; }
.gallery-cols-5 .gallery-item { width: 20%; }
.gallery-cols-6 .gallery-item { width: 16.666%; }

.gallery-item a {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-decoration: none;
}
.gallery-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 100 / 63;
  object-fit: cover;
  filter: sepia(20%) brightness(95%);
  transition: opacity .2s;
}

/* Lupe beim Hover */
.gallery-item a::after {
  content: '\2315';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) scale(.7);
  font-size: 28px;
  color: rgba(255,255,255,.9);
  opacity: 0;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
  transition: opacity .15s, transform .15s;
  z-index: 10;
}
.gallery-item a:hover::after { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.gallery-cap {
  display: block;
  padding: 5px 8px;
  font-size: 12px;
  color: var(--ink-light);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface);
}

@media screen and (max-width: 500px) { .gallery-item { width: 50% !important; } }
@media screen and (max-width: 320px) { .gallery-item { width: 100% !important; } }

/* ── Kontaktformular ── */
.contact-wrap {
  width: 100%;
  max-width: var(--content-w);
  padding: 0 28px 48px;
}
.contact-title, .map-title {
  font-family: var(--font-head);
  font-size: clamp(17px, 3vw, 22px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 18px;
}
.contact-success {
  background: rgba(51,255,51,.12);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.7;
}
.contact-errors {
  list-style: none;
  background: rgba(139,46,46,.08);
  border: 1px solid rgba(139,46,46,.35);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 18px;
  font-size: 15px;
  color: #8b2e2e;
}
.contact-errors li + li { margin-top: 4px; }
.contact-errors li::before { content: '× '; }

.contact-form { display: flex; flex-direction: column; gap: 14px; }
.cf-field { display: flex; flex-direction: column; gap: 5px; }
.cf-field label {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-light);
}
.cf-req { color: var(--accent-dark); margin-left: 2px; }
.cf-field input, .cf-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.cf-field input:focus, .cf-field textarea:focus { border-color: var(--accent); }
.cf-field textarea { min-height: 120px; resize: vertical; line-height: 1.7; }

.cf-submit {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s, padding-right .15s;
}
.cf-submit:hover {
  background: rgba(51,255,51,.12);
  border-color: var(--accent-dark);
  padding-right: 28px;
}
.cf-submit .arrow { color: var(--accent); font-size: 18px; }

/* ── Anfahrtskarte ── */
.map-wrap {
  width: 100%;
  max-width: var(--content-w);
  padding: 0 28px 48px;
}
.map-address {
  font-size: 15px;
  color: var(--ink-light);
  margin-bottom: 14px;
  line-height: 1.6;
}
.map-frame-wrap {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.map-frame { width: 100%; display: block; border: none; }
.map-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: .03em;
}
.map-link:hover { color: var(--ink); text-decoration: underline; }

/* ── Impressum-Modal ── */
#impr-lb {
  position: fixed; inset: 0; z-index: 8500;
  background: rgba(0,0,0,.55); overflow-y: auto;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px 60px;
}
#impr-lb.hidden { display: none; }
.impr-modal {
  background: var(--surface); border-radius: var(--radius,6px);
  width: 100%; max-width: 680px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  overflow: hidden;
}
.impr-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--border,#ddd);
}
.impr-header h2 { margin: 0; font-size: 1.2rem; }
.impr-close {
  background: none; border: none; cursor: pointer; font-size: 20px;
  color: var(--ink-light); line-height: 1; padding: 4px 8px;
}
.impr-close:hover { color: var(--ink); }
.impr-pdf-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px; background: var(--cream,var(--surface));
  border-bottom: 1px solid var(--border,#ddd);
  flex-wrap: wrap;
}
.impr-pdf-bar span { font-size: 13px; color: var(--ink-light); }
.impr-body { padding: 24px; }
.impr-body h3 { font-size: 1rem; margin: 20px 0 8px; }
.impr-body h3:first-child { margin-top: 0; }
.impr-row { display: flex; gap: 8px; margin-bottom: 4px; font-size: 15px; line-height: 1.5; }
.impr-lbl { color: var(--ink-light); min-width: 160px; flex-shrink: 0; }
.impr-ds  { white-space: pre-wrap; font-size: 14px; line-height: 1.65;
            color: var(--ink-mid); margin-top: 8px; }
/* ── Permanenter Footer ── */
#site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  text-align: center;
  padding: 6px 20px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 10px;
  font-family: 'VT323', var(--font-body);
  color: var(--ink-light);
  line-height: 1.4;
}
body { padding-bottom: 44px; }
