/* Public route effects use existing text, artwork and diagram paths through
   finite Web Animations. No generated frame, edge cover, light wipe, hidden
   loading state or layout override is needed. Without JavaScript, or when
   reduced motion is requested, the ordinary page styles remain unchanged. */

/* Applied only after the observer and motion API have been validated. Keep
   native geometry and keyboard access while each whole chapter waits its turn. */
[data-public-motion-state="waiting"] { opacity: 0; pointer-events: none; }
@media (max-width: 1120px) {
    [data-public-motion-state="waiting"] { opacity: 1; pointer-events: auto; }
}
@media (max-width: 1120px) {
    [data-public-motion-held="pricing-workflow"][data-public-motion-state="waiting"] { opacity: 0; pointer-events: none; }
}
@media (max-width: 760px) {
    [data-phone-email-stage="waiting"] { visibility: hidden; pointer-events: none; }
}
@media (min-width: 761px) and (max-width: 1120px) {
    [data-tablet-facts-stage="waiting"] { visibility: hidden; pointer-events: none; }
}
@media (max-width: 1120px) {
    html[data-intro-pending="home"] .hero-build-scene,
    .hero-build[data-intro-device-stage="waiting"] .hero-build-scene { visibility: hidden; }
    .hero-build[data-intro-device-stage="placing"] .hero-build-scene { visibility: visible; }
}

/* The head bootstrap prevents a full-content flash before the coordinated
   owner measures the actual headline. Its helper removes this gate on failure. */
html[data-intro-pending] :is(.studio-hero, .svc-hero, .prc-hero, .pcs-hero, .abt-hero, .inq-contact-section) {
    height: 100svh;
    min-height: 0;
    overflow: clip;
}
html[data-intro-pending] :is(.studio-hero, .svc-hero, .prc-hero, .pcs-hero, .abt-hero, .inq-contact-section) > * { visibility: hidden; }
html[data-intro-pending] main h1 { visibility: hidden; }
html[data-intro-pending] main h1 > span:first-child {
    position: fixed;
    z-index: 4;
    top: calc(50svh + var(--header-height, 80px) / 2);
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 36px);
    margin: 0;
    visibility: visible;
    text-align: center;
    transform: translate(-50%, -50%);
}

/* One temporary viewport stage, then one measured return to natural height.
   These selectors stop applying at completion and never frame body sections. */
[data-intro-stage="staging"], [data-intro-stage="settling"] {
    height: var(--intro-stage-height);
    min-height: 0;
    overflow: clip;
}
[data-intro-title] {
    position: fixed;
    z-index: 4;
    top: var(--intro-y);
    left: var(--intro-x);
    width: var(--intro-width);
    margin: 0;
}
/* A fixed tablet flex heading must retain its measured column width rather
   than inheriting the native title's more-specific width:100% rule. */
.inq-contact-copy .page-intro-title[data-intro-title] { width: var(--intro-width); }
[data-intro-title-slot] { display: block; box-sizing: border-box; flex: 0 0 auto; min-width: 0; visibility: hidden; pointer-events: none; }
[data-intro-companion="waiting"] { visibility: hidden; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    [data-public-motion-state="waiting"] { opacity: 1; pointer-events: auto; }
    [data-public-motion-held="pricing-workflow"][data-public-motion-state="waiting"] { opacity: 1; pointer-events: auto; }
    [data-intro-companion="waiting"] { visibility: visible; pointer-events: auto; }
    [data-intro-title] { position: static; width: auto; }
    [data-intro-title-slot] { display: none; }
    [data-phone-email-stage="waiting"] { visibility: visible; pointer-events: auto; }
    [data-tablet-facts-stage="waiting"] { visibility: visible; pointer-events: auto; }
    .hero-build[data-intro-device-stage] .hero-build-scene { visibility: visible; }
    [data-intro-stage="staging"], [data-intro-stage="settling"] { height: auto; overflow: visible; }
}

@media print {
    [data-public-motion-state="waiting"] { opacity: 1; pointer-events: auto; }
    [data-public-motion-held="pricing-workflow"][data-public-motion-state="waiting"] { opacity: 1; pointer-events: auto; }
    [data-intro-companion="waiting"] { visibility: visible; pointer-events: auto; }
    [data-intro-title] { position: static; width: auto; }
    [data-intro-title-slot] { display: none; }
    [data-phone-email-stage="waiting"] { visibility: visible; pointer-events: auto; }
    [data-tablet-facts-stage="waiting"] { visibility: visible; pointer-events: auto; }
    .hero-build[data-intro-device-stage] .hero-build-scene { visibility: visible; }
    [data-intro-stage="staging"], [data-intro-stage="settling"] { height: auto; overflow: visible; }
}
