/**
 * Reset + base element styles. No component-specific rules here.
 */

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

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

body {
	margin: 0;
	background: var(--ev-color-bg);
	color: var(--ev-color-text);
	font-family: var(--ev-font-family-base);
	font-size: var(--ev-font-size-base);
	line-height: var(--ev-line-height-base);
	/* Safety net for intentional decorative bleeds (e.g. .ev-hero--product's oversized media) that extend past their container on narrower viewports — clips instead of adding a horizontal scrollbar. */
	overflow-x: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
	font-family: var(--ev-font-family-heading);
	line-height: var(--ev-line-height-heading);
	color: var(--ev-color-text);
	margin: 0 0 var(--ev-space-md);
}

h1 { font-size: var(--ev-font-size-2xl); }
h2 { font-size: var(--ev-font-size-xl); }
h3 { font-size: var(--ev-font-size-lg); }

p {
	margin: 0 0 var(--ev-space-md);
	color: var(--ev-color-text-muted);
}

a {
	color: var(--ev-color-accent-cyan);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--ev-color-accent-blue);
}

/* Visible focus state everywhere — never suppressed */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 2px solid var(--ev-color-accent-cyan);
	outline-offset: 2px;
}

button {
	font-family: inherit;
	font-size: inherit;
}

input, textarea, select {
	font-family: inherit;
	font-size: var(--ev-font-size-base);
	color: var(--ev-color-text);
	background: var(--ev-color-surface);
	border: 1px solid var(--ev-color-border);
	border-radius: var(--ev-radius-sm);
	padding: var(--ev-space-sm);
}

label {
	display: block;
	margin-bottom: var(--ev-space-2xs);
	color: var(--ev-color-text);
	font-weight: 600;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: var(--ev-space-md);
	background: var(--ev-color-cta-primary);
	color: var(--ev-color-text-on-accent);
	padding: var(--ev-space-sm) var(--ev-space-md);
	border-radius: var(--ev-radius-sm);
	z-index: 1000;
	transition: top var(--ev-transition-fast);
}

.skip-link:focus {
	top: var(--ev-space-md);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}

	html {
		scroll-behavior: auto;
	}
}
