/* Shared GSAP runtime styles. Scene-specific rules live beside each scene. */

/*
 * Shared pinned-row frame.
 *
 * The row's authored margins remain untouched so ScrollTrigger measures a
 * stable natural trigger position. Vertical spacing found on the row's outer
 * gUI wrapper chain is normalised into these row paddings before scene styles
 * reset those wrappers.
 */
.gui-gsap-pinned-row-frame {
    padding-top: var(--gui-pinned-row-padding-top, 0px) !important;
    padding-bottom: var(--gui-pinned-row-padding-bottom, 0px) !important;
    height: calc(
            var(--gui-pinned-row-content-height, 0px)
            + var(--gui-pinned-row-height-adjustment, 0px)
    ) !important;
    min-height: calc(
            var(--gui-pinned-row-content-height, 0px)
            + var(--gui-pinned-row-height-adjustment, 0px)
    ) !important;
}

.gui-gsap-pinned-row-spacer {
    margin-top: var(--gui-pinned-row-margin-top, 0px) !important;
    margin-bottom: var(--gui-pinned-row-margin-bottom, 0px) !important;
}

/*
 * Text Reveal first-paint guard.
 *
 * Sequence JS is deliberately footer-loaded. Without a CSS guard the browser
 * can paint the authored text at full visibility, then GSAP applies the reveal
 * start state a frame later. The compiler emits semantic prehide flags into
 * data-gui-animation so we hide only the region participating in Text Reveal.
 * sequence.js releases the guard with data-gui-gsap-sequence-ready="1" after
 * tokenisation and the real GSAP initial state have been rendered.
 *
 * The delayed fallback keeps content accessible if the animation runtime ever
 * fails to initialise entirely.
 */
@keyframes gui-gsap-text-reveal-prehide-fallback {
    to { visibility: visible; }
}

[data-gui-animation*='"textRevealPrehideContainer":true']:not([data-gui-gsap-sequence-ready="1"]),
[data-gui-animation*='"textRevealPrehideTitleText":true']:not([data-gui-gsap-sequence-ready="1"]) .gui_title-text-holder,
[data-gui-animation*='"textRevealPrehideTitle":true']:not([data-gui-gsap-sequence-ready="1"]) .gui_title-holder,
[data-gui-animation*='"textRevealPrehideText":true']:not([data-gui-gsap-sequence-ready="1"]) .gui_text-holder,
[data-gui-animation*='"textRevealPrehideLinks":true']:not([data-gui-gsap-sequence-ready="1"]) .gui_btn-holder,
[data-gui-animation*='"textRevealPrehideMedia":true']:not([data-gui-gsap-sequence-ready="1"]) .gui_media-custom-holder,
[data-gui-animation*='"textRevealPrehideItems":true']:not([data-gui-gsap-sequence-ready="1"]) .gui_list-holder .gui_list > ul > li {
    visibility: hidden;
    animation: gui-gsap-text-reveal-prehide-fallback 0s 4s forwards;
}