/* ==========================================================================
   SCROLL-REVEAL — elementy pojawiają się przy przewijaniu
   Dodane 2026-11-15. Wcześniej animacje miały tylko 3 elementy hero.

   Zasady:
    - stan początkowy ustawiany WYŁĄCZNIE gdy <html> ma .reveal-ready
      (klasa dodawana przez JS) — bez JS treść jest zawsze widoczna,
    - prefers-reduced-motion wyłącza wszystko,
    - animacja na transform + opacity (kompozytor, bez layout thrash),
    - brak globalnej blokady: każde wejście w kadr działa niezależnie.
   ========================================================================== */

/* --- Stan początkowy: tylko elementy jeszcze nieodsłonięte --------------- */
html.reveal-ready :is(
    .value-card,
    .fact-card,
    .pkg-card,
    .faq-card,
    .bento-card,
    .compare-card,
    .contact-card,
    .stack-category,
    .card-project,
    .section-title,
    .section-subtitle,
    .section-tag,
    .pricing-calculator,
    .showcase-phone,
    .feature-card
):not(.is-revealed) {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
}

/* Karty bento i projekty — subtelniejsze, z lekkim skalowaniem */
html.reveal-ready :is(.portfolio-bento-grid article, .benefits-bento-grid > *):not(.is-revealed) {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(0.985);
}

/* --- Stan po odsłonięciu: animowane przejście --------------------------- */
html.reveal-ready :is(
    .value-card,
    .fact-card,
    .pkg-card,
    .faq-card,
    .bento-card,
    .compare-card,
    .contact-card,
    .stack-category,
    .card-project,
    .section-title,
    .section-subtitle,
    .section-tag,
    .pricing-calculator,
    .showcase-phone,
    .feature-card,
    .portfolio-bento-grid article,
    .benefits-bento-grid > *
).is-revealed {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition:
        opacity 0.62s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.62s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Hover: delikatne uniesienie (nadpisuje stan po odsłonięciu) -------- */
@media (hover: hover) and (pointer: fine) {
    html.reveal-ready .value-card.is-revealed:hover,
    html.reveal-ready .pkg-card.is-revealed:hover,
    html.reveal-ready .contact-card.is-revealed:hover,
    html.reveal-ready .bento-card.is-revealed:hover {
        transform: translate3d(0, -4px, 0) scale(1);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

/* --- Dostępność: pełne wyłączenie animacji ------------------------------ */
@media (prefers-reduced-motion: reduce) {
    html.reveal-ready :is(
        .value-card, .fact-card, .pkg-card, .faq-card, .bento-card,
        .compare-card, .contact-card, .stack-category, .card-project,
        .section-title, .section-subtitle, .section-tag,
        .pricing-calculator, .showcase-phone, .feature-card,
        .portfolio-bento-grid article, .benefits-bento-grid > *
    ):not(.is-revealed) {
        opacity: 1;
        transform: none;
    }
}
