/* ==========================================================================
   Zentrale Farbdefinitionen
   Alle Farben der Seite werden hier an einem Ort verwaltet.
   ========================================================================== */
:root {
  /* Grundfarben */
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text-dark: #111111;
  --color-gold: #f3d37a;

  /* Abgeleitete Rollen */
  --page-bg: var(--color-white);
  --page-text: var(--color-text-dark);
  --panel-bg: rgba(0, 0, 0, 1);
  --panel-text: var(--color-white);
  --accent: var(--color-gold);
  --accent-contrast: var(--color-black);
}

/* Grundlayout: keine Standardabstaende und volle Hoehe */
html,
body {
  margin: 0;
  min-height: 100%;
}

/* Seite auf Weiss, Scrollen aus, Text standardmaessig dunkel */
body {
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--page-bg);
  color: var(--page-text);
}

/* Hilfsklasse: Text in der Akzentfarbe darstellen */
.text-accent {
  color: var(--accent);
}

/* Sprachumschalter als durchgehender weisser Balken oben */
.lang-switch {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  justify-content: flex-end; /* Buttons bleiben rechts */
  padding: 15px 0; /* +10px Hoehe gegenueber den Buttons */
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  background: var(--panel-bg);
  color: var(--panel-text);
  text-decoration: none;
}

.social-icon {
  display: block;
  width: 24px;
  height: 24px;
  /* SVG-Dateien haben schwarze Fuellung: hier auf Weiss invertieren */
  filter: invert(1);
}

.social-btn:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

/* Beim Hover schwarze Icons auf goldenem Grund (wie der Sprachbutton) */
.social-btn:hover .social-icon {
  filter: none;
}

.social-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  background: var(--panel-bg);
  color: var(--panel-text);
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: 0px solid var(--color-black);
  border-radius: 0px;
}

.lang-btn:hover {
  background: var(--accent);
  color: var(--accent-contrast);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Zentriert den Bildstapel im Viewport */
.box {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Basisstil fuer alle rotierenden Ebenen */
.box img {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  height: auto;
  animation-name: spin;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--spin-duration);
  animation-direction: var(--spin-direction, normal);
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* Hauptblock im Scrollfluss */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
}

.text-block {
  position: relative;
  z-index: 10;
  box-sizing: border-box;
  width: min(58rem, 100vw);
  margin: 0 0 1rem;
  background: var(--panel-bg);
  color: var(--panel-text);
  padding: 0.6rem 1.25rem;
}

/* Scrollbereich fuer zusaetzliche Inhalte unterhalb des Fold */
.scroll-content {
  position: relative;
  z-index: 10;
  width: min(58rem, 100vw);
  margin: 0;
  padding-top: 0;
  padding-bottom: 12rem;
}

.content-block {
  background: var(--panel-bg);
  color: var(--panel-text);
  padding: 1.25rem;
  margin: 1rem 0;
}

.content-block h3,
.content-block p {
  margin-inline: 0;
}

.content-block h3 {
  margin-top: 0;
  margin-bottom: 0.7rem;
  font-size: 1.3rem;
}

.content-block h4 {
  margin-top: 1.1rem;
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.content-block p {
  margin-top: 0;
  margin-bottom: 0.8rem;
  line-height: 1.55;
}

.content-block ul {
  margin: 0 0 0.8rem;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.content-block li {
  margin-bottom: 0.4rem;
}

.content-block a {
  color: var(--accent);
  text-underline-offset: 0.18rem;
}

.content-block a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.content-block--media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.content-block__image {
  width: 100%;
  height: auto;
  display: block;
}

/* TWINT-Bild: standardmaessig nur unteres Band zeigen, per Klick ganzes Bild */
.twint-reveal {
  display: inline-block;
  width: 15rem;
  max-width: 100%;
  margin-bottom: 0.8rem;
  cursor: zoom-in;
}

.twint-reveal:has(.twint-reveal__toggle:checked) {
  cursor: zoom-out;
}

.twint-reveal__toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.twint-reveal__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
  object-fit: cover;
  object-position: bottom;
}

.twint-reveal__toggle:checked ~ .twint-reveal__img {
  aspect-ratio: auto;
  object-fit: fill;
}

.twint-reveal__hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  color: var(--accent);
}

.twint-reveal__toggle:checked ~ .twint-reveal__hint {
  display: none;
}

/* Einheitliche Abstaende fuer Text im Infoblock */
.text-block h1,
.text-block h2,
.text-block p,
.text-block blockquote {
  margin-inline: 0;
}

.text-block blockquote {
  margin-top: 0;
  margin-bottom: 1rem;
}

.text-block blockquote p {
  margin-bottom: 0.35rem;
}

.text-block cite {
  font-style: normal;
  font-weight: 600;
}

/* Drehanimation um die Bildmitte */
@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Individuelle Rotationsgeschwindigkeiten/-richtungen je Ebene */
.spin1 {
  --spin-duration: 260s;
}

.spin2 {
  --spin-duration: 260s;
  --spin-direction: reverse;
}

.spin3 {
  --spin-duration: 80s;
}

.spin4 {
  --spin-duration: 120s;
  --spin-direction: reverse;
}

/* Animation auf Wunsch reduzieren */
@media (prefers-reduced-motion: reduce) {
  .box img {
    animation: none;
  }
}

/* Mobile Anpassungen fuer Bildgroesse und Typografie */
@media (max-width: 700px) {
  .box img {
    width: 125%;
  }

  .text-block {
    width: 100vw;
    margin-top: 0;
    padding: 12px 16px;
  }

  .text-block h1 {
    font-size: 1.6rem;
  }

  .text-block h2 {
    font-size: 1.1rem;
  }

  .text-block p,
  .text-block blockquote,
  .text-block cite {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .scroll-content {
    width: 100vw;
    padding-top: 0;
    padding-bottom: 11rem;
  }

  .content-block {
    padding: 1rem;
    margin: 0.8rem 0;
  }

  .content-block--media {
    grid-template-columns: 1fr;
  }

  .content-block h3 {
    font-size: 1.12rem;
  }
}
