/* ==========================================================
   RE4 VR - gemeinsame Stile für alle Seiten
   ========================================================== */

/* Big Shoulders Display, selbst gehostet (SIL Open Font License,
   Lizenztext liegt als OFL-BigShoulders.txt daneben).
   Nur fuer Ueberschriften und Menue - Fliesstext bleibt Systemschrift. */
@font-face{
  font-family: "Big Shoulders";
  src: url("big-shoulders-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face{
  font-family: "Big Shoulders";
  src: url("big-shoulders-extrabold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

/* Titelschrift - nur fuer die grossen Seitentitel (INFO, FEATURES, ...) */
@font-face{
  font-family: "RE4 Title";
  src: url("re4-title.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root{
  --display: "Big Shoulders", "Trebuchet MS", "Segoe UI", sans-serif;
  --title:   "RE4 Title", "Big Shoulders", "Trebuchet MS", sans-serif;
}

:root{
  --ink:   #070605;
  --bone:  #efe9dd;
  --blood: #b3151b;
  --ember: #e07a2b;

  /* Breite des Trailers. Der dritte Wert begrenzt die Höhe. */
  --player-w: min(30vw, 460px, 46vh);
}

*{ box-sizing: border-box; margin: 0; padding: 0; }

html{ background: var(--ink); scroll-behavior: smooth; }

body{
  color: var(--bone);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  background: var(--ink);
  overflow-x: hidden;
}

/* ---------- Ebene 0: Artwork ---------- */
.bg{
  position: fixed;
  inset: 0;
  z-index: 0;
  /* oben buendig, unten wird beschnitten */
  background: url("re4vr-bg.jpg") center top / cover no-repeat;
  transform-origin: 52% 0%;
  animation: kenburns 46s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes kenburns{
  from{ transform: scale(1.02); }
  to  { transform: scale(1.10); }
}

/* ---------- Ebene 1: Feuerschein ---------- */
.glow{
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(ellipse 42% 38% at 52% 76%,
              rgba(255,138,42,.22) 0%,
              rgba(255,110,30,.10) 45%,
              rgba(255,110,30,0)   72%);
  animation: flicker 7s ease-in-out infinite;
}
@keyframes flicker{
  0%{opacity:.55} 12%{opacity:.9}  21%{opacity:.6}  34%{opacity:1}
  48%{opacity:.7} 61%{opacity:.95} 73%{opacity:.62} 86%{opacity:.9} 100%{opacity:.58}
}

/* ---------- Ebene 2: Verlauf ---------- */
body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to top,    rgba(7,6,5,.88) 0%, rgba(7,6,5,.5) 22%, rgba(7,6,5,0) 45%),
    linear-gradient(to bottom, rgba(7,6,5,.6)  0%, rgba(7,6,5,0)  35%);
}
/* Unterseiten: eigenes, ruhigeres Motiv - gerade noch erkennbar,
   damit es den Text nicht stoert. Deckkraft ueber .page::before regeln. */
.page .bg{
  background-image: url("page-bg.jpg");
  background-position: center top;
  animation-duration: 90s;
}
.page::before{
  background: rgba(7,6,5,.72);
}

/* ---------- Ebene 3: Filmkorn ---------- */
.grain{
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  z-index: 3;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  animation: grain .9s steps(5) infinite;
  will-change: transform;
}
@keyframes grain{
  0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)}
  40%{transform:translate(2%,-3%)} 60%{transform:translate(-2%,-2%)}
  80%{transform:translate(3%,1%)} 100%{transform:translate(0,0)}
}

/* ---------- Ebene 4: Regen ----------
   Liegt vor dem Hintergrund, aber hinter Navigation und Textfeld -
   der Effekt trifft also nur den Hintergrund. */
.rain{
  position: fixed;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Navigation ---------- */
.nav{
  position: sticky;
  top: 0;
  z-index: 6;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 3.2rem);
  padding: clamp(1rem, 2vh, 1.6rem) 5vw;
  background: linear-gradient(rgba(7,6,5,.9), rgba(7,6,5,0));
  backdrop-filter: blur(3px);
}
.nav a{
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(.9rem, 1.5vw, 1.25rem);
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(239,233,221,.68);
  padding: .3em 0;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav a:hover, .nav a:focus-visible{ color: #fff; border-color: var(--blood); }

/* Haus-Symbol statt "Home" - spart Platz auf schmalen Displays */
.nav-home{ display: inline-flex; align-items: center; }
.nav-home svg{ display: block; width: 1.15rem; height: 1.15rem; }

@media (max-width: 520px){
  .nav{ gap: 1.05rem; padding: .9rem 4vw; }
  .nav a{ font-size: .7rem; letter-spacing: .13em; }
  .nav-home svg{ width: 1.05rem; height: 1.05rem; }
}
.nav a.is-current{ color: #fff; border-color: var(--blood); }

/* ---------- Startseite ---------- */
.hero{
  min-height: calc(100svh - 3.6rem);
  display: grid;
  align-content: start;
  justify-items: center;
  row-gap: clamp(.9rem, 2.2vh, 1.8rem);
  padding: 0 5vw 3vh;
}

.player{
  position: relative;
  z-index: 5;
  width: var(--player-w);
  padding: clamp(5px, .55vmin, 9px);          /* Passepartout um das Video */
  background: rgba(7,6,5,.6);
  border: 1px solid rgba(239,233,221,.26);
  border-radius: 12px;
  backdrop-filter: blur(3px);
  box-shadow:
    0 26px 70px -26px rgba(0,0,0,.95),        /* Tiefe, hebt es vom Bild ab */
    0 0 70px -28px rgba(224,122,43,.55);      /* leichter Feuerschein */
}

.player-inner{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(239,233,221,.16);
}
.player-inner iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stack{
  position: relative;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: .45rem;
  text-align: center;
}

.download{
  display: block;
  position: relative;
  padding: clamp(.28rem, .7vmin, .45rem) clamp(.4rem, 1vmin, .65rem);
  background: rgba(7,6,5,.55);
  border: 1px solid rgba(239,233,221,.7);
  backdrop-filter: blur(2px);
  box-shadow: 0 0 45px -14px rgba(224,122,43,.6);
  transition: background .2s ease, border-color .2s ease,
              box-shadow .2s ease, transform .2s ease;
}
.download img{
  display: block;
  width: min(20vw, 235px);
  height: auto;
  filter: drop-shadow(0 0 6px rgba(179,21,27,.45));
  transition: filter .2s ease;
}
.download:hover, .download:focus-visible{
  background: rgba(179,21,27,.14);
  border-color: var(--blood);
  box-shadow: 0 0 60px -10px rgba(224,122,43,.85);
  transform: translateY(-2px);
}
.download:hover img, .download:focus-visible img{
  filter: brightness(1.45) drop-shadow(0 0 14px rgba(179,21,27,.8));
}
.download:active{ transform: translateY(0); }

/* Noch nicht freigegeben */
.download.is-soon{
  cursor: default;
  border-color: rgba(239,233,221,.28);
  box-shadow: none;
  background: rgba(7,6,5,.45);
}
.download.is-soon img{ filter: brightness(.62); }
.download.is-soon:hover{
  transform: none;
  background: rgba(7,6,5,.45);
  border-color: rgba(239,233,221,.28);
  box-shadow: none;
}
.download.is-soon:hover img{ filter: brightness(.62); }

/* "Coming Soon" liegt auf dem Button. Sobald in download.js eine Adresse
   steht, faellt die Klasse is-soon weg und der Text verschwindet mit ihr. */
.soon{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1rem, 2.6vw, 1.7rem);
  letter-spacing: .26em;
  text-indent: .26em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 2px 5px rgba(0,0,0,.95),
    0 0 20px rgba(0,0,0,.85),
    0 0 40px rgba(0,0,0,.7);
  pointer-events: none;
}
.download:not(.is-soon) .soon{ display: none; }

/* Countdown auf der Startseite */
.countdown{
  display: flex;
  gap: clamp(.9rem, 2.4vw, 1.9rem);
  margin-top: .3rem;
}
.countdown > div{
  display: grid;
  justify-items: center;
  gap: .1rem;
}
.countdown b{
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 22px rgba(0,0,0,.7);
}
.countdown span{
  font-family: var(--display);
  font-weight: 600;
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(239,233,221,.55);
}
.cd-date{
  font-family: var(--display);
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(224,122,43,.85);
}

.credit{
  font-family: var(--display);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(239,233,221,.6);
}

.note{
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(239,233,221,.5);
}

:focus-visible{ outline: 2px solid var(--bone); outline-offset: 5px; }

/* ---------- Unterseiten ---------- */
.section{
  position: relative;
  z-index: 5;
  max-width: 58rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vh, 3rem) 5vw clamp(2rem, 5vh, 4rem);
}
.panel{
  padding: clamp(1.6rem, 4.5vw, 3.2rem);
  background: rgba(7,6,5,.86);
  border: 1px solid rgba(239,233,221,.15);
  border-radius: 10px;
  backdrop-filter: blur(6px);
}
.panel h1.title{ text-align: center; }
.panel h1 .word{ position: relative; display: inline-block; }
.panel h1 .ver{
  font-family: var(--display);
  position: absolute;           /* haengt daneben, ohne die Mitte zu verschieben */
  left: calc(100% + .55em);
  bottom: .3em;
  font-size: .3em;
  font-weight: 700;
  letter-spacing: .22em;
  white-space: nowrap;
  color: var(--ember);
}
.lead.centered{ text-align: center; }

@media (max-width: 620px){
  .panel h1 .ver{
    position: static;
    display: block;
    margin-top: .6rem;
    font-size: .34em;
  }
}

.panel h1{
  margin-bottom: .5rem;
  font-family: var(--title);
  font-size: clamp(2.4rem, 7.5vw, 4.2rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .06em;
  text-transform: uppercase;
}
/* Erster Buchstabe im Logo-Rot.
   Die zweite Zeile ist fuer Titel, die wegen des Versionshinweises
   in einem <span class="word"> stecken - dort greift die erste nicht. */
.panel h1::first-letter{ color: var(--blood); }
.panel h1 .word::first-letter{ color: var(--blood); }

/* Die Titelbox nur so breit wie die Schrift selbst, damit die Aeste an den
   Buchstaben kleben. Zentriert bleibt sie ueber die Raender. */
.panel h1{ width: fit-content; max-width: 100%; position: relative; }
.panel h1.title{ margin-left: auto; margin-right: auto; }

/* Aeste, die durch die Ueberschrift kriechen. Das SVG setzt branches.js
   in jede h1; hier steht nur, wie es liegt und wie die Pfade wachsen. */
/* multiply sorgt dafuer, dass die schwarzen Aeste nur auf den hellen
   Buchstaben zu sehen sind - auf dem dunklen Panel verschwinden sie. */
.h1-branches{
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;      /* nichts ragt ueber die Titelzeile hinaus */
  pointer-events: none;
  mix-blend-mode: multiply;
}
.h1-branches path{
  fill: none;
  stroke: #000;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (prefers-reduced-motion: no-preference){
  /* Der Ast waechst einmal herein und bleibt dann stehen. */
  .h1-branches path{
    stroke-dasharray: var(--len);
    stroke-dashoffset: var(--len);
    animation: branchGrow var(--dur, 2.6s) ease-out var(--delay, 0s) forwards;
  }
  @keyframes branchGrow{ to{ stroke-dashoffset: 0; } }
}

.panel h1 + .lead.nolinie{ border-bottom: 0; padding-bottom: 0; margin-bottom: 1.2rem; }

.panel h1 + .lead{
  margin-bottom: 2.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(179,21,27,.6);
  font-size: 1.02rem;
  color: rgba(239,233,221,.72);
}
.panel h2{
  margin: 2.8rem 0 1.1rem;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3.1vw, 1.65rem);
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
}
.panel h1 + h2, .panel .lead + h2{ margin-top: 0; }
.panel ul + h2, .panel ol + h2{ margin-top: 3.4rem; }
.panel ul, .panel ol{ margin-bottom: 2rem; }
.panel h2 .num{
  display: block;
  margin-bottom: .35rem;
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--blood);
}
.panel h3{
  margin: 1.8rem 0 .6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ember);
}
.panel p, .panel li{
  font-size: .97rem;
  line-height: 1.8;
  color: rgba(239,233,221,.84);
}
.panel p + p{ margin-top: 1rem; }
.panel ul, .panel ol{ margin: .8rem 0 0 1.3rem; }
.panel li{ margin-bottom: .55rem; }
.panel li::marker{ color: var(--blood); }
.panel a{ color: var(--ember); }
.panel strong{ color: #fff; }
.panel code{
  font-family: Consolas, "Courier New", monospace;
  font-size: .88em;
  padding: .1em .4em;
  background: rgba(239,233,221,.08);
  border-radius: 3px;
}
.panel .closing{
  margin-top: 1.6rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(239,233,221,.12);
  font-style: italic;
  color: rgba(239,233,221,.66);
}

/* Download-Link auf Unterseiten */
.dl-link{
  display: inline-block;
  margin: .9rem 0 .2rem;
  padding: .8em 1.8em;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone);
  background: rgba(179,21,27,.16);
  border: 1px solid var(--blood);
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.dl-link:hover, .dl-link:focus-visible{ background: var(--blood); color: #fff; }
.dl-link.is-soon{
  cursor: default;
  color: rgba(239,233,221,.45);
  background: rgba(239,233,221,.05);
  border-color: rgba(239,233,221,.22);
}
.dl-link.is-soon:hover{
  background: rgba(239,233,221,.05);
  color: rgba(239,233,221,.45);
}

/* Installationsschritte */
.steps{ margin: 1.4rem 0 0 1.3rem; }
.steps > li{ margin-bottom: 1.6rem; }
.steps > li > strong{
  display: block;
  margin-bottom: .3rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .04em;
  color: #fff;
}
.steps ul{ margin-top: .6rem; }

/* Bindings-Bild */
.chart{ margin: 0 0 2.4rem; }
.chart a{ display: block; }
.chart img{
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(239,233,221,.15);
  border-radius: 8px;
}
.chart figcaption{
  margin-top: .7rem;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(239,233,221,.45);
  text-align: center;
}

/* Zusaetzlicher Abstand zwischen zwei Absaetzen */
.panel .spacer{ height: 1.4rem; }

/* Schlusssatz ohne Trennlinie darueber */
.panel .closing.plain{ border-top: 0; padding-top: 0; }

/* Sprungleiste unter der Seitenueberschrift */
.jump{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(.8rem, 2.5vw, 2rem);
  margin: 0 0 1.6rem;
}
.jump a{
  font-family: var(--display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(239,233,221,.62);
  padding-bottom: .25em;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.jump a:hover, .jump a:focus-visible{ color: #fff; border-color: var(--blood); }

/* Bereichstitel: Sprungziel nicht unter die Navigation schieben */
.section-title[id]{ scroll-margin-top: 5rem; }

/* mittige Zeile unter einem Bereichstitel */
.panel p.centered{ text-align: center; color: rgba(239,233,221,.7); }
.panel p.subhead{
  margin-top: 2.6rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .1em;
  color: #fff;
}

/* Trennlinie zwischen zwei Bereichen einer Seite */
.rule{
  height: 0;
  margin: 2.6rem 0 2.4rem;
  border: 0;
  border-top: 1px solid rgba(179,21,27,.6);
}

/* Hervorgehobener Einschub - rote Kante wie die Trennlinien, kein Fettdruck */
.panel p.warn{
  margin: 1.6rem 0;
  padding: .9rem 1.1rem;
  border-left: 2px solid var(--blood);
  background: rgba(179,21,27,.07);
}
.panel p.warn .warn-strong{
  color: var(--blood);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* Bereichstitel in der Titelschrift, mittig wie die Seitenueberschrift */
.panel h2.section-title{
  margin: 0 0 1.6rem;
  font-family: var(--title);
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--bone);
}
.panel .r{ color: var(--blood); }

/* FAQ - aufklappbare Fragen */
.faq{ margin-top: 1.6rem; }
.faq details{
  border-bottom: 1px solid rgba(239,233,221,.12);
}
.faq summary{
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1rem 2.2rem 1rem 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: .04em;
  color: rgba(239,233,221,.9);
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker{ display: none; }
.faq summary:hover, .faq details[open] summary{ color: #fff; }

/* Plus, das sich beim Oeffnen zum Minus dreht */
.faq summary::after{
  content: "";
  position: absolute;
  right: .3rem;
  top: 50%;
  width: 13px;
  height: 13px;
  background:
    linear-gradient(var(--blood), var(--blood)) center/13px 2px no-repeat,
    linear-gradient(var(--blood), var(--blood)) center/2px 13px no-repeat;
  transform: translateY(-50%);
  transition: transform .25s ease;
}
.faq details[open] summary::after{
  background: linear-gradient(var(--blood), var(--blood)) center/13px 2px no-repeat;
  transform: translateY(-50%) rotate(180deg);
}
.faq .answer{
  padding: 0 0 1.3rem;
  font-size: .95rem;
  line-height: 1.8;
  color: rgba(239,233,221,.8);
}
.faq .answer p + p{ margin-top: .8rem; }

@media (prefers-reduced-motion: reduce){
  .faq summary::after{ transition: none; }
}

/* Credits */
.credits{ list-style: none; margin: 1.6rem 0 0; padding: 0; }
.credits li{
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 1.1rem;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(239,233,221,.1);
}

/* Rundes Bild links. Ohne Bild erscheint stattdessen der Anfangsbuchstabe. */
.credits .avatar{
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(179,21,27,.85);

  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: rgba(239,233,221,.5);
}
.credits span.avatar{ background: rgba(239,233,221,.05); }

@media (max-width: 480px){
  .credits li{ grid-template-columns: 44px 1fr; gap: .9rem; }
  .credits .avatar{ width: 44px; height: 44px; font-size: 1.2rem; }
}
.credits b{
  display: block;
  margin-bottom: .15rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: .06em;
  color: #fff;
}
.credits span{
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(239,233,221,.78);
}

/* Optionsliste: Name fett, Erklaerung dahinter */
.options{ margin-top: 1.2rem; }
.options > div{
  padding: .85rem 0;
  border-bottom: 1px solid rgba(239,233,221,.1);
}
.options b{
  display: block;
  margin-bottom: .2rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: .05em;
  color: #fff;
}
.options span{
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(239,233,221,.8);
}

/* Hochkantes Bild, z.B. das Optionsmenue */
.shot-tall{ margin: 1.4rem 0 2rem; }
.shot-tall img{
  display: block;
  width: 100%;
  max-width: 420px;
  height: auto;
  margin: 0 auto;
  border: 1px solid rgba(239,233,221,.18);
  border-radius: 8px;
}
.shot-tall figcaption{
  margin-top: .7rem;
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(239,233,221,.45);
  text-align: center;
}

/* Galerie */
.gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.gallery a{ display: block; }
.gallery img{
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid rgba(239,233,221,.15);
  border-radius: 8px;
  transition: border-color .2s ease, transform .2s ease;
}
.gallery a:hover img{ border-color: var(--blood); transform: translateY(-2px); }

.videos{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
  margin-bottom: 2.6rem;
}
.video{ margin-top: 1.4rem; }
.video-frame{
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid rgba(239,233,221,.2);
  border-radius: 8px;
  overflow: hidden;
}
.video-frame iframe{ position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption{
  margin-top: .6rem;
  font-size: .8rem;
  letter-spacing: .1em;
  color: rgba(239,233,221,.55);
}

/* Tastenbelegung */
.binds{
  display: grid;
  grid-template-columns: minmax(9rem, 15rem) 1fr;
  gap: .1rem 1.5rem;
  margin-top: .8rem;
}
.binds dt{
  padding: .55rem 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  border-bottom: 1px solid rgba(239,233,221,.1);
}
.binds dd{
  padding: .55rem 0;
  font-size: .93rem;
  color: rgba(239,233,221,.75);
  border-bottom: 1px solid rgba(239,233,221,.1);
}
@media (max-width: 600px){
  .binds{ grid-template-columns: 1fr; gap: 0; }
  .binds dt{ border-bottom: 0; padding-bottom: .1rem; }
  .binds dd{ margin-bottom: .4rem; }
}

.totop{
  display: block;
  position: relative;
  z-index: 5;
  padding: 0 5vw 3.5rem;
  text-align: center;
  font-size: .74rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(239,233,221,.45);
}
.totop:hover{ color: var(--bone); }

/* ---------- Intro-Blende ---------- */
.curtain{
  position: fixed;
  inset: 0;
  z-index: 9;
  background: var(--ink);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference){
  .curtain{ animation: curtainOut 1.7s ease .15s forwards; }
  @keyframes curtainOut{ to{ opacity: 0; visibility: hidden; } }

  .nav, .player, .stack{ opacity: 0; animation: rise 1.2s ease 1.05s forwards; }
  @keyframes rise{
    from{ opacity: 0; transform: translateY(16px); }
    to  { opacity: 1; transform: none; }
  }
  .page .nav{ animation-delay: .05s; animation-duration: .6s; }

  /* Unterseiten: derselbe Auftakt wie die Startseite, nur kuerzer.
     Der Vorhang haengt hier am ::after des body - kein eigenes div noetig. */
  .page::after{
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9;
    background: var(--ink);
    pointer-events: none;
    animation: curtainOut .55s ease .03s forwards;
  }
  .page .section{ opacity: 0; animation: rise .6s ease .12s forwards; }
  .page .totop{ opacity: 0; animation: rise .6s ease .28s forwards; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .curtain, .rain, .grain{ display: none; }
  .bg, .glow, .panel h1{ animation: none; }
  .download, .download img{ transition: none; }
  .download:hover{ transform: none; }
}

/* ---------- Querformat: Gruppe kompakt ueber den Schriftzug ----------
   Alle Groessen an die Fensterhoehe gekoppelt, damit Trailer, Button und
   "Coming Soon" zusammen in das Band ueber dem Logo passen.
   Zu wenig Platz? Die 32vh beim Trailer verkleinern. */
@media (min-aspect-ratio: 1/1){
  :root{ --player-w: min(28vw, 440px, 32vh); }

  /* Trailer oben, Button unten am Bildrand */
  .hero{
    align-content: space-between;
    row-gap: 2vh;
    padding-top: clamp(2rem, 12vh, 7rem);      /* Trailer tiefer setzen */
    padding-bottom: clamp(1.5rem, 5vh, 3rem);
  }
  .stack{ gap: clamp(.4rem, 1vh, .7rem); }

  .download{
    padding: clamp(.4rem, 1vmin, .7rem) clamp(.6rem, 1.4vmin, 1rem);
  }
  .download img{ width: min(30vw, 400px); }
  .note{ font-size: clamp(.62rem, 1.4vh, .78rem); }
  /* "Coming Soon" liegt auf dem Button. Sobald in download.js eine Adresse
   steht, faellt die Klasse is-soon weg und der Text verschwindet mit ihr. */
.soon{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1rem, 2.6vw, 1.7rem);
  letter-spacing: .26em;
  text-indent: .26em;
  text-transform: uppercase;
  color: #fff;
  text-shadow:
    0 2px 5px rgba(0,0,0,.95),
    0 0 20px rgba(0,0,0,.85),
    0 0 40px rgba(0,0,0,.7);
  pointer-events: none;
}
.download:not(.is-soon) .soon{ display: none; }

/* Countdown auf der Startseite */
.countdown{
  display: flex;
  gap: clamp(.9rem, 2.4vw, 1.9rem);
  margin-top: .3rem;
}
.countdown > div{
  display: grid;
  justify-items: center;
  gap: .1rem;
}
.countdown b{
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1;
  min-width: 2ch;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.9), 0 0 22px rgba(0,0,0,.7);
}
.countdown span{
  font-family: var(--display);
  font-weight: 600;
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(239,233,221,.55);
}
.cd-date{
  font-family: var(--display);
  font-weight: 600;
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(224,122,43,.85);
}

.credit{ font-size: clamp(.66rem, 1.6vh, .9rem); }
}

/* ---------- Hochkant / schmale Displays ---------- */
@media (max-aspect-ratio: 1/1){
  :root{ --player-w: min(66vw, 340px); }
  .hero{
    align-content: space-between;
    row-gap: 3vh;
    padding-bottom: clamp(2rem, 7vh, 4rem);
  }
  .page .bg{ background-image: url("page-bg-portrait.jpg"); }

  .bg{
    /* eigenes Hochkant-Motiv, formatfuellend */
    background-image: url("re4vr-bg-portrait.jpg");
    background-size: cover;
    background-position: center 45%;
    transform-origin: center 45%;
    animation-name: kenburnsPortrait;
  }
  @keyframes kenburnsPortrait{
    from{ transform: scale(1); }
    to  { transform: scale(1.05); }
  }
  .download img{ width: min(52vw, 275px); }
}
