/* ==========================================================
   Baldurs Escape – Stylesheet
   Farben hier oben zentral anpassen.
   ========================================================== */
:root {
  --bg-dunkel: #151d2b;
  --bg-hell: #33415a;
  --tuerkis: #1fd6dc;
  --tuerkis-dunkel: #18a9ae;
  --grau: #8a909b;
  --text: #e6e9ee;
  --text-gedaempft: #b5bcc8;
  --karte: rgba(255, 255, 255, 0.04);
  --rand: rgba(255, 255, 255, 0.10);
  --schrift-titel: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --schrift-text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --breite: 52rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--schrift-text);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background:
    radial-gradient(ellipse at 75% 20%, rgba(70, 90, 125, 0.55), transparent 60%),
    linear-gradient(120deg, var(--bg-dunkel) 0%, #1f2a3d 50%, var(--bg-hell) 100%);
  background-attachment: fixed;
}

a { color: var(--tuerkis); }
a:hover { color: #fff; }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(21, 29, 43, 0.75);
  border-bottom: 1px solid var(--rand);
}
.kopf-innen {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.marke {
  font-family: var(--schrift-titel);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-decoration: none;
}
.marke {
  display: inline-flex;
  align-items: center;
}
.marke span { color: var(--tuerkis); }

/* kleiner Hund neben "Baldurs Escape" */
.marke-icon {
  display: block;
  flex: none;
  height: 2.4rem;
  width: calc(2.4rem * 576 / 439);
  margin-right: 0.6rem;
}
/* Auf der Startseite ist das nur ein Platzhalter, der mitwächst, wenn der Hund einfliegt */
.startseite .marke-icon {
  width: calc(2.4rem * 576 / 439 * var(--logo-platz, 0));
  margin-right: calc(0.6rem * var(--logo-platz, 0));
}
.startseite .marke {
  opacity: calc(1 - 0.85 * var(--logo-flug, 0));
}
/* ohne JavaScript: Hund direkt im Header zeigen */
html:not(.js) .startseite .marke-icon {
  width: calc(2.4rem * 576 / 439);
  margin-right: 0.6rem;
  background: url("img/logo-hund.png") center / contain no-repeat;
}

.navi ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.navi a {
  display: block;
  padding: 0.4rem 0.85rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.navi a:hover { color: var(--tuerkis); }
.navi a[aria-current="page"] {
  border-color: var(--tuerkis);
  color: var(--tuerkis);
}

/* ---------- Inhalt ---------- */
main {
  flex: 1;
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

h1, h2, h3 {
  font-family: var(--schrift-titel);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.8rem); margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 1.75rem 0 0.5rem; }

.untertitel {
  font-family: var(--schrift-titel);
  font-size: 1.2rem;
  color: var(--tuerkis);
  margin: 0 0 1.5rem;
}

/* Startseite: großes Logo */
.held {
  text-align: center;
  padding: 1rem 0 2rem;
}
/* Großes Logo: Hund + Schriftzug.
   Die Prozentwerte entsprechen der Lage des Hundes über dem Schriftzug im Original-Logo. */
.logo-buehne {
  width: min(620px, 100%);
  margin: 0 auto;
}
.logo-hund-platz {
  width: 59.08%;
  margin-left: 21.95%;
  aspect-ratio: 576 / 439;
}
.logo-hund-platz img,
.logo-schrift {
  display: block;
  width: 100%;
  height: auto;
}
.logo-schrift {
  /* blendet beim Scrollen aus (--logo-p läuft von 0 bis 1, gesetzt von logo-scroll.js) */
  opacity: calc(1 - var(--logo-p, 0) * 2.5);
  transform: translateY(calc(var(--logo-p, 0) * -20px));
}

/* Der "fliegende" Hund: liegt fixiert über allem und wird per Skript bewegt */
.logo-hund-flieg {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  transform-origin: 0 0;
  pointer-events: none;
  will-change: transform;
}
.js .logo-hund-flieg { display: block; }
.js .logo-hund-platz img { visibility: hidden; }

.qr {
  width: 200px;
  height: auto;
  border-radius: 12px;
}
.held h1 { margin-top: 1.5rem; }

.zentriert { text-align: center; }

/* Kasten / Karte */
.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.geschichte {
  border-left: 3px solid var(--tuerkis);
}
.geschichte p:last-child {
  font-family: var(--schrift-titel);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0;
}

.hinweis {
  text-align: center;
  border-color: var(--tuerkis-dunkel);
  background: rgba(31, 214, 220, 0.07);
}
.hinweis p { margin: 0.25rem 0; }

/* Fakten (Team-Größe) */
.fakten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.fakt {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
}
.fakt strong {
  display: block;
  font-family: var(--schrift-titel);
  font-size: 2.2rem;
  color: var(--tuerkis);
  line-height: 1.1;
}

/* Fähigkeiten-Liste */
.faehigkeiten {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.faehigkeiten li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--rand);
  border-radius: 999px;
  background: var(--karte);
  font-size: 0.95rem;
}

/* Kontakt */
.kontaktwege {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.kontaktweg {
  display: block;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.2s;
}
.kontaktweg:hover {
  border-color: var(--tuerkis);
  transform: translateY(-2px);
  color: var(--text);
}
.kontaktweg span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-gedaempft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.kontaktweg strong {
  color: var(--tuerkis);
  font-weight: 600;
  word-break: break-word;
}

.knopf {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  background: var(--tuerkis-dunkel);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.knopf:hover { background: var(--tuerkis); color: var(--bg-dunkel); }

/* Kontaktformular */
.formular { display: grid; gap: 1.1rem; }
.feld { display: grid; gap: 0.35rem; }
.feld label { font-weight: 600; font-size: 0.95rem; }
.feld input,
.feld textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  font: inherit;
  color: var(--text);
  background: rgba(10, 15, 25, 0.45);
  border: 1px solid var(--rand);
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feld textarea { resize: vertical; min-height: 8rem; }
.feld input:focus,
.feld textarea:focus {
  outline: none;
  border-color: var(--tuerkis);
  box-shadow: 0 0 0 3px rgba(31, 214, 220, 0.2);
}
.einwilligung {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--text-gedaempft);
}
.einwilligung input {
  margin-top: 0.3rem;
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--tuerkis);
  flex: none;
}
.pflicht { margin: 0; font-size: 0.85rem; color: var(--text-gedaempft); }
.formular .knopf { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.formular .knopf:disabled { opacity: 0.6; cursor: wait; }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.formular-status { margin: 0; min-height: 1.5em; }
.formular-status.ok { color: var(--tuerkis); }
.formular-status.fehler { color: #ff9b8a; }

/* Rechtstexte */
.rechtlich { font-size: 0.97rem; color: var(--text-gedaempft); }
.rechtlich h2, .rechtlich h3 { color: var(--text); }
.rechtlich ul { padding-left: 1.25rem; }
.rechtlich li { margin: 0.25rem 0; }
.rechtlich .karte h3 { margin-top: 0; }

/* ---------- Fußzeile ---------- */
.fuss {
  border-top: 1px solid var(--rand);
  background: rgba(15, 21, 32, 0.6);
  font-size: 0.95rem;
}
.fuss-innen {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.fuss nav a {
  color: var(--text-gedaempft);
  text-decoration: none;
  margin-right: 1.25rem;
}
.fuss nav a:hover { color: var(--tuerkis); }
.insta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-gedaempft);
  text-decoration: none;
}
.insta:hover { color: var(--tuerkis); }
.insta svg { width: 22px; height: 22px; }

/* ---------- Onepager (nur Handy, siehe onepager.js) ---------- */
.onepager-teil {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rand);
  scroll-margin-top: 4.5rem;
}
@media (min-width: 701px) {
  .onepager-teil { display: none; }   /* Desktop: Unterseiten bleiben eigene Seiten */
}
@media (max-width: 700px) {
  .navi { display: none; }            /* Handy: keine Reiter, alles auf einer Seite */
  .onepager-fehler .navi { display: block; }
  .kopf-innen { justify-content: center; }
}

/* lange Wörter (z. B. in Rechtstexten) sauber umbrechen */
h1, h2, h3, p, li { overflow-wrap: break-word; hyphens: auto; }

/* sehr schmale Handys */
@media (max-width: 360px) {
  .marke { font-size: 1.3rem; }
  .kopf-innen { padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- Handy ---------- */
@media (max-width: 600px) {
  .kopf-innen { justify-content: center; }
  .navi ul { justify-content: center; }
  main { padding-top: 2rem; }
  .karte { padding: 1.25rem; }
}
