/* ============================================================
   Back to top button (totop-) — a floating pill at the bottom
   left of the viewport (Sami corrected right -> left, 2026-12-01), in the spirit of Sami's reference:
   near-black pill, a light circle with a dark up-arrow at its
   left, white "Back to Top" text.
   Hidden until the visitor has scrolled past the MIDDLE of the
   page, then it fades in (opacity + a slight upward settle) and
   stays to the very bottom; scrolling back above the midpoint
   fades it out. The .totop-on class is toggled by the small
   script beside its markup in index.html.
   z-index 8: floats above the fixed blur bar (z 5) so it sits
   cleanly over the blur zone, below the hero header (z 10) and
   its mobile dropdown (z 20).
   ============================================================ */
.totop-btn{
  position:fixed;
  left:22px;
  bottom:26px;
  z-index:8;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:6px 18px 6px 6px;
  background:#101010;
  border:1px solid rgba(249,249,249,.16);
  border-radius:999px;
  box-shadow:0 8px 24px rgba(0,0,0,.45);
  color:#F9F9F9;
  font-family:'Archivo',sans-serif;
  font-size:14.5px;
  font-weight:500;
  letter-spacing:.01em;
  line-height:1;
  cursor:pointer;
  /* Hidden state: transparent, settled 10px low, inert. The
     visibility delay keeps it unclickable while it fades out. */
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(10px);
  transition:opacity .3s ease,transform .3s ease,visibility 0s linear .3s,border-color .2s ease,background .2s ease;
}
.totop-btn.totop-on{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0);
  transition:opacity .3s ease,transform .3s ease,visibility 0s,border-color .2s ease,background .2s ease;
}
@media (hover:hover){
  .totop-btn:hover{background:#181818;border-color:rgba(249,249,249,.32);}
}
.totop-btn:focus-visible{outline:2px solid #E85002;outline-offset:3px;}
.totop-ic{
  flex:none;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#F5F5F5;
  color:#111111;
  display:flex;
  align-items:center;
  justify-content:center;
}
.totop-ic svg{width:15px;height:15px;display:block;}
.totop-txt{white-space:nowrap;}
@media (max-width:640px){
  /* Mobile (Sami, 2026-12-01): icon only — the text is hidden and
     the pill collapses to the arrow circle — and the button moves
     to the bottom RIGHT. Desktop keeps the full pill at bottom-left. */
  .totop-btn{left:auto;right:16px;bottom:20px;gap:0;padding:5px;}
  .totop-txt{display:none;}
  .totop-ic{width:26px;height:26px;}
  .totop-ic svg{width:13px;height:13px;}
}
@media (prefers-reduced-motion:reduce){
  .totop-btn,.totop-btn.totop-on{transition:none;}
}
