


.grain {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: 80;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6  0 0 0 0 1  0 0 0 0 0.4  0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grain-shift 1.2s steps(6) infinite;
  will-change: transform;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -3%); }
  60%  { transform: translate(-2%, -2%); }
  80%  { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }


html.no-heavy-fx .grain,
html.is-mobile .grain,
html.is-lowperf .grain { display: none; }


.glass {
  background: rgba(8, 12, 8, 0.45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(57,255,20,0.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 8px 32px rgba(0,0,0,0.45);
}
.nav {
  transition: background 320ms ease, backdrop-filter 320ms ease, border-color 320ms ease;
}
.nav.is-scrolled {
  background: rgba(3, 5, 3, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: rgba(57,255,20,0.25);
}


@media (max-width: 720px) {
  .nav, .nav.is-scrolled {
    background: rgba(3, 5, 3, 0.92);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}


.magnetic {
  display: inline-block;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  will-change: transform;
}
.magnetic-inner {
  display: inline-block;
  transition: transform 320ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}


.cursor-dot {
  position: fixed;
  top: 0; left: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--green);
  background: transparent;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  will-change: transform, width, height, opacity;

  box-shadow:
    0 0 6px  rgba(57,255,20,0.55),
    0 0 14px rgba(57,255,20,0.35),
    0 0 24px rgba(57,255,20,0.18);

  transform: translate3d(-100px,-100px,0);
  transition:
    opacity        180ms ease,
    width          220ms cubic-bezier(.2,.8,.2,1),
    height         220ms cubic-bezier(.2,.8,.2,1),
    border-color   200ms ease,
    background     200ms ease;
}
.cursor-dot.is-visible { opacity: 1; }

.cursor-dot.is-link {
  width: 36px; height: 36px;
  background: rgba(57,255,20,0.10);
}
.cursor-dot.is-card {
  width: 56px; height: 56px;
  background: rgba(57,255,20,0.06);
}
.cursor-dot.is-text {
  width: 3px; height: 22px;
  border-radius: 1px;
  background: var(--green);
  border-color: transparent;
}
.cursor-dot.is-text::after { display: none; }


.cursor-trail {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  contain: strict;
}
.cursor-trail-dot {
  position: absolute;
  top: 0; left: 0;

  width: 40px; height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(57,255,20,0.55) 0%,
    rgba(57,255,20,0.32) 22%,
    rgba(57,255,20,0.12) 50%,
    rgba(57,255,20,0)    75%);
  opacity: 0;
  will-change: transform, opacity;
  transform: translate3d(-100px,-100px,0);
  mix-blend-mode: screen;
  filter: blur(2px);
}

.cursor-label {
  position: fixed;
  top: 0; left: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--green);
  background: rgba(3,5,3,0.85);
  border: 1px solid rgba(57,255,20,0.4);
  padding: 3px 7px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  will-change: transform, opacity;
  transform: translate3d(-100px,-100px,0);
  transition: opacity 180ms ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.cursor-label.is-visible { opacity: 1; }


@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-trail, .cursor-label { display: none; }
}

@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor body,
  html.has-custom-cursor a,
  html.has-custom-cursor button { cursor: none; }
}


[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
[data-reveal-stagger].is-visible > * { opacity: 1; transform: translateY(0); }
[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 90ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 180ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 270ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 360ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 450ms; }


[data-reveal] h2 {
  display: inline-block;
  padding-bottom: 0.15em;
}
