/*
Theme Name: Postkarte
Theme URI: https://example.ch/postkarte
Author: Postkarte
Description: A warm, paper-first block theme for a Postkarte site. Carries the same palette and typography as the Postkarte desktop app, so the portal, the response form and the marketing pages read as one product.
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.0
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: postkarte-theme
Tags: block-theme, full-site-editing, one-column, custom-colors, wide-blocks, accessibility-ready
*/

/*
 * Nearly everything lives in theme.json. What is here covers the handful of
 * things theme.json cannot yet express — and no more, so the editor and the
 * front end cannot drift apart.
 */

/* The stamp motif, shared with the app and the portal. */
.pk-stamp {
	display: inline-block;
	width: 22px;
	height: 16px;
	background: var(--wp--preset--color--franking);
	border: 1px solid var(--wp--preset--color--ink);
	transform: rotate(-4deg);
}

/* Links inside body copy: underlined, warm, never a default blue. */
.wp-site-blocks a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--teal);
	text-underline-offset: 0.18em;
	text-decoration-thickness: 1px;
}

.wp-site-blocks a:where(:not(.wp-element-button)):hover {
	text-decoration-thickness: 2px;
}

/* Focus that is visible on paper tones as well as on glass. */
.wp-site-blocks :where(a, button, input, textarea, select):focus-visible {
	outline: 2px solid var(--wp--preset--color--teal);
	outline-offset: 2px;
	border-radius: 3px;
}

/* The site header floats over content, so it takes the translucent treatment
   the app gives its navigation. Content below stays opaque paper. */
.wp-block-template-part.site-header,
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 20;
	backdrop-filter: saturate(180%) blur(18px);
	-webkit-backdrop-filter: saturate(180%) blur(18px);
	background: color-mix(in srgb, var(--wp--preset--color--parchment) 78%, transparent);
	border-bottom: 1px solid var(--wp--preset--color--sand);
}

@supports not (backdrop-filter: blur(1px)) {
	.wp-block-template-part.site-header,
	header.wp-block-template-part {
		background: var(--wp--preset--color--parchment);
	}
}

@media (prefers-reduced-transparency: reduce) {
	.wp-block-template-part.site-header,
	header.wp-block-template-part {
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: var(--wp--preset--color--parchment);
	}
}

/* Figures in tabular numerals wherever a theme shows data. */
.has-tabular-numbers,
.wp-block-table td:last-child {
	font-variant-numeric: tabular-nums;
}

/* Block styles registered in functions.php. */

.wp-block-group.is-style-postkarte-paper {
	background: var(--wp--preset--color--linen);
	border: 1px solid var(--wp--preset--color--sand);
	border-radius: 12px;
	box-shadow: 0 6px 16px -12px rgba(36, 28, 21, 0.4);
	padding: var(--wp--preset--spacing--30);
}

.wp-block-separator.is-style-postkarte-hairline {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--sand);
	opacity: 1;
	max-width: 100%;
}
