/* Fonts: New Spirit for headings, Lexend for text, served from /fonts. */
@font-face {
  font-family: 'New Spirit';
  src: url('/fonts/NewSpirit-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'New Spirit';
  src: url('/fonts/NewSpirit-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'New Spirit';
  src: url('/fonts/NewSpirit-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'New Spirit';
  src: url('/fonts/NewSpirit-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/fonts/Lexend-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lexend';
  src: url('/fonts/Lexend-latin-ext.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lexend Fallback';
  src: local('Arial'), local('ArialMT');
  size-adjust: 108.68%;
  ascent-override: 92.01%;
  descent-override: 23%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'New Spirit Fallback';
  src: local('Georgia');
  font-weight: 300 500;
  size-adjust: 107.51%;
  ascent-override: 90.41%;
  descent-override: 22.23%;
  line-gap-override: 0%;
}
@font-face {
  font-family: 'New Spirit Fallback';
  src: local('Georgia Bold'), local('Georgia-Bold');
  font-weight: 600 800;
  size-adjust: 99.67%;
  ascent-override: 97.72%;
  descent-override: 26.19%;
  line-gap-override: 0%;
}

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

html,
body {
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  /* line-height:0 on body itself stops whitespace text nodes between top-level
     blocks (e.g. </main> and <footer>) from rendering a stray line-box gap.
     Content line-height is restored on the direct children below. */
  line-height: 0;
  color: var(--neutral-wood);
  background-color: var(--neutral-paper);
  -webkit-font-smoothing: antialiased;
}

body > * {
  line-height: var(--leading-body);
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: underline;
  transition: var(--transition-fast);
}
a:hover {
  color: var(--primary-dark);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--neutral-wood);
}

h1 { font-size: var(--text-h1); margin-top: 0; margin-bottom: var(--space-5); }
h2 { font-size: var(--text-h2); margin-top: var(--space-10); margin-bottom: var(--space-4); }
h3 { font-size: var(--text-h3); margin-top: var(--space-8);  margin-bottom: var(--space-3); }
h4 { font-size: var(--text-h4); margin-top: var(--space-6);  margin-bottom: var(--space-3); }
/* A heading that must be an h2 for the page's outline but keeps the look of an
   h3 (the quote card that sits beside the main copy, before its first h2). */
.h3 { font-size: var(--text-h3); margin-top: var(--space-8); margin-bottom: var(--space-3); }

/* First heading in any container needs no top margin — section padding already provides the gap */
h1:first-child, h2:first-child, h3:first-child, h4:first-child { margin-top: 0; }

p { margin-bottom: var(--space-5); }
p:last-child { margin-bottom: 0; }

ul, ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}
li { margin-bottom: var(--space-3); }
