/* ============================================================
   Bubl — shared chrome for the case variants (A · B · C)
   ============================================================ */

/* ---- header inside the case: fixed, translucent navy at the top,
        hides on scroll-down, comes back solid on scroll-up ---- */
body[data-bubl-case] .site-header {
  position: fixed; top: 0; left: 0; right: 0;
  background: var(--bg);
  transition: transform 240ms cubic-bezier(.2,.7,.2,1), background 220ms cubic-bezier(.2,.7,.2,1);
}
/* at the very top the header is a navy sign over the tunnel entrance; the foam starts under it */
body[data-bubl-case].bubl-top .site-header { background: #150C62; }
body[data-bubl-case].bubl-top .wordmark-img { filter: invert(1); }
body[data-bubl-case].bubl-top .theme-toggle,
body[data-bubl-case].bubl-top .menu-btn { color: #fff; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35); }
body[data-bubl-case].bubl-header-hidden .site-header { transform: translateY(-100%); }
body[data-bubl-case] { overflow-x: clip; }
/* page-in must not use transform inside the case (fixed layers would jump) */
body[data-bubl-case] .page { animation-name: bx-page-in; }
@keyframes bx-page-in { from { opacity: 0; } to { opacity: 1; } }
/* the viewport simulator must not create a scroll container (kills sticky/pin) */
body.sim-viewport #root { overflow: clip; }

/* ---- foam canvas ---- */
/* Lives inside <main> (its own stacking context, z 1), so it always sits under the
   site header (40) and the mobile menu (60); z 30 orders it against the case's own layers. */
.bx-foam { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; display: block; }
.bx-foam-static { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0.92; }

/* ---- primitives ---- */
.bx-phone { border: 6px solid #0E0B33; border-radius: 30px; overflow: hidden; background: #fff; aspect-ratio: 440 / 956; box-shadow: 0 30px 60px -30px rgba(21, 12, 98, 0.55); }
.bx-phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.bx-phone--dark { border-color: #2A2542; }
.bx-ph { display: flex; align-items: center; justify-content: center; text-align: center; border: 2px dashed rgba(21, 12, 98, 0.35); border-radius: 16px; background: rgba(255, 255, 255, 0.5); padding: 12px; min-height: 120px; }
.bx-ph span { font-size: 11.5px; font-weight: 600; opacity: 0.55; word-break: break-all; }
.bx-sr-focus { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.bx-sr-focus:focus { position: static; width: auto; height: auto; padding: 6px 12px; background: #A8FB66; color: #150C62; border-radius: 999px; font-weight: 800; }
.bx-tail { font-family: var(--font); color: var(--fg); position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  body[data-bubl-case] .site-header { transition: none; }
}
