/**
 * Base layer: reset, element defaults, typography, accessibility utilities.
 *
 * Everything here is unclassed — it styles bare elements so that content
 * authored in the block editor looks right without any theme classes.
 */

/* -- Reset -------------------------------------------------------------- */

*,
*::before,
*::after {
	box-sizing: border-box;
	border: 0 solid var(--lg-border);
}

* {
	margin: 0;
}

/*
 * The `hidden` attribute has to win over any layout display value.
 * The UA rule for [hidden] is display:none, but any author rule that sets
 * display — `.lg-grid { display: grid }`, for instance — beats it regardless of
 * specificity, which silently reveals content meant to be hidden. This is the
 * one place !important is the correct tool: `hidden` is a statement of fact
 * about the element, not a style preference.
 */
[hidden] {
	display: none !important;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	tab-size: 4;
	scroll-behavior: smooth;
	/* Keep anchor targets clear of the sticky header. */
	scroll-padding-top: calc(var(--lg-header-height) + var(--lg-space-4));
}

body {
	min-height: 100vh;
	background-color: var(--lg-bg);
	color: var(--lg-fg);
	font-family: var(--lg-font-sans);
	font-size: var(--lg-text-base);
	line-height: var(--lg-leading-normal);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-synthesis-weight: none;
	text-rendering: optimizeLegibility;
}

/* The page shell keeps the footer at the bottom on short pages. */
.lg-site {
	display: flex;
	min-height: 100vh;
	flex-direction: column;
}

.lg-site__main {
	flex: 1 1 auto;
}

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

/*
 * The inlined icon sprite. It is the first element in the body and holds only
 * <defs>, so it paints nothing — but as a replaced element it would still
 * reserve its default box and push the entire page down. Note this rule has to
 * come after the `svg { display: block }` above to win.
 */
.lg-sprite {
	display: none !important;
}

img,
video {
	height: auto;
}

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

button {
	background: none;
	cursor: pointer;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: 600;
	letter-spacing: var(--lg-tracking-tight);
	line-height: var(--lg-leading-tight);
	text-wrap: balance;
}

h1 {
	font-size: var(--lg-text-4xl);
}

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

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

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

p,
li {
	text-wrap: pretty;
}

a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: none;
}

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

hr {
	border-top: 1px solid var(--lg-border);
}

::selection {
	background-color: rgb(var(--lg-primary-rgb) / 0.22);
}

@media (min-width: 640px) {
	h1 {
		font-size: var(--lg-text-6xl);
	}

	h2 {
		font-size: var(--lg-text-4xl);
	}
}

/* -- Focus -------------------------------------------------------------- */

/*
 * A single, consistent focus treatment. `:focus-visible` keeps the ring off
 * mouse clicks while guaranteeing it for keyboard and assistive tech, and the
 * ring is drawn with box-shadow so it follows the element's border-radius.
 */
:focus-visible {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow:
		0 0 0 2px var(--lg-bg),
		0 0 0 4px rgb(var(--lg-primary-rgb) / 0.65);
	border-radius: var(--lg-radius-sm);
}

/* -- Accessibility utilities -------------------------------------------- */

.screen-reader-text,
.lg-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* The skip link becomes visible only when it receives keyboard focus. */
.lg-skip-link {
	position: absolute;
	top: var(--lg-space-2);
	left: var(--lg-space-2);
	z-index: var(--lg-z-skip);
	padding: var(--lg-space-3) var(--lg-space-5);
	border-radius: var(--lg-radius-md);
	background-color: var(--lg-primary);
	color: var(--lg-primary-fg);
	font-size: var(--lg-text-sm);
	font-weight: 500;
	transform: translateY(-200%);
	transition: transform var(--lg-duration) var(--lg-ease);
}

.lg-skip-link:focus {
	transform: translateY(0);
}

/* -- Motion preferences -------------------------------------------------- */

@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;
	}
}

/* -- Print --------------------------------------------------------------- */

@media print {
	.lg-header,
	.lg-footer,
	.lg-cta-band,
	.lg-skip-link {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}
}
