/*
 * Falk26 – Grundlagen: Schrift, Seitenhintergrund, Überschriften, Links,
 * Buttons, Formulare, Fokus. Werte aus tokens.css.
 */

@font-face {
	font-family: veneer;
	src: url(../fonts/Veneer-latin.woff2) format("woff2"),
		url(../fonts/Veneer.ttf) format("truetype");
	font-display: swap;
}

/*
 * Seitenhintergrund: Sandton mit feiner Körnung. „html body.custom-background“,
 * weil WordPress die Customizer-Farbe als Inline-CSS nach den Stylesheets
 * ausgibt (WooCommerce stellt sie für Twenty Twenty auf Weiß).
 */
body,
html body.custom-background {
	color: var(--falk-text);
	background-color: var(--falk-page-tint);
	background-image: url(../img/koernung.png);
	background-repeat: repeat;
	font-family: var(--falk-font-text);
}

::selection {
	background: var(--falk-ocker-300);
	color: var(--falk-nacht-950);
}

/* Fließtext in der Textschrift statt der Serifenschrift des Parents */
.entry-content,
.entry-content p,
.entry-content ol,
.entry-content ul,
.entry-content dl,
.entry-content dt,
.entry-content cite,
.entry-content figcaption,
.entry-content .wp-caption-text {
	font-family: var(--falk-font-text);
}

.entry-content {
	font-size: var(--falk-step-0);
	line-height: 1.65;
}

/* Überschriften in Veneer; .entry-content-Varianten wegen der Parent-Spezifität. */
h1,
h2,
h3,
h4,
h5,
.site-title,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5 {
	font-family: var(--falk-font-display);
	font-weight: var(--falk-display-weight);
	letter-spacing: var(--falk-display-spacing);
	line-height: 1.05;
	color: var(--falk-heading);
	text-wrap: balance;
}

h1,
.entry-content h1 {
	font-size: var(--falk-step-6);
}

h2,
.entry-content h2 {
	font-size: var(--falk-step-4);
}

h3,
h5,
.entry-content h3,
.entry-content h5 {
	font-size: var(--falk-step-3);
}

h4,
.entry-content h4 {
	font-size: var(--falk-step-2);
	color: var(--falk-akzent-titel);
}

.entry-content h2,
.entry-content h3 {
	margin-top: var(--falk-space-6);
	margin-bottom: var(--falk-space-3);
}

.entry-content h4,
.entry-content h5 {
	margin-top: var(--falk-space-5);
	margin-bottom: var(--falk-space-2);
}

/* Links */
a {
	color: var(--falk-link);
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.18em;
	transition: color var(--falk-transition), background-color var(--falk-transition), border-color var(--falk-transition);
}

a:hover,
a:focus {
	color: var(--falk-link-hover);
}

/* Buttons: dieselben Selektoren wie Parent und WooCommerce, später geladen */
button,
.button,
.faux-button,
.wp-block-button__link,
.wp-block-file .wp-block-file__button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
	border-radius: var(--falk-radius);
	background-color: var(--falk-button-bg);
	color: var(--falk-button-text);
	font-family: var(--falk-font-text);
	letter-spacing: 0.06em;
	transition: background-color var(--falk-transition), color var(--falk-transition), transform var(--falk-transition);
}

button:hover,
button:focus,
.button:hover,
.button:focus,
.faux-button:hover,
.faux-button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus,
.wp-block-file .wp-block-file__button:hover,
.wp-block-file .wp-block-file__button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="reset"]:hover,
input[type="reset"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
	background-color: var(--falk-button-bg-hover);
	color: var(--falk-button-text-hover);
	text-decoration: none;
}

/* Umschalter im Kopf sind auch <button>, aber ohne Fläche */
.toggle,
.toggle:hover,
.toggle:focus,
.search-untoggle,
.close-nav-toggle {
	background-color: transparent;
	color: inherit;
}

/* Fokus sichtbar, nicht nur über die Farbe (B25) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.button:focus-visible {
	outline: 3px solid var(--falk-focus-ring);
	outline-offset: 3px;
	border-radius: var(--falk-radius);
}

/* Formulare */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="week"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="color"],
select,
textarea {
	border-radius: var(--falk-radius);
	border-color: var(--falk-border-stark);
	background-color: var(--falk-input-bg);
	color: var(--falk-text);
	font-family: var(--falk-font-text);
}

select {
	padding: 0.8rem 1.2rem;
	border-width: 0.1rem;
	border-style: solid;
	font-size: 1.6rem;
}

/* Rahmen in Tabellen und Trennern */
pre,
fieldset,
table,
table *,
hr {
	border-color: var(--falk-border);
}

/* Trenner: Linie in der Rahmenfarbe, die zwei Schrägstriche des Parents als Akzent */
.entry-content hr:not(.has-background),
hr.styled-separator {
	color: var(--falk-border-stark);
}

.entry-content hr::before,
.entry-content hr::after,
hr.styled-separator::before,
hr.styled-separator::after {
	width: 0.3rem;
	height: 2rem;
	top: calc(50% - 1rem);
	background: var(--falk-akzent-linie);
}

blockquote {
	border-color: var(--falk-akzent-linie);
}

cite,
figcaption,
.wp-caption-text {
	color: var(--falk-text-leise);
}

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