/*
 * iWebAndSEO theme — base layer
 * Design tokens, reset, typography, buttons, forms, icons, a11y helpers.
 * System fonts only — zero font requests, no icon-font CDN.
 */

:root {
	/* Palette */
	--ink: #0b1020;
	--ink-2: #131a30;
	--paper: #ffffff;
	--paper-2: #f4f6fb;
	--line: #e2e7f1;

	--text: #1c2437;
	--text-muted: #4b5568;
	--text-inverse: #f2f5fb;
	--text-inverse-muted: #b9c2d6;

	--brand: #2563eb;
	--brand-strong: #1d4ed8;
	--brand-soft: #eaf1ff;
	--accent: #10b981;
	--accent-strong: #059669;
	--focus: #7c3aed;

	/* Type */
	--font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--h1: clamp(2.25rem, 5vw, 3.5rem);
	--h2: clamp(1.75rem, 3.5vw, 2.5rem);
	--lead: clamp(1.05rem, 2vw, 1.25rem);

	/* Layout */
	--container: 1200px;
	--container-narrow: 760px;
	--header-h: 72px;

	/* Surfaces */
	--radius-sm: 8px;
	--radius: 14px;
	--radius-lg: 22px;
	--shadow-sm: 0 1px 2px rgb(11 16 32 / 0.06);
	--shadow: 0 10px 30px -12px rgb(11 16 32 / 0.18);

	--duration: 180ms;
}

/* ---------- Reset ---------- */

*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
	-webkit-text-size-adjust: 100%;
}

body {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: var(--font-sans);
	font-size: 1rem;
	line-height: 1.7;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
}

ul[class],
ol[class] {
	list-style: none;
	padding: 0;
}

/* ---------- Focus ---------- */

:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
	border-radius: 2px;
}

::selection {
	background: var(--brand);
	color: #fff;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.2;
	letter-spacing: -0.02em;
	text-wrap: balance;
	color: var(--ink);
	font-weight: 750;
}

h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }

p {
	text-wrap: pretty;
}

a {
	color: var(--brand-strong);
	text-decoration-thickness: from-font;
	text-underline-offset: 2px;
}

a:hover {
	color: var(--brand);
}

/* ---------- Layout helpers ---------- */

.container {
	width: min(100% - 2.5rem, var(--container));
	margin-inline: auto;
}

.container-narrow {
	width: min(100% - 2.5rem, var(--container-narrow));
	margin-inline: auto;
}

/* ---------- Accessibility helpers ---------- */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 10px;
	z-index: 999;
	background: var(--ink);
	color: #fff;
	padding: 0.8rem 1.3rem;
	border-radius: var(--radius-sm);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	left: 10px;
	color: #fff;
}

/* ---------- Icons ---------- */

.icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.icon svg {
	width: 1.25em;
	height: 1.25em;
	vertical-align: -0.25em;
}

/* ---------- Buttons ---------- */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.4rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color var(--duration),
		color var(--duration),
		border-color var(--duration),
		transform var(--duration);
}

.btn:hover,
.btn:focus-visible {
	text-decoration: none;
}

.btn .icon svg {
	width: 1em;
	height: 1em;
	transition: transform var(--duration);
}

.btn:hover .icon svg {
	transform: translateX(3px);
}

.btn-primary {
	background: var(--brand);
	color: #fff;
	box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
	background: var(--brand-strong);
	color: #fff;
	transform: translateY(-1px);
}

.btn-accent {
	background: var(--accent);
	color: #06281d;
	box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
	background: var(--accent-strong);
	color: #fff;
	transform: translateY(-1px);
}

.btn-ghost {
	background: transparent;
	color: inherit;
	border-color: currentColor;
}

.btn-ghost:hover {
	transform: translateY(-1px);
}

.btn-outline {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--line);
}

.btn-outline:hover {
	border-color: var(--ink);
	transform: translateY(-1px);
}

.btn-lg { padding: 0.9rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: 0.5rem 1.05rem; font-size: 0.875rem; }
.btn-block { width: 100%; }

/* ---------- Forms ---------- */

label {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--ink);
	margin-bottom: 0.4rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: #fff;
	color: var(--text);
	transition: border-color var(--duration);
}

input:hover,
textarea:hover,
select:hover {
	border-color: #c9d2e3;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--brand);
}

textarea {
	resize: vertical;
}

.required {
	color: #d92d20;
	font-weight: 700;
}

/* ---------- Reduced motion ---------- */

@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;
	}
}