*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 0.75rem);
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(122, 46, 224, 0.28), transparent 52%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(58, 160, 232, 0.1), transparent 55%),
    radial-gradient(ellipse 45% 35% at 0% 80%, rgba(155, 77, 255, 0.12), transparent 50%),
    var(--bg);
  image-rendering: auto;
}

.fx-scan,
.fx-noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  contain: strict;
}

.fx-scan {
  z-index: 400;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.14) 2px 3px
  );
  opacity: 0.22;
}

.fx-noise {
  z-index: 399;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
a {
  font: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
  text-shadow: 2px 2px 0 #000;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

p:last-child {
  margin-bottom: 0;
}

p strong,
.lede strong {
  color: var(--text);
  font-weight: 650;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--glow);
}

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--accent-deep);
  color: var(--text);
  font-family: var(--font-ui);
  border: 2px solid #000;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.lede {
  font-size: 1.08rem;
  color: var(--text);
  max-width: 40rem;
}

.panel-title {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--silver);
  text-shadow: 2px 2px 0 #000;
  margin: 0;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent-deep);
  color: #fff;
}

@media (max-width: 860px), (prefers-reduced-motion: reduce) {
  .fx-scan,
  .fx-noise {
    display: none;
  }
}

@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;
  }
}
