@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/fonts/outfit-v15-latin-200.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/outfit-v15-latin-300.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/outfit-v15-latin-regular.woff2') format('woff2');
}

:root {
  --bg: #0a0a0a;
  --fg: #f2f2f0;
  --accent: #6b7fd7;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

body {
  font-family: Outfit, ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

#field {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    440px circle at var(--x, 50vw) var(--y, 50vh),
    rgba(107, 127, 215, 0.10),
    transparent 70%
  );
}

.has-cursor .glow {
  opacity: 1;
  transition: opacity 1.2s ease 0.3s;
}

main {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
}

h1 {
  font-size: clamp(2.2rem, 9vw, 5.5rem);
  font-weight: 200;
  letter-spacing: 0.1em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.dot { color: var(--accent); }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  h1 { animation: none; opacity: 1; transform: none; }
  .has-cursor .glow { transition: none; }
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 1.75rem 1rem;
  opacity: 0;
  animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.6s forwards;
}

footer a {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(242, 242, 240, 0.34);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid rgba(242, 242, 240, 0.09);
  border-radius: 999px;
  transition: color 0.25s ease, border-color 0.25s ease;
}

footer a:hover,
footer a:focus-visible {
  color: rgba(242, 242, 240, 0.72);
  border-color: rgba(242, 242, 240, 0.22);
}

.doc {
  position: static;
  height: auto;
  overflow: visible;
  background: var(--bg);
}

.doc body,
body.doc {
  height: auto;
  overflow-y: auto;
}

.page {
  position: relative;
  z-index: 2;
  max-width: 660px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: rgba(242, 242, 240, 0.42);
  text-decoration: none;
  margin-bottom: 3rem;
  transition: color 0.25s ease;
}

.back:hover,
.back:focus-visible { color: rgba(242, 242, 240, 0.85); }

.back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 200;
  letter-spacing: 0.02em;
  white-space: normal;
  margin-bottom: 0.5rem;
  opacity: 1;
  transform: none;
  animation: none;
}

.updated {
  font-size: 13px;
  font-weight: 300;
  color: rgba(242, 242, 240, 0.32);
  margin-bottom: 3rem;
}

.page h2 {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 2.75rem 0 0.75rem;
  color: rgba(242, 242, 240, 0.95);
}

.page p,
.page li {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(242, 242, 240, 0.66);
}

.page p { margin-bottom: 1rem; }

.page ul {
  margin: 0 0 1rem 1.1rem;
  padding: 0;
}

.page li { margin-bottom: 0.4rem; }

.page a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 127, 215, 0.3);
}

.page a:hover { border-bottom-color: var(--accent); }

.note {
  border: 1px solid rgba(107, 127, 215, 0.25);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 2.5rem;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(242, 242, 240, 0.55);
}

.note strong {
  font-weight: 400;
  color: rgba(242, 242, 240, 0.8);
}

body.notfound {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page.center {
  text-align: center;
  padding: 2rem 1.5rem;
}

.page.center .code {
  font-size: clamp(3.5rem, 14vw, 6rem);
  font-weight: 200;
  letter-spacing: 0.08em;
  line-height: 1;
  color: rgba(242, 242, 240, 0.14);
  margin-bottom: 0.75rem;
}

.page.center h1 {
  margin-bottom: 0.5rem;
}

.page.center .lead {
  font-size: 15px;
  font-weight: 300;
  color: rgba(242, 242, 240, 0.5);
  margin-bottom: 2.5rem;
}

.page.center .back {
  margin-bottom: 0;
  justify-content: center;
}
