/* Reset and accessible document defaults; no page overflow masking. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--gradient-page) no-repeat fixed,
    linear-gradient(180deg, #070b14 0%, #0a0f1e 25%, #0d1326 50%, #0a0e1f 75%, #060912 100%) no-repeat fixed;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  overflow-wrap: anywhere;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--line-height-heading);
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4, h5, h6 { font-size: 1.125rem; }
p { text-wrap: pretty; }
small { font-size: var(--font-size-label); }

a {
  color: var(--accent-blue);
  text-underline-offset: .2em;
  text-decoration-thickness: .08em;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }
img, svg, video, canvas { max-width: 100%; }
img, video { display: block; height: auto; }
[hidden] { display: none !important; }

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

::selection {
  color: var(--bg-page);
  background: var(--accent-blue);
}

/* At wide viewports the usable content, excluding gutters, caps at 1200px. */
.container {
  width: calc(100% - 2 * var(--gutter));
  max-width: var(--content-max);
  min-width: 0;
  margin-inline: auto;
}

.section {
  min-width: 0;
  padding-block: var(--section-spacing);
  scroll-margin-block-start: var(--space-8);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: var(--space-3);
  inset-inline-start: var(--gutter);
  z-index: 100;
  max-width: calc(100% - 2 * var(--gutter));
  min-height: var(--control-min);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--accent-blue);
  color: var(--bg-page);
  font-weight: 700;
  transform: translateY(calc(-100% - 24px));
}

.skip-link:focus { transform: none; }

/* Runtime JS must also stop its ticker. CSS alone cannot cancel JS frames. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
