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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 6rem;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading);
  color: var(--text);
  background: var(--beige);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; outline: none; }

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  color: var(--purple);
  line-height: var(--leading-tight);
  font-weight: 700;
  letter-spacing: 0;
  text-wrap: balance;
}
h1, .h1 { font-size: var(--text-3xl); letter-spacing: 0; }
h2, .h2 { font-size: var(--text-2xl); }
h3, .h3 { font-size: var(--text-xl); }
h4, .h4 { font-size: var(--text-lg); letter-spacing: 0; }

p { text-wrap: pretty; }
img, svg { display: block; max-width: 100%; }
.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }

a {
  color: var(--purple);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--muted-purple);
  transition: color var(--t-fast) var(--ease), text-decoration-color var(--t-fast) var(--ease);
}
a:hover { text-decoration-color: currentColor; }

strong { font-weight: 700; }
abbr[title] { text-decoration: underline dotted 1px; text-underline-offset: 0.18em; cursor: help; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-xs); }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { border-radius: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--lavender); color: var(--purple); }

.visually-hidden {
  position: absolute !important;
  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: var(--s-4); top: -100px; z-index: 100;
  background: var(--purple); color: var(--ivory);
  padding: var(--s-3) var(--s-5); border-radius: var(--r-pill);
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: var(--s-3); }

[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.muted { color: var(--text-muted); }
.small { font-size: var(--text-sm); }
.only-mobile { display: none; }
