/* =====================================================================
   reveal — scroll-triggered section build-up on the homepage.
   Elements carry .reveal (single block) or .reveal-group (its CHILDREN
   rise staggered); js/reveal.js observes them and adds .is-revealed.
   Motion language ("veredelt" 2026-07-07): expo-out easing, 34px rise,
   card grids additionally micro-scale from .97; a .fit-heading's gold
   ornament line draws itself left->right after the headline lands.

   FOUC/robustness contract (see home/index.phtml):
   - hiding only applies under html.has-reveal, which an inline <head>-time
     script sets ONLY with JS + IntersectionObserver + no reduced-motion
     -> no-JS, old browsers and reduced-motion always see everything.
   - html.reveal-safety (set 3s after load) force-shows anything the
     observer might have missed (belt and braces).
   - .is-settled (added by reveal.js once the animation has finished)
     detaches ALL reveal transitions again: card hovers get their own
     transition/transform back (the reveal rules would otherwise override
     .service-tile:hover & Co. forever) and will-change is released.
   ===================================================================== */

html.has-reveal .reveal:not(.is-settled),
html.has-reveal .reveal-group:not(.is-settled) > * {
    opacity: 0;
    transform: translateY(34px);
    /* smoother feel (user 2026-07-07/-08): speed reduced ~25% four times (0.9s -> 1.2s -> 1.6s -> 2.13s -> 2.84s), then nudged to a round 3.0s */
    transition: opacity 3.0s cubic-bezier(.16, 1, .3, 1), transform 3.0s cubic-bezier(.16, 1, .3, 1);
    will-change: opacity, transform;
}

/* card grids (the only .reveal-group users) additionally micro-scale in */
html.has-reveal .reveal-group:not(.is-settled) > * {
    transform: translateY(34px) scale(.97);
}

html.has-reveal .reveal.is-revealed:not(.is-settled),
html.has-reveal .reveal-group.is-revealed:not(.is-settled) > * {
    opacity: 1;
    transform: none;
}

/* signature detail: the heading's gold ornament line (static base style in
   sectionHeading.css) draws itself left->right after the headline lands */
html.has-reveal .fit-heading.reveal:not(.is-settled)::after {
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform 2.63s cubic-bezier(.16, 1, .3, 1) 1.13s;   /* scaled with the rise (~.88x duration, .38x delay) */
}
html.has-reveal .fit-heading.reveal.is-revealed:not(.is-settled)::after {
    transform: scaleX(1);
}

/* safety net: if reveal.js never ran, show everything after the timeout.
   MUST stay the LAST block: the :not(.is-settled) guards above raise the
   hiding rules to equal specificity, so source order decides. */
html.reveal-safety .reveal:not(.is-revealed),
html.reveal-safety .reveal-group:not(.is-revealed) > * {
    opacity: 1;
    transform: none;
}
html.reveal-safety .fit-heading.reveal:not(.is-revealed)::after {
    transform: scaleX(1);
}
