/* ==========================================================================
   Reset, base element styles, and shared utility classes
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  background-color: var(--sand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  background-repeat: repeat;
  color: var(--navy);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.015em;
}

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

p {
  color: var(--body);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

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

::selection {
  background: var(--teal);
  color: #fff;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  background: var(--navy);
  color: var(--sand);
  padding: 12px 18px;
  border-radius: 3px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 12px;
}

section[id], #book {
  scroll-margin-top: 96px;
}

section {
  padding: 84px 0;
}

@media (max-width: 760px) {
  section { padding: 60px 0; }
  .wrap { padding: 0 22px; }
}
