/* film grain overlay */
.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* skip link */
.skip-link {
  position: fixed;
  top: -60px;
  left: 1rem;
  z-index: 100;
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

/* scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: var(--z-progress);
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* custom cursor (pointer:fine only) */
.cursor,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
}
.cursor {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
}
.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-accent);
  transition:
    width 0.3s var(--ease-out),
    height 0.3s var(--ease-out);
}
.cursor-ring.is-active {
  width: 64px;
  height: 64px;
}
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button {
  cursor: none;
}

@media (pointer: coarse) {
  .cursor,
  .cursor-ring {
    display: none;
  }
}
