/* ==========================================================================
   Design-Variablen – hier Farben & Schriften anpassen
   ========================================================================== */
:root {
  --bg: #0b0b0d;
  --bg-elevated: #121217;
  --panel-bg: rgba(16, 16, 20, 0.84);
  --line: rgba(255, 255, 255, 0.09);
  --text: #e9e6e0;
  --muted: #9a968e;
  --accent: #c9a96e;
  --accent-soft: rgba(201, 169, 110, 0.16);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Times New Roman", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;

  --panel-w: min(440px, 92vw);
  --gap: 20px;
  --footer-h: 52px;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse 80% 70% at 50% 42%, #1c1c24 0%, #121217 45%, #0b0b0d 100%);
}

a { color: var(--accent); text-underline-offset: 3px; }
code {
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
}
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ==========================================================================
   3D-Bühne
   ========================================================================== */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  outline: none;
}
#scene:active { cursor: grabbing; }

#hotspot-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}

/* ==========================================================================
   Hotspots
   ========================================================================== */
.hotspot {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transition: opacity 0.35s ease;
}
.hotspot__dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22), 0 2px 14px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s var(--ease), background 0.3s ease, box-shadow 0.3s ease;
}
.hotspot__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: pulse 2.6s ease-out infinite;
}
@keyframes pulse {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(3.2); opacity: 0; }
}
.hotspot:hover .hotspot__dot,
.hotspot:focus-visible .hotspot__dot { transform: scale(1.25); }

.hotspot.is-active .hotspot__dot {
  background: var(--accent);
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(201, 169, 110, 0.35), 0 0 26px rgba(201, 169, 110, 0.65);
}
.hotspot.is-active .hotspot__dot::after { border-color: var(--accent); }

.hotspot__label {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 6px);
  transform: translate(-50%, 6px);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(12, 12, 15, 0.82);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}
.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label,
.hotspot.is-active .hotspot__label {
  opacity: 1;
  transform: translate(-50%, 0);
}
.hotspot.is-hidden { display: none; }
.hotspot.is-occluded { opacity: 0.22; }

/* ==========================================================================
   Kopf, Hinweis, Fußzeile
   ========================================================================== */
.brand {
  position: fixed;
  top: calc(var(--gap) + env(safe-area-inset-top, 0px));
  left: calc(var(--gap) + 8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.brand__name {
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.brand__role {
  margin-top: 2px;
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}

.hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--footer-h) + 14px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  margin: 0;
  z-index: 8;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.hint.is-hidden { opacity: 0; }

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--footer-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  pointer-events: none;
}
.footer__link {
  pointer-events: auto;
  padding: 8px 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: color 0.3s ease, background-size 0.4s var(--ease);
}
.footer__link:hover,
.footer__link:focus-visible { color: var(--text); background-size: 100% 1px; }
.footer__sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); opacity: 0.6; }

/* ==========================================================================
   Infopanel
   ========================================================================== */
.panel {
  position: fixed;
  top: calc(var(--gap) + env(safe-area-inset-top, 0px));
  right: var(--gap);
  bottom: calc(var(--footer-h) + 8px + env(safe-area-inset-bottom, 0px));
  width: var(--panel-w);
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease), visibility 0s linear 0.55s;
}
.panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.panel__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 38px 34px 34px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.panel__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.panel__close:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.08); }

.panel__eyebrow {
  margin: 0 0 10px;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--accent);
}
.panel__title {
  margin: 0;
  padding-right: 36px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
.panel__subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.panel__subtitle:empty { display: none; }
.panel__title::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 18px 0 4px;
  background: var(--accent);
  opacity: 0.8;
}
.panel__text { margin-top: 16px; color: #cfcbc3; font-size: 0.96rem; }
.panel__text p { margin: 0 0 1em; }
.panel__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.panel__links:empty { display: none; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover { background: var(--accent); color: #17140e; }
.btn:disabled { opacity: 0.5; cursor: progress; }

/* ==========================================================================
   Galerie / Karussell
   ========================================================================== */
.gallery { margin-top: 28px; }
.gallery__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  touch-action: pan-y;
}
.gallery__track {
  display: flex;
  height: 100%;
  transition: transform 0.55s var(--ease);
}
.slide {
  flex: 0 0 100%;
  height: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  background: #000;
}
.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.gallery__viewport:hover .gallery__nav,
.gallery__nav:focus-visible { opacity: 1; }
.gallery__nav:hover { background: rgba(201, 169, 110, 0.25); border-color: var(--accent); }
@media (hover: none) { .gallery__nav { opacity: 1; } }
.gallery.is-single .gallery__nav,
.gallery.is-single .gallery__bar { display: none; }

.gallery__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.gallery__dots { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease, transform 0.3s ease;
}
.gallery__dot::before { content: ""; position: absolute; inset: -8px; } /* größere Klickfläche */
.gallery__dot.is-active { background: var(--accent); transform: scale(1.35); }
.gallery__count { font-size: 0.72rem; letter-spacing: 0.16em; color: var(--muted); }

/* ==========================================================================
   Overlays (Impressum / Kontakt)
   ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 7, 9, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0s linear 0.4s;
}
.overlay.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }

.overlay__card {
  position: relative;
  width: min(640px, 100%);
  max-height: min(86vh, 860px);
  overflow-y: auto;
  padding: 44px 44px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  transform: translateY(18px) scale(0.985);
  transition: transform 0.55s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}
.overlay.is-open .overlay__card { transform: none; }

.overlay__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.overlay__close:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.28); }

.overlay__title {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2rem;
}
.overlay__title::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin-top: 16px;
  background: var(--accent);
  opacity: 0.8;
}
.overlay__lead { margin: 18px 0 8px; color: var(--muted); }

.prose { margin-top: 18px; color: #cfcbc3; font-size: 0.95rem; }
.prose h3 {
  margin: 1.6em 0 0.4em;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.prose h3:first-child { margin-top: 0; }
.prose p { margin: 0 0 0.9em; }

/* Formular */
.form { margin-top: 22px; display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field > span {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  padding: 10px 2px 10px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  resize: vertical;
  transition: border-color 0.3s ease;
}
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field.has-error input,
.field.has-error textarea { border-bottom-color: #c46a6a; }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 0.82rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.check.has-error { color: #d89a9a; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form__status { margin: 0; font-size: 0.86rem; color: var(--muted); }
.form__status.is-ok { color: #9fcf9f; }
.form__status.is-error { color: #d89a9a; }

/* ==========================================================================
   Loader, Toast, noscript
   ========================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--bg);
  transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__inner { display: grid; gap: 16px; justify-items: center; }
.loader__label {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.loader__bar { width: 180px; height: 1px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.loader__bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(0.04);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(var(--gap) + env(safe-area-inset-top, 0px));
  transform: translate(-50%, -20px);
  z-index: 80;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(12, 12, 15, 0.9);
  border: 1px solid var(--accent);
  color: var(--text);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.noscript { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; margin: 0; background: var(--bg); }

/* ==========================================================================
   Mobil: Panel wird zum Bottom-Sheet
   ========================================================================== */
@media (max-width: 800px) {
  :root { --gap: 12px; }
  .brand { left: 18px; }
  .brand__name { font-size: 1.25rem; }

  .panel {
    top: auto;
    left: var(--gap);
    right: var(--gap);
    width: auto;
    height: 54vh;
    bottom: calc(var(--footer-h) + 4px + env(safe-area-inset-bottom, 0px));
    transform: translateY(40px);
  }
  .panel__scroll { padding: 30px 22px 26px; }
  .panel__title { font-size: 1.7rem; }

  .hint { font-size: 0.62rem; letter-spacing: 0.1em; }
  .overlay__card { padding: 36px 24px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}
