/*
Theme Name: Thorsten
Theme URI: https://example.com/
Author: Servinga
Author URI: https://servinga.com/
Description: Schlankes, schnelles Block-Theme fuer eine Unternehmens- oder Dienstleisterseite. Vollstaendig im WordPress-Editor anpassbar, ohne externe Schriften oder Tracker, damit die Seite datenschutzfreundlich bleibt.
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thorsten
Tags: block-patterns, full-site-editing, one-column, two-columns, block-styles, wide-blocks, custom-colors, custom-menu, editor-style, featured-images, translation-ready
*/

/* Alle Design-Einstellungen stehen in theme.json.
   Hier stehen nur Feinheiten, die sich dort nicht abbilden lassen. */

:root {
	--thorsten-transition: 180ms ease;
}

/* Weiches Scrollen bei Ankerlinks im Menue */
html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Buttons und Links */
.wp-block-button__link {
	transition: background-color var(--thorsten-transition), color var(--thorsten-transition), border-color var(--thorsten-transition);
}

.wp-block-button__link:hover,
.wp-block-button__link:focus {
	filter: brightness(0.92);
}

a:where(:not(.wp-block-button__link)) {
	text-underline-offset: 0.2em;
}

/* Sichtbarer Fokusrahmen fuer Tastaturbedienung */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* Karten */
.is-style-thorsten-card {
	box-shadow: 0 1px 2px rgba(20, 28, 38, 0.04), 0 8px 24px -12px rgba(20, 28, 38, 0.12);
	transition: transform var(--thorsten-transition), box-shadow var(--thorsten-transition);
}

.is-style-thorsten-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 1px 2px rgba(20, 28, 38, 0.05), 0 16px 32px -14px rgba(20, 28, 38, 0.18);
}

/* Kleine Grossbuchstaben-Auszeichnung ueber Ueberschriften */
.is-style-thorsten-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.5rem;
}

/* Navigation: aktiver Menuepunkt */
.wp-block-navigation .current-menu-item > a {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}

/* Header wird beim Scrollen mitgenommen */
.thorsten-sticky-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: saturate(180%) blur(8px);
}

/* Formulare, z. B. aus einem Kontaktformular-Plugin */
input:where([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="date"]),
select,
textarea {
	width: 100%;
	padding: 0.7em 0.9em;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 6px;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font-family: inherit;
	font-size: inherit;
	line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--primary) 20%, transparent);
}

label {
	display: block;
	margin-bottom: 0.35em;
	font-weight: 600;
}

/* Bilder nie breiter als ihr Container */
img,
video,
iframe {
	max-width: 100%;
	height: auto;
}

/* Tabellen auf kleinen Bildschirmen scrollbar halten */
.wp-block-table {
	overflow-x: auto;
}

/* Nur fuer Screenreader */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	top: 0.5rem;
	left: 0.5rem;
	padding: 0.75rem 1rem;
	background-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	z-index: 200;
	border-radius: 4px;
}

/* Druckausgabe */
@media print {
	.wp-block-template-part,
	.wp-block-navigation {
		display: none;
	}
}
