/**
 * Villex „Unna Calling“ – interaktive Weihnachtsgeschichte
 * Layout: fließend, Bild + Text vollständig sichtbar (kein Abschnitt)
 */

:root {
  --navy: #001e5a;
  --navy-deep: #000c22;
  --blue: #0d5bff;
  --blue-neon: #3d8bff;
  --gold: #c9a227;
  --gold-soft: #f0d78a;
  --ice: #e8eef8;
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.wg-page {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ice);
  background: var(--navy-deep);
  overflow-x: clip;
}

/* Schneeflocken: dieselben wie Startseite (seasonal-overlay.css → .vx-flake) */
.wg-snow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none !important;
  overflow: hidden;
  z-index: 5;
}

.wg-snow-layer .vx-snow {
  position: absolute;
  inset: 0;
}

.wg-shell {
  position: relative;
  z-index: 2;
  width: min(880px, calc(100% - 1.25rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.wg-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.wg-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.wg-brand img {
  height: 32px;
  width: auto;
}

.wg-top__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wg-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  color: var(--gold-soft);
  background: rgba(201, 162, 39, 0.12);
}

.wg-mute {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}

.wg-mute:hover {
  background: rgba(61, 139, 255, 0.22);
  border-color: rgba(61, 139, 255, 0.4);
}

.wg-mute[aria-pressed="true"] {
  opacity: 0.75;
}

.wg-mute.is-waiting {
  border-color: rgba(61, 139, 255, 0.55);
  background: rgba(13, 91, 255, 0.28);
  animation: wg-mute-pulse 1.4s ease-in-out infinite;
}

@keyframes wg-mute-pulse {
  50% {
    box-shadow: 0 0 0 4px rgba(61, 139, 255, 0.25);
  }
}

/* Nur wenn Browser Autoplay blockiert */
.wg-start {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 20%, rgba(61, 139, 255, 0.35), transparent 55%),
    rgba(0, 8, 24, 0.82);
  backdrop-filter: blur(8px);
}

.wg-start[hidden] {
  display: none !important;
}

.wg-start__card {
  width: min(420px, 100%);
  text-align: center;
  padding: 1.75rem 1.4rem;
  border-radius: 16px;
  border: 1px solid rgba(61, 139, 255, 0.35);
  background: linear-gradient(165deg, #0b1f4a, #06122c);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.wg-start__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-neon);
}

.wg-start__logo {
  display: block;
  width: min(200px, 70%);
  height: auto;
  margin: 0 auto 1.15rem;
}

.wg-start__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
}

.wg-start__btn {
  width: 100%;
  justify-content: center;
}

.wg-progress {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.wg-progress span {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.35s;
}

.wg-progress span.is-done {
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.wg-progress span.is-now {
  background: var(--blue-neon);
  box-shadow: 0 0 10px rgba(61, 139, 255, 0.5);
}

/* Stage wächst mit Inhalt – nichts wird abgeschnitten */
.wg-stage {
  position: relative;
  border-radius: 18px;
  overflow: visible;
  border: 1px solid rgba(61, 139, 255, 0.28);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
  background: #04122e;
}

.wg-stage.is-transitioning {
  pointer-events: none;
}

/* Kurzer Lichter-Blitz beim Kapitelwechsel */
.wg-stage__flash {
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: 18px;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 80% 55% at 50% 35%, rgba(61, 139, 255, 0.35), transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(201, 162, 39, 0.22), transparent 60%);
}

.wg-stage__flash.is-on {
  animation: wg-flash 0.7s var(--ease) forwards;
}

@keyframes wg-flash {
  0% {
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.wg-scene {
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  filter: blur(0);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease),
    filter 0.45s ease;
}

.wg-scene.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  filter: none;
}

.wg-scene.is-leaving {
  opacity: 0;
  transform: translateY(-14px) scale(0.99);
  filter: blur(2px);
  pointer-events: none;
}

.wg-scene.is-entering {
  opacity: 0;
  transform: translateY(22px) scale(0.98);
}

.wg-scene.is-entering.is-active {
  opacity: 1;
  transform: none;
}

.wg-scene.is-active .wg-scene__art {
  animation: wg-art-in 0.7s var(--ease) both;
}

.wg-scene.is-active .wg-scene__copy {
  animation: wg-copy-in 0.65s var(--ease) 0.08s both;
}

@keyframes wg-art-in {
  from {
    opacity: 0.35;
    transform: scale(1.03);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wg-copy-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* —— Bild: volle Breite, komplette Abbildung —— */
.wg-scene__art {
  position: relative;
  width: 100%;
  background: #020a18;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}

.wg-scene__art--photo {
  min-height: 0;
  flex: none;
}

.wg-scene__photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center center;
  vertical-align: middle;
}

.wg-scene__art svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 200px;
  aspect-ratio: 400 / 240;
}

/* —— Text unter dem Bild, vollständig —— */
.wg-scene__copy {
  position: relative;
  z-index: 2;
  padding: 1.35rem 1.35rem 1.5rem;
  background: linear-gradient(180deg, #061530 0%, #04122e 100%);
  border-radius: 0 0 18px 18px;
}

.wg-scene__kicker {
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-neon);
}

.wg-scene__title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.wg-scene__text {
  margin: 0 0 1.15rem;
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(232, 238, 248, 0.82);
}

.wg-scene__text--rich {
  margin: 0 0 1.25rem;
}

.wg-scene__text--rich p {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(232, 238, 248, 0.82);
}

.wg-scene__text--rich p:last-child {
  margin-bottom: 0;
}

.wg-scene__quote {
  margin: 1rem 0 !important;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--gold);
  background: rgba(201, 162, 39, 0.12);
  border-radius: 0 10px 10px 0;
  color: #fff !important;
  font-size: 1.08rem !important;
  line-height: 1.45 !important;
}

.wg-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding-top: 0.25rem;
}

.wg-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}

.wg-btn:hover {
  background: rgba(61, 139, 255, 0.22);
  border-color: rgba(61, 139, 255, 0.45);
  transform: translateY(-1px);
}

.wg-btn--primary {
  background: linear-gradient(135deg, var(--blue), #1a4fd6);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(13, 91, 255, 0.35);
}

.wg-btn--ghost {
  background: transparent;
}

.wg-choice {
  display: grid;
  gap: 0.5rem;
  width: 100%;
}

.wg-choice .wg-btn {
  text-align: left;
  width: 100%;
}

.wg-bob {
  animation: wg-bob 3.4s ease-in-out infinite;
}

@keyframes wg-bob {
  50% {
    transform: translateY(-7px);
  }
}

.wg-twinkle {
  animation: wg-twinkle 1.6s ease-in-out infinite;
}

@keyframes wg-twinkle {
  50% {
    opacity: 1;
  }
  0%,
  100% {
    opacity: 0.35;
  }
}

.wg-shake {
  animation: wg-shake 0.55s ease;
}

@keyframes wg-shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.wg-foot {
  margin-top: 1.15rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(232, 238, 248, 0.4);
}

.wg-foot a {
  color: var(--blue-neon);
}

@media (max-width: 560px) {
  .wg-shell {
    width: min(100% - 0.85rem, 560px);
    padding-top: 0.75rem;
  }

  .wg-scene__copy {
    padding: 1.1rem 1rem 1.35rem;
  }

  .wg-scene__text--rich p,
  .wg-scene__text {
    font-size: 0.98rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wg-bob,
  .wg-twinkle,
  .wg-stage__flash.is-on,
  .wg-scene.is-active .wg-scene__art,
  .wg-scene.is-active .wg-scene__copy {
    animation: none !important;
  }
  .wg-scene {
    transition: none !important;
    filter: none !important;
  }
}
