/*
 * Base layer: reset, layout primitives, typography baseline.
 * Reads every color/spacing/typography value from the theme.json-generated
 * custom properties (--wp--preset--*, --wp--custom--*) — nothing here
 * redefines a token value a second time (UX spec §13.2's "no component
 * references a primitive token directly" rule, extended to this file:
 * everything here consumes the SEMANTIC layer theme.json already built).
 *
 * Breakpoints (UX spec §13.5): mobile 390 / tablet 834 / desktop 1440.
 * CSS custom properties can't be used inside @media conditions, so these
 * three numbers are the one deliberate exception to "no duplicated token
 * values" in this file — they mirror settings.custom.breakpoint in theme.json.
 */

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

html { 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;
	background: var(--wp--preset--color--stone-50);
	color: var(--wp--preset--color--ink-950);
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.6;
}

h1, h2, h3, h4 {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--wp--preset--color--ink-950);
	margin: 0 0 var(--wp--preset--spacing--3, 12px);
}
h1 { font-size: var(--wp--preset--font-size--h1); }
h2 { font-size: var(--wp--preset--font-size--h2); }
h3 { font-size: var(--wp--preset--font-size--h3); }
h4 { font-size: var(--wp--preset--font-size--h4); }

a { color: var(--wp--preset--color--accent-600); }
a:hover { color: var(--wp--preset--color--accent-700); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-600);
	outline-offset: 2px;
}

.iek-site { max-width: 100%; overflow-x: hidden; }

.iek-main > .iek-section,
.iek-main > div > .iek-section {
	padding-block: var(--wp--preset--spacing--20, 80px);
}
@media (min-width: 834px) {
	.iek-main > .iek-section,
	.iek-main > div > .iek-section {
		padding-block: var(--wp--preset--spacing--32, 128px);
	}
}
.iek-section > * {
	max-width: 1240px;
	margin-inline: auto;
	padding-inline: var(--wp--preset--spacing--4, 16px);
}
@media (min-width: 834px) {
	.iek-section > * { padding-inline: var(--wp--preset--spacing--8, 32px); }
}
.iek-section:nth-of-type(even) { background: var(--wp--preset--color--stone-100); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.iek-skip-link {
	position: absolute;
	left: 0; top: -100px;
	background: var(--wp--preset--color--ink-950);
	color: var(--wp--preset--color--stone-50);
	padding: var(--wp--preset--spacing--3, 12px) var(--wp--preset--spacing--4, 16px);
	z-index: 100;
	transition: top var(--wp--custom--motion--fast, 180ms ease-out);
}
.iek-skip-link:focus { top: 0; }

/* Buttons (UX spec §5.1) */
.iek-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 var(--wp--preset--spacing--6, 24px);
	border-radius: var(--wp--custom--radius--button, 8px);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color var(--wp--custom--motion--fast, 180ms ease-out), opacity var(--wp--custom--motion--fast, 180ms ease-out);
}
.iek-button--primary {
	background: var(--wp--preset--color--accent-600);
	color: var(--wp--preset--color--paper);
}
.iek-button--primary:hover { background: var(--wp--preset--color--accent-700); color: var(--wp--preset--color--paper); }
.iek-button--secondary {
	background: transparent;
	border-color: var(--wp--preset--color--accent-600);
	color: var(--wp--preset--color--accent-600);
}
.iek-button--secondary:hover { background: var(--wp--preset--color--accent-100); }
.iek-button--text { background: none; border: none; color: var(--wp--preset--color--accent-600); padding: 0; min-height: auto; text-decoration: underline; }
.iek-button[disabled], .iek-button.is-loading { opacity: 0.6; pointer-events: none; }

.iek-input, textarea.iek-input, input.iek-input {
	width: 100%;
	min-height: 48px;
	padding: 8px 12px;
	border: 1px solid var(--wp--preset--color--ink-300);
	border-radius: var(--wp--custom--radius--button, 8px);
	background: var(--wp--preset--color--paper);
	font-family: inherit;
	font-size: 16px;
}
label { display: block; margin-bottom: var(--wp--preset--spacing--4, 16px); font-weight: 500; }

.iek-fallback-notice { color: var(--wp--preset--color--ink-400); font-size: var(--wp--preset--font-size--caption); font-style: italic; }

.iek-empty-state { text-align: center; padding: var(--wp--preset--spacing--12, 48px) 0; color: var(--wp--preset--color--ink-600); }
