/* ==========================================================
   PREMIUM — animacje, mikro-interakcje, dopracowanie (€10k feel)
   ========================================================== */

/* ---- Scroll reveal ---- */
@media (prefers-reduced-motion: no-preference) {
    .bib-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
    .bib-reveal.bib-in { opacity: 1; transform: none; }
    /* stagger dla kart w siatce */
    .bib-feat-grid .bib-in:nth-child(2){transition-delay:.06s}
    .bib-feat-grid .bib-in:nth-child(3){transition-delay:.12s}
    .bib-feat-grid .bib-in:nth-child(4){transition-delay:.18s}
    .bib-feat-grid .bib-in:nth-child(5){transition-delay:.24s}
    .bib-feat-grid .bib-in:nth-child(6){transition-delay:.30s}
    .bib-feat-grid .bib-in:nth-child(7){transition-delay:.36s}
    .bib-why-grid .bib-in:nth-child(2){transition-delay:.08s}
    .bib-why-grid .bib-in:nth-child(3){transition-delay:.16s}
    .bib-why-grid .bib-in:nth-child(4){transition-delay:.24s}
}

/* ---- Pasek postępu przewijania (subtelny, na górze) ---- */
#bib-scrollbar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 99999990; background: linear-gradient(90deg,#38bdf8,#6366f1,#ec4899); transition: width .1s linear; pointer-events: none; }
body.bib-has-editbar #bib-scrollbar { top: 46px; }

/* ---- Przyciski: połysk + lift ---- */
.bib-hero-cta, .bib-why-cta, .bib-mob-phone, .bib-post-more {
    position: relative; overflow: hidden;
}
.bib-hero-cta::after, .bib-why-cta::after {
    content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg); transition: left .6s;
}
.bib-hero-cta:hover::after, .bib-why-cta:hover::after { left: 130%; }

/* ---- Karty: głębszy, miększy cień + płynniejszy lift ---- */
.bib-feat-card, .bib-why-card, .bib-post-card, .bib-pkg-card, .bib-slide, .bib-info-card {
    transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s cubic-bezier(.2,.7,.2,1) !important;
}

/* ---- Sekcje: delikatne przejście tła ---- */
.bib-sec { position: relative; }

/* ---- Linki w nawigacji: podkreślenie animowane ---- */
.bib-hdr-nav li > a { position: relative; }
.bib-hdr-nav li > a::after {
    content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px;
    background: #e8420a; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.bib-hdr-nav li > a:hover::after, .bib-hdr-nav li.current-menu-item > a::after { transform: scaleX(1); }

/* ---- Obrazy: subtelny zoom przy hover w kartach (już jest), ujednolicony ---- */
.bib-slide-img img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.bib-slide:hover .bib-slide-img img { transform: scale(1.06); }

/* ---- Sekcja menu: tło z delikatnym wzorem ---- */
.bib-menu { position: relative; }
.bib-menu::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 15% 10%, rgba(56,189,248,.06), transparent 40%),
               radial-gradient(circle at 85% 90%, rgba(99,102,241,.06), transparent 40%);
    pointer-events: none;
}

/* ---- Płynne przewijanie + focus-visible dostępność ---- */
html { scroll-behavior: smooth; }
a:focus-visible, button:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; border-radius: 6px; }

/* ---- Selekcja tekstu w kolorach marki ---- */
::selection { background: #38bdf8; color: #fff; }

/* ---- Skip link (dostępność) ---- */
.bib-skip { position: fixed; top: -60px; left: 12px; z-index: 2147483647; background: #1e293b; color: #fff; padding: 10px 18px; border-radius: 0 0 10px 10px; font-weight: 700; text-decoration: none; transition: top .2s; }
.bib-skip:focus { top: 0; }

/* ---- Przycisk „do góry" ---- */
#bib-totop {
    position: fixed; left: 24px; bottom: 24px; z-index: 9990;
    width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(135deg,#38bdf8,#6366f1); color: #fff; font-size: 22px; font-weight: 800;
    box-shadow: 0 8px 22px rgba(99,102,241,.4);
    opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .25s;
}
#bib-totop.show { opacity: 1; visibility: visible; transform: none; }
#bib-totop:hover { transform: translateY(-3px); }
@media (max-width: 600px) { #bib-totop { left: 16px; bottom: 90px; width: 44px; height: 44px; } }
