/* Footprint entry intro — scoped to #gate so it cannot leak into the SPA.
   Loaded AFTER index-BdiGbZZ2.css so it can win where the two disagree. */

/* The SPA sets html{scroll-behavior:smooth} globally. The intro's hold depends on
   scrollTo() landing immediately, so smooth scrolling has to be off while the gate
   exists; it is restored the moment the gate is removed. */
html.fp-intro-active { scroll-behavior: auto !important; }

/* The SPA's header/nav/logo are position:fixed, so they render straight over the
   intro regardless of scroll position (measured: HEADER.fixed top-0 z-[70], a
   fixed logo link, and a fixed badge all overlapping the gate). Hide the SPA while
   the gate is up — visibility, not display, so layout and document height are
   unchanged and the SPA's own measurements stay valid. */
html.fp-intro-active #root { visibility: hidden; }

#gate {
  --fp-ink: #000;
  --fp-fg: #f4f8f9;
  --fp-accent: 92 245 219;
  --fp-chrome: 150 165 175;
  position: relative;
  height: 420vh;
  background: var(--fp-ink);
}
#gate[hidden] { display: none !important; }

#gate .fp-stage {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  cursor: crosshair; background: var(--fp-ink);
}
#gate .fp-canvas { display: block; width: 100%; height: 100%; }

#gate .fp-layer { position: absolute; inset: 0; pointer-events: none; }
#gate .fp-grain {
  opacity: .028; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

#gate .fp-chrome {
  position: absolute; pointer-events: none;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: rgb(var(--fp-chrome) / .62);
}
#gate .fp-tl { top: 26px; left: 26px; }
#gate .fp-tr { top: 26px; right: 26px; }
#gate .fp-bl { bottom: 26px; left: 26px; }
#gate .fp-br { bottom: 26px; right: 26px; }

#gate .fp-readout {
  position: absolute; top: 8%; left: 8%; pointer-events: none;
  font-family: ui-monospace, Menlo, monospace; font-size: 10px;
  letter-spacing: .18em; color: rgb(var(--fp-accent) / .62);
}

#gate .fp-prompt {
  position: absolute; left: 50%; bottom: 7vh; transform: translateX(-50%);
  font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  letter-spacing: .34em; text-transform: uppercase;
  color: rgb(var(--fp-fg) / .72); pointer-events: none; white-space: nowrap;
  transition: opacity .5s ease;
}
#gate .fp-prompt::after {
  content: ''; display: block; width: 1px; height: 34px; margin: 14px auto 0;
  background: linear-gradient(rgb(var(--fp-accent) / .9), transparent);
  animation: fp-drop 2.1s ease-in-out infinite;
}
@keyframes fp-drop {
  0%, 100% { opacity: .25; transform: translateY(-5px); }
  50% { opacity: 1; transform: translateY(5px); }
}

#gate .fp-enter {
  position: absolute; left: 50%; bottom: 9vh; transform: translateX(-50%); z-index: 3;
  display: inline-flex; align-items: center; gap: 12px; padding: 15px 30px;
  border: 1px solid rgb(var(--fp-accent) / .45); background: rgb(0 0 0 / .35);
  backdrop-filter: blur(3px); color: rgb(var(--fp-fg) / .94); cursor: pointer;
  font-family: ui-monospace, Menlo, monospace; font-size: 11px;
  letter-spacing: .3em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  transition: opacity .6s ease, border-color .3s ease, background .3s ease;
}
#gate .fp-enter.fp-ready { opacity: 1; pointer-events: auto; }
#gate .fp-enter:hover, #gate .fp-enter:focus-visible {
  border-color: rgb(var(--fp-accent) / 1); background: rgb(var(--fp-accent) / .1); outline: none;
}

#gate .fp-fallback {
  position: absolute; inset: 0; display: grid; place-content: center;
  padding: 24px; text-align: center;
  font-family: ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: .2em;
  color: rgb(var(--fp-chrome) / .7);
}
#gate .fp-fallback[hidden] { display: none !important; }

#gate.fp-leaving { transition: opacity .45s ease; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  #gate .fp-prompt::after { animation: none; }
}
