/**
 * Reset + base element styles.
 */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	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-color: var(--color-bg);
	/* Very subtle sitewide depth — two soft, low-opacity glows anchored to
	   the top corners. Barely visible; not a decoration you consciously see. */
	background-image:
		radial-gradient(ellipse 900px 500px at 12% 0%, rgba(var(--color-violet-rgb), 0.07), transparent 60%),
		radial-gradient(ellipse 900px 500px at 92% 0%, rgba(var(--color-cyan-rgb), 0.06), transparent 60%);
	background-repeat: no-repeat;
	color: var(--color-text);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	line-height: var(--lh-normal);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-feature-settings: "cv11", "ss01";
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-sans);
	font-weight: 700;
}

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

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

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
	margin: 0;
}

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

button {
	background: none;
	border: none;
	cursor: pointer;
}

::selection {
	background: var(--color-selection);
	color: var(--color-text);
}

/* Focus visibility — never remove without replacing. Deliberately uses
   `outline`, not `box-shadow`: several components (buttons, cards) already
   set their own box-shadow at the same specificity, which would silently
   win over a box-shadow-based ring depending on stylesheet order. Outline
   is a separate layer that always paints regardless of box-shadow. */
:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 3px;
	border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
	outline: none;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: var(--space-4);
	z-index: 1000;
	padding: var(--space-2) var(--space-4);
	background: var(--color-accent);
	color: var(--color-on-accent);
	font-weight: 600;
	border-radius: var(--radius-sm);
	transition: top var(--transition-fast);
}

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

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

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--space-5);
}

@media (max-width: 640px) {
	.container {
		padding-inline: var(--space-4);
	}
}
