/* =====================================================
   Zweck: Stylesheet der Bonusimpuls-Landingpage (Design-Tokens, Layout, Slider).
   Zielpfad: /home/mckiede/arbeits-anwendungen/bonusimpuls/oeffentlich/css/style.css
   Verantwortlich: Bonus-Impuls DE
   ===================================================== */

/* =====================================================
   DESIGN TOKENS
   Aus Canva Brand Kit Mission Projektrettung.
   Identisch mit game.css — nie einzeln ändern!
   ===================================================== */
:root {
  /* Hintergrundfarben */
  --bg:      #2a1f32;   /* Haupt-Hintergrund (dunkles Lila) */
  --primary: #483550;   /* Karten, Overlays */

  /* Akzentfarben */
  --yellow:  #dddd32;   /* CTA, Highlights, "DU" Glow */
  --orange:  #ff5930;   /* Dark Side / Wrong */
  --red:     #bc2037;   /* Dunkelrot */
  --mint:    #81c397;   /* Light Side / Right */
  --teal:    #204f56;   /* Dunkelgrün */
  --steel:   #405f88;   /* Neutral/Stahlblau */
  --navy:    #052757;   /* Dunkelblau, Buttontext */
  --violet:  #7c7095;   /* Sekundärtext, Footer */
  --white:   #ffffff;

  /* Schriften (Google Fonts, SIL OFL) */
  --font-title:  'Bebas Neue', sans-serif;   /* Headlines, DU, Buttons */
  --font-body:   'Montserrat', sans-serif;   /* Fließtext */
  --font-flavor: 'Caveat', cursive;          /* Zitate, Flavor-Texte */

  /* Border-Radius */
  --r:  12px;   /* Karten, Container */
  --rs: 6px;    /* Buttons, kleine Elemente */
}


/* =====================================================
   RESET
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }


/* =====================================================
   BODY & HINTERGRUND
   Dunkles Lila mit Weltraum-Farbverlauf und Sternenhimmel.
   Identisch mit game.css.
   ===================================================== */
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(72,53,80,.6) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(5,39,87,.4) 0%, transparent 60%);
}

/* Sternenhimmel als fixed Pseudo-Element (identisch game.css) */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(1px 1px at  8% 12%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 22% 55%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 38% 28%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 67% 18%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 81% 44%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 54% 72%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 13% 82%, #fff 0%, transparent 100%),
    radial-gradient(1px 1px at 92% 31%, #fff 0%, transparent 100%),
    radial-gradient(2px 2px at 33%  8%, rgba(221,221,50,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 72% 89%, #fff 0%, transparent 100%);
}


/* =====================================================
   LAYOUT
   Zentrierter Spalten-Container, max 780px.
   ===================================================== */
#app {
  position: relative; z-index: 1;
  max-width: 780px; margin: 0 auto;
  padding: 0 16px 0;
  min-height: 100vh;
  display: flex; flex-direction: column;
}


/* =====================================================
   SECTION-ANIMATIONEN
   Sections starten unsichtbar (step-hidden) und werden
   per JS schrittweise eingeblendet.

   Klassen-Ablauf:
     step-hidden   → unsichtbar, im Layout vorhanden
     step-entering → slide-up + fade Animation läuft
     step-visible  → sichtbar, Animation abgeschlossen

   Section 1 (.visible) ist sofort sichtbar ohne JS.
   ===================================================== */
.section {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 36px 0 16px;
  gap: 18px;
}

/* Unsichtbar aber im Layout — verhindert Sprünge beim Einblenden */
.step-hidden {
  opacity: 0;
  transform: translateY(36px);
  visibility: hidden;
  pointer-events: none;
  display: flex; /* display bleibt flex, nur visibility ändert sich */
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(36px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-entering {
  visibility: visible;
  pointer-events: auto;
  animation: slideUp .6s cubic-bezier(.22,.68,0,1.2) forwards;
}

.step-visible {
  opacity: 1; transform: none;
  visibility: visible; pointer-events: auto;
}

/* Section 1: sofort sichtbar, eigene Animations-Klasse */
.section.visible {
  opacity: 1; transform: none;
  visibility: visible; pointer-events: auto;
}


/* =====================================================
   HEADER
   ===================================================== */
#site-header {
  text-align: center;
  padding: 24px 0 8px;
}
#logo-header img {
  width: 160px; height: auto;
  transition: opacity .2s;
}
#logo-header:hover img { opacity: .8; }


/* =====================================================
   SECTION 1: DIE FRAGE
   ===================================================== */

/* Haupt-Headline: animiert beim Seitenaufruf ein (CSS, kein JS) */
.frage-text {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 7vw, 4.2rem);
  letter-spacing: 2px; line-height: 1.15;
  max-width: 600px; color: var(--white);
  text-shadow: 0 0 40px rgba(221,221,50,.12);
  animation: slideUp 1.2s cubic-bezier(.22,.68,0,1.2) .2s both;
}

/* "Die Antwort…" + Pfeil: Flexbox-Zeile, verzögert eingeblendet */
.frage-bottom-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: slideUp 1s ease .8s both;
}

.frage-antwort {
  font-family: var(--font-flavor);
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: var(--violet);
}


/* =====================================================
   PFEIL-BUTTON
   Pulsiert um Aufmerksamkeit zu lenken.
   Verschwindet nach Klick (.arrow-used via JS).
   ===================================================== */
@keyframes arrowPulse {
  0%, 100% { transform: translateY(0) scale(1);     opacity: 1; }
  50%       { transform: translateY(5px) scale(.93); opacity: .65; }
}

.btn-arrow {
  background: none; border: none; cursor: pointer; padding: 4px;
  animation: arrowPulse 1.8s ease-in-out infinite;
  transition: opacity .3s; flex-shrink: 0;
}
.btn-arrow img {
  width: 52px; height: auto;
  filter: drop-shadow(0 0 6px rgba(221,221,50,.3));
}
.btn-arrow:hover img { filter: drop-shadow(0 0 14px rgba(221,221,50,.65)); }

/* Nach Klick: Pfeil ausblenden */
.btn-arrow.arrow-used { animation: none; opacity: 0; pointer-events: none; }


/* =====================================================
   SECTION 2: SLIDER-WRAPPER + DU-ZOOM
   ===================================================== */

/* Wrapper: Positionierungs-Anker für DU-Overlay.
   overflow:hidden verhindert dass scale(8) aus dem Layout bricht. */
#slider-wrapper {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: hidden;
}

/* =====================================================
   DU-OVERLAY — Zoom-Animation
   Ein einziges Element, das über dem Slider positioniert ist.
   Startet riesig (scale 8, füllt Bildschirm) und zoomt
   auf finale Größe (scale 1) runter.

   Klassen-Ablauf (via JS):
     du-zoom-start → opacity:1, scale(8), kein Übergang
     du-zoom-end   → Transition auf scale(1) startet (0.9s)
     du-visible    → Animation fertig, finale Position

   Vorteil: position:absolute (nicht fixed) → kein Scroll-Konflikt.
   ===================================================== */
#du-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -52%) scale(1); /* finale Position */
  z-index: 20;
  pointer-events: none; /* Slider bleibt bedienbar */

  font-family: var(--font-title);
  font-size: clamp(5rem, 22vw, 11rem);
  letter-spacing: 8px; line-height: 1;

  /* Outline-Text: innen hohl, nur Kontur sichtbar */
  color: transparent;
  -webkit-text-stroke: clamp(1.5px, .35vw, 3px) rgba(255,255,255,.88);
  text-shadow: 0 0 30px rgba(255,255,255,.1);

  opacity: 0; /* startet unsichtbar */
}

/* Schritt 1: sofort riesig + sichtbar (kein CSS-Übergang!) */
#du-overlay.du-zoom-start {
  opacity: 1;
  transform: translate(-50%, -52%) scale(8);
  transition: none;
}

/* Schritt 2: Zoom-Transition auf finale Größe */
#du-overlay.du-zoom-end {
  opacity: 1;
  transform: translate(-50%, -52%) scale(1);
  transition: transform .9s cubic-bezier(.2,.8,.3,1);
}

/* Schritt 3: finale Position, kein Puls — ruhig stehen bleiben */
#du-overlay.du-visible {
  opacity: 1;
  transform: translate(-50%, -52%) scale(1);
}


/* =====================================================
   SPLIT-IMAGE-SLIDER
   Identisch mit game.css — nicht einzeln ändern!
   Canvas-Rendering schützt Originalbilder vor Download.
   img-bad  = Wrong (links, orange) — "DU bist das Problem"
   img-good = Right (rechts, mint) — "DU bist die Lösung"
   ===================================================== */
#slider-container {
  width: 100%; max-width: 360px; position: relative;
  border-radius: var(--r); overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  touch-action: none; user-select: none; cursor: ew-resize;
}

/* DIN A4 Hochformat — Seitenverhältnis der Buch-Illustrationen */
#slider-container::before { content: ''; display: block; padding-top: 141.4%; }

.slider-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 7rem; border-radius: var(--r);
}
canvas.slider-img {
  display: block; position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
}

#img-bad  { background: rgba(188,32,55,.15);  border: 3px solid var(--orange); }
#img-good { background: rgba(129,195,151,.15); border: 3px solid var(--mint); }

/* Gelbe Trennlinie */
#slider-line {
  position: absolute; top: 0; bottom: 0; width: 3px;
  background: var(--yellow); transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(221,221,50,.5); pointer-events: none;
}

/* Griff unterhalb des Bildes */
#slider-handle-wrap {
  width: 100%; max-width: 360px;
  height: 32px; position: relative; margin-top: -1px;
}
#slider-handle {
  position: absolute; width: 64px; height: 32px;
  background: var(--yellow); border-radius: 0 0 16px 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: var(--bg); font-weight: 900;
  box-shadow: 0 4px 8px rgba(0,0,0,.3); cursor: ew-resize;
  transition: transform .1s, box-shadow .2s;
}
#slider-handle:hover,
#slider-handle:active { transform: scaleX(1.08); box-shadow: 0 4px 18px rgba(221,221,50,.5); }


/* =====================================================
   SECTION 3: WENDE + CTA
   ===================================================== */

/* Karte nur für den Wende-Titel */
.wende-card {
  background: rgba(72,53,80,.55);
  border: 1px solid rgba(124,112,149,.35);
  border-radius: var(--r);
  padding: 26px 28px;
  max-width: 560px; width: 100%;
  backdrop-filter: blur(6px);
}

.wende-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 6vw, 3rem);
  letter-spacing: 2px; line-height: 1.15;
  color: var(--white);
}

/* "DU" im Wende-Titel: drei Zustände
   1. Standard:      weiß, kein Glow
   2. .du-glow-in:   transition weiß→gelb, Glow baut sich auf (via transition)
   3. .du-glow-pulse: Puls-Animation übernimmt (nach transition-Ende) */
.du-yellow {
  color: var(--white);
  text-shadow: none;
  transition: color .8s ease, text-shadow .8s ease;
}
/* Schritt 1: Farbe + erster Glow sanft via transition */
.du-yellow.du-glow-in {
  color: var(--yellow);
  text-shadow: 0 0 12px rgba(221,221,50,.5), 0 0 24px rgba(221,221,50,.2);
}
/* Schritt 2: Puls-Animation ab jetzt, transition deaktiviert */
@keyframes duGlowPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(221,221,50,.5), 0 0 24px rgba(221,221,50,.2); }
  50%       { text-shadow: 0 0 24px rgba(221,221,50,.9), 0 0 50px rgba(221,221,50,.4); }
}
.du-yellow.du-glow-pulse {
  color: var(--yellow);
  transition: none; /* Animation übernimmt, transition abschalten */
  animation: duGlowPulse 2.5s ease-in-out infinite;
}

/* Papierflieger-Illustration */
.paper-plane {
  width: clamp(100px, 30vw, 180px);
  height: auto; opacity: .85;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}

/* "Was genau ich damit meine…" — direkt über CTA */
.wende-text {
  font-size: clamp(.9rem, 2.5vw, 1.05rem);
  color: rgba(255,255,255,.7);
  line-height: 1.5; font-weight: 600;
  margin-bottom: -4px; /* optisch näher am Button */
}

/* CTA-Button: gelb gefüllt, hover: transparent mit gelbem Rand */
.btn-cta {
  display: inline-block;
  padding: 16px 32px;
  border-radius: var(--rs);
  border: 2px solid var(--yellow);
  background: var(--yellow);
  color: var(--navy);
  font-family: var(--font-title);
  font-size: clamp(1rem, 3.5vw, 1.5rem);
  letter-spacing: 2px; text-decoration: none;
  transition: all .25s;
  box-shadow: 0 4px 24px rgba(221,221,50,.22);
}
.btn-cta:hover {
  background: transparent; color: var(--yellow);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(221,221,50,.32);
}

/* Optionaler Subtext unter CTA (aktuell auskommentiert in HTML) */
.cta-subtext {
  font-family: var(--font-flavor);
  font-size: 1.1rem; color: var(--violet);
}


/* =====================================================
   FOOTER
   Immer sichtbar, kein JS-Einblenden.
   Identisch mit game.css.
   ===================================================== */
#site-footer {
  text-align: center;
  padding: 20px 0 16px;
  margin-top: auto;
  position: relative; z-index: 1;
  border-top: 1px solid rgba(124,112,149,.15);
}
#logo-footer {
  display: inline-flex; align-items: center; justify-content: center;
  opacity: .65; transition: opacity .2s;
}
#logo-footer:hover { opacity: .9; }
#logo-footer img { height: 80px; width: auto; }

#footer-legal {
  display: flex; align-items: center; justify-content: center;
  gap: 14px; margin-top: 8px; font-size: .75rem;
}
#footer-legal a {
  color: var(--violet); text-decoration: none; opacity: .8; transition: opacity .2s;
}
#footer-legal a:hover { opacity: 1; }

#info-btn {
  background: none; border: none; color: var(--violet);
  font-size: 1rem; cursor: pointer; padding: 0;
  opacity: .8; transition: opacity .2s;
}
#info-btn:hover { opacity: 1; }

/* Copyright/KI-Popup: erscheint bei Klick auf ⓘ */
#info-popup {
  margin-top: 6px; font-size: .72rem; color: var(--violet);
  background: rgba(72,53,80,.9); border: 1px solid var(--violet);
  border-radius: 8px; padding: 8px 14px;
  max-width: 300px; margin-left: auto; margin-right: auto;
  line-height: 1.6;
}


/* =====================================================
   UTILITY
   ===================================================== */
/* Allgemein (Popup) */
.hidden { display: none !important; }


/* =====================================================
   RESPONSIVE
   Mobile-first: QR-Scan = meist Smartphone
   ===================================================== */
@media (max-width: 480px) {
  .section        { padding: 24px 0 12px; gap: 14px; }
  .wende-card     { padding: 18px 14px; }
  .btn-cta        { padding: 14px 20px; }
  .frage-bottom-row { flex-wrap: wrap; }
  #logo-header img  { width: 120px; }
  #logo-footer img  { height: 60px; }
}
