/**
 * Avemed — base layer.
 *
 * Element-level defaults built on top of the theme.json tokens. Everything that
 * is not a block-specific style lives here.
 */

/* ---------------------------------------------------------------- Tokens */

:root {
	--avemed-gutter: var(--wp--custom--gutter, clamp(1rem, 4vw, 1.5rem));
	--avemed-max: var(--wp--style--global--wide-size, 1280px);
	--avemed-radius: var(--wp--custom--radius--base, 0.5rem);
	--avemed-radius-md: var(--wp--custom--radius--md, 0.75rem);
	--avemed-radius-lg: var(--wp--custom--radius--lg, 1rem);
	--avemed-radius-pill: var(--wp--custom--radius--pill, 999px);
	--avemed-transition: var(--wp--custom--transition, 180ms cubic-bezier(0.16, 1, 0.32, 1));

	--avemed-line: var(--wp--preset--color--line, oklch(92% 0.002 286));
	--avemed-muted: var(--wp--preset--color--muted-text, oklch(55.3% 0.013 286));
	--avemed-ink: var(--wp--preset--color--contrast, oklch(0% 0 0));
	--avemed-card: var(--wp--preset--color--card, #fff);
	--avemed-primary: var(--wp--preset--color--primary, oklch(64.4% 0.145 239));
	--avemed-primary-deep: var(--wp--preset--color--primary-deep, oklch(50% 0.13 240));

	--avemed-header-height: 3.5rem;
}

/* ------------------------------------------------------------- Elements */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--avemed-header-height) + 1.5rem);
}

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

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-feature-settings: "ss03" on;
	overflow-x: clip;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

img {
	font-style: italic; /* Makes broken-image alt text read as a placeholder. */
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--avemed-transition), opacity var(--avemed-transition);
}

p a:not(.wp-element-button),
.avemed-prose a:not(.wp-element-button) {
	text-decoration: underline;
	text-underline-offset: 0.25em;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix(in oklab, currentColor 35%, transparent);
}

p a:not(.wp-element-button):hover,
.avemed-prose a:not(.wp-element-button):hover {
	text-decoration-color: currentColor;
}

button {
	font: inherit;
	color: inherit;
}

:where(ul, ol) {
	padding-inline-start: 1.25em;
}

hr,
.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--avemed-line);
	opacity: 1;
}

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

:focus-visible {
	outline: 2px solid var(--avemed-ink);
	outline-offset: 2px;
	border-radius: 2px;
}

.avemed-skip-link:focus {
	position: fixed;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--avemed-ink);
	color: #fff;
	border-radius: var(--avemed-radius-pill);
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

/* -------------------------------------------------------------- Layout */

.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* Keep the alignfull rows edge-to-edge while inner content honours the gutter. */
.wp-site-blocks > .alignfull {
	margin-inline: 0;
}

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

.avemed-eyebrow {
	display: inline-block;
	font-size: 0.6875rem;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--avemed-muted);
	line-height: 1.4;
}

.avemed-numeral {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.875rem;
	font-weight: 300;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	color: var(--avemed-muted);
}

.avemed-lead {
	color: var(--avemed-muted);
	line-height: 1.6;
}

.avemed-prose > * + * {
	margin-block-start: 1.25em;
}

.avemed-prose h2 {
	font-size: var(--wp--preset--font-size--xx-large);
	margin-block-start: 2em;
}

.avemed-prose h3 {
	font-size: var(--wp--preset--font-size--x-large);
	margin-block-start: 1.75em;
}

.avemed-prose blockquote {
	margin-inline: 0;
	padding-inline-start: 1.25rem;
	border-inline-start: 2px solid var(--avemed-ink);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 300;
	line-height: 1.35;
}

/* ---------------------------------------------------------------- Icons */

.avemed-icon {
	display: inline-block;
	flex: 0 0 auto;
	width: 1.25em;
	height: 1.25em;
	stroke-width: 1.75;
}

.avemed-icon--sm {
	width: 1em;
	height: 1em;
}

/* The header cart badge and drawer rely on the hidden attribute. */
[hidden] {
	display: none !important;
}
