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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  /* Compensate for the fixed navbar height (~72px scrolled, ~88px not) */
  scroll-padding-top: 96px;
}

/* Cards that are also anchor targets (e.g. .vertical-card#connect) need
   their own scroll-margin so they don't get tucked under the navbar. */
[id="connect"],
[id="access"] {
  scroll-margin-top: 112px;
}

@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;
    scroll-behavior: auto !important;
  }
}

body {
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  font-weight: 400;
  overflow-x: hidden;
}

body.is-dark {
  background: var(--color-bg-deep);
  color: var(--color-text-inverse);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img,
video {
  object-fit: cover;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-snug);
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-display-xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  font-weight: 700;
}

h2 {
  font-size: var(--fs-display-lg);
  line-height: var(--lh-snug);
}

h3 {
  font-size: var(--fs-h2);
}

h4 {
  font-size: var(--fs-h3);
}

p {
  text-wrap: pretty;
}

code,
kbd,
samp,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

::selection {
  background: var(--violet-500);
  color: var(--paper);
}

*:focus-visible {
  outline: 2px solid var(--violet-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: var(--z-overlay);
  padding: var(--space-3) var(--space-4);
  background: var(--violet-700);
  color: var(--paper);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: top var(--dur-fast) var(--ease-out-quart);
}

.skip-link:focus {
  top: var(--space-4);
}

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