/* ==========================================================================
   Reset & global defaults.
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Anchor targets must clear the sticky header, or they land underneath it. */
	scroll-padding-top: calc(var(--od-header-h) + 20px);
	/* Reserve the scrollbar gutter permanently. Without this, locking body
	   scroll for the drawer removes the scrollbar and the whole page jumps
	   sideways by its width. */
	scrollbar-gutter: stable;
}

body {
	margin: 0;
	background: var(--od-surface);
	color: var(--od-body);
	font-family: var(--od-font-body);
	font-size: var(--od-fs-body);
	line-height: var(--od-lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Nothing should ever scroll the page sideways. */
	overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
	margin: 0;
}

ul, ol {
	margin: 0;
	padding: 0;
}

li {
	list-style: none;
}

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

svg {
	fill: currentColor;
}

a {
	color: var(--od-primary-600);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--od-primary-700);
}

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

button {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

table {
	border-collapse: collapse;
	width: 100%;
}

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

/* Focus: visible, branded, and never removed. */
:focus-visible {
	outline: 2px solid var(--od-focus);
	outline-offset: 3px;
	border-radius: 2px;
}

:focus:not(:focus-visible) {
	outline: none;
}

/* Skip link — first tab stop, hidden until focused. */
.od-skip {
	position: absolute;
	top: -100px;
	left: var(--od-s-4);
	z-index: 999;
	padding: var(--od-s-3) var(--od-s-5);
	background: var(--od-primary);
	color: #fff;
	border-radius: 0 0 var(--od-r-sm) var(--od-r-sm);
	font-weight: 600;
	text-decoration: none;
}

.od-skip:focus {
	top: 0;
	color: #fff;
}

.od-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;
}

::selection {
	background: var(--od-primary-100);
	color: var(--od-ink);
}

/* Reveal-on-scroll. Elements are only hidden once JS has confirmed it is
   running (html.js), so with JS off or broken the content is always visible. */
.js [data-reveal] {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity var(--od-dur) var(--od-ease), transform var(--od-dur) var(--od-ease);
}

.js [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.js [data-reveal] {
		opacity: 1;
		transform: none;
	}
}
