*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Ambient field: one blue bloom behind the fold plus a hairline grid. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(31, 139, 255, .16), transparent 70%),
    radial-gradient(760px 520px at 100% 8%, rgba(11, 92, 255, .1), transparent 72%),
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 64px 100%;
  opacity: .9;
  mask-image: linear-gradient(#000 0, #000 65%, rgba(0, 0, 0, .55) 100%);
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.028em;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -.018em; }

p { margin: 0; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

input, select {
  font: inherit;
  color: inherit;
}

canvas { display: block; }

img, svg { display: block; max-width: 100%; }

code, .mono, kbd {
  font-family: var(--font-mono);
  font-variant-ligatures: none;
}

::selection {
  background: var(--blue);
  color: #02060f;
}

:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: -60px;
  left: 16px;
  z-index: 99;
  padding: 10px 16px;
  background: var(--blue);
  color: #02060f;
  font: 600 12px/1 var(--font-mono);
  transition: top .2s var(--ease);
}

.skip:focus { top: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
