/* ==========================================================================
   foraigent — base: tokens, reset, background layers
   ========================================================================== */

:root {
  --bg: #08080c;
  --bg-2: #0e0e15;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);

  --text: #f2f1ec;
  --muted: #9b9aa6;
  --dim: #64636e;

  --lime: #c6ff4d;
  --violet: #8b6bff;
  --cyan: #5de4ff;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;

  --radius: 20px;
  --pad: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--lime);
  color: #0a0a0a;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Background layers ---- */

#network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  will-change: transform;
}

.glow--a {
  width: 46vmax;
  height: 46vmax;
  top: -18vmax;
  right: -12vmax;
  background: radial-gradient(circle, rgba(139, 107, 255, 0.55), transparent 65%);
  animation: drift-a 22s var(--ease) infinite alternate;
}

.glow--b {
  width: 40vmax;
  height: 40vmax;
  bottom: -20vmax;
  left: -14vmax;
  background: radial-gradient(circle, rgba(198, 255, 77, 0.28), transparent 65%);
  animation: drift-b 26s var(--ease) infinite alternate;
}

@keyframes drift-a {
  to { transform: translate(-8vmax, 10vmax) scale(1.1); }
}

@keyframes drift-b {
  to { transform: translate(10vmax, -6vmax) scale(1.15); }
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.06;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

header,
main,
footer {
  position: relative;
  z-index: 2;
}

/* ---- Reveal on load ---- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

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