/* =======================================================================
   DANCE WITH THE DEVIL — Landing Styles (bereinigt & optimiert)
   - Stabilere Carousels (keine Sprünge)
   - Scroll-Reveal (opt-in via .reveal + .is-visible)
   - Performance-Feinschliff & Motion-Respekt
   ======================================================================= */

/* ——— Reset/Document Basics ———————————————————————————————————————— 
* { outline: 1px solid red; }*/

html, body { touch-action: manipulation; }
header, footer { contain: layout style; }

html, body {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: black !important;
  width: 100%;
  max-width: 100%;
}

/* Text-Auswahl einfärben */
::selection {
  background: #000;  /* rote Unterlegung */
  color: #FF1E22;          /* weiße Schrift auf rot */
}

::-moz-selection {
  background: #000;
  color: #FF1E22;
}

h1 { font-family: PTMono, monospace; }
h2 { font-family: PTMono, monospace; }
h3 { font-family: PTMono, monospace; }

h2 {
  font-family: PTMono, monospace;
  white-space: normal;   /* erlaubt Zeilenumbrüche */
  word-break: normal;    /* kein Wort wird mitten drin gebrochen */
}

h2 span.word {
  display: inline-block;  /* Wort bleibt zusammen */
  margin-right: .01em;    /* Abstand wie normales Space */
}

h2 span.char {
  display: inline-block;  /* Zeichen animierbar */
}


.spacer-120 { height: 120px; width: 100%; display: block; }
.spacer-240 { height: 240px; width: 100%; display: block; }
.spacer-400 { height: 400px; width: 100%; display: block; }

/* ——— Scroll-Reveal (opt-in) ———————————————————————————————
   Vergib .reveal an Blöcke; beim Eintritt in den Viewport
   per JS zusätzlich .is-visible setzen. */

.reveal {
  opacity: 0;
  transform: translateY(40px);   /* nur optisch verschoben */
  will-change: opacity, transform;
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Weniger Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ——— HERO / Video-Backdrop / Matrix ——————————————————————————— */

.hero {
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}



.hero {
  position: relative;
  height: 100vh;        /* Vollbild auf Desktop */
  overflow: hidden;
  background-color: black;
  z-index: 0;
  transform: translateY(0);
  transition: transform 0.1s linear;
}

.hero-stack {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2; /* über Matrix/Video */
}

/* Platzhalter für fixiertes Video */
.video-box {
  width: 100%;
  height: 100vh;
  pointer-events: none;
}

/* Content im Hero */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: 0.4s; /* leicht verzögert nach Page-Load */
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content {
  font-family: PTMono, monospace;
  font-weight: 300;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
}

.hero-content-inner {
  width: 75%;
  display: grid;
  gap: 56px;
  color: #fff;
}

.dwtd-logo {
  width: 305px;
  height: 127px;
  display: block;
}

/* style-dwtd-landing.css */
.dwtd-logo {
  position: relative;
  display: block;
  opacity: 1; /* kein Fade! */
  animation: glitchBase 2.5s forwards;
}

.intro-final {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.intro-anim {
  position: relative;
}

.intro-placeholder {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  position: absolute !important;
}

.intro-text {
  color: white;
  font-weight: 300;
  font-size: 20px;
  line-height: 120%;
  margin: 0 0 12px 0;
  max-width: 40ch;
}

/* Fixiertes Video-Hintergrundbild */
.video-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
}

video#bgvid {
  position: fixed;
  top: 0; left: 50%;
  height: 100vh;
  width: auto;
  transform: translateX(-50%);
  object-fit: cover;
  z-index: 0;
}

/* Matrix Canvas */
#matrix {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;            /* immer Viewport-Breite */
  max-width: 1920px;       /* optional Limit nach oben */
  height: 600vh;
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;

  /* Fade-out unten */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 85%, rgba(0,0,0,0) 100%);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

/* ——— Mobile Anpassungen ≤ 810px ————————————————————————————— */

@media (max-width: 810px) {
  .hero {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  .video-box { width: 100vw; height: 100vw; }

  video#bgvid {
    position: fixed;
    top: 0; left: 50%;
    width: 100vw;
    height: 100vw;
    object-fit: cover;
    transform: translateX(-50%);
  }

  .hero-content {
    position: static !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    background: #000;
    padding: 64px 24px 32px;
    margin: 0 auto;
    height: auto !important;
  }

  .hero-content-inner {
    width: min(90%, 720px);
    margin: 0 auto;
    text-align: left;
    display: grid;
    gap: 56px;
    align-items: start;
    justify-items: start;
  }

  .dwtd-logo { width: 265px; height: 110px; margin: 0 auto; }

  .intro-text {
    font-size: 18px;
    line-height: 120%;
    margin-bottom: 12px;
    max-width: 100%;
  }
}

/* ——— Content-Block nach dem Hero —————————————————————————————————————————————————————————————————— */

.content {
  position: relative;
  z-index: 3;
  color: black;
  background-color: transparent;
  padding-inline: clamp(12px, 10vw, 200px);
  padding-block: clamp(100px, 20vh, 200px);
  margin-top: -28vh;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;

  /* Intro-Animation (kein Autoscroll) */
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity .9s ease-out,
    transform .9s ease-out;
  will-change: opacity, transform;
}

.content.visible {
  opacity: 1;
  transform: translateY(0);
}

.content p {
  font-family: PTMono, monospace;
  font-size: 28px;
  font-weight: 300;
  line-height: 38px;
  margin-top: 0;
}

.card {
  background-color: #FF1E22;
  color: black;
  padding-inline: clamp(24px, 10vw, 200px);
  padding-block: 100px;
  border-radius: 30px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (max-width: 810px) {
  .content {
    margin-top: 0 !important;
    z-index: 2;
    padding-inline: clamp(12px, 6vw, 24px);
    padding-block: clamp(64px, 12vh, 120px);
    opacity: 0;
    transform: translateY(-40px);
    transition: opacity 1s ease-out .1s, transform .8s ease-out .1s;
  }
  .content.visible { opacity: 1; transform: none; }
  .content p { font-size: 20px; line-height: 28px; }
  .card { padding: 40px 24px 0 24px; }
}

@media (prefers-reduced-motion: reduce){
  .content { opacity: 1; transform: none; transition: none; }
}

/* ——— Engagement-Komponente ——————————————————————————————— */

.engagement {
  margin-top: 48px;
  width: clamp(282px, 90vw, 375px);
  margin-inline: auto;
  display: grid;
  gap: 44px;
}

.engagement-head { display: grid; gap: 24px; }

.engagement .claim {
  padding-left: 52px;
  font-family: PTMono, monospace;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.3;
  margin: 0;
  color: #000;
}

.engagement-logo {
  width: 375px;
  height: auto;
  max-width: 100%;
  display: block;
  margin-left: 0;  
  animation: glitchBot 2.4s infinite linear alternate;
}

@keyframes glitchBot {
  0% { transform: translate(0, 0); }
  20% { transform: translate(2px, 1px); }
  40% { transform: translate(4px, -1px); }
  60% { transform: translate(-3px, 0); }
  80% { transform: translate(-2px, 2px); }
  100% { transform: translate(0, -1px); }
}

.engagement-form {
  width: 100%;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  padding-bottom: 0;
  margin-bottom: 0;
}

.soul-group {
  width: 90%;
  max-width: 90%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.06) inset;
}

#soulInput {
  flex: 1; min-width: 0;
  border: 0;
  background: transparent;
  color: #000;
  font-family: PTMono, monospace;
  font-size: 1.05rem;
  padding: .9rem 1rem;
  outline: none;
}

.soul-group:focus-within {
  box-shadow: 0 0 0 2px rgba(0,0,0,0) inset;
}

.soul-submit {
  border: 0;
  background: #000;
  color: #ff1e22;
  font: 700 1.6rem/1 PTMono, monospace;
  padding: .9rem 1.1rem;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .06s ease, filter .15s ease;
}
.soul-submit:hover { filter: brightness(1.1); }
.soul-submit:active { transform: translateY(0); }

.hint, .error, .poetry {
  margin-top: 24px !important;
  margin-left: 20px;
  margin-right: 60px;
  margin-bottom: 0;
  font-family: PTMono, monospace;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.2rem !important;
  padding: 0 32px;
}

.error {
  color: #000;
  min-height: 1.2em !important;
  font-size: 1.2rem !important;
  line-height: 1.2rem !important;
  padding: 0 32px;
}

.poetry {
  font-size: 1.2rem !important;
  opacity: 1;
  color: #000;
  transition: opacity .4s, color .2s;
}

/* Erfolgszustand */
.unlocked .soul-gate { display: none; }
.unlocked .poetry { color: #0f0; }

/* Status-Blöcke */
.engagement-status { display: grid; gap: 12px; padding: 0 24px; }
.engagement-status .status {
  min-height: 1.2em;
  font-family: PTMono, monospace;
  font-size: .95rem;
}

/* Engagment mobil */
@media (max-width: 420px) {
  .engagement-logo { width: 220px; height: auto; }
}
@media (max-width: 810px) {
  .engagement { width: 282px; }
  .engagement-logo { width: 282px; margin-left: 0; }
  .hint, .error, .poetry { margin-right: 0; margin-left: 0;}
}

/* ——— Modal / Gate (Overlay) —————————————————————————————————————————————————————————————————————————————————— */

.dwtd-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.dwtd-modal[aria-hidden="false"]{ pointer-events: auto; }

.dwtd-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(24,36,34,0.90);
  opacity: 0;
  transition: opacity .9s ease-out;
}
.dwtd-modal[aria-hidden="false"] .dwtd-backdrop{ opacity: 1; }

.dwtd-dialog{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 95vw;
  max-width: none;
  height: auto;
  max-height: 95vh;
  background: #0b0b0b;
  color: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 80px rgba(0,0,0,.5);
  transform: translateY(24px);
  opacity: 0;
  transition:
    transform .9s ease-out,
    opacity   .9s ease-out;
}

@media (min-width: 810px){
  .dwtd-dialog{ width: 820px; max-width: 820px; }
}


.dwtd-modal[aria-hidden="false"] .dwtd-dialog{
  transform: translateY(0);
  opacity: 1;
}

.dwtd-body{
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px;
  overflow: auto;
}

.dwtd-media{ position: relative; width: 100%; height: 100%; }

.dwtd-modal.mode-image .dwtd-dialog,
.dwtd-modal.mode-video .dwtd-dialog{
  height: 95vh; max-height: 95vh;
}
.dwtd-modal.mode-image .dwtd-body,
.dwtd-modal.mode-video .dwtd-body{
  padding: 0; overflow: hidden; display: flex;
}
.dwtd-modal .dwtd-media img,
.dwtd-modal .dwtd-media video{
  display: block; width: 100%; height: 100%; object-fit: cover;
}

/* Textmodus: nur vertikales Scrollen */
.dwtd-modal.mode-text .dwtd-body {
  margin: 0 auto;            /* horizontal zentrieren */
  text-align: left;          /* Text linksbündig */
  padding: 120px 80px;       /* Abstand oben/unten bleibt */
  font-family: PTMono, monospace;
  font-size: 28px;
  color: #FF1E22;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 800px;
  animation: glitchBot 2.4s infinite linear alternate;
}

@keyframes glitchBot {
  0% { transform: translate(0, 0); }
  20% { transform: translate(2px, 1px); }
  40% { transform: translate(4px, -1px); }
  60% { transform: translate(-3px, 0); }
  80% { transform: translate(-2px, 2px); }
  100% { transform: translate(0, -1px); }
}

/* Close-Button (Icon) */
.dwtd-close{
  position: absolute;
  top: 24px; right: 24px;
  width: 48px; height: 48px;
  background: url("../assets/close.svg") center/contain no-repeat;
  border: none; padding: 0; margin: 0;
  cursor: pointer; z-index: 10;
}
.dwtd-close:hover{ background-image: url("../assets/close-hover.svg"); }

/* Bewegungsreduktion */
@media (prefers-reduced-motion: reduce){
  .dwtd-backdrop{ transition: none; }
  .dwtd-dialog{ transition: none; transform: none !important; }
}

@media (max-width: 810px) {
  .dwtd-modal.mode-text .dwtd-body { margin: 0 auto; text-align: left; padding: 80px 32px; font-size: 20px; color: #FF1E22; max-width: 400px; }
  }

@media (max-width: 400px) {
  .dwtd-modal.mode-text .dwtd-body { font-size: 16px; max-width: 350px; }
  }  

/* ——— Text/Galerie-Abschnitt (weiß) ——————————————————————————————————————————————————————————————————— */

.gallery-content {
  position: relative;
  z-index: 3;
  color: black;
  background-color: transparent;
  padding-inline: clamp(12px, 10vw, 200px);
  padding-block: clamp(0px, 20vh, 0px);
  margin-top: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.gallery-content p {
  font-family: PTMono, monospace;
  font-size: 20px;
  font-weight: 300;
  line-height: 140%;
  margin-top: 0;
}
.gallery-content h2 {
  font-size: 44px;
  line-height: 46px;
  margin-top: 0;
  margin-bottom: 64px;
}
.gallery-content-card {
  background-color: #FFFFFF;
  color: black;
  padding-inline: clamp(24px, 10vw, 200px);
  padding-block: 100px;
  border-radius: 30px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Mobil Galerie */
@media (max-width: 810px) {
  .gallery-content {
    margin-top: 0 !important;
    z-index: 2;
    padding-inline: clamp(12px, 6vw, 24px);
    padding-block: clamp(0px, 12vh, 0px);
  }
  .gallery-content p { font-size: 18px; line-height: 140%; }
  .gallery-content h2 {
    font-size: 24px; line-height: 26px; margin-bottom: 28px;
  }
  .gallery-content-card { padding: 40px 24px 0 24px; }
}

/* ——— DWTD Image Carousel ———————————————————————————————— */
.dwtd-carousel { touch-action: pan-y; }

.dwtd-carousel{
  position: relative;
  max-width: 780px;
  margin: 80px auto;
  overflow: visible;
  /* Stabilisierung: Mindesthöhe für Caption, damit kein Sprung beim Fade */
  --dwtd-caption-min-h: 96px;
  clip-path: inset(0 0 0 0); /* begrenzt die "Layout-Breite" auf 100% */
}

.dwtd-slide{
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.0s ease;
  padding-bottom: 0;
}
.dwtd-slide.active{
  position: relative; /* nimmt Platz ein (Caption!) */
  opacity: 1;
  pointer-events: auto;
}

.dwtd-slide-media{
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  background: black;
  border-radius: 8px;
  box-shadow: 0 16px 32px -16px rgba(0,0,0,0.8);
}
.dwtd-slide-media img{
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
}

.dwtd-slide-caption{
  max-width: 680px;
  margin: 48px auto 0;
  padding: 0 24px;
  text-align: left;
  min-height: var(--dwtd-caption-min-h); /* »Anti-Spring« */
  display: block;
  flex-direction: column;
  justify-content: flex-start;
}
.dwtd-slide-caption .button {
  display: inline-flex;
  width: auto;
  flex: 0 0 auto;              /* verhindert, dass Flex den Button streckt */
  max-width: none;             /* keine unnötige Begrenzung */
  white-space: nowrap;         /* Text nicht umbrechen */
  margin: 0;                   /* keine Extra-Abstände */
}
.dwtd-slide-caption h3{
  font-family: PTMono, monospace;
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 8px;
  color:#000;
}
.dwtd-slide-caption p{
  font-family: PTMono, monospace;
  font-size: 14px;
  line-height: 1.2;
  margin: 0 0 48px;
  color:#000;
}


/* Navigation */
.dwtd-nav{
  position: absolute;
  /* top setzt das JS; horizontaler Offset via transform */
  width: 75px; height: 104px;
  border: 0; padding: 0; background: none; cursor: pointer;
  z-index: 30; font-size: 0; line-height: 0; color: transparent;
}

.dwtd-nav.prev{
  left: 0;                                  /* im Container andocken */
  background: url("../assets/carousel-back.svg") center/contain no-repeat;
  transform: translateX(calc(-100% + 60px));/* nach außen schieben (kein Layout-Overflow) */
}

.dwtd-nav.next{
  right: 0;
  background: url("../assets/carousel-next.svg") center/contain no-repeat;
  transform: translateX(calc(100% - 60px));
}

@media (max-width: 1200px){
  .dwtd-nav.prev { transform: translateX(calc(-100% + 60px)); }
  .dwtd-nav.next { transform: translateX(calc(100% - 60px)); }
}

@media (max-width: 810px){

  :root {
    --dwtd-prev-offset: 24px; /* Abstand nach außen links */
    --dwtd-next-offset: 24px; /* Abstand nach außen rechts */
  }
  .dwtd-nav.prev {
    width: 50px;
    height: 70px;
    left: 0;
    transform: translateX(calc(-100% + var(--dwtd-prev-offset)));
  }
  .dwtd-nav.next {
    width: 50px;
    height: 70px;
    right: 0;
    transform: translateX(calc(100% - var(--dwtd-next-offset)));
  }

  .dwtd-carousel,
  .dwtd-slide-media,
  .dwtd-slide-caption{
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  .dwtd-slide-caption{
    padding: 0 24px;
    box-sizing: border-box;
  }
  .dwtd-slide{ padding-bottom: 80px; }
  .dwtd-slide-media img{ width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }

  .dwtd-nav{ width: 60px; height: 84px; }
}

@media (max-width: 600px){
  .dwtd-carousel,
  .dwtd-slide-media,
  .dwtd-slide-caption{ max-width: 100%; }
  
  .dwtd-nav{ width: 50px; height: 70px; }
}

/* Buttons im weißen Card-Umfeld als Inline-Buttons */
.gallery-content-card .dwtd-slide-caption a.button,
.gallery-content-card a.button {
  display: inline-flex !important;
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  text-decoration: none;
}
.gallery-content-card .dwtd-slide-caption a.button { margin-left: 0; margin-right: 0; }

/* ——— Schwarze Content-Abschnitte ———————————————————————————————————————————————————————————————————— */

.black-content {
  position: relative;
  z-index: 3;
  color: white;
  background-color: transparent;
  padding-inline: clamp(12px, 10vw, 200px);
  padding-block: clamp(0px, 10vh, 200px);
  margin-top: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  align-items: left;
  justify-content: left;
}
.black-content p {
  font-family: PTMono, monospace;
  font-size: 20px;
  font-weight: 300;
  line-height: 140%;
  margin-top: 0;
  margin-bottom: 48px;
}
.black-content h2 {
  font-size: 44px;
  line-height: 46px;
  margin-top: 0;
  margin-bottom: 64px;
}
.black-content h3 {
  font-size: 20px;
  line-height: 26px;
  color: #FF1E22;
  margin-top: 0;
  margin-bottom: 4px;
}

.black-content-card {
  background-color: transparent; /* FIX: war '#black' */
  color: white;
  padding-inline: clamp(24px, 10vw, 200px);
  padding-block: 100px;
  border-radius: 30px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Links als Buttons in .engagement */
.engagement a.button {
  display: inline-flex !important;
  width: auto !important;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  text-decoration: none;
  margin-left: 0; margin-right: 0;
}

/* Mobil Schwarze Cards */
@media (max-width: 810px) {
  .black-content {
    margin-top: 120 !important;
    z-index: 2;
    padding-inline: clamp(12px, 6vw, 24px);
  }
  .black-content p { font-size: 18px; line-height: 140%; }
  .black-content h2 { font-size: 28px; line-height: 30px; margin-bottom: 28px; }
  .black-content h3 { font-size: 18px; line-height: 20px; margin-bottom: 4px; }
  .black-content-card { padding: 40px 24px 0 24px; }
}

/* ——— Resonanzraum (Video Carousel mit Audio) ————————————————— */

.resonanzraum {
  position: relative;
  z-index: 3;
  color: white;
  background-color: transparent;
  padding-inline: clamp(12px, 10vw, 200px);
  padding-block: clamp(10px, 10vh, 0px);
  margin-top: 0;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
.resonanzraum p {
  font-family: PTMono, monospace;
  font-size: 20px;
  font-weight: 300;
  line-height: 140%;
  margin-top: 0;
  margin-bottom: 48px;
}
.resonanzraum h2 {
  font-size: 44px;
  line-height: 46px;
  margin-top: 0;
  margin-bottom: 64px;
}
.resonanzraum h3 {
  font-size: 24px;
  line-height: 26px;
  color: #FF1E22;
  margin-top: 0;
  margin-bottom: 24px;
}

.resonanzraum-card {
  position: relative;
  background-color: black;
  color: white;
  padding-inline: clamp(24px, 10vw, 200px);
  padding-block: 100px;
  border-radius: 30px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
  position: relative;
  -webkit-font-smoothing: antialiased;
  --rr-stage-h: clamp(380px, 90vh, 860px);
}

/* Stage */
.rr-carousel {
  position: relative;
  height: var(--rr-stage-h);
  max-width: 1280px;
  margin: 120px auto;
  overflow: hidden; /* keine Scrollbar */
}

/* Slides */
.rr-slide,
.rr-slide.active {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.rr-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Media-Wrapper */
.rr-media {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

/* Video immer contain → kein Beschnitt, keine Sprünge */
.rr-media video{
  height: 100%;
  width: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

/* Linke UI: Label + Sound */
.rr-left-ui{
  position: absolute;
  /* top setzt das JS; horizontaler Offset via transform */
  left: 0;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 40;
  transform: translateX(calc(-100% + 184px)); /* raus aus dem Card-Body, ohne Layout zu vergrößern */
}
.rr-label{
  display: inline-flex;
  align-items: center;
  justify-content: left;
  width:164px;
  height: 104px;
  padding: 0 20px;
  background: #FF1E22;
  color: #000;
  font-family: PTMono, monospace;
  font-size: 24px;
  line-height: 1;
  border: 0;
  border-radius: 0;
  white-space: nowrap;
  user-select: none;
}
.rr-sound{
  width: 204px;
  height: 38px;
  border: 0;
  padding: 0;
  background: url("../assets/sound-off.svg") left/100% no-repeat;
  cursor: pointer;
}
.rr-sound.is-on{ background-image: url("../assets/sound-on.svg"); }

/* Rechte Navigation */
.rr-nav{
  position: absolute;
  right: 0;
  width: 75px; height: 104px;
  border: 0; padding: 0;
  background: url("../assets/carousel-next.svg") center/contain no-repeat;
  cursor: pointer; z-index: 40;
  transform: translateX(calc(100% - 60px));
}
.rr-nav:hover, .rr-sound:hover{ filter: brightness(1.08); }

/* Optionale Caption unter Stage */
.rr-caption{
  max-width: 900px;
  margin: 28px auto 0;
  padding-inline: 0;
  color: #fff;
}

/* Responsive UI-Positionierung */
@media (max-width: 1200px){
  :root {
    --rr-ui-offset: 12px; /* Abstand nach außen nur für Mobile */
  }

  .rr-left-ui{ transform: translateX(calc(-100% + 180px)); }
  .rr-nav    { transform: translateX(calc(100% - 40px)); }
}

@media (max-width: 810px){
  :root {
    --rr-ui-offset: 124px; /* Abstand nach außen nur für Mobile */
    --rr-nav-offset: 24px; /* Abstand nach außen nur für Mobile */
  }
  .rr-left-ui{
    gap: 4px;
    transform: translateX(calc(-100% + var(--rr-ui-offset)));
  }
  .rr-nav{
    width: 50px; height: 70px;
    transform: translateX(calc(100% - var(--rr-nav-offset)));
  }


  .resonanzraum-card{ --rr-stage-h: clamp(320px, 64vh, 640px); }
  .resonanzraum {
    margin-top: 0 !important;
    z-index: 2;
    padding-inline: clamp(12px, 6vw, 24px);
    padding-block: clamp(0px, 12vh, 0px);
  }
  .resonanzraum p { font-size: 18px; line-height: 140%; }
  .resonanzraum h2 { font-size: 24px; line-height: 26px; margin-bottom: 28px; }
  .resonanzraum h3 { font-size: 20px; line-height: 22px; margin-bottom: 16px; }
  .resonanzraum-card { padding: 40px 24px 0 24px; }

  
  .rr-label { height: 84px; width: 120px; padding: 0 16px; font-size: 16px; }
  .rr-sound { width: 152px; background-size: 100%; }
}

@media (max-width: 810px) {
  /* Stage im Hochformat (2:3) */
  .rr-carousel {
    width: 100vw;
    height: auto;
    aspect-ratio: 2 / 3;  /* Container selber im Format */
    margin: 120px 0 0;            /* kein Außenabstand */
  }

  /* Media-Wrapper füllt den Container */
  .rr-media {
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  /* Video skaliert auf volle Höhe → links/rechts crop */
  .rr-media video {
    width: auto;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}



/* ==========================================================
   Fullscreen-Image Modul
   - Bild füllt immer die gesamte Breite
   - Höhe richtet sich automatisch nach dem Seitenverhältnis
   - Ab <= 810px greift <picture> und zeigt das mobile Bild
   - Reveal: fade + slide-in, wenn in den Viewport gescrollt
   ========================================================== */


#random-picture img {
  opacity: 1;
  transition: opacity 0.8s ease;
  transform: scale(1);
}

#random-picture img.scaling {
  animation: zoomIn 5s linear forwards;
}

@keyframes zoomIn {
  from { transform: scale(1); }
  to   { transform: scale(1.04); }
}

.fullscreen-image {
  width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;              /* verhindert Lücken durch inline-img */
  background: #000;            /* optional Hintergrundfarbe */
  overflow: hidden;            /* keine Überstände */
}

/* Bild immer 100% breit, Höhe automatisch */
.fullscreen-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;         /* zeigt das gesamte Bild */
}

/* Reveal-Animation */
.fullscreen-image.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
  will-change: opacity, transform;
}

.fullscreen-image.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Bewegungsreduktion respektieren */
@media (prefers-reduced-motion: reduce) {
  .fullscreen-image.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


/* Teaser –————————————————————————————————————————————————————————————————————————————————————————————————————*/

.teaser-section {
  width: 100%;
  background: #F6F6F6;
  padding: 120px 0 120px 0;
}

.teaser-wrapper {
  width: 50%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.teaser-box {
  background-color: black;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.teaser-image {
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  position: relative;
}

.teaser-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease; /* smooth scaling */
}

.teaser-separator {
  width: 100%;
  height: 1px;
  background-color: #FF1E22;
}

.teaser-label {
  font-family: PTMono, monospace;
  font-size: 16px;
  line-height: 120%;
  color: white;
  text-align: center;
  padding: 32px 0;
  margin: 0;
  transition: color 0.3s ease; /* smooth color change */
}

/* Hover Effekt */
.teaser-box:hover .teaser-image img {
  transform: scale(1.05);
}

.teaser-box:hover .teaser-label {
  color: #FF1E22;
}


/* Responsive */
@media (max-width: 810px) {
  .teaser-wrapper {
    width: 100%;
    max-width: calc(100% - 48px); /* 24px links + rechts */
    margin: 0 auto;
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .teaser-box {
    width: 100%;
  }
}



/* ——— Buttons (weiß/schwarz Kontexte) ————————————————————————————————————————————————————————————————————————— */

/* === Buttons (Basis + Varianten) ======================================= */
:root {
  --btn-radius: 100px;
  --btn-h: 72px;
  --btn-pad-x: 48px;
  --btn-font: PTMono, monospace;
  --btn-red: #FF1E22;
  --btn-black: #000;
  --btn-white: #fff;
}

.button-wrapper {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: left;
  margin-top: 120px;
  margin-bottom: 80px;
  padding: 0;
}

.buttons {
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* Basis für <a class="button ..."> und <button class="button ..."> */
.button {
  font-family: var(--btn-font);
  font-size: 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);
  padding: 0 var(--btn-pad-x);
  border-radius: var(--btn-radius);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--btn-red) 60%, transparent);
}

/* Primary (schwarz) */
.button.primary {
  color: var(--btn-white);
  background: var(--btn-black);
  border: 4px solid var(--btn-black);
}
.button.primary:hover {
  color: var(--btn-black);
  background: var(--btn-white);
  border-color: var(--btn-white);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.6);
}
.button.primary:visited { color: var(--btn-white); }

/* Primary red */
.button.primary.red {
  color: var(--btn-black);
  background: var(--btn-red);
  border: 4px solid var(--btn-red);
}
.button.primary.red:hover {
  /* Red bleibt stabil (Brand) */
  color: var(--btn-black);
  background: var(--btn-red);
  border-color: var(--btn-red);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.6);
}

/* Secondary (roter Button mit weißem Rand/Text) */
.button.secondary {
  color: var(--btn-white);
  background: var(--btn-red);
  border: 4px solid var(--btn-white);
}
.button.secondary:hover {
  color: var(--btn-white);
  background: var(--btn-red);
  border-color: var(--btn-white);
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.6);
}

/* Buttons in weißen Cards: niemals 100% Breite */
.gallery-content-card .dwtd-slide-caption a.button,
.gallery-content-card a.button {
  display: inline-flex !important;
  width: auto !important;
  max-width: 100%;
  text-decoration: none;
  white-space: nowrap;
}

/* Responsive Tweaks */
@media (max-width: 810px) {
  .button-wrapper { margin-top: 60px; }
  .buttons { font-size: 18px; gap: 20px; }
  .button { font-size: 16px; height: 48px; padding: 0 24px; }
}


.content { opacity: 1 !important; transform: none !important; }
