/* ==========================================================================
   Base: reset, document, typography helpers, utilities
   Fluid sizes interpolate between the 375 px and 1440 px Figma frames:
   calc(min + (100vw - 375px) * (max - min) / 1065)
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
	scroll-behavior: smooth; /* in-page links (#specifikacija) glide; reduced motion turns it off below */
}

body {
	margin: 0;
	min-width: 320px;
	background: var(--c-bg);
	color: var(--c-ink);
	font-family: var(--font);
	font-weight: var(--fw-medium);
	font-size: 16px;
	line-height: 1.6875; /* 27 / 16 */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip;
}

body.is-locked {
	overflow: hidden;
}

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

h1, h2, h3, h4, h5, h6 {
	font-weight: var(--fw-bold);
}

/* :where() keeps the reset at zero specificity so component classes always win. */
:where(ul[class], ol[class]) {
	list-style: none;
	padding: 0;
}

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

img {
	height: auto;
}

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

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

a,
button,
label {
	-webkit-tap-highlight-color: transparent;
}

button {
	cursor: pointer;
	background: none;
	border: 0;
	padding: 0;
	border-radius: 0;
}

address {
	font-style: normal;
}

strong,
b {
	font-weight: var(--fw-bold);
}

[hidden] {
	display: none !important;
}

:focus-visible {
	outline: 2px solid var(--c-ink);
	outline-offset: 2px;
}

.on-dark :focus-visible,
.site-footer :focus-visible {
	outline-color: var(--c-white);
}

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

/* ---------------------------------------------------------- Utilities */

.container {
	width: min(var(--container), 100% - 2 * var(--gutter));
	margin-inline: auto;
}

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

.skip-link {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 12px 20px;
	background: var(--c-ink);
	color: var(--c-white);
	font-size: 12px;
	font-weight: var(--fw-bold);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

/* --------------------------------------------------------- Typography */

/* Kicker / breadcrumb label: Bold 12/22, 1.5 px, uppercase (mobile 11/18) */
.kicker {
	display: block;
	color: var(--c-muted);
	font-size: 12px;
	font-weight: var(--fw-bold);
	line-height: 22px;
	letter-spacing: 0.125em;
	text-transform: uppercase;
}

/* H2 section title: Bold 34/42 (mobile 26/32) */
.h2 {
	font-size: clamp(26px, calc(26px + (100vw - 375px) * 8 / 1065), 34px);
	line-height: 1.235;
	letter-spacing: 0.0088em;
}

/* H3 block title: Bold 28/36 (mobile 22/28) */
.h3 {
	font-size: clamp(22px, calc(22px + (100vw - 375px) * 6 / 1065), 28px);
	line-height: 1.286;
	letter-spacing: 0.0107em;
}

/* Lead: Medium 17/28 (mobile 15/24) */
.lead {
	color: var(--c-muted);
	font-size: clamp(15px, calc(15px + (100vw - 375px) * 2 / 1065), 17px);
	line-height: 1.647;
}

/* Body: Medium 16/27, muted (mobile 15/24) */
.text {
	color: var(--c-muted);
	font-size: clamp(15px, calc(15px + (100vw - 375px) * 1 / 1065), 16px);
	line-height: 1.6875;
}

.text > * + * {
	margin-top: 1em;
}

@media (max-width: 767px) {
	.kicker {
		font-size: 11px;
		line-height: 18px;
		letter-spacing: 0.1364em;
	}

	.text {
		line-height: 1.6;
	}
}
