/**
 * Grundlagen: Box-Modell, Typografie, Links, Formulare, Fokus. Gilt im Frontend und im Editor.
 *
 * Seitentypen über Body-Klassen:
 *   (Standard)        Beige – Inhaltsseiten, Startseite, Bienenpatenschaft, Bee2B
 *   .zel-page-light   Weiß  – Shop, Produkt, Warenkorb, Kasse, Konto, Rechtstexte
 */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 1.5rem;
}

body {
	margin: 0;
	background: var(--zel-beige);
	color: var(--zel-schwarz);
	font-family: var(--zel-font-text);
	font-size: var(--zel-fs-body);
	line-height: 1.6;
	/* Glättung wie im Entwurf (tokens.css, vorher antialiased/grayscale – am Mac rund 10 % dünner) */
	-webkit-font-smoothing: var(--zel-font-smoothing, auto);
	-moz-osx-font-smoothing: var(--zel-font-smoothing-moz, auto);
	overflow-x: clip;
}

body.zel-page-light {
	background: #fff;
	color: var(--zel-anthrazit);
}

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

img {
	display: block;
}

iframe {
	max-width: 100%;
}

p,
ul,
ol,
blockquote,
figure,
table {
	margin-top: 0;
	margin-bottom: 1.25rem;
}

/* Überschriften: Display-Schrift, Versalien, weiß auf Beige. Gewicht und Laufweite wie im Entwurf
   (Trade Gothic Bold ≙ Barlow Condensed 600, ohne Sperrung) – Tokens in tokens.css. */
h1,
h2,
h3,
h4,
h5,
h6,
.zel-h1,
.zel-h2,
.zel-h3 {
	margin-top: 0;
	margin-bottom: 1.25rem;
	color: var(--zel-heading-color, var(--zel-weiss));
	font-family: var(--zel-font-display);
	font-weight: var(--zel-fw-heading);
	font-style: normal;
	line-height: 1.05;
	letter-spacing: var(--zel-ls-heading);
	text-transform: uppercase;
	overflow-wrap: break-word;
	/* Nur lange Wörter trennen (z. B. „BIENENPATENSCHAFT“ am Handy), kurze nie. */
	hyphens: auto;
	-webkit-hyphens: auto;
	hyphenate-limit-chars: 12 5 5;
}

h1,
.zel-h1 {
	font-size: var(--zel-fs-h1);
}

h2,
.zel-h2 {
	font-size: var(--zel-fs-h2);
}

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

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

h5,
h6 {
	font-size: 1rem;
	color: var(--zel-schwarz);
}

.zel-page-light h1,
.zel-page-light h2,
.zel-page-light h3,
.zel-page-light h4,
.zel-page-light h5,
.zel-page-light h6 {
	color: var(--zel-anthrazit);
}

/* Links: auf Beige schwarz unterstrichen (Braun hätte dort zu wenig Kontrast), auf Weiß braun */
a {
	color: var(--zel-schwarz);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover {
	text-decoration-thickness: 2px;
}

.zel-page-light .zel-content a:not([class]),
.zel-page-light .woocommerce-product-details__short-description a,
.zel-page-light .woocommerce-Tabs-panel a {
	color: var(--zel-braun);
}

strong,
b {
	font-weight: 700;
}

hr {
	border: 0;
	border-bottom: var(--zel-dot) dotted currentColor;
	margin: 2.5rem 0;
}

blockquote {
	margin-left: 0;
	margin-right: 0;
	font-size: clamp(1.25rem, 2vw, 1.9375rem);
	line-height: 1.3;
	font-style: italic;
	font-weight: 500;
}

/* Geschütztes Leerzeichen (\00a0): „»“ und „«“ bleiben am ersten bzw. letzten Wort und stehen nie allein in
   einer Zeile (Paket 20, Nr. 23). Vorher: normales Leerzeichen. */
blockquote p:first-child::before {
	content: "»\00a0";
}

blockquote p:last-child::after {
	content: "\00a0«";
}

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

th,
td {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--zel-hellgrau);
	text-align: left;
	vertical-align: top;
}

/* Fokus: immer sichtbar */
:focus-visible {
	outline: var(--zel-focus);
	outline-offset: 3px;
}

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

/* Nur für Bildschirmleser */
.screen-reader-text,
.zel-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;
}

.screen-reader-text:focus {
	position: fixed !important;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	clip: auto;
	background: var(--zel-weiss);
	color: var(--zel-schwarz);
	font-weight: 700;
	white-space: normal;
}

/* Formularelemente (Grundlage; Formularmodule verfeinern) */
input,
select,
textarea,
button {
	font: inherit;
	color: inherit;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
select,
textarea {
	width: 100%;
	min-height: 2.75rem;
	padding: 0.625rem 0.75rem;
	border: 1px solid var(--zel-anthrazit);
	border-radius: 0;
	background: #fff;
	color: var(--zel-schwarz);
}

textarea {
	min-height: 8rem;
	resize: vertical;
}

label {
	display: inline-block;
	margin-bottom: 0.25rem;
	font-weight: 500;
}

::placeholder {
	color: #5c5c5c;
	opacity: 1;
}

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

/* Markierter Text in Honiggelb (Einstellungen → Verspieltes → „Markierter Text in Honiggelb“, Klasse aus
   inc/ueberraschungen.php) – mit schwarzer Schrift, auch auf dunklen Flächen gut lesbar. */
.zel-markieren-honig ::selection {
	background: #f3c46a;
	color: #000;
}
