/* Basis: Schriften, Reset, Typografie, Buttons, Hilfsklassen. */

@font-face {
	font-family: "Source Sans 3";
	src: url("../fonts/source-sans-3-latin-var.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Bebas Neue";
	src: url("../fonts/bebas-neue-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-offset, 0px) + var(--space-4));
}

html:has(dialog[open]) {
	overflow: hidden;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--color-bg);
	color: var(--color-text);
	font-family: var(--font-body);
	font-size: var(--fs-base);
	line-height: var(--lh-base);
	-webkit-font-smoothing: antialiased;
}

.site-main {
	flex: 1 0 auto;
}

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

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

img {
	height: auto;
}

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

button {
	cursor: pointer;
}

/* Typografie */
h1,
h2,
h3,
.display {
	font-family: var(--font-display);
	font-weight: 400;
	line-height: var(--lh-display);
	letter-spacing: var(--tracking-display);
	text-wrap: balance;
}

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

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

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

h4 {
	font-size: var(--fs-md);
	font-weight: var(--fw-bold);
	line-height: var(--lh-tight);
}

p {
	text-wrap: pretty;
}

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

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

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

/* Fokus: immer sichtbar bei Tastatur-Bedienung */
:focus-visible {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

:focus:not(:focus-visible) {
	outline: none;
}

/* Layout */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: var(--section-gap);
}

.section + .section {
	padding-top: 0;
}

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: var(--space-2) var(--space-4);
	margin-bottom: var(--space-5);
}

.section__title {
	color: var(--color-anthracite);
}

.section__intro {
	margin-top: var(--space-2);
	color: var(--color-text-muted);
}

.section__more {
	display: inline-flex;
	align-items: center;
	gap: var(--space-1);
	min-height: var(--tap);
	font-weight: var(--fw-semibold);
	text-decoration: none;
}

.section__more:hover {
	text-decoration: underline;
}

.section__more .icon {
	width: 20px;
	height: 20px;
}

/* Icons */
.icon {
	flex: none;
	width: 24px;
	height: 24px;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--control-h);
	padding: var(--space-2) var(--space-5);
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	font-size: var(--fs-base);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.btn .icon {
	width: 20px;
	height: 20px;
}

.btn--primary {
	background: var(--color-brand);
	color: var(--color-text-inverse);
}

.btn--primary:hover {
	background: var(--color-brand-dark);
}

.btn--secondary {
	background: transparent;
	border-color: var(--color-anthracite);
	color: var(--color-anthracite);
}

.btn--secondary:hover {
	background: var(--color-anthracite);
	color: var(--color-text-inverse);
}

/* Auf rotem oder dunklem Grund */
.btn--light {
	background: var(--color-surface);
	color: var(--color-brand);
}

.btn--light:hover {
	background: var(--color-bg);
}

.btn--outline-light {
	background: transparent;
	border-color: var(--color-text-inverse);
	color: var(--color-text-inverse);
}

.btn--outline-light:hover {
	background: var(--color-text-inverse);
	color: var(--color-brand);
}

.btn--block {
	width: 100%;
}

.btn[aria-disabled="true"],
.btn:disabled {
	opacity: 0.7;
	cursor: progress;
}

/* Icon-Button (Header) – 44 × 44 px Touch-Ziel */
.icon-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-width: var(--tap);
	min-height: var(--tap);
	padding: 0 var(--space-2);
	border: 0;
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--color-anthracite);
	font-weight: var(--fw-semibold);
	text-decoration: none;
}

.icon-btn:hover {
	background: var(--color-surface-sunken);
}

/* Formularfelder */
.field {
	width: 100%;
	min-height: var(--control-h);
	padding: var(--space-2) var(--space-4);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	background: var(--color-surface);
	color: var(--color-text);
}

.field::placeholder {
	color: var(--color-text-muted);
	opacity: 1;
}

.field:focus-visible {
	outline: var(--focus-ring);
	outline-offset: 0;
	border-color: var(--color-focus);
}

/* Sichtbar markierte Platzhalter für fehlende Inhalte */
.lt-placeholder {
	padding: 0 0.2em;
	border-radius: 3px;
	background: var(--color-placeholder-bg);
	color: var(--color-placeholder-text);
	font-weight: var(--fw-semibold);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

/* Barrierefreiheit (.screen-reader-text verwenden WordPress und WooCommerce) */
.sr-only,
.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 {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 100;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-sm);
	background: var(--color-anthracite);
	color: var(--color-text-inverse);
	font-weight: var(--fw-bold);
	transform: translateY(-200%);
}

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

/* Inhaltsseiten (index.php, Seiten) */
.entry {
	padding-block: var(--space-7);
}

.entry__title {
	margin-bottom: var(--space-5);
	color: var(--color-anthracite);
}

.entry__content > * + * {
	margin-top: var(--space-4);
}

.entry__content {
	max-width: 72ch;
}

.entry__content h2 {
	margin-top: var(--space-6);
	font-size: var(--fs-xl);
	color: var(--color-anthracite);
}

.entry__content ul {
	padding-left: 1.25em;
}

.entry__content li + li {
	margin-top: var(--space-1);
}

/* Hinweisbox über Seiten mit Platzhalter-Text (z. B. Rechtstexte) */
.lt-placeholder-notice {
	padding: var(--space-4);
	border: 2px dashed var(--color-placeholder-text);
	border-radius: var(--radius-md);
	background: var(--color-placeholder-bg);
	color: var(--color-placeholder-text);
}

.lt-placeholder-notice .lt-placeholder {
	padding: 0;
	background: none;
}

/* Kleines Etikett unter einzelnen Platzhalter-Texten */
.lt-placeholder-tag {
	display: block;
	margin-top: var(--space-1);
	font-size: var(--fs-xs);
	font-weight: var(--fw-semibold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: inherit;
	opacity: 0.85;
}

.notices:empty {
	display: none;
}

/* Seitenrahmen (page.php, 404, Shop) */
.page {
	padding-block: var(--space-5) var(--section-gap);
}

.page__header {
	display: grid;
	gap: var(--space-3);
	margin-bottom: var(--space-5);
}

.page__title {
	color: var(--color-anthracite);
}

.page__intro {
	max-width: 60ch;
	color: var(--color-text-muted);
	font-size: var(--fs-md);
}

/* Brotkrümel */
.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--fs-sm);
	color: var(--color-text-muted);
}

.breadcrumb__item {
	display: inline-flex;
	align-items: center;
}

.breadcrumb__item + .breadcrumb__item::before {
	content: "/";
	margin-inline: var(--space-2);
	color: var(--color-border-strong);
}

.breadcrumb a {
	display: inline-flex;
	align-items: center;
	min-height: var(--tap);
	color: var(--color-text-muted);
}

.breadcrumb a:hover {
	color: var(--color-brand);
}

/* Chips (Kategorien, aktive Filter) */
.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.chip {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: var(--tap);
	padding: 0 var(--space-4);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-pill);
	background: var(--color-surface);
	color: var(--color-text);
	font-weight: var(--fw-semibold);
	text-decoration: none;
}

.chip:hover {
	border-color: var(--color-brand);
	color: var(--color-brand);
}

.chip[aria-current="page"],
.chip--active {
	border-color: var(--color-anthracite);
	background: var(--color-anthracite);
	color: var(--color-text-inverse);
}

.chip .icon {
	width: 16px;
	height: 16px;
}

/* 404 */
.not-found {
	max-width: 52rem;
}

.not-found__code {
	font-family: var(--font-display);
	font-size: clamp(5rem, 3rem + 10vw, 9rem);
	line-height: 0.85;
	color: var(--color-brand);
}

.not-found__search {
	max-width: 36rem;
}

.not-found__links {
	margin-block: var(--space-6);
}

.not-found__help {
	color: var(--color-text-muted);
}
