/**
 * Base layer — document defaults, typography, and accessibility primitives.
 * Mobile-first: everything here works at 320px before any media query.
 */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

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

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

body {
	margin: 0;
	font-family: var(--sbc-font-body);
	font-size: var(--sbc-text-md);
	line-height: var(--sbc-leading-normal);
	color: var(--sbc-ink);
	background: var(--sbc-paper);
	-webkit-font-smoothing: antialiased;
}

/* Typography ------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--sbc-space-3);
	font-family: var(--sbc-font-display);
	font-weight: 600;
	line-height: var(--sbc-leading-tight);
	letter-spacing: var(--sbc-tracking-display);
	text-transform: uppercase;
	color: var(--sbc-ink);
}

h1 {
	font-family: var(--sbc-font-primary-display);
	font-weight: 700;
	font-size: var(--sbc-text-4xl);
}

h2 {
	font-size: var(--sbc-text-3xl);
}

h3 {
	font-size: var(--sbc-text-2xl);
}

h4 {
	font-size: var(--sbc-text-xl);
}

h5,
h6 {
	font-size: var(--sbc-text-lg);
}

p,
ul,
ol,
dl,
table,
figure {
	margin: 0 0 var(--sbc-space-4);
}

p:last-child,
ul:last-child,
ol:last-child {
	margin-bottom: 0;
}

a {
	color: var(--sbc-red);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--sbc-transition);
}

a:hover,
a:focus {
	color: var(--sbc-red-dark);
}

strong,
b {
	font-weight: 700;
}

small {
	font-size: var(--sbc-text-xs);
}

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

blockquote {
	margin: 0 0 var(--sbc-space-4);
	padding: var(--sbc-space-4) var(--sbc-space-5);
	border-left: 4px solid var(--sbc-red);
	background: var(--sbc-mist);
	font-size: var(--sbc-text-lg);
}

code,
kbd,
pre {
	font-family: var(--sbc-font-mono);
	font-size: 0.9em;
}

/* Accessibility primitives ------------------------------------------------ */

.sbc-skip-link {
	position: absolute;
	left: var(--sbc-space-4);
	top: -4rem;
	z-index: var(--sbc-z-overlay);
	padding: var(--sbc-space-2) var(--sbc-space-4);
	background: var(--sbc-red);
	color: var(--sbc-paper);
	font-weight: 700;
	text-decoration: none;
	border-radius: var(--sbc-radius-sm);
	transition: top var(--sbc-transition);
}

.sbc-skip-link:focus {
	top: var(--sbc-space-3);
	color: var(--sbc-paper);
}

:focus-visible {
	outline: none;
	box-shadow: var(--sbc-focus-ring);
	border-radius: var(--sbc-radius-sm);
}

.sbc-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(--sbc-red);
	color: var(--sbc-paper);
}

/* WordPress core alignment ------------------------------------------------ */

.alignleft {
	float: left;
	margin: 0 var(--sbc-space-4) var(--sbc-space-4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--sbc-space-4) var(--sbc-space-4);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide {
	width: min(100% - 2 * var(--sbc-space-4), var(--sbc-container));
	margin-inline: auto;
}

.alignfull {
	width: 100%;
	margin-inline: 0;
}

.wp-caption-text,
.screen-reader-text {
	font-size: var(--sbc-text-xs);
	color: var(--sbc-slate);
}

/* Utility --------------------------------------------------------------- */

.sbc-container {
	width: min(100% - 2 * var(--sbc-space-4), var(--sbc-container));
	margin-inline: auto;
}

.sbc-stack > * + * {
	margin-top: var(--sbc-space-4);
}

.sbc-lede {
	font-size: var(--sbc-text-lg);
	color: var(--sbc-ink-soft);
}

.sbc-eyebrow {
	font-family: var(--sbc-font-body);
	font-size: var(--sbc-text-xs);
	font-weight: 700;
	letter-spacing: var(--sbc-tracking-caps);
	text-transform: uppercase;
	/* Brand slate (#808080) is 3.95:1 on white — below AA for this 13px size;
	   gray-dark is 7.34:1 (wow pass, design-gate finding 1). */
	color: var(--sbc-gray-dark);
}

@media (min-width: 40em) {
	.sbc-container {
		width: min(100% - 3 * var(--sbc-space-4), var(--sbc-container));
	}
}

@media (min-width: 64em) {
	.sbc-container {
		width: min(100% - 4 * var(--sbc-space-4), var(--sbc-container));
	}
}
