/* ==========================================================================
   base.css: reset, typography, focus styles, skip link.
   ========================================================================== */

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

html {
  /* Leave room for the fixed menu when jumping to a section. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  background: var(--pond-deep);
  -webkit-text-size-adjust: 100%;
}

/* Smooth scrolling only for people who haven't asked for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--pond-deep);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.05;
  margin: 0;
}

p {
  margin: 0 0 1.1em;
}

a {
  color: var(--pink);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--rose);
}

/* A clear focus ring for keyboard users, on everything interactive. */
:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Headings that receive focus after a jump don't need a ring. */
[tabindex="-1"]:focus {
  outline: none;
}

/* Text for screen readers only. */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* "Skip to content": first thing a keyboard user can reach. */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--pond-deep);
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-200%);
}

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