/* geht-e Pitchdeck – Grundlayout
 * Jede Folie ist eine 1920 × 1080 px große Bühne. Elemente sind wie in Canva
 * absolut positioniert (left/top/width/height in px direkt am Element).
 * deck.js skaliert die Bühne passend auf das Browserfenster.
 */

@font-face {
  font-family: "Source Sans Pro";
  src: url("../assets/fonts/SourceSansPro-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Source Sans Pro";
  src: url("../assets/fonts/SourceSansPro-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --gruen-dunkel: #1b725c;
  --gruen-hell: #9cca7a;
  --gruen-neon: #10ff8d;
  --ui-bg: rgba(20, 28, 26, 0.86);
  --ui-fg: #f2f5f3;
  --ui-muted: #a9b5b0;
  --letterbox: #0d1211;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--letterbox);
  overflow: hidden;
  font-family: "Source Sans Pro", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Bühne ---------- */

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform-origin: center center;
  transform: translate(-50%, -50%);
}

.slide {
  position: absolute;
  inset: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
  font-family: "Source Sans Pro", Arial, sans-serif;
  line-height: 1.4;
}
.slide.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s ease, visibility 0s;
}

/* Alle direkten Kinder einer Folie sind frei positioniert */
.slide > *:not(.notes) {
  position: absolute;
  margin: 0;
}
.slide p,
.slide ul,
.slide li { margin: 0; }
.slide img { display: block; }
.slide b { font-weight: 700; }

.slide .notes { display: none; }

/* Textfelder mit Aufzählungen */
.textbox p { margin: 0; }
.textbox ul { padding: 0; list-style: disc; }
.textbox--48 ul { padding-left: 57px; }
.textbox--64 ul { padding-left: 72px; }
.textbox li::marker { font-size: 0.9em; }

/* Dekorative Wellen-Linien */
.deco { pointer-events: none; }

/* Fotos im Pfeil-Zuschnitt (Canva-Form) */
.chevron { overflow: hidden; }
.chevron img { position: absolute; left: 0; width: 100%; }
.chevron--bad { clip-path: polygon(0 0, 63.17% 0, 100% 50%, 63.17% 100%, 0 100%, 36.83% 50%); }
.chevron--bad img { top: -33.04%; height: 144.94%; }
.chevron--leitwarte,
.chevron--netz { clip-path: polygon(0 0, 75% 0, 100% 50%, 75% 100%, 0 100%, 25% 50%); }
.chevron--leitwarte img { top: -3.35%; height: 106.70%; }
.chevron--netz img { top: -30.03%; height: 160.05%; }

/* Glühbirne aus dem Logo (Schalter-Symbole auf Folie 4) */
.bulb { overflow: hidden; }
.bulb img { position: absolute; left: -163.05%; top: 0; width: 263.05%; height: 100%; }

/* Bildausschnitt */
.crop { overflow: hidden; }
.crop img { position: absolute; }

.chart { overflow: visible; }

/* ---------- Animationen (data-build = Sekunden nach Folienstart) ---------- */

.slide [data-build] { transition: opacity 0.6s ease; }
@media screen {
  /* !important übersteuert eine eigene Deckkraft am Element nur bis zum Einblenden */
  .stage .slide [data-build]:not(.is-built) { opacity: 0 !important; }
}

/* ---------- Schwarzbild ---------- */
body.is-blank .stage { visibility: hidden; }

/* ---------- Steuerleiste ---------- */

.hud {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 12px);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--ui-bg);
  color: var(--ui-fg);
  font: 15px/1 "Source Sans Pro", Arial, sans-serif;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 20;
  backdrop-filter: blur(6px);
}
body.show-hud .hud {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
.hud button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}
.hud button:hover,
.hud button:focus-visible { background: rgba(255, 255, 255, 0.14); outline: none; }
.hud button[aria-pressed="true"] { background: var(--gruen-dunkel); }
.hud__count { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; color: var(--ui-muted); }
.hud__sep { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.2); margin: 0 4px; }

/* ---------- Sprechernotizen ---------- */

.notes-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(440px, 38vw);
  display: flex;
  flex-direction: column;
  background: #fbfcfb;
  color: #1d2422;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  font: 17px/1.5 "Source Sans Pro", Arial, sans-serif;
  z-index: 15;
}
.notes-panel[hidden] { display: none; }
.notes-panel header,
.notes-panel footer {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  background: #eef3f0;
}
.notes-panel header strong { color: var(--gruen-dunkel); }
.notes-panel footer { font-size: 15px; color: #56635e; justify-content: flex-start; }
#notes-timer { font-variant-numeric: tabular-nums; color: #56635e; }
.notes-panel__body {
  flex: 1;
  overflow: auto;
  padding: 18px 20px;
  white-space: pre-wrap;
}
body.show-notes .viewport { right: min(440px, 38vw); }

/* ---------- Übersicht ---------- */

.overview {
  position: fixed;
  inset: 0;
  overflow: auto;
  padding: 32px;
  background: var(--letterbox);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  align-content: start;
  z-index: 25;
}
.overview[hidden] { display: none; }
.overview__item {
  cursor: pointer;
  color: var(--ui-fg);
  font: 15px/1.3 "Source Sans Pro", Arial, sans-serif;
  border: 0;
  padding: 0;
  background: none;
  text-align: left;
}
.overview__thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  outline: 3px solid transparent;
  outline-offset: 2px;
  margin-bottom: 8px;
}
.overview__thumb .slide {
  visibility: visible;
  opacity: 1;
  transform-origin: 0 0;
  transition: none;
}
.overview__thumb .slide [data-build] { transition: none; }
.overview__item.is-current .overview__thumb { outline-color: var(--gruen-neon); }
.overview__item.is-hidden { opacity: 0.45; }
.overview__item:hover .overview__thumb,
.overview__item:focus-visible .overview__thumb { outline-color: #ffffff; }
.overview__item:focus-visible { outline: none; }

/* ---------- Hilfe ---------- */

.help {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  z-index: 30;
}
.help[hidden] { display: none; }
.help__card {
  background: #fbfcfb;
  color: #1d2422;
  padding: 28px 36px;
  border-radius: 12px;
  font: 17px/1.5 "Source Sans Pro", Arial, sans-serif;
  min-width: 340px;
}
.help__card h2 { margin: 0 0 12px; color: var(--gruen-dunkel); font-size: 24px; }
.help__card dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; margin: 0; }
.help__card dt { font-weight: 700; }
.help__card dd { margin: 0; }
.help__card p { margin: 16px 0 0; color: #56635e; font-size: 15px; }

/* ---------- Druck / PDF ---------- */

@media print {
  @page { size: 1920px 1080px; margin: 0; }
  html, body { height: auto; overflow: visible; background: #ffffff; }
  .viewport { position: static; display: block; }
  .stage { position: static; transform: none !important; width: auto; height: auto; }
  .slide {
    position: relative;
    visibility: visible;
    opacity: 1;
    transition: none;
    break-after: page;
    page-break-after: always;
  }
  body:not(.show-hidden) .slide[data-hidden="true"] { display: none; }
  .slide [data-build] { transition: none; }
  .hud, .notes-panel, .overview, .help { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Wörter mit Bindestrich nicht umbrechen (wie in Canva) */
.nobr { white-space: nowrap; }
