/* CCDE Präsentation – Offline-Webversion
   Gestaltung angelehnt an ccde.net (Farben/Schriften laut CCDE_Styleguide_Praesentation.md) */

@font-face { font-family: "Inter"; font-weight: 300; font-style: normal; src: url("../fonts/inter-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 300; src: url("../fonts/IBMPlexMono-Light.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; src: url("../fonts/IBMPlexMono-Medium.ttf") format("truetype"); }

:root {
  --primary: #1a2bc3;
  --primary-dark: #080e4a;
  --primary-bright: #223dd3;
  --accent: #45cdff;
  --ink: #0a0a0a;
  --white: #ffffff;
  --bright-gray: #f4f4f4;
  --muted-fg: #bebebe;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, .7, .2, 1);
  /* Bühne 1920 × 1080, Video-Spalte = Blender-Kamera-Crop x 58,1–100 % */
  --col-x: 1115.5px;
  --col-w: 804.5px;
  --header-h: 112px;
  --pad-x: 108px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; background: #000; overflow: hidden; }
body { font-family: var(--sans); color: var(--white); -webkit-font-smoothing: antialiased; }
body.idle { cursor: none; }

/* ---------- Bühne (skaliert auf Fenstergröße, 16:9) ---------- */
#stage {
  position: fixed; left: 50%; top: 50%;   /* fixed: verhindert, dass Mobil-Browser die Seite herauszoomen */
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
  background-color: #1b1b1b;
  background-image: conic-gradient(from 90deg at 80%, #000 0deg, #4f4f4f 360deg);
}

/* ---------- Kopfleiste ---------- */
.site-header {
  position: absolute; z-index: 20; left: 0; top: 0; width: 100%; height: var(--header-h);
  background: var(--primary);
  display: flex; align-items: center; padding: 0 var(--pad-x);
}
.logo-btn { background: none; border: 0; padding: 0; cursor: pointer; display: block; }
button:focus:not(:focus-visible) { outline: none; }
.site-header .logo { height: 63px; width: auto; display: block; }
.site-header nav { position: relative; margin-left: auto; display: flex; align-items: center; gap: 44px; height: 100%; }
.nav-item {
  position: relative; height: 100%; display: flex; align-items: center;
  font-family: var(--mono); font-size: 16px; letter-spacing: .02em; text-transform: uppercase;
  color: rgba(255,255,255,.72); background: none; border: 0; cursor: pointer;
  transition: color .3s var(--ease);
}
.nav-item:hover, .nav-item.active { color: var(--white); }
/* Aktiv-Indikator: ein einziges Element, das zur aktiven Navigation wandert */
.nav-indicator {
  position: absolute; left: 0; bottom: 0; width: 132px; height: 5px; overflow: hidden; color: var(--white); /* Wrapper schneidet das 7px-SVG unten um 2px ab */
  pointer-events: none; opacity: 0;
  transition: transform .65s var(--ease), opacity .35s var(--ease);
}
.nav-indicator svg { display: block; width: 132px; height: 7px; }
.nav-indicator.visible { opacity: 1; }
.nav-indicator.no-anim { transition: none; }
.slide-counter {
  margin-left: 40px; min-width: 150px; height: 54px; padding: 0 22px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1px solid var(--white); font-family: var(--mono); font-weight: 500; font-size: 16px; letter-spacing: .04em;
}

/* ---------- Folien ---------- */
.slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .7s var(--ease), visibility 0s linear .7s;
}
.slide.active { opacity: 1; visibility: visible; transition: opacity .7s var(--ease), visibility 0s; z-index: 2; }

.slide.light { background: var(--bright-gray); color: var(--ink); }
/* Medienspalte der verlassenen Folie sofort ausblenden (kein Durchscheinen beim schnellen Blättern) */
.slide .media-col { transition: opacity .35s ease; }
.slide:not(.active) .media-col { opacity: 0; transition: opacity .18s ease; }

/* Video-Spalte rechts */
.media-col {
  position: absolute; top: 0; left: var(--col-x); width: var(--col-w); height: 100%;
  background: none; /* Hintergrund der Bühne (Conic-Gradient) läuft durch */
  overflow: hidden;
}
.media-col video, .media-col img.poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-col canvas.seq { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.media-col.seq-on img.poster { display: none; }
/* Feinausrichtung der Animation je Folie (prozentual zur Höhe der Medienspalte) */
.folie-02 .media-col canvas.seq, .folie-02 .media-col img.poster,
.folie-04 .media-col canvas.seq, .folie-04 .media-col img.poster { transform: translateY(10%); }
.media-col video { opacity: 0; transition: opacity .6s var(--ease); }
.media-col video.ready { opacity: 1; }
.media-col .placeholder {
  position: absolute; left: 36px; right: 36px; top: calc(var(--header-h) + 36px); bottom: 36px;
  border: 1px dashed rgba(69,205,255,.5);
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center;
}
.media-col.empty .placeholder { display: flex; }
.placeholder .ph-label { font-family: var(--mono); font-size: 14px; color: var(--accent); letter-spacing: .04em; }
.placeholder .ph-text { font-size: 17px; color: var(--muted-fg); line-height: 1.45; }

/* Textspalte */
.content {
  position: absolute; left: var(--pad-x); top: var(--header-h); bottom: 0; width: 960px;
  display: flex; flex-direction: column; justify-content: center; padding-bottom: 20px;
}
.crumb {
  font-family: var(--mono); font-size: 20px; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 32px;
}
.crumb span { opacity: .55; margin: 0 .45em; }
h1 {
  font-weight: 300; font-size: 72px; line-height: 1.08; letter-spacing: -.018em; max-width: 960px; text-wrap: balance;
}
h1 b { font-weight: 700; }
h1 .nb { white-space: nowrap; }
.sub, .lead, ul.points li { text-wrap: pretty; }
.sub { font-weight: 300; font-size: 31px; line-height: 1.35; margin-top: 24px; max-width: 900px; }
.lead { font-weight: 400; font-size: 25px; line-height: 1.55; margin-top: 32px; max-width: 900px; color: rgba(255,255,255,.92); }
.lead.lead-2 { margin-top: 18px; }
ul.points { list-style: none; margin-top: 44px; display: grid; gap: 18px; max-width: 920px; }
ul.points li { position: relative; padding-left: 44px; font-size: 25px; line-height: 1.42; }
ul.points li::before { /* Check_Icon.svg aus dem CCDE-Iconset, eingefärbt über die Maske */
  content: ""; position: absolute; left: 0; top: .2em; width: 25px; height: 25px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22,5.21c0-.13-.05-.26-.15-.35l-2.71-2.71c-.09-.09-.22-.15-.35-.15H5.21c-.13,0-.26.05-.35.15l-2.71,2.71c-.09.09-.15.22-.15.35v13.59c0,.13.05.26.15.35l2.71,2.71c.09.09.22.15.35.15h13.59c.13,0,.26-.05.35-.15l2.71-2.71c.09-.09.15-.22.15-.35V5.21ZM20,19.5c0,.28-.22.5-.5.5H4.5c-.28,0-.5-.22-.5-.5V6s0-1.5,0-1.5c0-.28.22-.5.5-.5h15c.28,0,.5.22.5.5v15Z'/%3E%3Cpath d='M10.35,14.82c-.2.2-.51.2-.71,0l-3.23-3.23-1.41,1.41,2.85,2.85c.09.09.22.15.35.15h3.59c.13,0,.26-.05.35-.15l6.85-6.85-1.41-1.41-7.23,7.23Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22,5.21c0-.13-.05-.26-.15-.35l-2.71-2.71c-.09-.09-.22-.15-.35-.15H5.21c-.13,0-.26.05-.35.15l-2.71,2.71c-.09.09-.15.22-.15.35v13.59c0,.13.05.26.15.35l2.71,2.71c.09.09.22.15.35.15h13.59c.13,0,.26-.05.35-.15l2.71-2.71c.09-.09.15-.22.15-.35V5.21ZM20,19.5c0,.28-.22.5-.5.5H4.5c-.28,0-.5-.22-.5-.5V6s0-1.5,0-1.5c0-.28.22-.5.5-.5h15c.28,0,.5.22.5.5v15Z'/%3E%3Cpath d='M10.35,14.82c-.2.2-.51.2-.71,0l-3.23-3.23-1.41,1.41,2.85,2.85c.09.09.22.15.35.15h3.59c.13,0,.26-.05.35-.15l6.85-6.85-1.41-1.41-7.23,7.23Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.buttons { display: flex; gap: 16px; margin-top: 46px; }
.btn {
  display: inline-flex; align-items: center; gap: 14px; height: 64px; padding: 0 32px;
  font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: .03em; text-transform: uppercase;
  color: var(--white); border-radius: 2px; border: 1px solid transparent;
}
.btn.primary { background: var(--primary); }
.btn.dark { background: #3a3a3a; }
.btn.outline { border-color: var(--white); }
.btn .arrow { font-family: var(--sans); font-weight: 300; font-size: 22px; }

/* Tag-Bubbles (Folie 1) */
.tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.tag {
  display: inline-flex; align-items: center; height: 46px; padding: 0 22px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06);
  font-family: var(--mono); font-size: 16px; letter-spacing: .03em; text-transform: uppercase; color: rgba(255,255,255,.9);
}

/* Folie 6 (hell) */
.light .crumb { color: var(--primary); }
.cards { display: grid; gap: 10px; margin-top: 30px; max-width: 880px; }
.card {
  display: flex; align-items: center; gap: 22px; padding: 12px 24px; background: var(--white);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}
.card img { width: 44px; height: 44px; flex: none; }
.card .label { font-family: var(--mono); font-size: 13px; color: var(--primary); letter-spacing: .04em; }
.card .txt { font-size: 20px; margin-top: 2px; }
.benefit { display: flex; align-items: flex-start; gap: 16px; margin-top: 40px; max-width: 880px; font-weight: 700; font-size: 22px; }
.benefit img { width: 40px; height: 40px; }
.benefit img { flex: none; margin-top: 2px; }
.benefit span { font-weight: 400; line-height: 1.45; text-wrap: pretty; }
.benefit span b { font-weight: 700; }
.photos {
  position: absolute; left: 1040px; right: var(--pad-x); top: calc(var(--header-h) + 64px); bottom: 64px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1.45fr 1fr; gap: 26px;
}
.photo {
  position: relative; background: #e6e6e6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  clip-path: polygon(28px 0, 100% 0, 100% calc(100% - 28px), calc(100% - 28px) 100%, 0 100%, 0 28px);
  overflow: hidden;
}
.photo.big { grid-column: 1 / 3; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .ph-label { font-family: var(--mono); font-size: 14px; color: var(--primary); letter-spacing: .04em; }
.photo .ph-text { font-size: 17px; color: #555; }

/* Folie 7 */
.ways { display: flex; gap: 48px; margin-top: 40px; }
.way { width: 230px; }
.way img { width: 72px; height: 72px; display: block; margin-bottom: 14px; }
.way span { font-size: 21px; line-height: 1.35; }
.contact {
  margin-top: 40px; padding: 26px 34px; max-width: 900px; background: rgba(255,255,255,.07);
  clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
}
.contact .name { font-weight: 700; font-size: 23px; }
.contact .addr { font-size: 21px; color: var(--muted-fg); margin-top: 6px; }
.contact .tel { font-family: var(--mono); font-size: 20px; color: var(--accent); margin-top: 8px; }

/* ---------- Einblend-Animation beim Betreten ----------
   Gestaffelt über --i (Reihenfolge). Sehr weiche Expo-Out-Kurve, kleine Wege,
   leichte Unschärfe, die sich auflöst. Headline Wort für Wort aus einer Maske. */
:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --stagger: 95ms;
  --start: 320ms;
}
.reveal { opacity: 0; }
.slide.active .reveal {
  --delay: calc(var(--i, 0) * var(--stagger) + var(--start));
  animation: rv-fade 1.25s var(--ease-out) var(--delay) both;
}
@keyframes rv-fade {
  from { opacity: 0; transform: translate3d(0, 18px, 0); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Pfad-Zeile: wischt von links auf */
.slide.active .crumb.reveal { animation-name: rv-wipe; animation-duration: 1.1s; }
@keyframes rv-wipe {
  from { opacity: 0; clip-path: inset(0 100% 0 0); transform: translate3d(-8px, 0, 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}

/* Headline: Wörter steigen gestaffelt aus einer Maske */
h1.reveal { opacity: 1; }
.slide.active h1.reveal { animation: none; }
h1 .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
h1 .wi { display: inline-block; transform: translate3d(0, 105%, 0); opacity: 0; }
.slide.active h1 .wi {
  animation: rv-word 1.15s var(--ease-out) both;
  animation-delay: calc(var(--i, 1) * var(--stagger) + var(--start) + var(--w, 0) * 55ms);
}
@keyframes rv-word {
  0%   { transform: translate3d(0, 105%, 0); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: none; opacity: 1; }
}

/* Listenpunkte: Text gleitet von links, Quadrat skaliert kurz vorher auf */
.slide.active ul.points li.reveal { animation-name: rv-slide; }
@keyframes rv-slide {
  from { opacity: 0; transform: translate3d(-14px, 0, 0); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
ul.points li::before { transform: scale(0); }
.slide.active ul.points li.reveal::before {
  animation: rv-dot .7s var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * var(--stagger) + var(--start) - 60ms);
}
@keyframes rv-dot { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Tags, Karten, Fotos: leichtes Hineinwachsen */
.slide.active .tag.reveal, .slide.active .card.reveal, .slide.active .photo.reveal, .slide.active .contact.reveal { animation-name: rv-grow; }
@keyframes rv-grow {
  from { opacity: 0; transform: translate3d(0, 10px, 0) scale(.97); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Beim Verlassen: Inhalt bleibt stehen und blendet leicht nach oben aus (kein Zurückspringen) */
.slide.leaving .reveal, .slide.leaving h1 .wi { animation: none !important; opacity: 1; transform: none; filter: none; clip-path: none; }
.slide.leaving ul.points li::before { transform: none; }
.slide.leaving .content { transform: translate3d(0, -10px, 0); opacity: 0; transition: transform .7s var(--ease-out), opacity .5s ease; }

/* Hinweis: Absichtlich KEINE Abschaltung bei „prefers-reduced-motion“. Windows meldet diese Einstellung,
   sobald unter Einstellungen › Barrierefreiheit › Visuelle Effekte die „Animationseffekte“ aus sind
   (häufig auf Firmen-/Präsentationsrechnern) – dann liefen Logo- und Textanimationen nicht. */

/* ---------- Vollbild-Button ---------- */
/* Steuerleiste unten rechts (Pause-Anzeige, Vollbild, Touch-Pfeile) */
.ctrl-bar {
  position: absolute; z-index: 25; right: 40px; bottom: 36px;
  display: flex; align-items: center; gap: 12px;
}
.fs-btn {
  width: 58px; height: 58px; flex: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--white); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 2px;
  transition: background .3s var(--ease), opacity .3s var(--ease);
}
.fs-btn:hover { background: var(--primary); border-color: var(--primary); }
.light-active .fs-btn { color: var(--ink); border-color: rgba(10,10,10,.25); background: rgba(10,10,10,.05); }
.light-active .fs-btn:hover { color: var(--white); }
body.is-fullscreen .fs-btn { display: none; }

/* ---------- Pause-Anzeige (Leertaste) ---------- */
.pause-badge {
  height: 58px; padding: 0 22px; flex: none;
  display: flex; align-items: center; gap: 12px; pointer-events: none;
  font-family: var(--mono); font-size: 15px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--white); background: rgba(10,10,10,.55); border: 1px solid rgba(255,255,255,.25); border-radius: 2px;
  opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .5s var(--ease-out, ease);
}
body.is-paused .pause-badge { opacity: 1; transform: none; }
.light-active .pause-badge { color: var(--ink); background: rgba(255,255,255,.7); border-color: rgba(10,10,10,.25); }

/* ---------- Pfeil-Navigation für Touch-Geräte ---------- */
.nav-arrow {
  display: none; width: 110px; height: 110px; flex: none; align-items: center; justify-content: center; cursor: pointer;
  color: var(--white); background: rgba(10,10,10,.45); border: 1px solid rgba(255,255,255,.3); border-radius: 2px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background .25s ease, opacity .3s ease, transform .15s ease;
}
.nav-arrow svg { width: 44px; height: 44px; }
.nav-arrow:focus { outline: none; }
.nav-arrow:active { background: var(--primary); border-color: var(--primary); transform: scale(.96); }
.nav-arrow[disabled] { opacity: .3; pointer-events: none; }
.light-active .nav-arrow { color: var(--ink); background: rgba(255,255,255,.75); border-color: rgba(10,10,10,.25); }
.light-active .nav-arrow:active { color: var(--white); }
.nav-arrow { display: flex; width: 58px; height: 58px; }
.nav-arrow svg { width: 28px; height: 28px; }
body.is-touch .nav-arrow { width: 110px; height: 110px; }
body.is-touch .nav-arrow svg { width: 44px; height: 44px; }
body.is-touch .ctrl-bar { gap: 14px; }
body.is-touch .fs-btn, body.is-touch .pause-badge { height: 110px; }
body.is-touch .fs-btn { width: 110px; }
body.is-touch .fs-btn svg { width: 38px; height: 38px; }
body.is-touch .pause-badge { font-size: 20px; padding: 0 28px; }
body.is-touch .fs-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.25); }

/* ---------- Bedienhilfe ---------- */
.help {
  position: absolute; z-index: 30; right: 40px; bottom: 112px; padding: 18px 22px; background: rgba(0,0,0,.82);
  font-family: var(--mono); font-size: 15px; line-height: 1.8; color: #ddd; display: none;
}
.help.show { display: block; }
.help b { color: var(--white); font-weight: 500; }


/* ---------- Preloader ----------
   Bildmarke in drei Teilen: Außen-Oktagon und Innen-Oktagon indexieren in 45°-Schritten
   gegeneinander (wie ein Werkzeugwechsler), der Kreis in der Mitte „pulsiert“.
   Am Ende rastet alles ein und die Fläche gleitet nach oben weg. */
#preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--white);
  transition: clip-path 1.1s cubic-bezier(.76, 0, .24, 1);
  clip-path: inset(0 0 0 0);
}
#preloader.done { clip-path: inset(0 0 100% 0); }
#preloader.gone { display: none; }
.pl-inner { width: min(34vmin, 360px); display: flex; flex-direction: column; align-items: center; }
.pl-mark { width: 52%; height: auto; overflow: visible; fill: currentColor; }
.pl-mark g.pl-outer, .pl-mark g.pl-inner-ring, .pl-mark g.pl-dot { transform-box: view-box; transform-origin: 960px 960px; }

/* Auftritt */
/* Startbildschirm (.waiting): Marke tritt auf und steht, darunter der Start-Button.
   Nach dem Klick (.running) beginnt das Indexieren = Ladeanimation. */
.pl-outer      { animation: pl-in-outer 1.1s cubic-bezier(.16,1,.3,1) both; }
.pl-inner-ring { animation: pl-in-inner 1.1s cubic-bezier(.16,1,.3,1) .12s both; }
.pl-dot        { animation: pl-in-dot .9s cubic-bezier(.34,1.4,.64,1) .35s both; }
#preloader.running .pl-outer      { animation: pl-in-outer 1.1s cubic-bezier(.16,1,.3,1) both, pl-index 2.4s linear .3s infinite; }
#preloader.running .pl-inner-ring { animation: pl-in-inner 1.1s cubic-bezier(.16,1,.3,1) .12s both, pl-index-rev 2.4s linear .3s infinite; }
#preloader.running .pl-dot        { animation: pl-in-dot .9s cubic-bezier(.34,1.4,.64,1) .35s both, pl-pulse 2.4s ease-in-out .3s infinite; }
@keyframes pl-in-outer { from { opacity: 0; transform: rotate(-90deg) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes pl-in-inner { from { opacity: 0; transform: rotate(90deg) scale(.5); } to { opacity: 1; transform: none; } }
@keyframes pl-in-dot   { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: none; } }
/* Indexieren: zwei 45°-Schritte pro Zyklus (= 90°, dadurch nahtlos, weil die Marke 4-fach symmetrisch ist) */
@keyframes pl-index {
  0%, 12%  { transform: rotate(0);     animation-timing-function: cubic-bezier(.77,0,.18,1); }
  38%, 62% { transform: rotate(45deg); animation-timing-function: cubic-bezier(.77,0,.18,1); }
  88%, 100%{ transform: rotate(90deg); }
}
@keyframes pl-index-rev {
  0%, 12%  { transform: rotate(0);      animation-timing-function: cubic-bezier(.77,0,.18,1); }
  38%, 62% { transform: rotate(-45deg); animation-timing-function: cubic-bezier(.77,0,.18,1); }
  88%, 100%{ transform: rotate(-90deg); }
}
@keyframes pl-pulse {
  0%, 12%, 50%, 62%, 100% { transform: scale(1); }
  25%, 75% { transform: scale(.8); }
}

/* Einrasten am Ende: Loop stoppt genau an der Zyklusgrenze (0° ≙ 90°), dann kurzer Impuls der ganzen Marke */
#preloader.ready .pl-outer, #preloader.ready .pl-inner-ring, #preloader.ready .pl-dot { animation: none; }
#preloader.ready .pl-mark { animation: pl-settle .8s cubic-bezier(.16,1,.3,1) both; }
@keyframes pl-settle { 0% { transform: scale(1); } 35% { transform: scale(.94); } 100% { transform: scale(1); } }

.pl-meta {
  width: 100%; margin-top: 9%; display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: max(11px, 1.15vmin); letter-spacing: .06em; text-transform: uppercase;
  opacity: 0; animation: pl-fade .8s ease .5s forwards;
}
.pl-label { color: rgba(255,255,255,.72); }
.pl-pct { font-weight: 500; font-variant-numeric: tabular-nums; }
.pl-bar { position: relative; width: 100%; height: 2px; margin-top: 12px; background: rgba(255,255,255,.18); overflow: hidden; opacity: 0; animation: pl-fade .8s ease .5s forwards; }
.pl-bar span { position: absolute; inset: 0; background: var(--white); transform-origin: left center; transform: scaleX(0); }
@keyframes pl-fade { to { opacity: 1; } }
#preloader.waiting .pl-meta, #preloader.waiting .pl-bar { animation: none; opacity: 0; pointer-events: none; }
#preloader.running .pl-meta, #preloader.running .pl-bar { animation: pl-fade .6s ease .25s forwards; }

/* Start-Button */
.pl-inner { position: relative; }
.pl-start {
  position: absolute; z-index: 2; left: 50%; top: 100%; margin-top: -8px;
  display: inline-flex; align-items: center; gap: 14px; white-space: nowrap;
  padding: 0 26px 0 30px; height: 56px; border: 1px solid var(--white); border-radius: 2px;
  background: var(--white); color: var(--primary); cursor: pointer;
  font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  opacity: 0; transform: translate(-50%, 10px);
  animation: pl-start-in .9s cubic-bezier(.16,1,.3,1) 1s forwards;
  transition: background .35s ease, color .35s ease;
}
.pl-start svg { transition: transform .45s cubic-bezier(.16,1,.3,1); }
.pl-start:hover, .pl-start:focus-visible { background: transparent; color: var(--white); outline: none; }
.pl-start:hover svg, .pl-start:focus-visible svg { transform: translateX(4px); }
@keyframes pl-start-in { to { opacity: 1; transform: translate(-50%, 0); } }
#preloader.running .pl-start {
  animation: none; pointer-events: none; opacity: 0; transform: translate(-50%, 8px);
  transition: opacity .35s ease, transform .5s cubic-bezier(.16,1,.3,1);
}
#preloader.done .pl-inner { transform: translateY(-4vh); opacity: 0; transition: transform .9s cubic-bezier(.76,0,.24,1), opacity .5s ease; }



/* ---------- Fotos mit Vergrößerung ---------- */
.photo.has-img { cursor: zoom-in; }
.photo.has-img img { transition: transform 1.2s var(--ease-out, ease); }
.photo.has-img:hover img { transform: scale(1.035); }
.photo .zoom-hint {
  position: absolute; right: 18px; bottom: 18px; width: 44px; height: 44px; z-index: 2; pointer-events: none;
  display: flex; align-items: center; justify-content: center; color: var(--white);
  background: rgba(10,10,10,.55); border: 1px solid rgba(255,255,255,.35); border-radius: 2px;
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .5s var(--ease-out, ease);
}
.photo.has-img:hover .zoom-hint { opacity: 1; transform: none; }

/* ---------- Lightbox (Originalgröße) ---------- */
.lb {
  position: fixed; inset: 0; z-index: 900; background: rgba(8,8,8,.94);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s;
}
.lb.open { opacity: 1; visibility: visible; transition: opacity .45s ease; }
.lb-wrap { position: absolute; inset: 0 0 72px 0; overflow: auto; cursor: grab; display: flex; /* margin:auto am Bild zentriert ohne Abschneiden */ scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent; }
.lb-wrap.dragging { cursor: grabbing; }
.lb-img { display: block; margin: auto; max-width: none; user-select: none; -webkit-user-drag: none; cursor: zoom-out;
  opacity: 0; transform: scale(.985); transition: opacity .5s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.lb.loaded .lb-img { opacity: 1; transform: none; }
.lb.fit .lb-wrap { overflow: hidden; cursor: default; }
.lb.fit .lb-img { max-width: calc(100vw - 80px); max-height: calc(100vh - 72px - 60px); width: auto; height: auto; cursor: zoom-in; }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 72px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border-top: 1px solid rgba(255,255,255,.1); background: rgba(8,8,8,.9);
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.8);
}
.lb-info { display: flex; gap: 18px; align-items: center; min-width: 0; }
.lb-count { color: var(--white); font-weight: 500; }
.lb-cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-actions { display: flex; gap: 8px; }
.lb-btn {
  height: 40px; min-width: 40px; padding: 0 14px; cursor: pointer; color: var(--white);
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.25); border-radius: 2px;
  transition: background .25s ease, border-color .25s ease;
}
.lb-btn:hover { background: var(--primary); border-color: var(--primary); }
.lb.single .lb-prev, .lb.single .lb-next { display: none; }
body.lb-open .fs-btn { visibility: hidden; }


/* ---------- Foto-Karussell (Überblendung) ---------- */
.carousel .car-item { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity 1.4s cubic-bezier(.4,0,.2,1); }
.carousel .car-item.active { opacity: 1; pointer-events: auto; z-index: 1; }
.carousel .car-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: none; }
.photo.carousel:hover img { transform: none; }
/* sanfte Ken-Burns-Bewegung während ein Foto steht */
.carousel .car-item.active img { animation: car-kb 7s ease-out both; }
.carousel.paused .car-item.active img { animation-play-state: paused; }
@keyframes car-kb { from { transform: scale(1.06); } to { transform: scale(1); } }
.car-dots { position: absolute; left: 32px; bottom: 26px; z-index: 3; display: flex; gap: 8px; }
.car-dot { width: 44px; height: 14px; padding: 5px 0; background: none; border: 0; cursor: pointer; }
.car-dot::before { content: ""; display: block; height: 3px; background: rgba(255,255,255,.4); }
.car-dot span { display: block; height: 3px; margin-top: -3px; background: var(--white); transform-origin: left center; transform: scaleX(0); }
.car-dot:not(.active) span { transform: scaleX(0) !important; }


/* Seitenstart: Text beginnt erst, wenn der Vorhang zur Hälfte oben ist */
body.intro { --start: 750ms; }

/* ---------- Keine Markierung im Header / in der Steuerleiste ----------
   Kein Text-Markieren (Doppelklick/Ziehen), kein Fokus-Rahmen und kein Tap-Highlight –
   die Schaltflächen bleiben normal klickbar. */
.site-header, .site-header *, .ctrl-bar, .ctrl-bar *, .help {
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.site-header img, .ctrl-bar svg { -webkit-user-drag: none; user-drag: none; }
.site-header a:focus, .site-header a:focus-visible,
.site-header button:focus, .site-header button:focus-visible,
.ctrl-bar button:focus, .ctrl-bar button:focus-visible { outline: none; }
.site-header ::selection, .ctrl-bar ::selection { background: transparent; }

/* =====================================================================
   HOCHFORMAT (Smartphone / Tablet hochkant)
   Statt der skalierten 16:9-Bühne: Animation oben, Text darunter in
   lesbarer Größe, Folie scrollt bei Bedarf senkrecht. Aktiv über
   body.is-portrait (gesetzt in app.js, Seitenverhältnis < 0,9).
   ===================================================================== */
body.is-portrait {
  --header-h: 56px;
  --pad-x: 20px;
  --media-h: min(46vh, 112vw);
}
body.is-portrait #stage {
  left: 0; top: 0; width: 100%; height: 100%; transform: none !important;
  background: #111; background-image: none;   /* einheitlicher Grund – keine Kante zwischen Animation und Text */
}
/* Kopfleiste: Logo + Zähler, Kapitel-Navigation entfällt */
body.is-portrait .site-header { height: var(--header-h); padding: 0 16px; }
body.is-portrait .site-header .logo { height: 32px; }
body.is-portrait .site-header nav { display: none; }
body.is-portrait .slide-counter { margin-left: auto; min-width: 0; height: 32px; padding: 0 12px; font-size: 12px; gap: 6px; }

/* Folie = senkrecht scrollender Bereich unter der Kopfleiste */
body.is-portrait .slide {
  top: var(--header-h); overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  display: flex; flex-direction: column;
}
body.is-portrait .media-col {
  position: relative; left: auto; top: auto; width: 100%; height: var(--media-h); flex: none;
  background: linear-gradient(180deg, #2c2c2c 0%, #1f1f1f 50%, #111 100%);   /* läuft unten exakt in den Grund aus */
}
body.is-portrait .media-col canvas.seq,
body.is-portrait .media-col img.poster,
body.is-portrait .media-col video { object-fit: cover; object-position: 50% 52%; }
body.is-portrait .folie-02 .media-col canvas.seq, body.is-portrait .folie-02 .media-col img.poster,
body.is-portrait .folie-04 .media-col canvas.seq, body.is-portrait .folie-04 .media-col img.poster { transform: none; object-position: 50% 38%; }
body.is-portrait .media-col .placeholder { top: 16px; left: 16px; right: 16px; bottom: 16px; }
body.is-portrait .media-col::after { /* Verlauf über der Animation: unten deckend, nach oben transparent */
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none;
  background: linear-gradient(0deg, #111 0%, rgba(17,17,17,.92) 18%, rgba(17,17,17,.55) 48%, rgba(17,17,17,0) 100%);
}
body.is-portrait .content {
  position: relative; z-index: 2; left: auto; top: auto; bottom: auto; width: 100%; flex: none;
  justify-content: flex-start; padding: 22px var(--pad-x) 112px;
}
body.is-portrait .media-col + .content { margin-top: -50px; }   /* Text rückt etwas in die Animation hinein */
body.is-portrait .light .content { padding-top: 28px; padding-bottom: 28px; }

/* Typografie */
body.is-portrait .crumb { font-size: 11px; margin-bottom: 12px; }
body.is-portrait h1 { font-size: clamp(28px, 8.2vw, 40px); line-height: 1.1; max-width: none; }
body.is-portrait .sub { font-size: 17px; margin-top: 12px; }
body.is-portrait .lead { font-size: 15.5px; line-height: 1.55; margin-top: 14px; }
body.is-portrait .lead.lead-2 { margin-top: 10px; }
body.is-portrait ul.points { margin-top: 20px; gap: 11px; }
body.is-portrait ul.points li { font-size: 15.5px; line-height: 1.45; padding-left: 28px; }
body.is-portrait ul.points li::before { width: 17px; height: 17px; top: .17em; }
body.is-portrait .tags { gap: 8px; margin-top: 18px; }
body.is-portrait .tag { height: 30px; padding: 0 13px; font-size: 10.5px; }

/* Folie 6 */
body.is-portrait .cards { margin-top: 18px; gap: 8px; }
body.is-portrait .card { gap: 14px; padding: 10px 14px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
body.is-portrait .card img { width: 32px; height: 32px; }
body.is-portrait .card .label { font-size: 10.5px; }
body.is-portrait .card .txt { font-size: 14.5px; line-height: 1.35; }
body.is-portrait .benefit { margin-top: 20px; gap: 12px; font-size: 14.5px; }
body.is-portrait .benefit img { width: 28px; height: 28px; }
body.is-portrait .photos {
  position: relative; left: auto; right: auto; top: auto; bottom: auto; flex: none;
  margin: 0 var(--pad-x) 112px; height: calc((100vw - 2 * var(--pad-x)) * 1.25); gap: 10px;
}
body.is-portrait .photo { clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px); }
body.is-portrait .photo .zoom-hint { opacity: 1; transform: none; width: 34px; height: 34px; right: 10px; bottom: 10px; }

/* Folie 7 */
body.is-portrait .ways { gap: 12px; margin-top: 20px; }
body.is-portrait .way { width: auto; flex: 1; }
body.is-portrait .way img { width: 40px; height: 40px; margin-bottom: 8px; }
body.is-portrait .way span { font-size: 12.5px; }
body.is-portrait .contact { margin-top: 20px; padding: 16px 18px; }
body.is-portrait .contact .name { font-size: 16px; }
body.is-portrait .contact .addr, body.is-portrait .contact .tel { font-size: 13.5px; }
body.is-portrait .buttons { margin-top: 20px; gap: 10px; flex-wrap: wrap; }
body.is-portrait .btn { height: 44px; padding: 0 16px; font-size: 12px; gap: 10px; }

/* Steuerleiste: Pfeile unten rechts, kein Vollbild-Button (iPhone unterstützt es nicht) */
body.is-portrait .ctrl-bar { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); gap: 10px; z-index: 30; }
body.is-portrait .fs-btn { display: none; }
body.is-portrait .nav-arrow, body.is-touch.is-portrait .nav-arrow {
  width: 52px; height: 52px; background: rgba(20,20,20,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
body.is-portrait .nav-arrow svg, body.is-touch.is-portrait .nav-arrow svg { width: 24px; height: 24px; }
body.is-portrait .light-active .nav-arrow { background: rgba(255,255,255,.85); }
body.is-portrait .pause-badge, body.is-touch.is-portrait .pause-badge { height: 52px; font-size: 12px; padding: 0 14px; }
body.is-portrait .help { display: none !important; }
/* Fußleiste hinter den Pfeilen: Text läuft weich darunter aus */
body.is-portrait #stage::after {
  content: ""; position: absolute; z-index: 25; left: 0; right: 0; bottom: 0; height: 96px; pointer-events: none;
  background: linear-gradient(180deg, rgba(17,17,17,0), rgba(17,17,17,.92) 62%);
}
body.is-portrait #stage.light-active::after { background: linear-gradient(180deg, rgba(244,244,244,0), rgba(244,244,244,.95) 62%); }

/* Preloader auf schmalen Bildschirmen: größere Marke, Text ohne Umbruch */
.pl-label, .pl-pct { white-space: nowrap; }
.pl-meta { gap: 16px; }
@media (max-width: 760px), (max-aspect-ratio: 9/10) {
  .pl-inner { width: min(72vw, 320px); }
  .pl-mark { width: 46%; }
  .pl-meta { font-size: 11px; letter-spacing: .05em; margin-top: 12%; }
  .pl-start { height: 50px; padding: 0 20px 0 24px; font-size: 13px; margin-top: 4px; }
}
