/*
 * Base styles. Components get their own sections as they are built.
 */

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--body);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--ink);
	font-family: var(--font-heading);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-heading);
}

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

a {
	color: var(--plum);
	transition:
		color var(--ease-hover),
		background-color var(--ease-hover),
		border-color var(--ease-hover),
		text-decoration-color var(--ease-hover),
		box-shadow var(--ease-hover),
		opacity var(--ease-hover);
}

::selection {
	background: var(--selection);
	color: var(--bg);
}

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

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

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 8px 16px;
	border-radius: var(--radius-control);
	background: var(--ink);
	color: var(--bg);
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.site-main:focus {
	outline: none;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	word-wrap: normal !important;
}

/* Phones and tablets zoom into form fields with text under 16px (iOS Safari): fields stay at
   16px there, whatever their component sets. */
@media (max-width: 1023px) {
	input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
	select,
	textarea {
		font-size: 16px !important;
	}
}
