/* =======================================================================
   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 {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background: black !important;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

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

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

h1 { font-family: PTMono, monospace; }
h2 { font-family: PTMono, monospace; }
h3 { font-family: PTMono, monospace; }
p { 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; }

@media (max-width: 810px) {
  .spacer-120 { height: 40px; width: 100%; display: block; }
  .spacer-240 { height: 80px; 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.001; /* kein Layout-Shift aber unsichtbar */
  transform: translateY(24px);
  will-change: opacity, transform;
  transition:
    opacity .6s ease-out,
    transform .6s ease-out;
  backface-visibility: hidden;
}

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

/* 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 */
.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;
}

.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;
}



/* ——— 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: 10vh;
  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 h2 {
  font-size: 44px;
  line-height: 46px;
  margin-top: 120px;
  margin-bottom: 64px;
}

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

.content h3 {
  font-size: 32px;
  line-height: 32px;
  color: black;
  margin-top: 48px;
  margin-bottom: 16px;
}

.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;
}

.card-image {
  margin: 80px 0;     /* Bild über Padding hinausziehen */
  overflow: hidden;         /* Beschneiden links/rechts */
  border-radius: 8px;      /* optional, falls Kanten rund sein sollen */
}

.card-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;        /* Beschneidet Überbreite */
}

.card-image figcaption {
  font-family: PTMono, monospace;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
  background: #000;
  padding: 8px 24px;
  margin-top: 0;
}

/* ——— 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); }
}

@media (max-width: 810px) {
  .engagement { width: 282px; }
  .engagement-logo { width: 282px; margin-left: 0; }
  .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 h2 { font-size: 32px; line-height: 34px; margin-bottom:16px }
  .content p { font-size: 20px; line-height: 28px; }
  .card { padding: 120px 24px 120px 24px; }
}

@media (max-width: 420px) {
  .engagement-logo { width: 220px; height: auto; }
}

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




/* ——— 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: 0px;
  padding-block: 0px;
  border-radius: 30px;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: visible;
  position: relative;
  -webkit-font-smoothing: antialiased;
  --rr-stage-h: clamp(380px, 80vh, 860px);
}

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

/* Slides */
.rr-slide,
.rr-slide.active {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 3.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, 72vh, 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 0px 0 0px; }

  
  .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;
  }
}




/* ——— 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: 0px;
  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; }
}




/* ==========================================================
   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;
  visibility: visible;
  transition: opacity 0.8s ease, visibility 0s linear 0.8s; 
  transform: scale(1);
  backface-visibility: hidden;   /* Safari Ghosting Fix */
  will-change: opacity, transform;
}

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

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

.fullscreen-image {
  z-index: 999;
  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-color: #fff;
  padding: 120px 0 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: white;
  background: black;
  border: 4px solid black;
}
.button.primary:hover {
  color: white;
  background: black;
  border-color: black;
  transform: translateY(-4px);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.6);
}
.button.primary:visited { color: 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; }
