/**
 * Caldera — element base, fonts, and the WordPress core class contract.
 */

/* ------------------------------------------------------------------- Fonts */

/* Licensed display face. The files are not bundled; when they are dropped into
   /assets/fonts/ these rules activate and win over Anton in the stack. */
@font-face {
	font-family: 'PP Neue Corp Compact';
	src: url('../fonts/pp-neue-corp-compact-ultrabold.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Anton';
	src: url('../fonts/anton-latin.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
		U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Anton';
	src: url('../fonts/anton-latin-ext.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
		U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: 'DM Sans';
	src: url('../fonts/dm-sans-latin.woff2') format('woff2');
	font-weight: 100 1000;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
		U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
		U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'DM Sans';
	src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
	font-weight: 100 1000;
	font-style: normal;
	font-display: swap;
	unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
		U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

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

/*
 * The theme hides things by toggling the `hidden` attribute — filtered cards,
 * trend arrows, empty-state notices. The user agent's `[hidden]` rule is a bare
 * element default, so any component that sets `display` on a class silently
 * outranks it and the element stays visible. This makes the attribute mean what
 * the markup says it means, everywhere.
 */
[hidden] {
	display: none !important;
}

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

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

body {
	margin: 0;
	background-color: var(--surface-canvas);
	color: var(--text-primary);
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: var(--font-weight-medium);
	line-height: var(--leading-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0 0 var(--spacing-24);
	font-family: var(--font-display);
	font-weight: var(--font-weight-regular);
	font-feature-settings: 'ss06', 'ss10';
	letter-spacing: var(--tracking-heading);
	text-transform: uppercase;
	text-wrap: balance;
}

h1 {
	font-size: var(--text-heading-3xl);
	line-height: var(--leading-heading-3xl);
}

h2 {
	font-size: var(--text-heading-2xl);
	line-height: var(--leading-heading-2xl);
}

h3 {
	font-size: var(--text-heading-lg);
	line-height: var(--leading-heading-lg);
}

h4 {
	font-size: var(--text-heading);
	line-height: var(--leading-heading);
}

h5 {
	font-size: var(--text-subheading);
	line-height: var(--leading-subheading);
}

/* The compressed face loses its industrial character below 26px, so the smallest
   heading level steps out of the display family rather than shrinking it. */
h6 {
	font-family: var(--font-body);
	font-size: var(--text-heading-sm);
	line-height: var(--leading-heading-sm);
	font-weight: var(--font-weight-medium);
	letter-spacing: 0;
	text-transform: none;
}

p,
ul,
ol,
dl,
blockquote,
figure,
pre,
table {
	margin: 0 0 var(--spacing-24);
}

a {
	color: inherit;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 0.18em;
	transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
	color: var(--color-ember);
}

strong,
b {
	font-weight: 700;
}

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

blockquote {
	margin-inline: 0;
	padding: var(--spacing-24) var(--spacing-32);
	border-radius: var(--radius-medium);
	background: var(--surface-raised);
	font-size: var(--text-heading-sm);
	line-height: 1.4;
}

blockquote > :last-child {
	margin-bottom: 0;
}

blockquote cite {
	display: block;
	margin-top: var(--spacing-12);
	font-size: var(--text-body-sm);
	font-style: normal;
	color: var(--text-muted);
}

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

pre {
	overflow-x: auto;
	padding: var(--spacing-24);
	border-radius: var(--radius-small);
	background: var(--surface-inverse);
	color: var(--text-on-inverse);
	line-height: 1.5;
}

:not(pre) > code {
	padding: 0.15em 0.4em;
	border-radius: var(--spacing-4);
	background: var(--surface-raised);
}

hr {
	height: 0;
	margin: var(--spacing-48) 0;
	border: 0;
	border-top: var(--border-hairline) dotted var(--border-color);
}

/* ----------------------------------------------------------------- Media */

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

iframe,
embed,
object {
	border: 0;
}

figure {
	margin-inline: 0;
}

figcaption,
.wp-caption-text {
	margin-top: var(--spacing-10);
	font-family: var(--font-meta);
	font-size: var(--text-caption);
	line-height: var(--leading-caption);
	color: var(--text-muted);
}

/* ----------------------------------------------------------------- Tables */

table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-body-sm);
}

th,
td {
	padding: var(--spacing-12) var(--spacing-16);
	text-align: left;
	border-bottom: 1px solid var(--color-obsidian-15);
}

th {
	font-weight: var(--font-weight-medium);
	white-space: nowrap;
}

/* ------------------------------------------------------------------ Forms */

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

textarea {
	width: 100%;
	min-height: 160px;
	resize: vertical;
}

/* --------------------------------------------------------- Focus & a11y */

:focus-visible {
	outline: 3px solid var(--color-ember);
	outline-offset: 3px;
	border-radius: var(--spacing-4);
}

.is-inverse :focus-visible,
.caldera-section--inverse :focus-visible {
	outline-color: var(--color-chalk);
}

.screen-reader-text {
	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;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	position: fixed !important;
	top: var(--spacing-16);
	left: var(--spacing-16);
	z-index: 100000;
	width: auto;
	height: auto;
	padding: var(--spacing-12) var(--spacing-24);
	clip: auto;
	clip-path: none;
	border-radius: var(--radius-pills);
	background: var(--color-ember);
	color: var(--color-obsidian);
	font-size: var(--text-body-sm);
	text-decoration: none;
}

/* ------------------------------------------- WordPress core class contract */

.alignleft {
	float: left;
	margin: 0 var(--spacing-24) var(--spacing-16) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--spacing-16) var(--spacing-24);
}

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

.alignnone {
	margin-bottom: var(--spacing-24);
}

.wp-caption {
	max-width: 100%;
	margin-bottom: var(--spacing-24);
}

.wp-caption img {
	border-radius: var(--radius-medium);
}

.gallery {
	display: grid;
	gap: var(--spacing-16);
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	margin-bottom: var(--spacing-24);
}

.gallery-item {
	margin: 0;
}

.gallery-item img {
	width: 100%;
	border-radius: var(--radius-small);
}

.sticky,
.bypostauthor {
	/* Required by the theme review guidelines; visual treatment is applied on the
	   card component rather than here. */
}

.wp-block-image img,
.wp-post-image {
	border-radius: var(--radius-medium);
}

.skip-link {
	/* styled via .screen-reader-text */
}

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

@media print {
	/* Print is ink on paper, not a surface in the palette — the warm canvas would
	   only waste toner. */
	body {
		background: white;
		color: black;
	}

	.caldera-site-header,
	.caldera-site-footer,
	.caldera-pagination,
	.caldera-cta,
	.caldera-halftone {
		display: none !important;
	}
}
