/* =======================
   TYPOGRAPHY & BASE
======================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-family-primary);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: var(--line-height-relaxed);
  background-color: var(--bg-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
}

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

.skip-link:focus,
.skip-link:focus-visible {
  position: absolute;
  left: var(--space-page);
  top: 0.4rem;
  z-index: 200;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0.55rem 0.9rem;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  background: var(--color-secondary);
  color: var(--text-inverse);
  border-radius: var(--radius-sm);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text-link);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-sm);
  color: var(--text-header);
  text-wrap: balance;
}

h1 { font-size: var(--font-size-display); }
h2 { font-size: var(--font-size-title); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding-inline: var(--space-page);
}

p {
  text-align: start;
}

p a {
  text-decoration: underline;
  color: var(--text-link);
  text-underline-offset: 0.15em;
}

.article-meta {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: var(--spacing-xs) 0;
  font-weight: var(--font-weight-normal);
}

#article-body,
#article-body p,
#article-body li,
main,
header,
footer,
input,
button,
select,
textarea {
  font-family: var(--font-family-primary);
}

main {
  min-height: 50vh;
}

.whisper-regular {
  font-family: "Whisper", cursive;
  font-weight: 400;
  font-style: normal;
  font-size: 2.5rem;
  line-height: 1;
}

@media (max-width: 48rem) {
  .whisper-regular {
    font-size: 2rem;
  }
}

.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;
}

@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;
  }
}
