/* Shared page scrollbar: same ambient hairline rail used by the portfolio landing. */
html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

body {
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.scroll-rail {
  position: fixed;
  top: var(--scroll-rail-top, 0px);
  right: 0;
  z-index: var(--scroll-rail-z, 120);
  width: 1px;
  height: calc(100vh - var(--scroll-rail-top, 0px));
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(243, 241, 236, .05) 12%,
    rgba(243, 241, 236, .05) 88%,
    transparent 100%
  );
  transition:
    top .6s cubic-bezier(.22, 1, .36, 1),
    height .6s cubic-bezier(.22, 1, .36, 1),
    opacity .5s ease;
}

.scroll-rail.is-ready {
  opacity: 1;
}

.scroll-rail__bead {
  position: absolute;
  top: 0;
  right: -2px;
  width: 5px;
  height: 48px;
  border-radius: 0;
  background: var(--amber, #ff8a3d);
  opacity: .35;
  will-change: transform, opacity;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6);
  transition: opacity .6s ease;
}

.scroll-rail.is-active .scroll-rail__bead {
  opacity: 1;
}

.scroll-rail__tick {
  position: absolute;
  right: 0;
  width: 14px;
  height: 1px;
  background: var(--amber, #ff8a3d);
  opacity: 0;
  transition: opacity .6s ease;
}

.scroll-rail.is-active .scroll-rail__tick {
  opacity: .55;
}

.scroll-rail__pct {
  position: absolute;
  right: 18px;
  color: var(--amber, #ff8a3d);
  font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-size: 10px;
  letter-spacing: .18em;
  opacity: 0;
  white-space: nowrap;
  transform: translateY(-50%);
  mix-blend-mode: screen;
  transition: opacity .5s ease;
}

.scroll-rail.is-active .scroll-rail__pct {
  opacity: .85;
}

@media (max-width: 640px) {
  .scroll-rail {
    display: none;
  }
}
