/*
Theme Name: SchilterLaw
Theme URI: https://www.schilterlaw.ch/
Author: Schilter Rechtsanwälte GmbH
Description: Blocktheme für Schilter Rechtsanwälte GmbH, Zug und Schwyz. Gebaut ausschliesslich mit nativen WordPress-Funktionen (theme.json v3, Block-Templates, Template-Teile, Patterns, Block-Stilvarianten). Schriften lokal eingebunden, keine externen Dienste.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schilterlaw
Domain Path: /languages
Tags: block-theme, full-site-editing, one-column, wide-blocks, custom-colors, editor-style, accessibility-ready, translation-ready
*/

/* Only what theme.json cannot express lives here. */

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

:root {
	--sra-header-h: var(--wp--custom--header--height);
	--sra-feder: var(--wp--custom--motion--feder);
	--sra-ring: 0 0 0 2px var(--wp--preset--color--papier), 0 0 0 4px var(--wp--preset--color--siegellack);
	color-scheme: light;
}

html { scroll-padding-top: calc(var(--sra-header-h) + 1.5rem); -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; font-optical-sizing: auto; }

/* Typography — engraved-plate width for display sizes, size-specific tracking */
h1, h2, .has-display-font-size, .has-xxl-font-size:where(:not(blockquote, blockquote *)) {
	font-stretch: 116%;
	text-wrap: balance;
}
h3, .wp-block-post-title { font-stretch: 108%; text-wrap: balance; }
p, li { text-wrap: pretty; hanging-punctuation: first; }
.is-style-marke { font-stretch: 100%; }
:where(.wp-block-post-content, .entry-content) :where(p, li) { max-width: 70ch; }

/* Links — calm underline, wax-red on hover */
a { text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: color 160ms ease, text-decoration-color 160ms ease; }
a:where(:not(.wp-element-button)) { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:where(:not(.wp-element-button)):hover { text-decoration-color: currentColor; }

/* Focus is always visible, never color alone */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: none;
	box-shadow: var(--sra-ring);
	border-radius: 4px;
}

/* Buttons respond on press, not on release */
.wp-element-button, .wp-block-button__link {
	transition: transform var(--wp--custom--motion--druck) ease-out, background-color 160ms ease, color 160ms ease;
	-webkit-tap-highlight-color: transparent;
}
.wp-element-button:active, .wp-block-button__link:active { transform: scale(0.97); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--seetiefe); color: var(--wp--preset--color--papier); border-color: var(--wp--preset--color--seetiefe); }
.is-style-seetiefe .wp-block-button__link { background: var(--wp--preset--color--papier); color: var(--wp--preset--color--seetiefe); }
.is-style-seetiefe .wp-block-button__link:hover { background: var(--wp--preset--color--kalk); color: var(--wp--preset--color--seetiefe); }
.is-style-seetiefe .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--papier); }
.is-style-seetiefe .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--papier); color: var(--wp--preset--color--seetiefe); }
.is-style-seetiefe :where(a, button):focus-visible { box-shadow: 0 0 0 2px var(--wp--preset--color--seetiefe), 0 0 0 4px var(--wp--preset--color--papier); }

/* ---------------------------------------------------------------- Header: sticky frosted material
   Sticky must sit on the template-part wrapper: an element can only stick within its parent,
   and the wrapper is exactly as tall as the inner group. */
.site-header-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
}
@media (max-width: 600px) { .admin-bar .site-header-part { top: 0; } } /* admin bar scrolls away on small screens */
.site-header {
	position: relative;
	background: color-mix(in srgb, var(--wp--preset--color--papier) 0%, transparent);
	transition: background-color 320ms var(--sra-feder), -webkit-backdrop-filter 320ms var(--sra-feder), backdrop-filter 320ms var(--sra-feder);
}
/* scroll edge effect instead of a hard divider — appears only once content passes underneath */
.site-header::after {
	content: ""; position: absolute; inset: 100% 0 auto; height: 1px; opacity: 0;
	background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--wp--preset--color--seetiefe) 16%, transparent) 12%, color-mix(in srgb, var(--wp--preset--color--seetiefe) 16%, transparent) 88%, transparent);
	box-shadow: 0 6px 18px -6px rgb(19 59 69 / 18%);
	transition: opacity 320ms var(--sra-feder);
}
.site-header.is-scrolled {
	background: color-mix(in srgb, var(--wp--preset--color--papier) 72%, transparent);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	backdrop-filter: blur(20px) saturate(180%);
}
.site-header.is-scrolled::after { opacity: 1; }
.site-header__inner { transition: min-height 320ms var(--sra-feder); }
.site-header.is-scrolled .site-header__inner { min-height: 3.75rem; }
.site-logo img { transition: height 320ms var(--sra-feder), width 320ms var(--sra-feder); }
.site-header.is-scrolled .site-logo img { height: 2.2rem; width: calc(2.2rem * 3.95); }
/* without JavaScript the bar is always in its frosted, legible state */
html:not(.sra-js) .site-header {
	background: color-mix(in srgb, var(--wp--preset--color--papier) 72%, transparent);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	backdrop-filter: blur(20px) saturate(180%);
}
.site-header__inner { min-height: var(--sra-header-h); gap: var(--wp--preset--spacing--40); }
.site-logo { margin: 0; flex: none; }
.site-logo img { display: block; height: 2.6rem; width: calc(2.6rem * 3.95); border-radius: 0; }
.language-switcher ul { display: flex; gap: 0.125rem; margin: 0; padding: 0; list-style: none; }
.language-switcher a {
	display: inline-grid; place-items: center; min-width: 2.75rem; min-height: 2.75rem; padding-inline: 0.5rem;
	border-radius: var(--wp--custom--radius--kapsel); font-size: var(--wp--preset--font-size--s); font-weight: 560;
	letter-spacing: 0.02em; text-decoration: none; color: var(--wp--preset--color--stein);
}
.language-switcher a:hover { color: var(--wp--preset--color--siegellack); }
.language-switcher a[aria-current] { background: var(--wp--preset--color--kalk); color: var(--wp--preset--color--seetiefe); }
.site-header .wp-block-shortcode { margin: 0; }
.site-header .wp-block-navigation__container { gap: 0.25rem 1.5rem; }
.site-header .wp-block-navigation-item__content { padding-block: 0.4rem; text-decoration: none; }
.site-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.site-header .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--siegellack); }
.site-header .wp-block-navigation .wp-block-navigation__submenu-container {
	border: 0; border-radius: var(--wp--custom--radius--mittel); padding: 0.5rem; min-width: 17rem;
	background: color-mix(in srgb, var(--wp--preset--color--papier) 88%, transparent);
	-webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
	box-shadow: var(--wp--preset--shadow--schwebend);
	transform-origin: top left;
}
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 0.55rem 0.75rem; border-radius: var(--wp--custom--radius--klein); }
.site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--kalk); }
.site-header .header-phone { flex: none; }
.site-header .wp-block-navigation__responsive-container.is-menu-open { padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem) 2rem; }
.site-header .is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container, .wp-block-navigation-item) { align-items: flex-start !important; text-align: left; }
.site-header .is-menu-open .wp-block-navigation__container { gap: 0.25rem; width: 100%; }
.site-header .is-menu-open .wp-block-navigation-item__content { font-size: var(--wp--preset--font-size--l); font-stretch: 108%; }
.site-header .is-menu-open .wp-block-navigation__submenu-container { background: none !important; box-shadow: none !important; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 0 0.5rem 1rem !important; min-width: 0; }
.site-header .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { font-size: var(--wp--preset--font-size--m); font-stretch: 100%; padding: 0.35rem 0; color: var(--wp--preset--color--stein); }
@media (max-width: 62rem) { .site-header .header-phone { display: none; } }

/* ---------------------------------------------------------------- Home hero */
.home-hero { padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--60); }
.home-hero h1 { max-width: 13ch; }
.home-hero .is-lead { max-width: 34ch; }
.shield-emblem {
	position: relative;
	aspect-ratio: 199.47 / 228.86;
	width: min(100%, 30rem);
	margin-inline: auto;
	background: url("assets/images/logo-frame.svg") center / 100% 100% no-repeat;
}
.shield-emblem > .wp-block-image {
	position: absolute; margin: 0;
	left: 25.17%; top: 26.08%; width: 47.75%; height: 47.57%;
}
.wp-block-image.is-style-schild img {
	width: 100%; height: 100%; object-fit: cover; border-radius: 0;
	-webkit-mask: url("assets/images/shield-mask.svg") center / 100% 100% no-repeat;
	mask: url("assets/images/shield-mask.svg") center / 100% 100% no-repeat;
}
.offices-strip { border-top: 1px solid var(--wp--preset--color--nebel); padding-top: var(--wp--preset--spacing--40); }
.offices-strip p { margin: 0; }

/* One orchestrated entrance — the only non-user-triggered motion on the site */
@media (prefers-reduced-motion: no-preference) {
	.home-hero .hero-copy > * { animation: sra-rise 900ms var(--sra-feder) both; }
	.home-hero .hero-copy > :nth-child(2) { animation-delay: 80ms; }
	.home-hero .hero-copy > :nth-child(3) { animation-delay: 160ms; }
	.home-hero .hero-copy > :nth-child(4) { animation-delay: 240ms; }
	.shield-emblem { animation: sra-frame 1100ms var(--sra-feder) both; }
	.shield-emblem > .wp-block-image img { animation: sra-seal 1300ms var(--sra-feder) 200ms both; }
	@keyframes sra-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
	@keyframes sra-frame { from { opacity: 0; transform: scale(0.965); } to { opacity: 1; transform: none; } }
	@keyframes sra-seal { from { opacity: 0; transform: scale(1.08); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
	@view-transition { navigation: auto; }
}

/* ---------------------------------------------------------------- Practice index */
.practice-index { border-top: 1px solid var(--wp--preset--color--nebel); }
.practice-row {
	position: relative;
	isolation: isolate;
	border-bottom: 1px solid var(--wp--preset--color--nebel);
	padding-block: var(--wp--preset--spacing--40);
}
.practice-row::before {
	content: ""; position: absolute; z-index: -1;
	inset: 0 calc(-1 * var(--wp--preset--spacing--30));
	border-radius: var(--wp--custom--radius--mittel);
	background: transparent;
	transition: background-color 220ms ease;
}
.practice-row > .wp-block-columns { margin: 0; }
.practice-row h3 { margin: 0; }
.practice-row h3 a { text-decoration: none; }
.practice-row h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--wp--custom--radius--mittel); }
.practice-row .practice-topics { margin: 0; padding: 0; list-style: none; color: var(--wp--preset--color--stein); font-size: var(--wp--preset--font-size--s); }
.practice-row .practice-topics li + li { margin-top: 0.2rem; }
@media (hover: hover) {
	.practice-row:hover::before { background: var(--wp--preset--color--kalk); }
	.practice-row:hover h3 a { color: var(--wp--preset--color--siegellack); }
}
.practice-row:has(a:active)::before { background: var(--wp--preset--color--nebel); }
.more-areas { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; }
.page-hero .backlink { margin-bottom: var(--wp--preset--spacing--40); }

/* ---------------------------------------------------------------- Team & publications */
.team-list { margin: 0; padding: 0; list-style: none; }
.team-list li { font-size: var(--wp--preset--font-size--xl); font-stretch: 108%; color: var(--wp--preset--color--seetiefe); line-height: 1.25; padding-block: 0.6rem; border-bottom: 1px solid var(--wp--preset--color--nebel); }
.pub-list { margin: 0; padding: 0; list-style: none; }
.pub-list li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; padding-block: 1rem; border-bottom: 1px solid var(--wp--preset--color--nebel); }
.pub-list li > span:first-child { color: var(--wp--preset--color--stein); font-variant-numeric: tabular-nums; font-size: var(--wp--preset--font-size--s); padding-top: 0.15em; }
.pub-list strong { font-weight: 600; color: var(--wp--preset--color--seetiefe); }

/* ---------------------------------------------------------------- Post lists */
.post-rows .wp-block-post { border-bottom: 1px solid var(--wp--preset--color--nebel); padding-block: var(--wp--preset--spacing--40); position: relative; }
.post-rows .wp-block-post:first-child { border-top: 1px solid var(--wp--preset--color--nebel); }
.post-rows .wp-block-post-title { margin: 0.35rem 0 0; }
.post-rows .wp-block-post-title a { text-decoration: none; }
.post-rows .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.post-rows .post-meta { gap: 0.25rem 1rem; position: relative; z-index: 1; }
.post-rows .wp-block-post-terms a { text-decoration: none; color: var(--wp--preset--color--see); }
.post-rows .wp-block-post-excerpt { color: var(--wp--preset--color--stein); margin-top: 0.5rem; }
@media (hover: hover) { .post-rows .wp-block-post:hover .wp-block-post-title a { color: var(--wp--preset--color--siegellack); } }

/* ---------------------------------------------------------------- Practice pages */
.page-hero { padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50); }
.page-hero .backlink a { text-decoration: none; }
.page-hero .backlink a::before { content: "‹"; display: inline-block; margin-right: 0.4em; transition: transform 200ms var(--sra-feder); }
.page-hero .backlink a:hover::before { transform: translateX(-3px); }
.page-hero .wp-block-image img { border-radius: var(--wp--custom--radius--gross); }
.topic { padding-block: var(--wp--preset--spacing--60); }
.topic + .topic { border-top: 1px solid var(--wp--preset--color--nebel); }
.topic .wp-block-image img { border-radius: var(--wp--custom--radius--gross); }
@media (min-width: 48rem) { .topic.is-reversed > .wp-block-columns { flex-direction: row-reverse; } }
.wp-block-quote.is-style-leitsatz { margin-block: var(--wp--preset--spacing--70); text-wrap: balance; }
.wp-block-quote.is-style-leitsatz p { font-stretch: 100%; }
.wp-block-quote.is-style-leitsatz cite { display: block; margin-top: 1.25rem; }
.form-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.form-steps > li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.25rem 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--wp--preset--color--nebel); }
.form-steps > li::before { content: counter(step); grid-row: span 2; width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--wp--preset--color--kalk); color: var(--wp--preset--color--seetiefe); font-weight: 600; font-size: var(--wp--preset--font-size--s); }
.form-steps > li > strong { color: var(--wp--preset--color--seetiefe); font-weight: 600; }
.form-steps ul { margin: 0.35rem 0 0; padding-left: 1.1em; color: var(--wp--preset--color--tinte); }
.form-steps ul li + li { margin-top: 0.3rem; }
.legal-text h2 { font-size: var(--wp--preset--font-size--l); font-stretch: 100%; letter-spacing: 0; font-weight: 600; margin-top: var(--wp--preset--spacing--60); }

/* ---------------------------------------------------------------- Footer */
.site-footer { padding-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50); }
.site-footer .footer-logo img { height: 9.5rem; width: auto; border-radius: 0; }
.site-footer .footer-heading { font-weight: 600; color: var(--wp--preset--color--nebel); margin-bottom: 0.75rem; }
.site-footer p, .site-footer li { font-size: var(--wp--preset--font-size--s); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li + li { margin-top: 0.35rem; }
.site-footer a { text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); }
.site-footer a:hover { color: var(--wp--preset--color--papier); text-decoration-color: currentColor; }
.site-footer .footer-base { border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--papier) 16%, transparent); padding-top: var(--wp--preset--spacing--40); color: color-mix(in srgb, var(--wp--preset--color--kalk) 72%, transparent); }

/* ---------------------------------------------------------------- Refinements */
.team-columns { border-top: 1px solid var(--wp--preset--color--nebel); padding-top: var(--wp--preset--spacing--40); }
@media (min-width: 48rem) {
	.form-aside { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--sra-header-h) + 1.5rem); }
	.wp-block-column:has(> .form-aside) { align-self: stretch; }
}
@media (max-width: 47.99rem) {
	.shield-emblem { width: min(72%, 17rem); }
	.offices-strip { display: grid !important; grid-template-columns: 1fr 1fr; gap: 1.25rem 1rem; }
	.offices-strip > .wp-block-column { margin: 0; }
	.pub-list li { grid-template-columns: 3rem 1fr; gap: 0.75rem; }
	.home-hero .wp-block-buttons { gap: 0.75rem; }
}

/* ---------------------------------------------------------------- Accessibility preferences */
@media (prefers-reduced-transparency: reduce) {
	.site-header, .site-header.is-scrolled, .site-header .wp-block-navigation .wp-block-navigation__submenu-container { background: var(--wp--preset--color--papier); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
	.site-header, .site-header.is-scrolled { background: var(--wp--preset--color--papier); -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 1px solid var(--wp--preset--color--tinte); }
	:root { --wp--preset--color--stein: #3B474C; --wp--preset--color--nebel: #8A9A9E; }
	a:where(:not(.wp-element-button)) { text-decoration-color: currentColor; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
	.wp-element-button:active, .wp-block-button__link:active { transform: none; }
}
@media print {
	.site-header, .site-footer, .wp-block-buttons { display: none !important; }
	a { color: inherit; text-decoration: none; }
}
