/* Humor-Varianten: Begleiter (cmp) und Kapitel (chp). Baut auf style.css und varianten.css auf. */

/* ---------- Begleiter ---------- */
.cmp {
  position: fixed; z-index: 40; right: 16px; top: 50%;
  width: 160px; transform: translateY(-40%);
  display: flex; flex-direction: column; align-items: center;
  pointer-events: none;
}
.cmp-stage { width: 160px; }
.cmp-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.cmp-bubble {
  position: relative; max-width: 180px; margin-bottom: 6px; padding: 10px 13px;
  border-radius: 14px; background: var(--white); color: var(--ink);
  font: 600 0.9rem/1.35 var(--body);
  box-shadow: 0 6px 18px rgba(32, 48, 60, 0.18);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.cmp-bubble::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px;
  background: var(--white); transform: translateX(-50%) rotate(45deg);
}
.cmp-bubble.is-new { transform: scale(0.9); opacity: 0.3; }
.cmp-x {
  pointer-events: auto; position: absolute; top: -12px; right: -4px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: var(--pale-bg); color: var(--navy);
  font: 700 18px/30px var(--body); cursor: pointer;
}
.cmp-x:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cmp.is-off { display: none; }
.cmp.is-moving .cmp-bubble { opacity: 0; transform: scale(0.92); }
@media (max-width: 1239px) {
  .cmp { top: auto; bottom: 10px; right: 8px; width: auto; transform: none; flex-direction: row; align-items: flex-end; }
  .cmp-stage { width: 104px; }
  .cmp-bubble { margin: 0 4px 56px 0; max-width: 190px; font-size: 0.86rem; }
  .cmp-bubble::after { left: auto; right: -6px; bottom: 14px; transform: rotate(45deg); }
}

/* ---------- Kapitel ---------- */
.chp { position: relative; height: var(--chp-h, 500vh); background: var(--deep); color: var(--white); }
.chp-sticky {
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center;
  gap: clamp(16px, 4vw, 64px); max-width: var(--wrap); margin: 0 auto; padding: 72px var(--gutter) 32px;
}
.chp-stage svg { display: block; width: 100%; height: auto; max-height: 72vh; overflow: visible; }
.chp-text h2 { margin: 0 0 18px; font: 800 clamp(1.9rem, 3.8vw, 3rem)/1.05 var(--display); color: var(--white); }
.chp-steps { position: relative; list-style: none; margin: 0; padding: 0; min-height: 8.5em; }
.chp-steps li {
  position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(10px);
  font-size: clamp(1.15rem, 2vw, 1.45rem); line-height: 1.45;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.chp-steps li.is-on { opacity: 1; transform: none; }
.chp-dots { display: flex; gap: 8px; margin-top: 24px; }
.chp-dots i { width: 28px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); transition: background 0.3s; }
.chp-dots i.on { background: var(--accent); }
@media (max-width: 760px) {
  .chp-sticky { grid-template-columns: 1fr; align-content: center; gap: 6px; padding-top: 64px; }
  .chp-stage svg { max-height: 46vh; }
  .chp-text h2 { font-size: 1.6rem; margin-bottom: 8px; }
  .chp-steps { min-height: 7.4em; }
  .chp-steps li { font-size: 1.05rem; }
  .chp-dots { margin-top: 10px; }
}

/* ---------- Idee 3: Ausreden-Mauer ---------- */
.wall { position: fixed; z-index: 40; right: 14px; top: 50%; transform: translateY(-46%); width: 200px; pointer-events: none; }
.wall-bricks { display: flex; flex-direction: column; gap: 5px; }
.wall-row { display: flex; gap: 5px; }
.brick {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 4px 8px;
  border-radius: 4px; background: #b5654a; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.18);
  color: #fff; font: 700 0.74rem/1.15 var(--body); text-align: center;
  transition: transform 0.9s cubic-bezier(0.5, -0.3, 0.7, 1), opacity 0.9s ease;
}
.brick .kurz { display: none; }
.brick.weg { transform: translate(var(--dx, 60px), 120vh) rotate(var(--rot, 40deg)); opacity: 0; }
.wall-say {
  margin-top: 10px; padding: 9px 12px; border-radius: 12px; background: var(--white); color: var(--ink);
  font: 600 0.86rem/1.35 var(--body); box-shadow: 0 6px 18px rgba(32, 48, 60, 0.18);
}
.wall-say b { color: var(--accent-dark); }
.wall-done {
  position: absolute; left: 0; right: 0; top: 0; padding: 16px; border-radius: 14px;
  background: var(--accent); color: #fff; font: 800 1.05rem/1.25 var(--display); text-align: center;
  opacity: 0; transform: scale(0.9); transition: opacity 0.4s, transform 0.4s;
}
.wall.is-done .wall-done { opacity: 1; transform: none; }
@media (max-width: 1239px) {
  .wall { top: auto; bottom: 0; left: 0; right: 0; width: auto; transform: none; padding: 8px 10px 10px; background: rgba(243, 246, 249, 0.96); border-top: 1px solid var(--pale); }
  .wall-bricks { gap: 4px; }
  .wall-row { gap: 4px; }
  .brick { min-height: 24px; padding: 2px 4px; font-size: 0.68rem; }
  .brick .lang { display: none; }
  .brick .kurz { display: inline; }
  .wall-say { margin-top: 6px; padding: 6px 10px; font-size: 0.8rem; box-shadow: none; background: var(--white); }
  .wall-done { top: 8px; left: 10px; right: 10px; font-size: 0.95rem; padding: 12px; }
  .tv-h3 { padding-bottom: 112px; }
}

/* ---------- Idee 7: Bewegungsmelder ---------- */
.lamp .cmp-stage { border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(32, 48, 60, 0.22); }
.lamp-dark { transition: opacity 0.5s ease; }

@media (prefers-reduced-motion: reduce) {
  .cmp-bubble, .chp-steps li, .brick, .wall-done, .lamp-dark { transition: none; }
}

/* ---------- Ergänzungen für die Humor-Seiten ---------- */
.wall-x {
  pointer-events: auto; position: absolute; top: -14px; right: -6px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: var(--pale-bg); color: var(--navy);
  font: 700 17px/28px var(--body); cursor: pointer;
}
.wall.is-off { display: none; }
.wall-say { min-height: 3.9em; }
@media (max-width: 1239px) {
  .wall-bricks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wall-row { display: contents; }
  .brick { min-height: 26px; }
  .wall-say { min-height: 0; }
  .wall-x { top: -12px; right: 6px; }
}
.h4-buzz .cmp-stage { animation: h4-buzz 0.6s ease; }
@keyframes h4-buzz {
  0%, 100% { transform: none; }
  15%, 45%, 75% { transform: translateX(-4px) rotate(-3deg); }
  30%, 60%, 90% { transform: translateX(4px) rotate(3deg); }
}
.h2-chp, .h6-chp { background: var(--navy); }
.h8-chp { background: var(--deep); }
.h8-chp .chp-steps li { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .h4-buzz .cmp-stage, .chp-skip { animation: none; } }

/* ---------- Storyselling ---------- */
.s1-panel, .s1-floor { transition: fill 0.4s ease; }
.s1-chp .chp-text h2, .s2-chp .chp-text h2 { font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: 1.15; }
.s1-chp .chp-steps li strong, .s2-chp .chp-steps li strong { display: block; margin-bottom: 6px; font: 700 1rem/1.2 var(--display); color: var(--accent); }
.s1-chp .chp-steps { min-height: 9.5em; }
@media (max-width: 760px) {
  .s1-chp .chp-text h2, .s2-chp .chp-text h2 { font-size: 1.2rem; }
  .s1-chp .chp-steps li strong, .s2-chp .chp-steps li strong { font-size: 0.9rem; margin-bottom: 3px; }
  .s1-chp .chp-steps { min-height: 7.6em; }
}
.st-fill { transition: fill 0.4s ease; }
.st-chp .chp-text h2 { font-size: clamp(1.45rem, 2.5vw, 2.05rem); line-height: 1.15; }
.st-chp .chp-steps { min-height: 11.5em; }
.st-chp .chp-steps li { font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.chp-steps li:not(.is-on) { pointer-events: none; }
.st-cta { display: inline-flex; margin-top: 16px; }
.st-big { display: block; font: 800 clamp(1.6rem, 3vw, 2.3rem)/1.1 var(--display); color: var(--accent); }
@media (max-width: 760px) {
  .st-chp .chp-text h2 { font-size: 1.2rem; }
  .st-chp .chp-steps { min-height: 10.5em; }
  .st-chp .chp-steps li { font-size: 0.98rem; line-height: 1.42; }
  .st-cta { margin-top: 10px; padding-top: 10px; padding-bottom: 10px; }
}
.st-chp .chp-dots { gap: 5px; }
.st-chp .chp-dots i { width: auto; flex: 1 1 0; min-width: 4px; max-width: 28px; }

/* Story v2: ohne feste Überschrift, größere Texte */
.st-noh2 .chp-text h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.sa-chp .chp-steps { min-height: 10em; }
.sa-chp .chp-steps li { font-size: clamp(1.3rem, 2.2vw, 1.8rem); line-height: 1.32; font-weight: 500; }
.st-lead { display: block; font: 800 clamp(1.8rem, 3.3vw, 2.7rem)/1.1 var(--display); color: var(--white); }
.st-green { color: var(--accent); }
@media (max-width: 760px) {
  .sa-chp .chp-steps { min-height: 8.6em; }
  .sa-chp .chp-steps li { font-size: 1.12rem; line-height: 1.38; }
  .st-lead { font-size: 1.55rem; }
}

/* Story v3: Überspringen und Wieder anzeigen */
.chp[hidden], .chp-restore[hidden] { display: none !important; }
.chp-skip {
  position: absolute; z-index: 5; top: 86px; right: var(--gutter);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px 8px 20px;
  border: 0; border-radius: 999px; background: var(--white); color: var(--ink);
  font: 700 1rem/1 var(--body); cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  animation: chp-skip-in 0.6s ease 0.4s both;
}
.chp-skip span {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; background: var(--navy); color: var(--white); font-size: 1.3rem; line-height: 1;
}
.chp-skip:hover { background: var(--pale-bg); }
.chp-skip:hover span { background: var(--ink); }
.chp-skip:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes chp-skip-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } to { opacity: 1; transform: none; } }
.chp-restore { background: var(--deep); color: var(--pale); }
.chp-restore p { max-width: var(--wrap); margin: 0 auto; padding: 14px var(--gutter); font: 500 0.95rem/1.4 var(--body); }
.chp-restore button { margin-left: 8px; padding: 0; border: 0; background: none; color: var(--white); font: 700 0.95rem/1.4 var(--body); text-decoration: underline; cursor: pointer; }
.chp-restore button:focus-visible { outline: 3px solid var(--white); outline-offset: 2px; }
.sa-chp .chp-steps { min-height: 6em; }
.sa-chp .chp-dots { margin-top: 28px; }
@media (max-width: 760px) {
  .chp-skip { top: 72px; min-height: 42px; padding: 6px 8px 6px 16px; font-size: 0.92rem; }
  .chp-skip span { width: 28px; height: 28px; }
  .sa-chp .chp-steps { min-height: 5em; }
  .sa-chp .chp-dots { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) { .chp-skip { animation: none; } }

/* Story v5: Hinweis „Weiterscrollen“ im ersten Schritt */
.st-hint { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font: 600 1rem/1 var(--body); color: var(--pale); }
.st-hint::after { content: "\2193"; display: inline-block; font-size: 1.2rem; animation: st-hint 1.4s ease-in-out infinite; }
@keyframes st-hint { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(5px); } }
@media (max-width: 760px) { .st-hint { margin-top: 12px; font-size: 0.92rem; } }
@media (prefers-reduced-motion: reduce) { .st-hint::after { animation: none; } }
