/* Global systems layered over every section: hit slides, section cut, edit flashes, background numerals.
   (Loads last; themes live in css/core.css, section layouts in css/sec-*.css.) */

/* hit slides (theme .signal): white, halftone, one word on marker */
#hyper-word .hw-word { color: #000; text-shadow: 1px 1px 0 #a3a3a3, 2px 2px 0 #9a9a9a, 3px 3px 0 #919191, 4px 4px 0 #878787, 5px 5px 0 #7d7d7d, 6px 6px 0 #737373, 7px 7px 0 #696969, 8px 8px 0 #5f5f5f, 9px 9px 0 #555, 10px 10px 0 #4b4b4b, 11px 11px 0 #414141, 12px 12px 0 #373737, 18px 22px 30px rgba(0,0,0,.25); }
#hyper-word .hw-lead { color: #1b1b1b; }
#tricked .tk-h .sw:last-child { color: var(--on-acc); position: relative; }
#tricked .tk-h .sw:last-child::before { content: ''; position: absolute; left: -.06em; right: -.08em; top: -.05em; bottom: -.18em; z-index: -1; background: var(--acc);
  transform: rotate(-1.2deg); -webkit-mask: var(--marker) 0 0 / 100% 100% no-repeat; mask: var(--marker) 0 0 / 100% 100% no-repeat; }

/* giant cropped outline numerals: section wayfinding + depth */
.bgnum {
  position: absolute !important; right: -70px; top: 30px; z-index: 0 !important; pointer-events: none;
  font: 400 1240px/.8 var(--f-display); letter-spacing: -.02em; color: transparent;
  -webkit-text-stroke: 2px rgba(255,255,255,.09);
}
.paper .bgnum, .xerox .bgnum { -webkit-text-stroke-color: rgba(0,0,0,.085); }
.signal .bgnum { -webkit-text-stroke-color: rgba(0,0,0,.12); }
.signal.flipped .bgnum { -webkit-text-stroke-color: rgba(255,255,255,.1); }
section[data-folio="off"] .bgnum { display: none; }

/* section cut overlay (outside reveal; its stage is scaled to match the slides) */
#xcut { position: fixed; inset: 0; z-index: 80; pointer-events: none; visibility: hidden; overflow: hidden; }
#xcut .xc-panels { position: absolute; inset: 0; display: flex; }
#xcut .xc-panels i { flex: 1; height: 100%; background: #000; box-shadow: inset -1px 0 0 rgba(255,255,255,.08); }
#xcut .xc-panels i.sig { background: #fff; }
#xcut .xc-name { color: #000; }
#xcut .xc-img { position: absolute; inset: 0; background: #000 50% 50% / cover no-repeat; opacity: 0; }
#xcut .xc-img.fit { background-size: contain; }
#xcut .xc-stage { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform: translate(-50%, -50%) scale(var(--rs, .5)); }
#xcut .xc-in { position: absolute; inset: 0; }
#xcut .xc-num { position: absolute; left: 70px; top: 40px; font: 400 980px/.8 var(--f-display); letter-spacing: -.02em; color: #fff; white-space: nowrap; mix-blend-mode: difference; }
#xcut.outline .xc-num { color: transparent; -webkit-text-stroke: 4px #fff; }
#xcut .xc-name { position: absolute; left: 96px; bottom: 120px; font: 700 132px/.95 var(--f-head); text-transform: uppercase; color: #000; white-space: nowrap; padding: 14px 30px 4px; z-index: 2; }
#xcut .xc-name::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #fff; transform: scaleX(var(--k, 1)) rotate(-1deg); transform-origin: 0 50%;
  -webkit-mask: var(--marker) 0 0 / 100% 100% no-repeat; mask: var(--marker) 0 0 / 100% 100% no-repeat; }
#xcut .xc-meta { position: absolute; right: 96px; bottom: 132px; font: 400 20px/1 var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: #fff; mix-blend-mode: difference; }

/* flash frame for impacts (white on dark slides, black on light ones; set by the engine) */
#flash { position: fixed; inset: 0; z-index: 85; pointer-events: none; opacity: 0; background: #fff; }
/* edit flash: the whole frame inverts for a couple of frames */
.reveal.fx-invert { filter: invert(1); }

/* component hooks used by scenes */
#welcome .w-dot, #finale .fn-dot { display: inline-block; width: .14em; height: .14em; margin-left: .02em; vertical-align: baseline; }
#ascension .as-item { --k: 0; }
#ascension .as-item::after { content: ''; position: absolute; left: 14px; right: 14px; top: 50%; height: 5px; margin-top: -2px; background: var(--x-c); transform: scaleX(var(--k)); transform-origin: 0 50%; }
.ticks.anim > li { --k: 1; }
.ticks.anim > li::after { content: ''; position: absolute; left: 4px; top: calc(.42em + 4px); width: 10px; height: 10px; background: var(--acc); transform: scale(var(--k)); }
#meetings .ds-table td, #meetings .ds-lead { position: relative; }
#meetings .ds-bar { position: absolute; left: -6px; right: -6px; top: 3%; bottom: 3%; background: #000; transform-origin: 0 50%; }
#args .ar-board b { display: inline-block; font-weight: 400; }
#here-it-is .hi-bar { transform-origin: 100% 50%; }
#finale .fn-steel { background-size: 100% 300%; }

/* echo: outline ghosts that blow out of a word as it lands (made by the engine, removed on leave) */
.echo-ghost { position: absolute !important; z-index: 0 !important; margin: 0 !important; pointer-events: none; color: transparent !important; -webkit-text-stroke: 2px var(--fg); white-space: nowrap; }

@media print { #xcut, #flash { display: none !important; } }
@media (prefers-reduced-motion: reduce) { #xcut { display: none !important; } }
.echo-ghost::before, .echo-ghost *::before, .echo-ghost::after, .echo-ghost *::after { display: none !important; }
.echo-ghost * { color: transparent !important; background: none !important; }

/* SVG labels get a halo in the slide colour so strokes never run through the letters */
.mx-svg .lbl, .mx-svg .sub, svg text.svg-mono { paint-order: stroke fill; stroke: var(--bg); stroke-width: 7px; stroke-linejoin: round; }
.mx-svg .onband .lbl, .mx-svg .onband .sub, .mx-svg .wedge ~ .lbl, .mx-svg .wedge ~ .sub { stroke: none; }
.fg-stage .ann { background: var(--bg); padding: 2px 6px 1px; margin-left: -6px; }
/* SplitText line masks: let descenders hang below the line instead of being clipped */
.sl-mask { padding-bottom: .26em; margin-bottom: -.26em; }

/* letterbox bands (measured: v4/v5/v8 frame their footage in black bars); the engine rides them in on entry */
.lbox { position: absolute !important; inset: 0; z-index: 45 !important; pointer-events: none; }
.lbox i { position: absolute; left: 0; right: 0; top: 0; height: 34px; background: #000; transform-origin: 50% 0; box-shadow: 0 1px 0 rgba(255,255,255,.16); }
.lbox i:last-child { top: auto; bottom: 0; transform-origin: 50% 100%; box-shadow: 0 -1px 0 rgba(255,255,255,.16); }
/* section-cut inserts: 2-frame white line drawings laid over the flash image */
#xcut .xc-ins { position: absolute; inset: 0; margin: auto; height: 86vh; width: auto; opacity: 0; visibility: hidden; mix-blend-mode: screen; pointer-events: none; }

/* the website's own name and credit: shown on the page, left out of the slide export (?pptx) */
.pptx .site-only { display: none !important; }
