/* ==========================================================================
   Umbra – Stylesheet
   Farben und Typo-Skala kommen aus theme.json (--wp--preset--*).
   Hier steht nur, was theme.json nicht ausdruecken kann.
   ========================================================================== */

:root {
	--umbra-hairline: 1px solid var(--wp--preset--color--line);
	--umbra-transition: 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Lesbarkeit: Zeilenlaenge begrenzen, Absaetze ruhig setzen */
.wp-block-post-content p,
.wp-block-post-content li {
	max-width: var(--wp--custom--measure);
	text-wrap: pretty;
}

h1, h2, h3,
.wp-block-post-title {
	text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Fokus – immer sichtbar, nie unterdrueckt
   -------------------------------------------------------------------------- */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Links – Unterstreichung als Haarlinie, nicht als Balken
   -------------------------------------------------------------------------- */
.wp-site-blocks a:where(:not(.wp-element-button)) {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	text-decoration-color: var(--wp--preset--color--line);
	transition: color var(--umbra-transition), text-decoration-color var(--umbra-transition);
}

.wp-site-blocks a:where(:not(.wp-element-button)):hover {
	text-decoration-color: var(--wp--preset--color--accent);
}

/* --------------------------------------------------------------------------
   Kopfbereich
   -------------------------------------------------------------------------- */
.umbra-header {
	border-bottom: var(--umbra-hairline);
}

.umbra-header .wp-block-navigation__responsive-container-open,
.umbra-header .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--contrast);
}

.umbra-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
}

/* Aktueller Menuepunkt bekommt einen Punkt, keine Farbe */
.wp-block-navigation .current-menu-item > a::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 3px;
	margin-right: 0.6em;
	vertical-align: 0.28em;
	background: var(--wp--preset--color--accent);
}

/* --------------------------------------------------------------------------
   Signatur: Marginalien
   Metadaten haengen links neben der Textspalte – ab 1200px.
   Darunter stehen sie schlicht ueber dem Titel.
   -------------------------------------------------------------------------- */
.umbra-anchor {
	position: relative;
}

.umbra-marginalia {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: var(--wp--custom--tracking--wide);
	text-transform: uppercase;
	color: var(--wp--preset--color--muted);
	line-height: 1.9;
}

.umbra-marginalia > * {
	margin-block: 0;
}

@media (min-width: 1200px) {
	.umbra-marginalia {
		position: absolute;
		top: 0.55rem;
		left: -14rem;
		width: 11rem;
		text-align: right;
		padding-top: 0.75rem;
		border-top: 1px solid var(--wp--preset--color--accent);
	}
}

/* --------------------------------------------------------------------------
   Beitragsliste – Zeilen statt Karten
   -------------------------------------------------------------------------- */
.umbra-index {
	border-top: var(--umbra-hairline);
}

.umbra-index .wp-block-post {
	border-bottom: var(--umbra-hairline);
	padding-block: var(--wp--preset--spacing--30);
	transition: background-color var(--umbra-transition);
}

.umbra-index .wp-block-post:hover {
	background-color: var(--wp--preset--color--surface);
}

.umbra-index .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large);
	margin-block: 0.2em 0.35em;
}

.umbra-index .wp-block-post-title a {
	background-image: linear-gradient(var(--wp--preset--color--accent), var(--wp--preset--color--accent));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0 1px;
	transition: background-size var(--umbra-transition);
}

.umbra-index .wp-block-post-title a:hover {
	background-size: 100% 1px;
	color: var(--wp--preset--color--contrast);
}

.umbra-index .wp-block-post-excerpt__excerpt {
	max-width: 54ch;
}

.umbra-index .wp-block-post-excerpt__more-text {
	display: none;
}

/* --------------------------------------------------------------------------
   Blockstile
   -------------------------------------------------------------------------- */
.is-style-umbra-outline {
	border: var(--umbra-hairline);
	padding: var(--wp--preset--spacing--30);
}

.is-style-umbra-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--tracking--wide);
	color: var(--wp--preset--color--muted);
	font-weight: 400;
	line-height: 1.6;
}

.is-style-umbra-framed img {
	border: var(--umbra-hairline);
}

.wp-block-separator:not(.is-style-dots) {
	border: 0;
	border-top: var(--umbra-hairline);
	opacity: 1;
}

.wp-block-separator.is-style-umbra-accent {
	border: 0;
	height: 1px;
	background: var(--wp--preset--color--accent);
	max-width: 3rem;
	margin-inline: 0;
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Bilder, Zitate
   -------------------------------------------------------------------------- */
.wp-block-image img {
	display: block;
}

.wp-block-post-featured-image img {
	filter: saturate(0.85) contrast(1.02);
}

.wp-block-quote {
	font-style: normal;
}

.wp-block-quote cite {
	display: block;
	margin-top: var(--wp--preset--spacing--20);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--tracking--wide);
	font-style: normal;
	color: var(--wp--preset--color--muted);
}

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */
input[type="text"],
input[type="search"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select,
.wp-block-search__input {
	background: transparent;
	border: var(--umbra-hairline);
	border-radius: 0;
	color: var(--wp--preset--color--contrast);
	padding: 0.8em 1em;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--small);
	width: 100%;
}

input::placeholder,
textarea::placeholder {
	color: var(--wp--preset--color--muted);
}

.wp-block-search__button {
	border: var(--umbra-hairline);
	border-radius: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding: 0.8em 1.4em;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: var(--wp--custom--tracking--wide);
	cursor: pointer;
	transition: background-color var(--umbra-transition), color var(--umbra-transition);
}

.wp-block-search__button:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

/* --------------------------------------------------------------------------
   Blaettern
   -------------------------------------------------------------------------- */
.wp-block-query-pagination {
	border-top: var(--umbra-hairline);
	padding-top: var(--wp--preset--spacing--30);
}

.wp-block-query-pagination-numbers .page-numbers {
	padding-inline: 0.4em;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
}

.wp-block-query-pagination-numbers .page-numbers.current {
	color: var(--wp--preset--color--contrast);
}

/* --------------------------------------------------------------------------
   Fussbereich
   -------------------------------------------------------------------------- */
.umbra-footer {
	border-top: var(--umbra-hairline);
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: var(--wp--custom--tracking--wide);
	text-transform: uppercase;
}

.umbra-footer a {
	color: inherit;
	text-decoration: none;
}

.umbra-footer a:hover {
	color: var(--wp--preset--color--contrast);
}

/* --------------------------------------------------------------------------
   Ein einziger Bewegungsmoment: der Titel steigt beim Laden auf
   -------------------------------------------------------------------------- */
@keyframes umbra-rise {
	from { opacity: 0; transform: translateY(0.6rem); }
	to   { opacity: 1; transform: none; }
}

.umbra-rise > * {
	animation: umbra-rise 620ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.umbra-rise > *:nth-child(2) { animation-delay: 90ms; }
.umbra-rise > *:nth-child(3) { animation-delay: 160ms; }

@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;
	}
}

/* --------------------------------------------------------------------------
   Editor – dunkler Hintergrund auch in der Bearbeitungsansicht
   -------------------------------------------------------------------------- */
.editor-styles-wrapper {
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* --------------------------------------------------------------------------
   Druck
   -------------------------------------------------------------------------- */
@media print {
	.umbra-header,
	.umbra-footer,
	.wp-block-query-pagination {
		display: none;
	}

	body {
		background: #fff;
		color: #000;
	}
}
