/*
Theme Name: FahrSchulKombinat
Theme URI: https://fahrschulkombinat.de/
Author: Fahrschulkombinat
Author URI: https://fahrschulkombinat.de/
Description: Playful-but-trustworthy WordPress block theme for driving schools. Neo-brutalist cards, hard ink shadows and Ortstafel accents. Ships 18 self-contained section patterns (hero, Ortstafel location tabs, timetables, licence classes, Kennzeichen downloads, team, fleet, reviews, FAQ, SEO tables) that can be copied into any other block theme. Fonts are bundled locally, so no third-party requests are made.
Requires at least: 6.6
Tested up to: 6.8
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: fahrschulkombinat
Tags: full-site-editing, block-patterns, blog, one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, block-styles, style-variations, translation-ready, accessibility-ready
*/

/*
 * Almost every visual decision lives in `theme.json` (tokens, element styles)
 * and `assets/css/fsk-sections.css` (the portable section kit). What is left
 * here is the handful of global rules that neither of those can express.
 */

/* --------------------------------------------------------------------------
   Document
   -------------------------------------------------------------------------- */

html {
	/* Anchor links must not slide under the sticky header. */
	scroll-padding-top: 5.5rem;
}

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

/* The soft paper glow behind the whole page, from the source design. */
body::before {
	content: "";
	position: fixed;
	z-index: -1;
	inset: 0;
	background-image:
		radial-gradient(circle at 18% 12%, var(--wp--preset--color--pink-soft) 0, transparent 42%),
		radial-gradient(circle at 86% 58%, var(--wp--preset--color--cyan-soft) 0, transparent 46%);
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */

.skip-link:focus {
	z-index: 100000;
	top: 0.5rem;
	left: 0.5rem;
	padding: 0.75rem 1.25rem;
	border: var(--wp--custom--border-width) solid var(--wp--preset--color--ink);
	border-radius: 12px;
	background: var(--wp--preset--color--sign-yellow);
	box-shadow: var(--wp--preset--shadow--hard);
	color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

/* Visually hidden but readable by screen readers — used for table captions
   and other labels the design does not show. */
.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
	word-wrap: normal;
}

/* A visible focus ring everywhere, in the brand pink. */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--pink);
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Buttons — the "press down" interaction from the design
   -------------------------------------------------------------------------- */

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: transform 0.12s, box-shadow 0.12s;
}

/* Zero-specificity fallback: guarantees the hard shadow even if the
   `elements.button.shadow` value in theme.json is ignored, while still losing
   to any shadow an author sets on an individual button. */
:where(.wp-block-button__link) {
	box-shadow: var(--wp--preset--shadow--hard);
}

.wp-block-button__link:hover {
	transform: translate(-2px, -2px);
	box-shadow: var(--wp--preset--shadow--hard-lg);
}

.wp-block-button__link:active {
	transform: translate(3px, 3px);
	box-shadow: 1px 1px 0 var(--wp--preset--color--ink);
}

/* Block style: "Umriss" — paper fill instead of ink. */
.wp-block-button.is-style-fsk-outline .wp-block-button__link {
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--ink);
}

/* Block style: "Sticker" — pill shaped, tilted. */
.wp-block-button.is-style-fsk-sticker .wp-block-button__link {
	border-radius: 999px;
	rotate: -2deg;
}

/* --------------------------------------------------------------------------
   Long-form content
   -------------------------------------------------------------------------- */

.entry-content > * {
	margin-block: 1.25rem;
}

.entry-content :is(h2, h3, h4) {
	margin-block-start: 2.25rem;
}

/* Post body headings read better in sentence case than the display uppercase
   used for section titles. */
.entry-content :is(h2, h3, h4, h5, h6) {
	text-transform: none;
	letter-spacing: -0.015em;
}

.wp-block-post-content :is(ul, ol) {
	padding-inline-start: 1.5rem;
}

.wp-block-post-content li + li {
	margin-block-start: 0.375rem;
}

/* Tables in post content get the same hard-ruled treatment as the SEO table. */
.wp-block-table table {
	border-collapse: collapse;
}

.wp-block-table :is(th, td) {
	border: 1.5px solid var(--wp--preset--color--ink);
	padding: 0.5rem 0.625rem;
}

.wp-block-table thead th {
	background: var(--wp--preset--color--cyan);
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Pagination + comments
   -------------------------------------------------------------------------- */

.wp-block-query-pagination {
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
}

.wp-block-query-pagination .page-numbers {
	padding: 0.375rem 0.6875rem;
	border: 2px solid var(--wp--preset--color--ink);
	border-radius: 10px;
	background: var(--wp--preset--color--card);
	box-shadow: var(--wp--preset--shadow--hard-sm);
	text-decoration: none;
}

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

.wp-block-post-comments-form :is(input, textarea) {
	width: 100%;
	padding: 0.6875rem 0.875rem;
	border: var(--wp--custom--border-width) solid var(--wp--preset--color--ink);
	border-radius: var(--wp--custom--radius--sm);
	background: var(--wp--preset--color--card);
	font-family: inherit;
	font-size: 1rem;
}

.wp-block-post-comments-form .form-submit input[type="submit"] {
	width: auto;
	background: var(--wp--preset--color--ink);
	box-shadow: var(--wp--preset--shadow--hard);
	color: var(--wp--preset--color--paper);
	cursor: pointer;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
	body::before,
	.fsk-marquee,
	.fsk-locstrip,
	.fsk-sign,
	.fsk-doodle,
	.fsk-sticker,
	.fsk-announce,
	.fsk-video {
		display: none !important;
	}

	.fsk-header {
		position: static;
	}

	/* Reveal every timetable, not just the selected location. */
	.fsk-panel[hidden] {
		display: block !important;
	}

	.fsk-panel__label {
		display: inline-block !important;
	}
}
