/* Reset, document typography, and the two fixed background layers. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1 {
  margin: 0;
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

#lattice,
.vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#lattice {
  z-index: 0;
}

/* Radial fade stops the lattice competing with the headline for attention. */
.vignette {
  z-index: 1;
  background:
    radial-gradient(120% 90% at 18% 42%, transparent 0%, var(--color-bg) 78%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.55) 0%, transparent 35%);
}

.site-header,
.hero,
.contact,
.site-footer {
  position: relative;
  z-index: 2;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Removed from view but kept in the accessibility tree and the form payload. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
