/* ==========================================================================
   ACE - Base: fonts, reset, typography, utilities
   ========================================================================== */

@font-face {
	font-family: "Newsreader";
	src: url("../fonts/newsreader/newsreader-wght-normal.woff2") format("woff2");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Newsreader";
	src: url("../fonts/newsreader/newsreader-wght-italic.woff2") format("woff2");
	font-weight: 200 800;
	font-style: italic;
	font-display: swap;
}

@font-face {
	font-family: "Inter Tight";
	src: url("../fonts/inter-tight/inter-tight-wght-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* Reset ------------------------------------------------------------------ */
*,
*::before,
*::after {
	box-sizing: border-box;
	border-radius: 0 !important;
}

* {
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	min-height: 100vh;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

img,
picture,
video,
svg {
	display: block;
	max-width: 100%;
}

img,
video {
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	background: none;
	border: 0;
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration: none;
}

ul[class],
ol[class] {
	list-style: none;
}

/* Typography ------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-display);
	font-weight: 350;
	line-height: var(--lh-heading);
	letter-spacing: var(--tracking-display);
	font-optical-sizing: auto;
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

em,
.italic {
	font-style: italic;
}

p {
	text-wrap: pretty;
}

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75em;
	font-family: var(--font-body);
	font-size: var(--fs-eyebrow);
	font-weight: 500;
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
	color: var(--text-secondary);
}

.eyebrow--rule::before {
	content: "";
	width: 2rem;
	height: 1px;
	background: var(--ace-gold);
}

.lead {
	font-size: var(--fs-lead);
	line-height: 1.6;
	color: var(--text-secondary);
	max-width: 60ch;
}

.text-secondary {
	color: var(--text-secondary);
}

/* Links ------------------------------------------------------------------ */
.link-underline {
	background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
	transition: background-size var(--dur-base) var(--ease-premium);
}

.link-underline:hover,
.link-underline:focus-visible {
	background-size: 100% 1px;
}

/* Selection & focus ------------------------------------------------------ */
::selection {
	background: var(--ace-navy);
	color: var(--ace-ivory);
}

:focus-visible {
	outline: 2px solid var(--ace-gold);
	outline-offset: 3px;
}

/* Accessibility ---------------------------------------------------------- */
.screen-reader-text {
	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: fixed;
	top: 1rem;
	left: 1rem;
	z-index: calc(var(--z-preloader) + 1);
	padding: 0.75rem 1.25rem;
	background: var(--ace-navy);
	color: var(--ace-ivory);
	font-size: var(--fs-small);
	transform: translateY(-200%);
	transition: transform var(--dur-fast) var(--ease-premium);
}

.skip-link:focus {
	transform: translateY(0);
}

/* Icons ------------------------------------------------------------------ */
.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}
