/* ==========================================================================
   Page-to-page transition (desk <-> locker) + the big corner buttons that start it.
   Logic: js/transition.js.  A circle of light closes on the button you pressed, the
   new page opens from the middle (like a bulb coming on).
   ========================================================================== */
@property --r { syntax: "<length-percentage>"; inherits: false; initial-value: 150%; }

/* the new page starts hidden under black (this class is set by a tiny inline script in <head>) */
html.tr-in::after { content: ""; position: fixed; inset: 0; z-index: 9999; background: #000; pointer-events: none; animation: trFadeOut .3s 4s forwards; }  /* the delayed fade is a safety net */

.tr-veil { position: fixed; inset: 0; z-index: 9999; pointer-events: all; background: #000;
  --x: 50%; --y: 50%; --r: 150%;
  -webkit-mask-image: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 3px));
          mask-image: radial-gradient(circle at var(--x) var(--y), transparent var(--r), #000 calc(var(--r) + 3px)); }
.tr-veil::after { content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background: radial-gradient(circle at var(--x) var(--y), transparent calc(var(--r) - 40px), rgba(255,214,140,.25) var(--r), transparent calc(var(--r) + 40px)); }
.tr-veil.closing { animation: trClose .75s cubic-bezier(.6,0,.4,1) forwards; }
.tr-veil.opening { --r: 0px; animation: trOpen 1s cubic-bezier(.3,0,.2,1) forwards; }
@keyframes trClose { from { --r: 150%; } to { --r: 0px; } }
@keyframes trOpen  { from { --r: 0px; }  to { --r: 150%; } }
.tr-veil.fade-only { -webkit-mask-image: none; mask-image: none; animation: none; }
.tr-veil.fade-only.closing { animation: trFadeIn .4s forwards; }
.tr-veil.fade-only.opening { animation: trFadeOut .5s forwards; }
@keyframes trFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes trFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ---------- the big corner button: an icon you can't miss ---------- */
.nav-fab { position: fixed; right: 22px; bottom: 22px; z-index: var(--z-controls); display: grid; justify-items: center; gap: 4px;
  width: 92px; padding: 8px 6px 7px; text-decoration: none; color: var(--cream, #efe5c8);
  background: linear-gradient(180deg, #1a2342, #0b1030); border: 3px solid var(--ochre, #d9a441);
  box-shadow: 4px 6px 0 rgba(0,0,0,.6);
  opacity: 0; pointer-events: none; transition: opacity .8s 2s, transform .2s; }
.go .nav-fab, .locker-page .nav-fab { opacity: 1; pointer-events: auto; }
.nav-fab svg { width: 54px; height: 62px; display: block; overflow: visible; }
.nav-fab span { font: 15px/1 var(--font-comic, Bangers, Impact, sans-serif); letter-spacing: .09em; text-align: center; }
.nav-fab:hover, .nav-fab:focus-visible { transform: translateY(-3px) rotate(-2deg); background: linear-gradient(180deg, #243055, #101638); outline: none; }
.nav-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* the pulsing ring is a separate layer that grows and fades (animating box-shadow repainted the button, which floats over the scrolling page, every frame) */
.nav-fab::after { content: ""; position: absolute; inset: -3px; border: 3px solid rgba(255,200,110,.55); pointer-events: none; animation: fabpulse 2.8s ease-out infinite; }
@keyframes fabpulse { 0% { opacity: .8; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.32); } }
@media (max-width: 700px) { .nav-fab { width: 74px; right: 12px; bottom: 12px; } .nav-fab svg { width: 40px; height: 48px; } .nav-fab span { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .nav-fab::after { animation: none; display: none; } .tr-veil.closing, .tr-veil.opening { animation-duration: .01s; } }
