/**
 * Reset, base element styles, and shared utility classes (container,
 * buttons, screen-reader text, focus states).
 */

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

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

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

img {
	max-width: 100%;
	height: auto;
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	/* Fraunces carries elegance at medium weight; bolder turns editorial-heavy. */
	font-weight: var(--weight-medium);
	line-height: var(--leading-tight);
	margin: 0 0 var(--space-md);
	color: var(--color-text);
}

p {
	margin: 0 0 var(--space-lg);
}

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

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

button {
	font-family: inherit;
	cursor: pointer;
}

input, textarea, select, button {
	font-family: inherit;
	font-size: var(--text-base);
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* --- Focus states: visible everywhere, never suppressed --- */
:focus-visible {
	outline: 2px solid var(--color-focus);
	outline-offset: 2px;
	border-radius: var(--radius-sm);
}

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

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--space-md);
	z-index: 10000;
	background: var(--color-text);
	color: #fff;
	padding: var(--space-sm) var(--space-lg);
	border-radius: var(--radius-sm);
	transition: top var(--duration-fast) var(--ease-soft);
}

.skip-link:focus {
	top: var(--space-md);
	width: auto;
	height: auto;
	clip: auto;
}

/* Safety net: nothing (stray absolute elements, wide intrinsic content)
   may create sideways page scroll. `clip` doesn't spawn a scroll container
   the way `hidden` does. */
#page {
	overflow-x: clip;
}

/* --- Layout utility --- */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-inline: auto;
	/* Breathing room against the viewport edge at every size: never less
	   than 20px on phones, growing to 40px before the max-width caps it. */
	padding-inline: clamp(20px, 4vw, 40px);
}

/* --- Buttons --- */
.button,
button[type="submit"],
input[type="submit"],
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	background: var(--color-text);
	color: var(--color-bg);
	border: none;
	border-radius: var(--radius-pill);
	padding: var(--space-md) var(--space-xl);
	font-weight: var(--weight-semibold);
	font-size: var(--text-sm);
	letter-spacing: 0.01em;
	transition: transform var(--duration-fast) var(--ease-soft), box-shadow var(--duration-fast) var(--ease-soft), background var(--duration-fast) var(--ease-soft);
	white-space: nowrap;
}

.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.wp-element-button:hover {
	background: var(--color-accent-primary-dark);
	color: #fff;
	box-shadow: var(--shadow-hover);
}

.button:active,
button[type="submit"]:active {
	transform: scale(0.98);
}

.button-primary {
	background: var(--color-accent-primary);
	color: #fff;
}

.button-primary:hover {
	background: var(--color-accent-primary-dark);
}

.button-outline {
	background: transparent;
	color: var(--color-text);
	border: 1.5px solid var(--color-border);
}

.button-outline:hover {
	background: var(--color-surface);
	color: var(--color-text);
	box-shadow: var(--shadow-soft);
}

/* --- Icons: simple line icons via inline SVG background, no icon font/JS lib --- */
.icon {
	display: inline-block;
	width: 1.25em;
	height: 1.25em;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
	flex-shrink: 0;
}
