/* Alap: reset, tipográfia, linkek, fókusz, űrlap elemek alapja. */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: var(--f-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

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

img {
	height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 0;
	color: var(--c-navy);
	font-family: var(--f-head);
	font-weight: 700;
	line-height: var(--lh-head);
	text-wrap: balance;
}

h1 {
	font-size: var(--fs-h1);
	line-height: var(--lh-tight);
}

h2 {
	font-size: var(--fs-h2);
	letter-spacing: -0.005em;
}

h3 {
	font-size: var(--fs-h3);
}

h4 {
	font-size: var(--fs-h4);
}

h5,
h6 {
	font-size: var(--fs-body);
}

p,
ul,
ol,
dl,
figure,
blockquote,
table {
	margin: 0;
}

ul[class],
ol[class] {
	padding: 0;
	list-style: none;
}

a {
	color: var(--c-blue-strong);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	color: var(--c-navy);
}

strong,
b {
	font-weight: 700;
}

small {
	font-size: var(--fs-xs);
}

hr {
	height: 1px;
	margin: var(--s-7) 0;
	border: 0;
	background: var(--c-line);
}

code,
kbd,
pre,
samp {
	font-family: var(--f-mono);
	font-size: 0.9em;
}

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

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

button {
	cursor: pointer;
}

[hidden] {
	display: none !important;
}

/* Fókusz: csak billentyűzetnél, jól látható kék gyűrű (≥3:1 kontraszt). */
:focus {
	outline: none;
}

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

.tf-main:focus-visible {
	outline: none;
}

::selection {
	background: var(--c-sky-300);
	color: var(--c-navy);
}

/* Képernyőolvasó szöveg (WordPress szabvány osztály). */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	border: 0;
	white-space: nowrap;
	word-wrap: normal !important;
}

.tf-skip-link:focus {
	position: fixed !important;
	top: 12px;
	left: 12px;
	z-index: 1000;
	width: auto;
	height: auto;
	margin: 0;
	padding: 12px 20px;
	clip: auto;
	clip-path: none;
	border-radius: var(--r-pill);
	background: var(--c-navy);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

/* Űrlap elemek alapja: szürke kitöltés, keret nélkül (a mezők részletes stílusa a components.css-ben). */
:where(input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"],
	input[type="search"], input[type="url"], input[type="date"], select, textarea) {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	border: 1.5px solid transparent;
	border-radius: var(--r-md);
	background: var(--c-surface);
	color: var(--c-ink);
	font-size: var(--fs-body);
	line-height: 1.4;
	transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
	appearance: none;
}

:where(input, select, textarea):focus-visible {
	outline: none;
	border-color: var(--c-blue);
	background: var(--c-bg);
	box-shadow: var(--sh-focus);
}

:where(textarea) {
	min-height: 120px;
	resize: vertical;
}

:where(select) {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%2313252d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-position: right 14px center;
	background-repeat: no-repeat;
	background-size: 18px;
}

::placeholder {
	color: var(--c-muted);
	opacity: 1;
}

/* Jelölőnégyzet és rádió a design szerint. */
:where(input[type="checkbox"], input[type="radio"]) {
	display: inline-grid;
	flex: none;
	place-content: center;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.5px solid var(--c-control);
	background: var(--c-bg);
	cursor: pointer;
	vertical-align: -4px;
	appearance: none;
	transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

:where(input[type="checkbox"]) {
	border-radius: 6px;
}

:where(input[type="checkbox"]:checked) {
	border-color: var(--c-blue);
	background: var(--c-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

:where(input[type="radio"]) {
	border-radius: 50%;
}

:where(input[type="radio"]:checked) {
	border: 2px solid var(--c-blue);
	background: radial-gradient(circle, var(--c-blue) 0 4.5px, var(--c-bg) 5px);
}

:where(input[type="checkbox"], input[type="radio"]):disabled {
	border-color: var(--c-line);
	background-color: var(--c-sky-50);
	cursor: not-allowed;
}

:where(input[type="checkbox"], input[type="radio"]):focus-visible {
	outline: 3px solid var(--c-focus);
	outline-offset: 2px;
}

label {
	cursor: pointer;
}
