/* Homepage navigation: the same glass and coral/blue rim as the brief CTA. */
.home-scroll-control {
  position: fixed;
  z-index: 15;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 25, 35, 0.8);
  box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.35),
    inset 0 -6px 16px rgba(0, 0, 0, 0.75),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 160ms ease;
}
.home-scroll-control[hidden] { display: none; }
.home-scroll-control::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, #ffa091, #8da9fc);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.home-scroll-control svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
  transition: transform 180ms ease;
}
.home-scroll-control[data-scrollto="0"] svg { transform: rotate(180deg); }
.home-scroll-control:focus-visible { outline: 2px solid #cbd5ff; outline-offset: 5px; }
.home-scroll-control:active { background: #252c40; }
@media (hover: hover) and (pointer: fine) {
  .home-scroll-control:hover { background: rgba(45, 51, 69, 0.95); }
}
/* Keep the fixed control away from the final row of native-scroll footer links. */
@media (pointer: coarse), (max-height: 700px) {
  .galaxy { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
}
/* Consent occupies the same corner; do not leave a focusable control underneath it. */
body:has(.ds-analytics-consent:not([hidden])) .home-scroll-control { visibility: hidden; }
html.ds-project-open .home-scroll-control { visibility: hidden; }
body:has(.proj-modal.open) .home-scroll-control { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .home-scroll-control, .home-scroll-control svg { transition: none; }
}
