/**
 * Rheinfly – Basis: Typografie, Links, Fokus, Formulare.
 * Gilt auch ohne Elementor (Rechtsseiten im Block-Editor).
 */

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--rf-bg);
	color: var(--rf-text);
	font-family: var(--rf-font);
	font-size: var(--rf-fs-base);
	font-weight: var(--rf-fw-regular);
	line-height: var(--rf-lh-text);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--rf-space-3);
	color: var(--rf-primary);
	font-family: var(--rf-font);
	font-weight: var(--rf-fw-bold);
	line-height: var(--rf-lh-heading);
	letter-spacing: -0.01em;
}
h1 { font-size: var(--rf-fs-h1); }
h2 { font-size: var(--rf-fs-h2); }
h3 { font-size: var(--rf-fs-h3); font-weight: var(--rf-fw-semibold); }
h4, h5, h6 { font-size: var(--rf-fs-base); font-weight: var(--rf-fw-semibold); }

p, ul, ol, dl, address, blockquote, table {
	margin: 0 0 var(--rf-space-3);
}
address { font-style: normal; }
small { font-size: var(--rf-fs-sm); }
strong, b { font-weight: var(--rf-fw-semibold); }

img, svg, video, iframe {
	max-width: 100%;
}
img {
	height: auto;
}

a {
	color: var(--rf-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--rf-transition);
}
a:hover {
	color: var(--rf-accent-hover);
}

:focus-visible {
	outline: 2px solid var(--rf-accent);
	outline-offset: 2px;
}

hr {
	border: 0;
	border-top: 1px solid var(--rf-border);
	margin: var(--rf-space-5) 0;
}

table {
	width: 100%;
	border-collapse: collapse;
}
th, td {
	padding: var(--rf-space-2) var(--rf-space-3);
	border-bottom: 1px solid var(--rf-border);
	text-align: left;
	vertical-align: top;
}
th { font-weight: var(--rf-fw-semibold); }

/* Formulare (inkl. Elementor-Pro-Formular) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
input[type="password"],
select,
textarea,
.elementor-field-group .elementor-field-textual {
	width: 100%;
	min-height: var(--rf-control-h);
	padding: 12px 14px;
	border: 1px solid #c9d0da;
	border-radius: var(--rf-radius-btn);
	background: var(--rf-bg);
	color: var(--rf-text);
	font: inherit;
	font-size: 16px; /* verhindert Zoom auf iOS */
	line-height: 1.4;
	transition: border-color var(--rf-transition), box-shadow var(--rf-transition);
}
textarea { min-height: 140px; resize: vertical; }
input:focus,
select:focus,
textarea:focus,
.elementor-field-group .elementor-field-textual:focus {
	border-color: var(--rf-accent);
	box-shadow: var(--rf-focus);
	outline: none;
}
label {
	display: inline-block;
	margin-bottom: var(--rf-space-1);
	font-weight: var(--rf-fw-semibold);
	font-size: var(--rf-fs-sm);
}
input[type="checkbox"],
input[type="radio"] {
	width: 18px;
	height: 18px;
	accent-color: var(--rf-accent);
}

button,
input[type="submit"],
input[type="button"] {
	font: inherit;
	cursor: pointer;
}

/* Barrierefreiheit */
.screen-reader-text {
	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.screen-reader-text:focus {
	clip: auto;
	width: auto;
	height: auto;
	margin: 0;
	top: 8px;
	left: 8px;
	z-index: 100000;
	padding: 12px 16px;
	background: var(--rf-primary);
	color: var(--rf-primary-contrast);
	border-radius: var(--rf-radius-btn);
	text-decoration: none;
}

/* Inhalte ohne Elementor (Rechtsseiten): lesbare Breite */
body:not(.elementor-page) .site-main.page,
body:not(.elementor-page) .site-main.post {
	max-width: 760px;
	margin-inline: auto;
	padding: var(--rf-space-6) var(--rf-gutter);
}

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