/*
Theme Name: Michael Bacht
Description: Website des Bildhauers Michael Bacht – Werkverzeichnisse zum Blättern, Videos, Biografie. Dunkelgrauer Grund, fast weiße Schrift.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Author: Media Digits
License: GPL-2.0-or-later
Text Domain: bacht
*/

@font-face { font-family: "Zen Kaku"; src: url("assets/fonts/zkgn-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Zen Kaku"; src: url("assets/fonts/zkgn-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Zen Kaku"; src: url("assets/fonts/zkgn-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
	--bg: #2e2e2d;
	--bg-deep: #262625;
	--bg-raise: #383837;
	--fg: #eceae4;
	--muted: #a5a39c;
	--line: rgba(236, 234, 228, .16);
	--paper: #e9e7e1;
	--pad: clamp(20px, 3.4vw, 56px);
	--font: "Zen Kaku", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: var(--font);
	font-weight: 300;
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
img, video, canvas { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: var(--line); transition: text-decoration-color .2s, color .2s; }
a:hover { text-decoration-color: var(--fg); }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
::selection { background: var(--fg); color: var(--bg); }
h1, h2, h3 { font-weight: 300; line-height: 1.25; margin: 0; }
p { margin: 0 0 1.1em; }
button { font: inherit; color: inherit; }

.skip { position: absolute; left: -999px; top: 0; background: var(--fg); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

.eyebrow, .site-name, .site-nav a, .count, .back, .hero-down, .hero-line, .footer-nav a, .copy, .subnav a, .byline, .vbtn, .viewer-count, .nav-toggle-label {
	font-size: 12px;
	letter-spacing: .16em;
	text-transform: uppercase;
	font-weight: 400;
}

/* ---------- Kopf ---------- */
.site-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 26px var(--pad);
	position: relative;
	z-index: 20;
}
.is-home .site-header { position: absolute; top: 0; left: 0; right: 0; }
.site-name { text-decoration: none; font-weight: 500; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(18px, 2.6vw, 40px); }
.site-nav a { text-decoration: none; position: relative; padding: 6px 0; color: var(--fg); opacity: .78; transition: opacity .2s; }
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a, .site-nav .current-page-ancestor > a { opacity: 1; }
.site-nav .current-menu-item > a::after, .site-nav .current_page_item > a::after, .site-nav .current-page-ancestor > a::after {
	content: ""; position: absolute; left: 0; right: .16em; bottom: 0; height: 1px; background: var(--fg);
}
.nav-toggle { display: none; background: none; border: 0; padding: 6px 0; cursor: pointer; align-items: center; gap: 12px; }
.nav-toggle-icon { width: 22px; height: 9px; border-top: 1px solid var(--fg); border-bottom: 1px solid var(--fg); transition: transform .25s, height .25s; }

@media (max-width: 820px) {
	.nav-toggle { display: inline-flex; position: relative; z-index: 31; }
	.site-nav {
		position: fixed; inset: 0; background: var(--bg-deep); z-index: 30;
		display: flex; align-items: center; padding: var(--pad);
		opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
	}
	.nav-open .site-nav { opacity: 1; visibility: visible; }
	.site-nav .menu { flex-direction: column; gap: 22px; }
	.site-nav a { font-size: 15px; opacity: 1; }
	.nav-open .nav-toggle-icon { height: 0; border-bottom: 0; }
	.nav-open { overflow: hidden; }
	.nav-open .site-name { position: relative; z-index: 31; }
}

/* ---------- Startseite ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 460px; overflow: hidden; background: var(--bg-deep); }
.hero-image { position: absolute; inset: 0; background-image: var(--hero); background-size: cover; background-position: center 38%; animation: hero-in 1.6s ease-out both; }
.hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(38,38,37,.72) 0%, rgba(38,38,37,.18) 26%, rgba(38,38,37,.12) 58%, rgba(38,38,37,.82) 100%);
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.hero-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 30px; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
.hero-line { margin: 0; opacity: .85; }
.hero-down { text-decoration: none; display: inline-flex; gap: 10px; align-items: center; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.hero-down:hover { border-bottom-color: var(--fg); }

/* ---------- Abschnitte ---------- */
.site-main { flex: 1; }
.section { padding: clamp(56px, 8vw, 110px) var(--pad) clamp(64px, 8vw, 120px); }
.section--top { padding-top: clamp(28px, 4vw, 56px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: clamp(28px, 4vw, 52px); border-bottom: 1px solid var(--line); }
.count { margin: 0; color: var(--muted); }

/* ---------- Raster der Werkverzeichnisse ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 18px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 22px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 54px clamp(14px, 1.6vw, 26px); } }
.tile a { display: block; text-decoration: none; position: relative; }
.tile-cover { display: block; aspect-ratio: 177 / 252; background: var(--paper); overflow: hidden; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s; }
.tile-cover img { width: 100%; height: 100%; object-fit: cover; }
.tile a:hover .tile-cover, .tile a:focus-visible .tile-cover { transform: translateY(-6px); box-shadow: 0 18px 30px -14px rgba(0,0,0,.6); }
.tile-meta { display: flex; gap: 10px; margin-top: 10px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tile-n { font-variant-numeric: tabular-nums; letter-spacing: .08em; color: var(--fg); opacity: .7; }
.tile-t { color: var(--muted); transition: opacity .25s, color .25s; }
.tile a:hover .tile-t { color: var(--fg); }
@media (min-width: 1100px) {
	.tile-meta { position: absolute; left: 0; right: 0; top: 100%; }
	.tile-t { opacity: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
	.tile a:hover .tile-t, .tile a:focus-visible .tile-t { opacity: 1; }
}

/* ---------- Werkverzeichnis (Viewer) ---------- */
.book-page { padding: clamp(20px, 3vw, 40px) var(--pad) clamp(56px, 7vw, 100px); }
.book-head { display: grid; gap: 8px; margin-bottom: clamp(20px, 3vw, 36px); }
.back { text-decoration: none; color: var(--muted); justify-self: start; margin-bottom: 14px; }
.back:hover { color: var(--fg); }
.book-head .eyebrow { margin: 0; color: var(--muted); }
.book-title { font-size: clamp(24px, 3.2vw, 40px); letter-spacing: .01em; max-width: 24em; }
.viewer { background: var(--bg-deep); border: 1px solid var(--line); user-select: none; -webkit-user-select: none; }
.viewer-stage { position: relative; padding: clamp(14px, 3vw, 44px) clamp(10px, 3vw, 44px); min-height: 320px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.viewer-fit { width: 100%; margin: 0 auto; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.viewer-book { width: 100%; }
.viewer.at-cover .viewer-fit { transform: translateX(-25%); }
.viewer.at-end .viewer-fit { transform: translateX(25%); }
.viewer-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; pointer-events: none; }
.viewer.is-ready .viewer-status { display: none; }
.viewer .leaf { background: var(--paper); }
.viewer .leaf canvas { width: 100%; height: 100%; }
.viewer-bar { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px; border-top: 1px solid var(--line); }
.vbtn { background: none; border: 1px solid var(--line); min-width: 44px; height: 40px; padding: 0 14px; cursor: pointer; transition: border-color .2s, background .2s; letter-spacing: .12em; }
.vbtn:hover { border-color: var(--fg); }
.vbtn:disabled { opacity: .3; cursor: default; }
.vbtn--text { margin-left: 18px; }
.viewer-count { min-width: 9em; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .viewer-bar { gap: 10px; } .vbtn--text { margin-left: 2px; } .viewer-count { min-width: 6.4em; } }
.viewer:fullscreen { display: flex; flex-direction: column; border: 0; }
.viewer:fullscreen .viewer-stage { flex: 1; }
.viewer-empty { display: grid; justify-items: start; gap: 20px; }
.viewer-empty img { max-width: 320px; }
.book-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: clamp(32px, 5vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); }
.book-nav a { text-decoration: none; display: grid; gap: 6px; font-size: 15px; }
.book-nav .eyebrow { color: var(--muted); }
.book-nav-next { text-align: right; grid-column: 2; }
.book-nav a:hover .eyebrow { color: var(--fg); }

/* ---------- Videos ---------- */
.videos { display: grid; gap: clamp(36px, 5vw, 64px) clamp(24px, 3vw, 48px); grid-template-columns: 1fr; }
@media (min-width: 860px) { .videos { grid-template-columns: 1fr 1fr; } }
.video-item { display: flex; flex-direction: column; }
.video-title { order: 2; font-size: 20px; margin-top: 16px; }
.video-date { order: 3; color: var(--muted); font-size: 13px; margin: 4px 0 0; letter-spacing: .04em; }
.video-body { display: contents; }
.video-body > * { order: 4; margin-top: 12px; margin-bottom: 0; color: var(--muted); font-size: 15px; }
.video-body > .wp-block-video, .video-body > .wp-block-embed, .video-body > figure:first-child { order: 1; margin: 0; }
.video-body video { width: 100%; background: #000; aspect-ratio: 16 / 9; }
.wp-block-video { margin: 0; }
.nav-links { display: flex; gap: 14px; margin-top: 48px; }

/* ---------- Textseiten ---------- */
.doc { padding: clamp(28px, 4vw, 56px) var(--pad) clamp(64px, 8vw, 120px); }
.doc-head { display: grid; padding-bottom: 18px; margin-bottom: clamp(28px, 4vw, 52px); border-bottom: 1px solid var(--line); }
.prose { max-width: 50rem; }
.prose h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 0 0 1.1em; }
.prose h2 .en, .prose .en { display: block; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; font-weight: 400; }
.prose h3 { font-size: 20px; margin: 2.4em 0 1em; }
.prose section { padding-top: clamp(40px, 6vw, 80px); scroll-margin-top: 20px; }
.prose section:first-of-type { padding-top: clamp(20px, 3vw, 36px); }
.prose .lead { font-size: 18px; color: var(--fg); }
.prose .note, .note { color: var(--muted); border-left: 1px solid var(--line); padding-left: 16px; font-size: 15px; }
.byline { color: var(--muted); margin-bottom: 10px; }
.subnav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.subnav a { text-decoration: none; color: var(--muted); padding-bottom: 3px; border-bottom: 1px solid var(--line); }
.subnav a:hover { color: var(--fg); border-bottom-color: var(--fg); }

.rows { margin: 0; }
.row { display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 18px; padding: 11px 0; border-top: 1px solid var(--line); }
.row dt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 15px; padding-top: 1px; }
.row dd { margin: 0; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; gap: 2px; } }
.bib { list-style: none; margin: 0; padding: 0; }
.bib li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 16px; }
.bib .au { font-weight: 500; }

.children { list-style: none; margin: 0; padding: 0; }
.children li { border-top: 1px solid var(--line); }
.children li:last-child { border-bottom: 1px solid var(--line); }
.children a { display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; text-decoration: none; font-size: clamp(18px, 2vw, 22px); }
.children a span { transition: transform .25s; }
.children a:hover span { transform: translateX(6px); }

.essay p { hyphens: auto; }
.essay .footnote-ref { text-decoration: none; color: var(--muted); padding: 0 1px; }
.essay .footnote-ref:hover { color: var(--fg); }
.notes ol { padding-left: 1.6em; color: var(--muted); font-size: 14.5px; }
.notes li { margin-bottom: .7em; scroll-margin-top: 20px; }
.notes li p { margin: 0; }
.notes a { color: var(--fg); }

.epigraph { margin: 2em 0 2.4em; padding: 0 0 0 20px; border-left: 1px solid var(--line); color: var(--muted); }
.epigraph p { margin: 0 0 .7em; }
.epigraph cite { font-style: normal; padding-left: 1.5em; }
.epigraph footer { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.dialog p { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: 12px; margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.dialog .sp { color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding-top: 5px; }
[lang="de"] .dialog p { grid-template-columns: 2.4rem minmax(0, 1fr); }

/* ---------- Fuß ---------- */
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 26px var(--pad); border-top: 1px solid var(--line); color: var(--muted); }
.footer-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
