/* WHOLE STACK Reveal: Schriftzug-Maske über dem Video */
.nav-video-sentinel { height: 1px; width: 100%; pointer-events: none; visibility: hidden; }

.whole-stack-section { position: relative; height: 300vh; background: var(--ws-bg, var(--bg)); z-index: 2; }

.ws-stage {
  position: relative; height: 100vh; width: 100%; overflow: clip; overflow-clip-margin: 120px;
  background: var(--ws-bg, var(--bg)); display: flex; flex-direction: column;
  --ws-nav-gap: 12px;
  padding: calc(var(--topnav-scroll-offset, 72px) + var(--ws-nav-gap)) 4vw 32px;
}

.ws-top, .ws-bot {
  display: flex; justify-content: space-between; align-items: center;
  color: var(--fg); flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
}
.ws-top { padding: 0 6px 18px; }
.ws-bot { padding: 18px 6px 0; color: var(--fg-mute); }
.ws-top .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ws-gold); margin-right: 10px; vertical-align: middle; }
.ws-top .red { color: var(--ws-gold); }
.ws-bot .seg { display: flex; gap: 24px; align-items: center; }
.ws-bot .seg span .num { color: var(--ws-gold); margin-right: 6px; }
.ws-bot .meta-mark { color: var(--fg); }

.ws-frame {
  position: relative; flex: 1 1 auto; width: 100%; min-height: 0;
  border-radius: 14px; overflow: hidden; background: var(--ws-bg, var(--bg));
  isolation: isolate; box-shadow: 0 0 0 transparent;
  transform-origin: 50% 0%; will-change: transform, box-shadow;
}
@media (max-width: 768px) {
  .ws-frame { will-change: box-shadow; }
}

.ws-video {
  /* Video ragt 1px über den Rahmen, damit beim Skalieren keine Haarlinie am Rand bleibt */
  position: absolute; top: -1px; left: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; max-height: none;
  object-fit: cover; object-position: center center; z-index: 1;
  background: var(--ws-bg, var(--bg)); transform: translateZ(0);
}

.ws-mask-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; pointer-events: none; }
.ws-mask-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; pointer-events: none; }
.ws-mask-paper { fill: var(--ws-bg, var(--bg)); }
/* Dunkelmodus: Deckfläche als warmer Espresso-Verlauf, darüber ein weicher Goldschein
   hinter dem Schriftzug. Im hellen Modus bleibt die Spot-Ebene aus. */
/* Deckfläche wie der Problem-Abschnitt: Seitengrund, unten ein weicher Goldboden (beide Modi) */
.ws-mask-spot { fill: url(#ws-floor-grad); }
[data-theme='dark'] .ws-mask-paper { fill: var(--ws-bg, var(--bg)); }
[data-theme='dark'] .ws-mask-spot { fill: url(#ws-floor-grad); }
.ws-mask-text { fill: #000; text-rendering: geometricPrecision; }

.ws-caption {
  position: absolute; left: 0; right: 0; bottom: 36px; z-index: 4; text-align: center;
  color: var(--ws-letter-color, var(--bone, #F7F3EC));
  font-family: var(--font-display); text-transform: uppercase;
  font-size: clamp(20px, 2.4vw, 30px); letter-spacing: 0.04em;
  opacity: 0; transform: translateY(24px); mix-blend-mode: difference; pointer-events: none;
}
.ws-caption .arrow { display: inline-block; margin-left: 14px; color: var(--ws-gold); font-family: var(--font-mono); font-size: 0.6em; letter-spacing: 0; transform: translateY(-2px); }

@media (max-width: 768px) {
  .ws-stage { --ws-nav-gap: 8px; padding: calc(var(--topnav-scroll-offset, 64px) + var(--ws-nav-gap)) 4vw 22px; }
  .ws-bot .seg { gap: 14px; font-size: 9.5px; }
  .ws-bot .seg-r { display: none; }
  .ws-caption { font-size: 18px; bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-caption { opacity: 1 !important; transform: none !important; }
}
