/* Tokens, type and the layers that exist on every screen.
   Z scale: field 0, main 1, timeline/topbar 40, loader 60, grain 70. */
:root {
  --bg: #060606;
  --fg: #f2f2ee;
  --dim: #9a9a95;
  --line: rgba(242, 242, 238, 0.16);
  --line-strong: rgba(242, 242, 238, 0.42);
  --pad: clamp(16px, 4vw, 56px);
  --rail: 72px;
  --display: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --goat-mask: none;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.motion.is-loading { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: none; }
.motion #field { display: block; }
main { position: relative; z-index: 1; }

.grain {
  position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.motion .grain { animation: grain 0.8s steps(6) infinite; }
@keyframes grain {
  0% { background-position: 0 0; } 20% { background-position: -60px 40px; }
  40% { background-position: 40px -80px; } 60% { background-position: -80px -20px; }
  80% { background-position: 60px 60px; } 100% { background-position: 0 0; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 26px; border-radius: 99px;
  border: 1px solid var(--fg); background: var(--fg); color: var(--bg);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; white-space: nowrap;
  cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.15s;
}
.btn:hover { background: transparent; color: var(--fg); }
.btn:active { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.tech { display: flex; flex-wrap: wrap; gap: 6px 22px; }
