/* Gemeinsame Grundlagen für Fotokarte und 3D-Karte */
@font-face { font-family: "Cormorant"; src: url("../vendor/fonts/cormorant-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../vendor/fonts/cormorant-latin-300-italic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../vendor/fonts/cormorant-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../vendor/fonts/cormorant-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../vendor/fonts/dm-sans-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../vendor/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../vendor/fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --tiefsee: #0d2230;      /* Flächen, Karten, Leisten */
  --tiefsee-2: #163446;    /* Hover, zweite Ebene */
  --gischt: #eef2f3;       /* Text auf dunkel */
  --nebel: #9db0bb;        /* Nebentext */
  --gold: #c8a96e;         /* einziger Akzent */
  --gold-hell: #e2cc9f;
  --schatten: 0 18px 48px rgba(3, 14, 22, 0.45);
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --rand: clamp(16px, 2.4vw, 32px);
  --dauer: 420ms;
  --kurve: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--tiefsee); color: var(--gischt); }
body { font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--gold-hell); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Wortmarke oben links */
.wortmarke {
  position: fixed; z-index: 30; top: var(--rand); left: var(--rand);
  font-family: var(--serif); font-weight: 300; font-size: clamp(30px, 3.6vw, 46px); line-height: 1;
  letter-spacing: 0.01em; color: #fff; text-decoration: none;
  text-shadow: 0 1px 18px rgba(3, 14, 22, .55);
}
.wortmarke .punkt { color: var(--gold); }
.wortmarke small { display: block; margin-top: 6px; font-family: var(--sans); font-size: 13px; font-weight: 400; letter-spacing: 0.02em; color: rgba(255,255,255,.82); }

/* Umschalter Foto / 3D oben rechts */
.modus {
  position: fixed; z-index: 30; top: var(--rand); right: var(--rand);
  display: flex; padding: 4px; border-radius: 999px;
  background: rgba(13, 34, 48, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--schatten);
}
.modus a { padding: 8px 16px; border-radius: 999px; font-size: 14px; color: var(--gischt); text-decoration: none; }
.modus a[aria-current="page"] { background: var(--gold); color: var(--tiefsee); font-weight: 500; }

/* Bedienleiste rechts */
.leiste {
  position: fixed; z-index: 30; right: var(--rand); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px;
  background: rgba(13, 34, 48, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--schatten);
}
.leiste button { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; }
.leiste button:hover { background: var(--tiefsee-2); }
.leiste svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.leiste hr { width: 24px; border: 0; border-top: 1px solid rgba(255,255,255,.12); margin: 4px auto; }

/* Infokarte */
.karte {
  position: fixed; z-index: 40; left: var(--rand); bottom: var(--rand);
  width: min(420px, calc(100vw - 2 * var(--rand)));
  max-height: calc(100vh - 140px); overflow: auto;
  background: var(--tiefsee); border-radius: 18px; box-shadow: var(--schatten);
  transform: translateY(calc(100% + 40px)); opacity: 0; visibility: hidden;
  transition: transform var(--dauer) var(--kurve), opacity var(--dauer) var(--kurve), visibility 0s linear var(--dauer);
}
.karte.offen { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
.karte figure { margin: 0; position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 18px 18px 0 0; background: var(--tiefsee-2); }
.karte figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.karte .schliessen {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(13, 34, 48, .78); display: grid; place-items: center; font-size: 20px; line-height: 1;
}
.karte .inhalt { padding: 20px 24px 24px; }
.karte .rubrik { margin: 0 0 4px; font-size: 13px; color: var(--gold); letter-spacing: 0.02em; }
.karte h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.05; }
.karte p.text { margin: 0 0 16px; color: rgba(238, 242, 243, .9); max-width: 62ch; }
.karte ul.fakten { list-style: none; margin: 0 0 18px; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 6px; font-size: 14px; color: var(--nebel); }
.karte ul.fakten li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 10px 1px 0; border-radius: 50%; background: var(--gold); }
.karte .aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--gold); color: var(--tiefsee); font-weight: 500; font-size: 14px; }
.knopf:hover { background: var(--gold-hell); }
.knopf.leise { background: transparent; color: var(--gischt); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); font-weight: 400; }
.knopf.leise:hover { background: var(--tiefsee-2); }
.karte .verwandt { margin-top: 20px; }
.karte.ohne-bild figure { aspect-ratio: auto; height: 56px; background: transparent; }
.karte.ohne-bild figure img { display: none; }
.karte .adresse { margin: -6px 0 14px; font-size: 14px; color: var(--nebel); }
.karte .verwandt h3 { margin: 0 0 8px; font-size: 13px; font-weight: 400; color: var(--nebel); }

/* Ortsliste */
.liste {
  position: fixed; z-index: 45; top: 0; bottom: 0; left: 0; width: min(360px, 88vw);
  background: var(--tiefsee); box-shadow: var(--schatten); padding: calc(var(--rand) + 70px) 0 var(--rand);
  transform: translateX(-102%); transition: transform var(--dauer) var(--kurve); overflow: auto;
}
.liste.offen { transform: none; }
.liste h2 { margin: 0 24px 12px; font-family: var(--serif); font-weight: 300; font-size: 28px; }
.liste h2.zweit { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); }
.liste ol.unterkuenfte li .t { font-family: var(--sans); font-size: 16px; font-weight: 500; }
.liste ol { list-style: none; margin: 0; padding: 0; }
.liste li button { width: 100%; text-align: left; padding: 12px 24px; display: grid; gap: 2px; }
.liste li button:hover, .liste li button[aria-current="true"] { background: var(--tiefsee-2); }
.liste li .t { font-family: var(--serif); font-size: 22px; line-height: 1.15; }
.liste li .r { font-size: 13px; color: var(--nebel); }
.liste .zu { position: absolute; top: var(--rand); right: 18px; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; }
.liste .zu:hover { background: var(--tiefsee-2); }

/* Fußzeile */
.nachweis {
  position: fixed; z-index: 20; right: var(--rand); bottom: calc(var(--rand) - 6px);
  font-size: 12px; color: rgba(255,255,255,.78); text-shadow: 0 1px 8px rgba(3,14,22,.8);
}
.nachweis button { text-decoration: underline; text-underline-offset: 3px; }
.nachweis a { color: inherit; text-underline-offset: 3px; }
.liste .recht { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; display: flex; gap: 18px; }
.liste .recht a { color: var(--nebel); }
.liste .recht a:hover { color: var(--gold-hell); }

/* Über-Dialog */
dialog.ueber { max-width: 560px; width: calc(100vw - 32px); border: 0; border-radius: 18px; padding: 28px; background: var(--tiefsee); color: var(--gischt); box-shadow: var(--schatten); }
dialog.ueber::backdrop { background: rgba(3, 14, 22, .55); }
dialog.ueber h2 { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: 30px; }
dialog.ueber p, dialog.ueber li { color: rgba(238,242,243,.88); }
dialog.ueber ul { padding-left: 18px; }

@media (max-width: 720px) {
  .leiste { top: auto; bottom: var(--rand); transform: none; flex-direction: row; }
  .leiste hr { width: 1px; height: 24px; border-top: 0; border-left: 1px solid rgba(255,255,255,.12); margin: auto 4px; }
  .karte { left: 0; right: 0; bottom: 0; width: 100%; border-radius: 18px 18px 0 0; max-height: 78vh; }
  .nachweis { display: none; }
  .modus a { padding: 7px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
