/* Z Designstudio 2027 - baseline styling. Tokens first, then layout, then components. */


:root {
	--zd-text: #000;
	--zd-muted: #5c5c5c;
	--zd-line: #d9d9d9;
	--zd-bg: #ffffff;
	--zd-accent: #000;
	/* Measured on the old stack (Agent/project/25a_Chunk-0-Reference-Tokens.md):
	   1060px content box, 25px side padding, 18px header inset. */
	--zd-space: 25px;
	--zd-width: 66.25rem;
	--zd-header-top: 25px;
	--zd-header-inset: 18px;
	--zd-brand-size: 33px;
	--zd-brand-leading: 28px;
	--zd-brand-tracking: 0.02em;
	--zd-brand-width: 14.4rem;
	--zd-font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--zd-font-head: "Gerbera", var(--zd-font-body);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	/* The header is a fixed overlay, so anchor targets and skip links must clear it. */
	scroll-padding-top: 9.5rem;
	/* Reserve the scrollbar lane: the drawer locks scrolling without shifting the page sideways. */
	scrollbar-gutter: stable;
}

/* Scroll lock for the drawer. No layout shift, because the gutter above is already reserved. */
html.zd-drawer-open,
html.zd-drawer-open body { overflow: hidden; }

/* Page-to-page transitions are the browser's job now: one at-rule, no script, and a prerendered
   page (see inc/performance.php) arrives without a flash. Reduced motion turns it off entirely. */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: 0.28s;
	animation-timing-function: var(--zd-ease-reveal, cubic-bezier(0.16, 1, 0.3, 1));
}

@media (prefers-reduced-motion: reduce) {
	::view-transition-group(*),
	::view-transition-old(*),
	::view-transition-new(*) { animation: none; }
}

body {
	margin: 0;
	background: var(--zd-bg);
	color: var(--zd-text);
	font-family: var(--zd-font-body);
	font-size: 17px;
	line-height: 28px;
	letter-spacing: -0.2px;
	/* Column, so a short page still ends with the wordmark at the bottom edge. The footer is in flow,
	   never an overlay: a fixed bar covered the last row of cards. */
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
}

h1, h2, h3, h4 {
	font-family: var(--zd-font-head);
	font-weight: 600;
	line-height: 1.15;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

h1 { font-size: clamp(1.75rem, 3vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 2vw, 1.9rem); }

p, ul, ol, dl, figure { margin: 0 0 1em; }

a { color: var(--zd-accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

img, svg, video { max-width: 100%; height: auto; }

.wrap {
	width: min(100% - 2 * var(--zd-space), var(--zd-width));
	margin-inline: auto;
}

/* Focus must stay visible - the old theme removed every outline. */
:focus-visible {
	outline: 3px solid var(--zd-accent);
	outline-offset: 2px;
}

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

.skip-link:focus {
	position: fixed;
	top: 0.5rem; left: 0.5rem;
	width: auto; height: auto;
	clip-path: none;
	padding: 0.5rem 0.75rem;
	background: var(--zd-bg);
	border: 2px solid var(--zd-accent);
	z-index: 100;
}

/* Header - measured against the old stack: static zero-height overlay, brand top-right in two
   uppercase lines, the toggle directly beneath it, the menu itself in a full-screen drawer.
   Values: brand 33/28px, 0.02em tracking, right inset 18px, top 25px. */
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 30;
	background: transparent;
	border: 0;
}

/* The old theme had a disable-sticky-nav option. Sticky is the default; the flag turns it off. */
.zd-no-sticky .site-header { position: absolute; }
.site-header__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0;
	padding: var(--zd-header-top) var(--zd-header-inset) 0 0;
}

.site-branding { display: flex; justify-content: flex-end; width: 100%; position: relative; z-index: 26; }

.site-branding__link {
	display: block;
	max-width: var(--zd-brand-width);
	font-family: var(--zd-font-head);
	font-size: var(--zd-brand-size);
	font-weight: 400;
	line-height: var(--zd-brand-leading);
	letter-spacing: var(--zd-brand-tracking);
	text-transform: uppercase;
	text-align: right;
	text-decoration: none;
	color: var(--zd-text);
}

/* The Gerbera subset's `&` has width but no outline, so the character is set in the body face.
   Without this the client's own name prints with a gap in it. */
.zd-amp { font-family: var(--zd-font-body); font-weight: 600; }

.primary-nav__list,
.footer-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-nav__list a { text-decoration: none; }

/* Toggle - 30x4px bars under the brand, a 44px touch target, never colour-only. */
.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	position: relative;
	z-index: 26;
	width: 70px;
	height: 44px;
	margin: 6px calc(var(--zd-header-inset) * -1) 0 0;
	padding: 0 20px;
	background: none;
	border: 0;
	color: var(--zd-text);
	cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::after {
	display: block;
	position: relative;
	width: 30px;
	height: 4px;
	background: currentColor;
	content: "";
}

.nav-toggle__bar::after { position: absolute; top: 10px; left: 0; }

/* Open state: the two bars cross, so the control still says "close". */
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-90deg); }

/* Drawer. Hidden only when JS is running, so a browser without JS still gets the menu.
   The open animation is CSS: `allow-discrete` lets `display` take part in the transition and
   `@starting-style` supplies the first frame, so no timer, no class juggling, no library. */
.zd-js .primary-nav {
	display: none;
	opacity: 0;
	translate: 0 -0.75rem;
	transition:
		opacity 0.28s var(--zd-ease-reveal, cubic-bezier(0.16, 1, 0.3, 1)),
		translate 0.28s var(--zd-ease-reveal, cubic-bezier(0.16, 1, 0.3, 1)),
		display 0.28s allow-discrete;
}

.zd-js .primary-nav.is-open {
	display: block;
	position: fixed;
	inset: 0;
	z-index: 25;
	padding: 9rem var(--zd-space) var(--zd-space);
	background: var(--zd-bg);
	overflow-y: auto;
	opacity: 1;
	translate: 0 0;
}

@starting-style {
	.zd-js .primary-nav.is-open {
		opacity: 0;
		translate: 0 -0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.zd-js .primary-nav {
		transition: none;
		opacity: 1;
		translate: none;
	}
}

/* Without JS the menu follows the brand in normal flow instead of covering the page. */
.primary-nav { width: 100%; }

.zd-js .primary-nav__list {
	flex-direction: column;
	align-items: flex-end;
	gap: 0;
	margin-top: 2rem;
}

.primary-nav__list a {
	font-family: var(--zd-font-head);
	font-size: var(--zd-brand-size);
	font-weight: 400;
	line-height: 45px;
	letter-spacing: var(--zd-brand-tracking);
	text-transform: uppercase;
	color: var(--zd-text);
}

.primary-nav__list a:hover,
.primary-nav__list a:focus-visible { text-decoration: underline; text-underline-offset: 0.12em; }

/* Breakpoint scale, all range syntax, all mobile-first where it matters:
   < 40rem (640)  one column, smallest type      - phone
   < 45rem (720)  brand steps to 28px, grid 2-up  - large phone / small tablet
   >= 56rem (896) project aside beside the body   - tablet landscape
   >= 72rem       (1152) wide layout              - desktop
   The portfolio grid itself needs none of these: `auto-fill` with a `minmax()` floor already
   reacts to the space it is given, which is what a container query would say anyway. */
@media (width < 45rem) {
	.site-branding__link { font-size: 28px; line-height: 22.4px; }
	.zd-js .primary-nav.is-open { padding-top: 7.5rem; }
}

/* Main + project */
/* First content line lands at 136px, the measured top of the old grid: 25px inset + 66px brand
   + 45px toggle. The header itself is a zero-height overlay, as in the old design. */
.site-main { padding-block: 8.5rem var(--zd-space); }

.project__layout {
	display: grid;
	gap: var(--zd-space);
	grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 56rem) {
	.project__layout { grid-template-columns: 18rem minmax(0, 1fr); }
}

.project__aside { align-self: start; }

.spec-list { margin: 0 0 var(--zd-space); border-top: 1px solid var(--zd-line); }
.spec-list__row {
	display: grid;
	grid-template-columns: 8rem minmax(0, 1fr);
	gap: 0.5rem;
	padding-block: 0.4rem;
	border-bottom: 1px solid var(--zd-line);
}
.spec-list__label { margin: 0; color: var(--zd-muted); font-size: 0.9rem; }
.spec-list__value { margin: 0; }

.project__thumb { margin: 0 0 var(--zd-space); }
.project__thumb img { display: block; border-radius: 0.125rem; }

/* Fallback for headings inside content that use no explicit font. */
.entry-content > * + * { margin-top: 1em; }
.entry-content h2 { margin-top: 1.5em; }

/* Cards */
.post-grid {
	display: grid;
	gap: var(--zd-space);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}
.post-card__title { font-size: 1.1rem; margin-bottom: 0.35em; }
.post-card__title a { text-decoration: none; }
.post-card__media img { display: block; }

/* Project overview */
.project-filter { margin-bottom: var(--zd-space); }
/* Legacy portfolio markup keeps the category links but its opener duplicates the page heading. */
.atp-filter-opener { display: none; }

/* The bar belongs above the cards, never between them: if a grid ever wraps it, it takes the whole row. */
.project-grid > .project-filter { grid-column: 1 / -1; }
.project-filter__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.project-filter__list a {
	display: inline-block;
	padding: 0.25rem 0.6rem;
	border: 1px solid var(--zd-line);
	text-decoration: none;
	font-size: 0.9rem;
}
.project-filter__list a[aria-current="true"] {
	background: var(--zd-accent);
	border-color: var(--zd-accent);
	color: var(--zd-bg);
}
.project-filter__count { color: inherit; opacity: 0.65; font-size: 0.8em; }

.project-grid {
	display: grid;
	gap: var(--zd-space);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
	margin-bottom: var(--zd-space);
}
.project-card {
	margin: 0;
	display: grid;
	gap: 0.35rem;
	align-content: start;
}
.project-card__link {
	/* One box per title. As a bare inline element a wrapped title splits into fragments of a few
	   pixels, which fails the WCAG 2.2 target-size check and makes the card hard to hit. */
	display: inline-block;
	min-height: 24px;
	text-decoration: none;
	color: inherit;
}
.project-card__link:hover,
.project-card__link:focus-visible { text-decoration: underline; }
.project-card__media {
	display: block;
	overflow: hidden;
	/* The ratio belongs to the frame, not the image. A failed image ignores its own aspect-ratio and
	   would otherwise stretch the card to 1500px in a page whose uploads are missing. */
	aspect-ratio: 4 / 3;
}
.project-card__media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

/* The figure wraps the media so the award label can sit over the image without nesting links. */
.project-card__figure { position: relative; }

.project-card__award {
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 1;
	/* The badge is a label, never a layout: a missing award image used to render at its raw
	   attachment size (370x1500) and its absolutely positioned link then covered the whole card,
	   which is both a visual break and a WCAG target-size failure. */
	max-width: 9.5rem;
	max-height: 2.5rem;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	background: #111;
	color: #fff;
	padding: 0.15rem 0.45rem;
	font-family: var(--zd-font-head);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	text-decoration: none;
}

.project-card__award:hover,
.project-card__award:focus-visible { text-decoration: underline; }

/* No image to sit on: keep the label in the flow so it cannot float over the title. The card is a
   flex column, so the badge has to stop stretching to the full width. */
.project-card__award--inline {
	position: static;
	display: inline-block;
	align-self: flex-start;
	justify-self: start;
	width: max-content;
	margin-bottom: 0.5rem;
}
.project-card__title { font-family: var(--zd-font-head); font-weight: 600; margin: 0; overflow-wrap: break-word; }
.project-card__year { color: var(--zd-muted); font-size: 0.9rem; }

/* First-visit language hint. Not a redirect: a line of text and two links. */
.language-notice {
	padding: 0.75rem var(--zd-space);
	background: var(--zd-bg);
	border-bottom: 1px solid var(--zd-line);
	color: var(--zd-text);
	font-size: 0.95rem;
}
.language-notice__text { margin: 0; }
.language-notice__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0.35rem 0 0;
}
.language-notice__link { font-weight: 600; }
.language-notice__stay { color: var(--zd-muted); }
.language-notice__info { color: var(--zd-muted); text-decoration: underline; }

/* Anchor target from the notice: leave room above the heading instead of jamming it against the viewport. */
#cookie-info { scroll-margin-top: 1rem; }

.language-switch__current { color: var(--zd-muted); }

/* Language switch - visible on purpose. The old theme hid it with display:none. */
.language-switch { flex: 0 0 auto; }
.language-switch ul,
.language-switch .bogo-language-switcher {
	display: flex;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.language-switch a { text-decoration: none; font-size: 0.85rem; }
.language-switch a:hover,
.language-switch a:focus-visible { text-decoration: underline; }

/* Original subpage footer corners: Industrial Light on the left, Interior Bold on the right.
   Keep this above the page content while reserving footer space for keyboard and touch access. */
.language-switch.language-switch--corner {
	display: block;
	visibility: visible;
	opacity: 1;
	position: fixed;
	bottom: clamp(1rem, 2.4vh, 1.6rem);
	z-index: 10;
	color: #000;
	font-size: 0.8125rem;
	line-height: 1.2;
	letter-spacing: 0.08em;
	font-synthesis: none;
}
.language-switch--left {
	left: clamp(1rem, 2.25vw, 2.5rem);
	font-family: "Gerbera Portal Light", var(--zd-font-body);
	font-weight: 300;
}
.language-switch--right {
	right: clamp(1rem, 2.25vw, 2.5rem);
	font-family: "Gerbera Portal Bold", var(--zd-font-body);
	font-weight: 700;
}
.language-switch--corner .language-switch__list { gap: 0.35rem; }
.language-switch--corner a { color: inherit; font: inherit; }
.language-switch--corner .language-switch__current {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.25em;
}
.language-switch--corner .language-switch__unavailable { opacity: 0.5; }
.language-switch--corner a:focus-visible { outline: 2px solid var(--zd-accent); outline-offset: 3px; }

/* Skip work off-screen: only beyond the first screenful, so the LCP element is never affected. */
@supports (content-visibility: auto) {
	.project-grid > .project-card:nth-child(n + 7),
	.logo-grid > .logo-grid__item:nth-child(n + 9),
	.post-grid > .post-card:nth-child(n + 5) {
		content-visibility: auto;
		contain-intrinsic-size: auto 16rem;
	}
}

/* Award and partner logos */
.logo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr));
	gap: var(--zd-space);
	margin: 0 0 var(--zd-space);
	padding: 0;
	list-style: none;
}
.logo-grid__item {
	display: grid;
	gap: 0.5rem;
	justify-items: center;
	text-align: center;
	padding: var(--zd-space) 0;
	border: 1px solid var(--zd-line);
	/* A track of `auto` sizes to max-content, so one wide logo widened its own column to 3000px and
	   pushed the page sideways. The track must stay inside the cell. */
	grid-template-columns: minmax(0, 1fr);
	overflow-wrap: anywhere;
}
.logo-grid__item img {
	display: block;
	height: auto;
	max-height: 5rem;
	max-width: 100%;
	width: auto;
}
.logo-grid__name { font-size: 0.85rem; color: var(--zd-muted); }

/* Hub pages: the detail lives one level down (kontakt -> adresse, motivation -> kompetenz). */
.page-children { margin: var(--zd-space) 0 0; }
.page-children__list {
	display: grid;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.page-children__item {
	padding-top: 0.75rem;
	border-top: 1px solid var(--zd-line);
}
.page-children__item a { font-family: var(--zd-font-head); font-weight: 600; }
.page-children__excerpt {
	display: block;
	color: var(--zd-muted);
	font-size: 0.95rem;
}

/* Visible cookie disclosure in the footer: one line always shown, the full table one click away. */
.cookie-info__line {
	margin: var(--zd-space) 0 0;
	font-size: 0.85rem;
	color: var(--zd-muted);
}
.cookie-info {
	margin: 0.25rem 0 0;
	font-size: 0.85rem;
	color: var(--zd-muted);
}
.cookie-info summary {
	cursor: pointer;
	color: var(--zd-text);
}
.cookie-info summary:focus-visible {
	outline: 2px solid var(--zd-accent);
	outline-offset: 2px;
}
.cookie-info__facts {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 0.25rem 0.75rem;
	margin: 0.5rem 0;
}
.cookie-info__facts dt { font-weight: 600; }
.cookie-info__facts dd { margin: 0; }
.cookie-info__more { margin: 0; }

/* Footer */
/* Footer - the old design ends in one centred wordmark, 25px above the bottom edge, with the two
   language corners either side of it. It sits in normal flow (sticky, so a short page still shows it
   at the viewport edge) instead of floating over the content: a fixed bar covered card titles at the
   bottom of the screen, which is a WCAG 2.2 target-size and focus-obscured failure. */
.site-footer {
	margin-top: auto;
	z-index: 11;
	background: var(--zd-bg);
	border: 0;
	margin-block: auto 0;
	margin-inline: 0;
	padding: 0;
	color: var(--zd-text);
	font-size: 14px;
}

.site-footer__bar {
	padding-bottom: var(--zd-space);
	text-align: center;
}

.site-footer__wordmark {
	pointer-events: auto;
	display: inline-block;
	font-size: 14px;
	font-weight: 400;
	line-height: 28px;
	letter-spacing: 0.05em;
	color: var(--zd-text);
	text-decoration: none;
}

.site-footer__wordmark:hover,
.site-footer__wordmark:focus-visible { text-decoration: underline; text-underline-offset: 0.2em; }

/* Cookie disclosure and any legacy footer prose stay in normal flow, above the wordmark bar. */
.site-footer__meta {
	color: var(--zd-muted);
	font-size: 0.8125rem;
	line-height: 1.5;
}
.site-footer__meta:empty { display: none; }

/* Breadcrumbs: a list, quiet until hovered, never colour-only. */
.breadcrumbs { margin: 0 0 calc(var(--zd-space) / 2); font-size: 0.85rem; color: var(--zd-muted); }
.breadcrumbs__list {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.breadcrumbs__list li + li::before { content: "/"; margin-right: 0.35rem; color: var(--zd-muted); }
.breadcrumbs a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.breadcrumbs a:hover { color: var(--zd-text); }
.breadcrumbs [aria-current="page"] { color: var(--zd-text); }

/* Previous / next project. */
.project-nav {
	display: flex;
	flex-wrap: wrap;
	gap: var(--zd-space);
	justify-content: space-between;
	margin-top: var(--zd-space);
	padding-top: calc(var(--zd-space) / 2);
	border-top: 1px solid var(--zd-line);
}
.project-nav .nav-label { display: block; font-size: 0.85rem; color: var(--zd-muted); }

/* Search and empty states. A browser-default search input looks like 1998 and misses the 44px
   touch target, so it gets a real field: muted border (6.7:1, above the 3:1 UI minimum) and accent
   button (17.4:1 against the background). */
.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	max-width: 32rem;
	margin-block: var(--zd-space);
}
.search-form input[type="search"] {
	flex: 1 1 12rem;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--zd-muted);
	border-radius: 0.25rem;
	background: var(--zd-bg);
	color: var(--zd-text);
	font: inherit;
}
.search-form button,
.search-form input[type="submit"] {
	min-height: 2.75rem;
	padding: 0.5rem 1rem;
	border: 1px solid var(--zd-accent);
	border-radius: 0.25rem;
	background: var(--zd-accent);
	color: var(--zd-bg);
	font: inherit;
	cursor: pointer;
}

.link-list {
	display: grid;
	gap: 0.5rem;
	justify-items: start;
	list-style: none;
	margin: 0 0 var(--zd-space);
	padding: 0;
}
.link-list a { text-decoration: underline; text-underline-offset: 2px; }
.no-results { color: var(--zd-muted); }

/* Portal: original subpage typography and side menus; PDF pages 1–2 guide composition.
   These rules are scoped independently of the rebuilt subpages' header. */
.page-template-template-landing .site-header { display: none; }
.page-template-template-landing { isolation: isolate; }
/* The portal carries its own studio mark in the footer; the subpage wordmark bar stays off it. */
.page-template-template-landing .site-footer__bar { display: none; }
.page-template-template-landing .site-footer {
	position: relative;
	z-index: 1;
	margin-top: 0;
	background: var(--zd-bg);
}
.page-template-template-landing .site-main { padding-block: 0; }

.landing {
	--zd-text: #000;
	--landing-type: clamp(1rem, 4.4vw, 2.0625rem);
	--landing-gutter: clamp(1rem, 3vw, 1.5rem);
	position: fixed;
	inset: 0;
	z-index: 0;
	height: 100vh;
	height: 100svh;
	min-height: 0;
	overflow: hidden;
	background-color: #fff;
	isolation: isolate;
	font-synthesis: none;
}

/* Transparent first-screen space preserves all portal hit targets. Only the opaque content
   participates in foreground hit testing; its natural height comes from the WordPress blocks. */
.landing-scroll {
	position: relative;
	z-index: 1;
	padding-top: 100vh;
	padding-top: 100svh;
	pointer-events: none;
}
.landing-content {
	padding-block: clamp(2rem, 6vw, 6rem);
	background: var(--zd-bg);
	pointer-events: auto;
}
.landing-content .entry-content { display: flow-root; }
.landing-content .entry-content > :last-child { margin-bottom: 0; }
.landing-content a { overflow-wrap: anywhere; }
.landing-content:focus { outline: 3px solid var(--zd-accent); outline-offset: -3px; }

.landing__media { position: absolute; inset: 0; z-index: -1; }
.landing__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.landing__half {
	position: absolute;
	inset-block: 0;
	width: 50%;
	transition: background-color 120ms ease;
}
.landing__half--left { left: 0; }
.landing__half--right { right: 0; }
.landing__half:hover { background-color: rgba(255, 255, 255, 0.15); }
.landing__half:focus-visible { outline: 3px solid var(--zd-accent); outline-offset: -3px; }

.landing__header {
	position: absolute;
	inset: 0 0 auto 0;
	z-index: 3;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem var(--landing-gutter) 0;
	pointer-events: none;
}
.landing__nav {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	max-width: calc(50% - 1.5rem);
	max-height: min(calc(100svh - 6rem), var(--landing-nav-available, calc(100svh - 6rem)));
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0.25rem;
	margin: -0.25rem;
	font-family: "Gerbera Portal Light", var(--zd-font-body);
	font-size: var(--landing-type);
	font-weight: 300;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	pointer-events: auto;
}
.landing__nav--right {
	align-items: flex-end;
	font-family: "Gerbera Portal Bold", var(--zd-font-body);
	font-weight: 700;
	text-align: right;
}

.landing__logo {
	position: absolute;
	top: clamp(3.5rem, 8.25vh, 6rem);
	left: 50%;
	transform: translateX(-50%);
	z-index: 1;
	text-align: center;
	line-height: 0;
	pointer-events: auto;
}
.landing__logo img,
.landing__logo-link > svg {
	display: block;
	height: clamp(3.5rem, 16vh, 10rem);
	width: auto;
	max-width: 20vw;
	object-fit: contain;
	color: var(--zd-text);
}
.landing__logo-link { display: block; color: var(--zd-text); text-decoration: none; }
.landing__logo-mark {
	display: block;
	font-family: var(--zd-font-head);
	font-size: clamp(5rem, 16vh, 11.5rem);
	font-weight: 600;
	line-height: 0.8;
	letter-spacing: -0.02em;
}

.landing__title {
	display: block;
	max-width: 11.5ch;
	color: var(--zd-text);
	font: inherit;
	letter-spacing: inherit;
	text-decoration: none;
}
.landing__title-text { display: block; }
.landing__nav--right .landing__title { max-width: 9ch; text-align: right; }
.landing__title:focus-visible,
.landing__burger:focus-visible { outline: 2px solid var(--zd-accent); outline-offset: 1px; }

/* Native checkbox keeps the menus usable without JavaScript, including Space to toggle. */
.landing__toggle {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}
.landing__burger {
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	width: 2.75rem;
	height: 2.75rem;
	flex-shrink: 0;
	user-select: none;
	line-height: 0;
}
.landing__nav--right .landing__burger { justify-content: flex-end; }
.landing__burger .navicon {
	background: currentColor;
	display: block;
	height: 2px;
	position: relative;
	transition: background 0.2s ease-out;
	width: 1.875rem;
}
.landing__nav--right .navicon { height: 3px; }
.landing__burger .navicon::before,
.landing__burger .navicon::after {
	background: currentColor;
	content: "";
	display: block;
	height: 100%;
	position: absolute;
	transition: transform 0.2s ease-out, top 0.2s ease-out;
	width: 100%;
}
.landing__burger .navicon::before { top: 0.5rem; }
.landing__burger .navicon::after { top: -0.5rem; }
.landing__toggle:checked ~ .landing__menu { display: block; }
.landing__toggle:checked ~ .landing__burger .navicon { background: transparent; }
.landing__toggle:checked ~ .landing__burger .navicon::before { top: 0; transform: rotate(-45deg); }
.landing__toggle:checked ~ .landing__burger .navicon::after { top: 0; transform: rotate(45deg); }
.landing__toggle:focus-visible ~ .landing__burger { outline: 2px solid var(--zd-accent); outline-offset: 1px; }
.landing__menu { display: none; max-width: 100%; margin-top: 0.2em; }
.landing__menu-list,
.landing__menu-list .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.landing__menu-list li { margin: 0; }
.landing__menu-list a { color: var(--zd-text); font: inherit; text-decoration: none; }
.landing__menu-list a:hover,
.landing__menu-list a:focus-visible { text-decoration: underline; text-underline-offset: 0.15em; }

/* Both corners show E D; the current language is underlined. */
.landing__foot {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 3;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.5rem;
	padding: 0 var(--landing-gutter) clamp(1rem, 2.4vh, 1.6rem);
	font-size: 0.8125rem;
	line-height: 1.2;
	letter-spacing: 0.08em;
	pointer-events: none;
}
.landing__foot > * { pointer-events: auto; }
.landing__studio {
	justify-self: center;
	color: var(--zd-text);
	font-family: "Gerbera Portal Bold", var(--zd-font-body);
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}
.landing__studio:hover { text-decoration: underline; }
.landing__lang { justify-self: start; font-family: "Gerbera Portal Light", var(--zd-font-body); font-weight: 300; }
.landing__lang:last-child { justify-self: end; font-family: "Gerbera Portal Bold", var(--zd-font-body); font-weight: 700; }
.landing__lang .language-switch__list { display: flex; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.landing__lang a { color: var(--zd-text); text-decoration: none; }
.landing__lang a:hover,
.landing__lang a:focus-visible { text-decoration: underline; }
.landing__lang .language-switch__current { text-decoration: underline; text-underline-offset: 0.25em; }

@media (max-width: 40rem) {
	.landing__logo { top: 2.5rem; }
	.landing__logo img,
	.landing__logo-link > svg { height: 4rem; }
}
@media (max-width: 48rem) {
	.landing__header { padding-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
	.landing__half,
	.landing__burger .navicon,
	.landing__burger .navicon::before,
	.landing__burger .navicon::after { transition: none; }
}

/* Fixed column counts for grids that ask for them - the legacy `[attic_grid_portfolio columns="4"]`
   on the overview pages expects four across, not the fluid default. */
.project-grid--cols-2,
.project-grid--cols-3,
.project-grid--cols-4 { grid-template-columns: 1fr; }

@media (min-width: 40rem) {
	.project-grid--cols-2,
	.project-grid--cols-3,
	.project-grid--cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 56rem) {
	.project-grid--cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 72rem) {
	.project-grid--cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Filters and cards share document order at every width; no visual reordering. */
.portfolio { display: block; }
.portfolio > .project-filter { margin-block-end: 1.5rem; }
/* Pagination for the automatic listing. `paginate_links( type: list )` is used because
   `the_posts_pagination()` returns nothing when the main query has one page. */
.pagination__list,
.pagination .page-numbers {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.pagination .page-numbers li { margin: 0; }

.pagination .page-numbers a,
.pagination .page-numbers span {
	display: inline-block;
	padding: 0.4rem 0.7rem;
	border: 1px solid currentColor;
	text-decoration: none;
}

.pagination .page-numbers a:hover,
.pagination .page-numbers a:focus-visible { text-decoration: underline; }

.pagination .page-numbers .current {
	background: currentColor;
	font-weight: 600;
}
.project-grid--cols-1 { grid-template-columns: minmax(0, 1fr); }
.project-grid--cols-5,
.project-grid--cols-6 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 641px) {
	.project-grid--cols-5,
	.project-grid--cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 961px) {
	.project-grid--cols-5,
	.project-grid--cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1201px) {
	.project-grid--cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.project-grid--cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- Modern layout + a11y
   Fluid where the platform can do it, explicit where it cannot. */

/* Ragged right edges look accidental in narrow columns; `pretty` only fixes the last line. */
p,
.entry-content li,
.spec-list__value { text-wrap: pretty; }

/* Touch targets: WCAG 2.2 asks for 24px, but 44 is what a thumb actually hits. Only for coarse
   pointers, so a mouse user keeps the compact chips the old design had. */
@media (pointer: coarse) {
	.project-filter__list a,
	.language-switch a,
	.site-footer__wordmark { min-height: 44px; display: inline-flex; align-items: center; }
	.project-filter__list { gap: 0.5rem; }
}

/* A bare <summary> is 20px tall in most engines, under the 24px minimum. */
summary { padding-block: 0.2rem; }

/* Focus ring on a dark chip: the accent outline disappears against the accent background, so the
   ring follows currentColor and gets an offset. */
.project-filter__list a:focus-visible,
.site-footer__wordmark:focus-visible,
.language-switch a:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

/* Forced colours: Windows high contrast strips backgrounds, so structure has to live in borders. */
@media (forced-colors: active) {
	.project-filter__list a,
	.site-footer__wordmark,
	.nav-toggle { border: 1px solid CanvasText; }
	.project-filter__list a[aria-current="true"] { border-width: 3px; }
	.nav-toggle__bar,
	.nav-toggle__bar::after { background: CanvasText; }
	.site-header { border-bottom: 1px solid CanvasText; }
	:focus-visible { outline: 3px solid Highlight; }
}

/* More contrast, not different colours: text goes to full black and rules get heavier. */
@media (prefers-contrast: more) {
	:root { --zd-muted: #1a1a1a; --zd-line: #767676; }
	.site-footer__wordmark,
	.language-switch a { text-decoration: underline; text-underline-offset: 0.2em; }
	.project-filter__list a { border-color: #1a1a1a; }
}
