/*
Theme Name: Satzspiegel
Theme URI: 
Author: Martin
Description: Ein ruhiges Blog-Theme für das Lesen. Inter für alles Bedienende, eine Serife nur für Beitragstitel und Beitragstext. Farbstile und Schrift-Stimmen sind unabhängig voneinander kombinierbar. Keine externen Ressourcen, keine Build-Werkzeuge.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 7.4
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: satzspiegel
Tags: blog, one-column, custom-colors, editor-style, featured-images, full-site-editing, style-variations, threaded-comments, translation-ready, wide-blocks
*/

/* Weicher Seitenwechsel, nur wenn Bewegung erlaubt ist */
@media (prefers-reduced-motion: no-preference) {
	@view-transition { navigation: auto; }
}

:root { color-scheme: var(--wp--custom--control-scheme, light); }

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

::selection {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--base);
}

/* Links: gepunktete Linie, Abstand zur Grundlinie */
a { text-underline-offset: 0.2em; }

/* Sichtbarer Tastaturfokus */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* Umbruch: Überschriften ausgleichen, Absätze ohne Schusterjungen */
h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.wp-block-query-title { text-wrap: balance; }
p, li, blockquote, figcaption { text-wrap: pretty; }

/* Deutsche Silbentrennung im Lesetext (nutzt lang-Attribut von WordPress) */
.wp-block-post-content,
.wp-block-post-excerpt {
	-webkit-hyphens: auto;
	hyphens: auto;
	hyphenate-limit-chars: 6 3 3;
}
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6),
.wp-block-post-content figcaption,
.wp-block-post-content .wp-block-table { -webkit-hyphens: manual; hyphens: manual; }

/* Variable-Font-Feinheiten der gewählten Schrift-Stimme (z. B. Fraunces SOFT) */
.wp-block-post-title,
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6) {
	font-variation-settings: var(--wp--custom--serif--title-variation, normal);
}

/* Überschriften im Text: mehr Luft davor, eng an den folgenden Absatz */
.wp-block-post-content > :is(h1, h2, h3, h4, h5, h6) { margin-block-start: 2em; }
.wp-block-post-content > :is(h1, h2, h3, h4, h5, h6) + * { margin-block-start: 0.6em; }
.wp-block-post-content > :first-child { margin-block-start: 0; }

/* Meta-Zeile im Beitragskopf */
.wp-block-post-terms { display: flex; flex-wrap: wrap; column-gap: 0.75em; }
.wp-block-post-terms .wp-block-post-terms__separator { display: none; }

/* Beitrags-Navigation: Beschriftung über dem Titel */
.wp-block-post-navigation-link { flex: 1 1 0; }
.wp-block-post-navigation-link .post-navigation-link__label {
	display: block;
	color: var(--wp--preset--color--muted);
}
.wp-block-post-navigation-link.post-navigation-link-next { text-align: end; }

/* Fußzeile: feine Linie */
.satzspiegel-footer { border-top: 1px solid var(--wp--preset--color--line); }

/* "Antworten"-Überschrift im Kommentarformular: kein Block, feste Klasse von WordPress selbst */
.comment-reply-title {
	font-size: var(--wp--preset--font-size--medium);
	margin-bottom: 1em;
}

/* Abstand zwischen der Kommentarliste und dem Formular darunter: der Block-
   Wrapper (.wp-block-post-comments-form) bekommt von WordPress selbst
   keinen Abstand nach oben. */
.wp-block-post-comments-form {
	margin-top: var(--wp--preset--spacing--60);
}

/* Abstand zwischen Kommentaren (auch verschachtelten Antworten): das <li>
   selbst ist unstyled und unsichtbar, deshalb sitzt der Abstand direkt am
   tatsächlich gerenderten Kommentar-Block (siehe className im Muster).
   Bewusst ohne Ausnahme für den ersten Kommentar: li:first-child träfe bei
   Antwortketten jede verschachtelte Antwort (dort hat die umschließende
   <ol> meist nur ein <li>), nicht nur den obersten Kommentar. Etwas mehr
   Luft nach der Kommentar-Überschrift ist der kleinere Kompromiss.
   Läuft bewusst außerhalb der Globalen Stile, damit ein gespeicherter Stand
   in der Datenbank sie nicht überdecken kann. */
.satzspiegel-comment-row { margin-top: var(--wp--preset--spacing--50); }
