:root {
  --mf-accent: #3b82f6;
}

html {
  scroll-behavior: smooth;
}

.mf-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  width: var(--mf-progress, 0%);
  background: linear-gradient(90deg, #60a5fa, var(--mf-accent));
  z-index: 9999;
  transition: width 0.12s linear;
}

.mf-scroll-hint,
.mf-backtop {
  position: fixed;
  z-index: 9998;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.mf-scroll-hint {
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  border-radius: 999px;
  width: 44px;
  height: 60px;
  padding: 8px 6px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: 700 18px/1 Manrope, Arial, sans-serif;
  animation: mf-bob 1.8s ease-in-out infinite;
}

.mf-scroll-hint__mouse {
  width: 14px;
  height: 20px;
  border: 2px solid currentColor;
  border-radius: 10px;
  position: relative;
}

.mf-scroll-hint__mouse::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 50%;
  width: 2px;
  height: 4px;
  background: currentColor;
  transform: translateX(-50%);
  border-radius: 2px;
}

.mf-scroll-hint__arrow {
  line-height: 1;
}

.mf-scroll-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.mf-backtop {
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 700 17px/1 Manrope, Arial, sans-serif;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mf-backtop.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mf-scroll-hint:focus-visible,
.mf-backtop:focus-visible {
  outline: 2px solid var(--mf-accent);
  outline-offset: 2px;
}

.mf-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.mf-reveal.mf-in {
  opacity: 1;
  transform: none;
}

@keyframes mf-bob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-scroll-hint {
    animation: none;
  }

  .mf-reveal,
  .mf-backtop {
    transition: none;
  }
}
