
/* ------------------------------------------------------------------ fonts */
@font-face {
  font-family: Manrope;
  src: url('../assets/fonts/manrope-regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('../assets/fonts/manrope-medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url('../assets/fonts/manrope-semibold.woff') format('woff');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('../assets/fonts/manrope-bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/instrument-serif-italic.woff') format('woff');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-normal);
  letter-spacing: var(--tracking-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

/* --------------------------------------------------------------- headings */

h1,
h2,
h3 {
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ------------------------------------------------------------------ focus */

:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-sm);
}

/* Mouse users keep a clean surface; keyboard users always get the ring. */

:focus:not(:focus-visible) {
  outline: none;
}

/* -------------------------------------------------------------- utilities */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: var(--z-skip-link);
  padding: var(--space-3) var(--space-5);
  background-color: var(--gold);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-md);
  transform: translateY(calc(-100% - var(--space-5)));
  transition: transform var(--transition-base);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ------------------------------------------------------- reduced motion */

@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;
    }
}

/* -------------------------------------------------------- page globals */
html {
  scroll-padding-top: calc(var(--header-h, var(--masthead)) + 1.5rem);
}
body {
  background: var(--paper);
}
[hidden] {
  display: none!important;
}

/* Scroll lock while any dialog is up. A class rather than an inline style, so
   the state is inspectable and a single sync point in JS owns it. */
body.is-dialog-open {
  overflow: hidden;
}
