/* =========================================================
   BASE CSS
   Typography, resets, accessibility
========================================================= */

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

html {
	font-size: 16px;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-main);
	font-size: 1rem;
	line-height: 1.6;
	color: var(--text-primary);
	background:
		radial-gradient(circle at 8% 12%, rgba(24, 160, 182, 0.13) 0, transparent 24%),
		radial-gradient(circle at 92% 6%, rgba(14, 91, 216, 0.18) 0, transparent 26%),
		linear-gradient(180deg, var(--bg-main) 0%, var(--surface-soft) 100%);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

main {
	display: block;
	flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	color: var(--text-primary);
}

h1 {
	font-size: 2.25rem;
}

h2 {
	font-size: 1.85rem;
}

h3 {
	font-size: 1.35rem;
}

h4 {
	font-size: 1.15rem;
}

p {
	margin: 0;
	color: var(--text-secondary);
}

small {
	font-size: 0.85rem;
	color: var(--text-secondary);
}

a {
	color: var(--accent-primary);
	text-decoration: none;
	transition: opacity var(--transition);
}

a:hover {
	opacity: 0.88;
}

:focus-visible {
	outline: 3px solid var(--accent-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

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

input,
button,
textarea,
select {
	font-family: inherit;
	font-size: 1rem;
	color: var(--text-primary);
}

input::placeholder,
textarea::placeholder {
	color: var(--text-secondary);
	opacity: 0.85;
}

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

:focus {
	outline: none;
}

:focus-visible {
	box-shadow: var(--focus-ring);
	border-radius: 4px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	box-shadow: var(--focus-ring);
}

.visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

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

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

code,
pre {
	font-family: "Consolas", "Courier New", monospace;
}

@media (max-width: 600px) {
	h1 {
		font-size: 1.9rem;
	}

	h2 {
		font-size: 1.55rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
