/* ==========================================================================
 Fermex. Base
 Reset, typography, utilities, font-faces.
 ========================================================================== */

/* -- Font faces --------------------------------------------------------- */
@font-face {
	font-family: 'Inter';
	src: url('../fonts/Inter-Variable.woff2') format('woff2-variations'),
	 url('../fonts/Inter-Variable.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IBM Plex Serif';
	src: url('../fonts/IBMPlexSerif-SemiBold.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IBM Plex Serif';
	src: url('../fonts/IBMPlexSerif-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'IBM Plex Mono';
	src: url('../fonts/IBMPlexMono-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

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

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

body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	color: var(--c-ink);
	background: var(--c-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	font-feature-settings: 'kern', 'liga', 'calt', 'ss01';
	font-variant-ligatures: contextual;
	overflow-x: hidden;
}

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

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

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

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

ul, ol { padding-left: 0; list-style: none; }

a {
	color: var(--c-deep-teal);
	text-decoration: none;
	transition: color var(--t-fast) var(--ease-out);
}
a:hover, a:focus-visible { color: var(--c-navy); }

main { display: block; }

/* -- Typography --------------------------------------------------------- */
h1, .h1 {
	font-family: var(--font-sans);
	font-size: var(--fs-hero);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
	letter-spacing: var(--ls-display);
	color: var(--c-navy);
	text-wrap: balance;
}

h2, .h2 {
	font-family: var(--font-sans);
	font-size: clamp(2rem, 3.5vw, 3rem);
	font-weight: var(--fw-bold);
	line-height: var(--lh-snug);
	letter-spacing: var(--ls-tight);
	color: var(--c-navy);
	text-wrap: balance;
}

h3.h3 {
	font-family: var(--font-sans);
	font-size: var(--fs-xl);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-snug);
	letter-spacing: var(--ls-tight);
	color: var(--c-navy);
}

h4.h4 {
	font-family: var(--font-sans);
	font-size: var(--fs-lg);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-snug);
	color: var(--c-navy);
}

h5.h5 {
	font-family: var(--font-sans);
	font-size: var(--fs-md);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-snug);
	color: var(--c-navy);
}

h6.h6 {
	font-family: var(--font-sans);
	font-size: var(--fs-sm);
	font-weight: var(--fw-semibold);
	line-height: var(--lh-base);
	color: var(--c-ink-muted);
	text-transform: uppercase;
	letter-spacing: var(--ls-wide);
}

.eyebrow {
	display: inline-block;
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	font-weight: var(--fw-medium);
	line-height: 1;
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	color: var(--c-deep-teal);
	padding: var(--space-2) var(--space-3);
	background: var(--c-mist);
	border-radius: var(--r-full);
}

.eyebrow--dark {
	background: rgba(141, 169, 196, 0.12);
	color: var(--c-steel);
}

p {
	max-width: var(--max-w-prose);
	color: var(--c-ink-muted);
	text-wrap: pretty;
}

small { font-size: var(--fs-sm); }

strong, b { font-weight: var(--fw-semibold); color: var(--c-ink); }

em, i { font-style: italic; }

code, kbd, samp, pre {
	font-family: var(--font-mono);
	font-size: 0.92em;
	background: var(--c-mist);
	padding: 0.1em 0.35em;
	border-radius: var(--r-sm);
}

pre {
	padding: var(--space-5);
	overflow-x: auto;
	line-height: var(--lh-base);
}

blockquote {
	font-family: var(--font-serif);
	font-size: var(--fs-lg);
	line-height: var(--lh-snug);
	color: var(--c-ink);
	padding: var(--space-5) var(--space-6);
	border-left: 3px solid var(--c-deep-teal);
}

hr {
	border: 0;
	border-top: 1px solid var(--c-border);
	margin: var(--space-7) 0;
}

/* -- Focus ring --------------------------------------------------------- */
:focus { outline: none; }

:focus-visible {
	outline: 3px solid var(--c-deep-teal);
	outline-offset: 3px;
	border-radius: 2px;
}

/* -- Selection --------------------------------------------------------- */
::selection {
	background: var(--c-deep-teal);
	color: var(--c-white);
}

/* -- Skip link --------------------------------------------------------- */
.skip-link {
	position: absolute;
	left: -10000px;
	top: 8px;
	background: var(--c-navy);
	color: var(--c-white);
	padding: var(--space-3) var(--space-5);
	border-radius: var(--r-md);
	z-index: var(--z-toast);
}
.skip-link:focus.skip-link:focus-visible { left: 8px; color: var(--c-white); }

/* -- Layout utilities -------------------------------------------------- */
.container {
	width: 100%;
	max-width: var(--max-w);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow {
	max-width: var(--max-w-narrow);
}

.prose {
	max-width: var(--max-w-prose);
}

.prose h2 { margin-top: var(--space-7); }
.prose h3 { margin-top: var(--space-6); }
.prose p,
.prose ul,
.prose ol {
	margin-top: var(--space-4);
}
.prose ul.prose ol {
	padding-left: var(--space-6);
	list-style: revert;
}
.prose li { margin-top: var(--space-2); }
.prose a {
	color: var(--c-deep-teal);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
}
.prose a:hover { text-decoration-thickness: 2px; }
.prose img {
	margin: var(--space-6) 0;
	border-radius: var(--r-lg);
}

.stack > * + * { margin-top: var(--space-5); }
.stack-sm > * + * { margin-top: var(--space-3); }
.stack-lg > * + * { margin-top: var(--space-7); }

.cluster {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	align-items: center;
}

.grid {
	display: grid;
	gap: var(--space-5);
}

@media (min-width: 640px) { .grid--sm-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid--md-2 { grid-template-columns: repeat(2, 1fr); } .grid--md-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid--lg-3 { grid-template-columns: repeat(3, 1fr); } .grid--lg-4 { grid-template-columns: repeat(4, 1fr); } }

.section {
	padding-block: clamp(var(--space-8), 8vw, var(--space-10));
}

.section--tight { padding-block: var(--space-7); }
.section--loose { padding-block: clamp(var(--space-9), 12vw, var(--space-11)); }

.section--dark {
	background: var(--c-dark-bg);
	color: var(--c-dark-fg);
}
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--c-white); }
.section--dark p { color: var(--c-dark-muted); }

.section--mist { background: var(--c-mist); }
.section--paper { background: var(--c-paper); }

.section-head {
	display: grid;
	gap: var(--space-3);
	max-width: 64ch;
	margin-bottom: var(--space-7);
}

.section-head--center {
	text-align: center;
	margin-inline: auto;
}

/* -- Accessibility ----------------------------------------------------- */
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.is-hidden { display: none !important; }

/* -- Helpers ----------------------------------------------------------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--c-ink-muted); }
.text-subtle { color: var(--c-ink-subtle); }
.text-mono { font-family: var(--font-mono); }
.text-serif { font-family: var(--font-serif); }

.bg-mist { background: var(--c-mist); }
.bg-paper { background: var(--c-paper); }
.bg-navy { background: var(--c-navy); color: var(--c-white); }

.divider {
	height: 1px;
	background: var(--c-border);
	margin-block: var(--space-6);
	border: 0;
}
