/* MFZ_PA 2026-11-12 — cover/welcome motion + lighting layer ("Option B: Skyline", gold-wireframe
   dusk skyline). NEW FILE, scoped entirely to #deck.k-cover — a no-op (display:none) for every
   other scene, so it cannot touch stat/keypoints/gift/video/winner/thanks (deck-enrich's territory)
   or guest/mc. Loaded after deck.css + deck-enrich.css so these rules can safely extend the
   existing .d-kicker/.d-title/.d-sub/.d-tag/.dhead selectors without editing those files.
   GPU budget: transform + opacity only (no layout-affecting properties animated). */

.cover-stage { position: absolute; inset: 0; z-index: 0; display: none; overflow: hidden; pointer-events: none; }
#deck.k-cover .cover-stage { display: block; }
/* V5 (2026-11-16): `position:relative` DROPPED here — .dcontent is already `position:absolute` +
   `z-index:2` from deck.css's base rule, and this redundant override was silently breaking the new
   3-thirds cover layout's `left:33.334cqw;right:33.334cqw` (deck.css #deck.k-cover .dcontent): on a
   relatively-positioned element, left/right are flow OFFSETS, not box edges, so the centre column
   never actually narrowed — it just overlapped the left logo third. z-index:2 alone (already set by
   the base rule anyway) is all this ever needed. */
#deck.k-cover .dwrap { background: #060402; }

/* V7 (2026-11-16, Fable spec): real photographic dusk render (was an illustrated/gradient skyline),
   darkened with an espresso multiply-style overlay fading to solid #291811 toward the bottom so the
   stage dead-zone reads dark and quiet. Slow Ken Burns kept (subtle cinematic zoom, not "sparkle/
   dust" — that's a different effect, removed below per the spec's explicit kill-list). */
.cover-bg {
  position: absolute; inset: -3%; width: 106%; height: 106%;
  background-image: url("/static/assets/gridline-renders/Cam06.jpg");
  background-size: cover; background-position: center 42%;
  filter: saturate(.9) brightness(.88);
  transform-origin: 50% 55%;
}

/* V7: the old warm-gold sunrise-horizon lift, light sweep, window-twinkle and rising-dust layers were
   all built for the illustrated cartoon skyline this scene no longer uses — Fable's spec explicitly
   kills "sparkle/dust" animation and the old warm-gold treatment. Their markup stays in led.html
   (harmless, display:none) rather than touching that file's DOM structure for a same-night build. */
.cover-horizon, .cover-sweep, .cover-twinkle, .cover-dust, .cover-glow { display: none; }

/* V7: single full-stage espresso scrim, fading from a light top wash to solid #291811 at the bottom
   (same gradient language as .d-herobg::after elsewhere in deck.css) — replaces the old warm-gold
   radial text-column scrim. Not scaled by the Ken Burns zoom (sits on its own static layer) so the
   bottom stays reliably dark/solid regardless of the image's pan/zoom state.
   V7 fix (found in the first real-render screenshot pass): Cam06's own baked-in "Gridline" building
   signage sits at almost exactly the same height/column as the static .ct-left "Gridline." wordmark,
   reading as a faint doubled ghost behind it. A second, horizontal darkening pass (strongest under the
   two side logo columns, clear through the centre third where the event info sits) fixes this without
   needing a different source photo or repositioning the real logos off their established 3-thirds grid. */
.cover-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(41,24,17,.6) 0%, rgba(41,24,17,.62) 28%, transparent 36%, transparent 64%, rgba(41,24,17,.62) 72%, rgba(41,24,17,.6) 100%),
    linear-gradient(180deg, rgba(41,24,17,.38) 0%, rgba(41,24,17,.6) 48%, rgba(41,24,17,.95) 100%);
}

/* ── duplicate-date fix: cover already states the date once in its own .d-tag at the bottom;
   the persistent .dhead meta line at top repeated it — keep the logo, drop the repeated text. ── */
#deck.k-cover .dhead .dmeta { display: none; }

/* MFZ_PA 2026-11-14 (MFZ mid-task: cover logo → centered top, every other scene keeps it top-right).
   .dmeta is display:none above, so .dhead has exactly one visible flex child (.dlogo) on this scene —
   justify-content:center centers it alone, no absolute-positioning juggling needed. Vertical position
   (top:2.6cqh) and size (6.6cqh, deck.css) are untouched, so it still clears the title (.dcontent top
   inset 13cqh) by the same margin as every other scene. */
#deck.k-cover .dhead { justify-content: center; }

/* ── calm, staggered text entrance — fires every time deck.js re-renders .dcontent's innerHTML
   (fresh elements ⇒ animation restarts naturally, no JS needed) ── */
#deck.k-cover .d-kicker, #deck.k-cover .d-title, #deck.k-cover .d-welcome-ar, #deck.k-cover .d-sub, #deck.k-cover .d-tag {
  opacity: 0; transform: translateY(.9cqh);
  animation: coverIn .9s cubic-bezier(.19,1,.22,1) both;
}
#deck.k-cover .d-kicker { animation-delay: .05s; }
#deck.k-cover .d-title  { animation-delay: .28s; }
/* MFZ_PA 2026-11-12: "Welcome / أهلاً بكم" bilingual pairing — sits right under the English title,
   same gold family as d-tag but a touch larger, between the title's weight and the Arabic sub. */
#deck.k-cover .d-welcome-ar { animation-delay: .42s; font-size: 4.6cqh; font-weight: 600; color: var(--gold2); letter-spacing: .01em; margin-top: -.6cqh; }
#deck.k-cover .d-sub    { animation-delay: .55s; }
#deck.k-cover .d-tag    { animation-delay: .85s; }

@keyframes coverIn { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: no-preference) {
  .cover-bg      { animation: kCoverKenBurns 42s ease-in-out infinite alternate; }
  .cover-horizon { animation: kCoverHorizon 14s ease-in-out infinite; }
  .cover-sweep   { animation: kCoverSweep 10s cubic-bezier(.4,0,.2,1) infinite; animation-delay: 2s; }
  .cover-glow    { animation: kCoverGlow 7s ease-in-out infinite; }
}

@keyframes kCoverKenBurns {
  from { transform: scale(1) translate(0, 0); }
  to   { transform: scale(1.07) translate(-1.2%, -0.6%); }
}
@keyframes kCoverHorizon { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
/* travel is in cqw (container width units) so it's exact: start left -46cqw, band 40cqw wide.
   0%→38% is the actual pass (eased by the animation's own cubic-bezier, so it reads as a calm
   ease-in-out sheen, not a constant-speed wipe); 38%→100% HOLDS the band fully off-screen right
   (left ends at 150cqw ⇒ right edge at 190cqw, i.e. 90cqw clear past the 100cqw viewport edge) —
   that hold is the "calm pause between passes" and, since both the start and end position sit
   fully transparent off-screen, the infinite loop restart is seamless with no jump/pop. */
@keyframes kCoverSweep   { 0% { transform: translateX(0); } 38% { transform: translateX(150cqw); } 100% { transform: translateX(150cqw); } }
@keyframes kCoverGlow    { 0%, 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); } }

@keyframes kCoverTwinkleIn  { 0% { opacity: 0; } 55% { opacity: 0; } 70% { opacity: 1; } 85% { opacity: .55; } 100% { opacity: .85; } }
@keyframes kCoverDustRise   { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: .9; } 85% { opacity: .5; } 100% { opacity: 0; transform: translate(var(--dx, 2cqw), -62cqh); } }

@media (prefers-reduced-motion: no-preference) {
  .cover-twinkle span { animation: kCoverTwinkleIn 1.6s ease-out forwards; }
  .cover-dust span { animation: kCoverDustRise var(--dur, 14s) ease-in var(--delay, 0s) infinite; }
}

@media (prefers-reduced-motion: reduce) {
  .cover-bg, .cover-horizon, .cover-sweep, .cover-glow, .cover-twinkle span, .cover-dust span { animation: none !important; }
  .cover-twinkle span { opacity: .75; }
  #deck.k-cover .d-kicker, #deck.k-cover .d-title, #deck.k-cover .d-welcome-ar, #deck.k-cover .d-sub, #deck.k-cover .d-tag { animation: none; opacity: 1; transform: none; }
}
