/* ==========================================================================
   Base: reset, typography, forms, utilities.
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + var(--header-gap) * 2);
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: var(--fs-base);
	line-height: var(--lh-body);
	letter-spacing: var(--tracking);
	color: var(--text);
	background: var(--white);
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

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

figure {
	margin: 0;
}

a {
	color: var(--teal);
	text-decoration: none;
	transition: color var(--ease);
}

a:hover {
	color: var(--teal-900);
}

:focus-visible {
	outline: 2px solid var(--teal);
	outline-offset: 2px;
}

/* Headings ---------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--sp-3);
	line-height: var(--lh-tight);
	color: var(--black);
	font-weight: 700;
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 600; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 600; color: var(--teal); }
h4 { font-size: var(--fs-h4); font-weight: 600; }
h5 { font-size: var(--fs-lg); font-weight: 600; }
h6 { font-size: var(--fs-base); font-weight: 600; }

p {
	margin: 0 0 var(--sp-4);
}

ul,
ol {
	margin: 0 0 var(--sp-4);
	padding-left: 1.25rem;
}

li {
	color: var(--text);
}

hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: var(--sp-6) 0;
}

.hl { color: var(--teal); }
.hl--orange { color: var(--orange); }

/* Buttons reset ----------------------------------------------------------- */

button {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
	cursor: pointer;
}

/* Form controls ----------------------------------------------------------- */

input,
select,
textarea {
	width: 100%;
	font: inherit;
	color: var(--ink);
	background: var(--white);
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	padding: 0.625rem 0.75rem;
	min-height: 2.75rem;
	transition: border-color var(--ease), box-shadow var(--ease);
}

textarea {
	resize: vertical;
	min-height: 7rem;
}

input::placeholder,
textarea::placeholder {
	color: #a5a5a5;
}

input:hover,
select:hover,
textarea:hover {
	border-color: var(--teal);
}

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--teal);
	box-shadow: 0 0 0 3px rgb(0 119 117 / 0.15);
}

/* Layout helpers ---------------------------------------------------------- */

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

.section {
	padding-block: var(--section-y);
}

.screen-reader-text,
.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: var(--sp-4);
	top: -4rem;
	z-index: 1000;
	padding: var(--sp-2) var(--sp-4);
	background: var(--teal);
	color: var(--white);
	border-radius: var(--radius-sm);
}

.skip-link:focus {
	top: var(--sp-4);
	color: var(--white);
}

[hidden] {
	display: none !important;
}

/* Long-form text (WYSIWYG, posts, legal pages) ----------------------------- */

.prose > :last-child {
	margin-bottom: 0;
}

.prose h2,
.prose h3,
.prose h4 {
	margin-top: var(--sp-6);
}

.prose h3 {
	color: var(--teal);
}

.prose a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.prose img {
	border-radius: var(--radius);
}

.prose table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: var(--sp-5);
}

.prose th,
.prose td {
	border: 1px solid var(--line);
	padding: var(--sp-2) var(--sp-3);
	text-align: left;
}

.prose blockquote {
	margin: var(--sp-5) 0;
	padding: var(--sp-3) var(--sp-5);
	border-left: 4px solid var(--teal);
	background: var(--teal-50);
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
