/*
Theme Name: Wunderbogen
Theme URI: https://wunderbogen.de
Author: Wunderbogen Verlag
Description: Theme für den Wunderbogen Verlag. Startseite mit dreidimensionalem Familienbogen, Buchseiten mit Cover und Steckbrief, Newsletter-Anmeldung über FluentCRM mit Double-Opt-in. Schrift und Bilder liegen auf dem eigenen Server.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wunderbogen
Tags: custom-colors, custom-menu, custom-logo, translation-ready, accessibility-ready
*/

/* Layout: transparent 3D hero over a fixed canvas; every following band is solid paper that slides over the dots. */
@font-face {
  font-family: "Fredoka";
  src: url(assets/fonts/fredoka.woff2) format("woff2");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben aus dem Wunderbogen-Design-System, Thema Hell */
  --surface: #FBF7EF;
  --surface-raised: #FFFFFF;
  --ink: #1E2238;
  --ink-muted: #5A5F7A;
  --line: #E6DECF;
  --mohnrot: #E5533D;
  --mandarine: #F18A2E;
  --sonnengelb: #F4C133;
  --kleegruen: #4FAE6C;
  --himmelblau: #2F9BD3;
  --indigo: #4955B0;
  --flieder: #8A55B0;
  --on-hell: #1E2238;
  --action: #4955B0;
  --on-action: #FFFFFF;
  --link: #4955B0;
  --focus: #4955B0;
  /* Bänder mit festem Look: Refrain auf Indigo, Fuß auf Tinte */
  --band: #4955B0;
  --on-band: #FFFFFF;
  --foot-bg: #1E2238;
  --foot-ink: #FBF7EF;
  --foot-muted: #A9AEC8;
  --foot-line: #3A4062;

  /* Schrift */
  --font: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --fs-display: clamp(2.5rem, 1.35rem + 4.2vw, 4.5rem);
  --fs-headline: clamp(1.875rem, 1.35rem + 2vw, 2.5rem);
  --fs-title: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
  --fs-body-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-overline: 0.8125rem;

  /* Abstände und Ecken */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 64px;
  --section: clamp(64px, 9vw, 128px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #1E2238;
    --surface-raised: #262B45;
    --ink: #FBF7EF;
    --ink-muted: #A9AEC8;
    --line: #3A4062;
    --indigo: #6F7BE0;
    --flieder: #B07DDA;
    --action: #2F9BD3;
    --on-action: #1E2238;
    --link: #2F9BD3;
    --focus: #F4C133;
    --foot-bg: #262B45;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --surface: #1E2238;
  --surface-raised: #262B45;
  --ink: #FBF7EF;
  --ink-muted: #A9AEC8;
  --line: #3A4062;
  --indigo: #6F7BE0;
  --flieder: #B07DDA;
  --action: #2F9BD3;
  --on-action: #1E2238;
  --link: #2F9BD3;
  --focus: #F4C133;
  --foot-bg: #262B45;
  color-scheme: dark;
}

/* Grundlagen */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--surface);
}
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

.band {
  position: relative;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(0px, 2.5vw, 24px); }
.solid { background: var(--surface); z-index: 2; overflow: clip; }

.overline {
  display: block;
  font-size: var(--fs-overline);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.display { font-size: var(--fs-display); line-height: 1.04; letter-spacing: -0.01em; }
.headline { font-size: var(--fs-headline); line-height: 1.15; }
.title { font-size: var(--fs-title); line-height: 1.25; }
.lead { font-size: var(--fs-body-lg); line-height: 1.55; }
.small { font-size: var(--fs-small); line-height: 1.45; }
.muted { color: var(--ink-muted); }
.measure { max-width: 34em; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--action);
  color: var(--on-action);
  font: 600 var(--fs-body)/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--secondary { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* Fester 3D-Canvas hinter allem */
#bogen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Kopfzeile */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--line);
}
.site-header .wrap {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.brand { display: inline-flex; align-items: center; min-height: 48px; }
.brand svg { width: 176px; height: auto; display: block; }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.nav a:hover { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }
.menu-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink);
  font: 600 var(--fs-small)/1 var(--font);
  cursor: pointer;
}

/* Hero */
.hero { z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 13fr);
  grid-template-areas: "copy stage";
  column-gap: clamp(24px, 4vw, 64px);
  row-gap: var(--space-3);
  align-items: center;
  padding-block: clamp(24px, 4vw, 56px) clamp(32px, 5vw, 72px);
}
.hero-copy { grid-area: copy; display: grid; gap: var(--space-4); min-width: 0; }
.hero-copy .display { max-width: 9.5em; }
.stage { grid-area: stage; width: 100%; aspect-ratio: 930 / 640; max-width: 100%; }
.hero-note { display: flex; flex-direction: column; gap: var(--space-1); }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-mouse { display: none; }
  .hint-touch { display: inline; }
}

/* Auf breiten Schirmen steht die Bildunterschrift im Inneren des Bogens */
.caption {
  grid-area: stage;
  align-self: end;
  justify-self: center;
  width: min(56%, 340px);
  margin-bottom: 12.5%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: var(--space-2);
  text-align: center;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.caption .overline { letter-spacing: 0.32em; }
.legend { display: flex; align-items: flex-end; gap: 0; }
.legend button {
  width: 40px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.legend button span {
  display: block;
  width: var(--d);
  height: var(--d);
  border-radius: 50%;
  background: var(--c);
  transition: transform 200ms ease;
}
.legend button[aria-pressed="true"] span { transform: translateY(-6px) scale(1.18); }
.legend button:hover span { transform: translateY(-3px) scale(1.08); }
.caption-text { min-width: 0; }
.caption-kind { font-size: var(--fs-title); font-weight: 600; line-height: 1.2; }
.caption-who { color: var(--ink); }

/* Abschnitte allgemein */
.section { padding-block: var(--section); }
.section-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.deco {
  position: absolute;
  border-radius: 50%;
  background: var(--c);
  pointer-events: none;
  z-index: 0;
}
.section > .wrap { position: relative; z-index: 1; }
[data-depth] { will-change: transform; transform: translate3d(0, var(--py, 0px), 0); }

/* Intro */
.intro .wrap { display: grid; gap: var(--space-4); }
.intro .headline { max-width: 17em; }
.intro .lead { max-width: 32em; color: var(--ink-muted); }
.intro .lead strong { color: var(--ink); font-weight: 600; }

/* Buch */
.book-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.book-scene {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 1600px;
  padding-block: var(--space-5);
  min-width: 0;
}
.book {
  --w: min(340px, 70vw);
  --d: 12px;
  position: relative;
  width: var(--w);
  height: var(--w);
  transform-style: preserve-3d;
  transform: rotateX(var(--rx, 6deg)) rotateY(var(--ry, 26deg));
  z-index: 1;
}
.book > div { position: absolute; backface-visibility: hidden; }
.book-front, .book-back { inset: 0; border-radius: 2px 6px 6px 2px; overflow: hidden; }
.book-front { transform: translateZ(calc(var(--d) / 2)); }
.book-back { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.book-spine {
  top: 0;
  left: calc(50% - var(--d) / 2);
  width: var(--d);
  height: 100%;
  background: #4FAE6C;
  transform: rotateY(-90deg) translateZ(calc(var(--w) / 2));
}
.book-edge-r {
  top: 3px;
  left: calc(50% - var(--d) / 2);
  width: calc(var(--d) - 2px);
  height: calc(100% - 6px);
  background: #EFE8DA;
  transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px));
}
.book-edge-t, .book-edge-b {
  left: 0;
  top: calc(50% - var(--d) / 2);
  width: calc(100% - 3px);
  height: calc(var(--d) - 2px);
  background: #EFE8DA;
}
.book-edge-t { transform: rotateX(90deg) translateZ(calc(var(--w) / 2 - 3px)); }
.book-edge-b { transform: rotateX(-90deg) translateZ(calc(var(--w) / 2 - 3px)); }

.cover {
  container-type: inline-size;
  background: #FBF7EF;
  color: #1E2238;
}
.cover svg.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; max-width: none; }
.cover-text {
  position: absolute;
  left: 9cqw;
  top: 10cqw;
  right: 9cqw;
  display: grid;
  gap: 2.4cqw;
}
.cover-series { font-size: 3.3cqw; font-weight: 500; letter-spacing: 0.32em; text-transform: uppercase; color: #5A5F7A; }
.cover-title { font-size: 11.5cqw; font-weight: 600; line-height: 1.02; letter-spacing: -0.01em; max-width: 7em; }
.cover-sub { font-size: 3.6cqw; line-height: 1.35; max-width: 17em; color: #5A5F7A; }
.cover-author { position: absolute; left: 9cqw; bottom: 9cqw; font-size: 4.2cqw; font-weight: 500; }
.cover-mark { position: absolute; left: 9cqw; bottom: 16cqw; width: 13cqw; }
.book-back.cover .cover-text { top: 12cqw; }
.back-blurb { font-size: 4.6cqw; line-height: 1.4; font-weight: 500; }

.sticker {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: var(--sonnengelb);
  color: var(--on-hell);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  transform: rotate(-8deg);
  top: 6%;
  right: max(0px, calc(50% - 205px));
}
.book-note { margin-top: var(--space-3); text-align: center; }

.book-copy { display: grid; gap: var(--space-4); min-width: 0; }
.book-copy .series { color: var(--ink-muted); font-weight: 500; }
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-3) 0;
  border-block: 1px solid var(--line);
}
.facts div { display: grid; gap: 2px; min-width: 0; }
.facts dt { font-size: var(--fs-small); color: var(--ink-muted); }
.facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.features li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.features li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c);
  transform: translateY(1px);
}

/* Refrain-Band */
.refrain { background: var(--band); color: var(--on-band); z-index: 2; overflow: clip; }
.refrain .overline { color: var(--on-band); }
.refrain blockquote { margin: 0; display: grid; gap: var(--space-4); max-width: 100%; }
.refrain .verse { font-size: clamp(1.75rem, 1.1rem + 2.7vw, 3.25rem); font-weight: 600; line-height: 1.2; max-width: none; }
.refrain .verse span { display: block; }
.refrain p { font-size: var(--fs-body-lg); max-width: 30em; }
.letter { width: 56px; height: 56px; }

/* Familien */
.families-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); align-items: end; }
.families-head .arc { width: clamp(96px, 14vw, 160px); }
.fam-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.fam {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  flex: 1 1 250px;
  max-width: 100%;
  min-width: 0;
}
.fam-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--c); margin-top: 2px; }
.fam strong { display: block; font-weight: 600; font-size: 1.125rem; line-height: 1.3; }
.fam span { display: block; }
.fam small { display: block; margin-top: 2px; font-size: var(--fs-small); color: var(--ink-muted); }
.fam--guests { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }

/* Werte */
.values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
.value { display: grid; gap: var(--space-3); align-content: start; min-width: 0; }
.value-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--c); }
.value h3 { font-size: var(--fs-title); line-height: 1.25; }
.value p { color: var(--ink-muted); }

/* Newsletter */
.nl-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.nl-card {
  display: grid;
  gap: var(--space-4);
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  min-width: 0;
}
.form { display: grid; gap: var(--space-3); }
.field { display: grid; gap: var(--space-2); }
.field label { font-weight: 500; }
.input-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.input-row input { flex: 1 1 240px; min-width: 0; }
input[type="email"] {
  min-height: 52px;
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--ink-muted);
  font: 400 var(--fs-body)/1.2 var(--font);
}
input[type="email"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--space-3); align-items: start; font-size: var(--fs-small); line-height: 1.5; color: var(--ink-muted); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--action); }
.form-msg { font-size: var(--fs-small); min-height: 1.45em; }
.form-msg.is-error { color: var(--ink); font-weight: 600; }
.nl-success { display: grid; gap: var(--space-2); padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface); box-shadow: inset 0 0 0 2px var(--kleegruen); }

.podcast {
  position: relative;
  display: grid;
  gap: var(--space-3);
  align-content: start;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 2px var(--line);
  min-width: 0;
}
.podcast .icon { width: 40px; height: 40px; color: var(--ink); }
.podcast .sticker { position: absolute; top: -18px; right: 18px; width: 76px; height: 76px; font-size: 17px; background: var(--kleegruen); }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.audiences { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.audiences li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: var(--space-3); align-items: baseline; }
.audiences li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); transform: translateY(1px); }
.audiences strong { display: block; font-weight: 600; }
.mailbox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  width: fit-content;
  max-width: 100%;
}
.mailbox a { font-size: var(--fs-body-lg); font-weight: 600; user-select: all; overflow-wrap: anywhere; }

/* Fuß */
.site-footer { background: var(--foot-bg); color: var(--foot-ink); z-index: 2; }
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
  gap: var(--space-5);
  padding-block: var(--space-6) var(--space-5);
}
.foot-brand { display: grid; gap: var(--space-3); align-content: start; }
.foot-brand svg { width: 150px; height: auto; }
.foot-col h2 { font-size: var(--fs-overline); font-weight: 500; letter-spacing: 0.45em; text-transform: uppercase; color: var(--foot-muted); margin-bottom: var(--space-3); }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-1); }
.foot-col a { color: var(--foot-ink); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.foot-col a:hover { text-decoration: underline; }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-4) var(--space-5);
  border-top: 1px solid var(--foot-line);
  color: var(--foot-muted);
  font-size: var(--fs-small);
}

/* Schmal */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "stage" "copy" "caption";
    padding-top: var(--space-3);
  }
  .stage { aspect-ratio: 930 / 600; }
  .caption {
    grid-area: caption;
    justify-self: stretch;
    width: auto;
    margin: var(--space-3) 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    text-align: left;
    padding: var(--space-3) var(--space-4) var(--space-4);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    box-shadow: inset 0 0 0 1px var(--line);
  }
  .legend { justify-content: space-between; }
  .book-grid, .nl-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .values { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-2) max(16px, env(safe-area-inset-right, 0px)) var(--space-3) max(16px, env(safe-area-inset-left, 0px));
    background: var(--surface);
    box-shadow: 0 1px 0 var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { min-height: 48px; }
  .brand svg { width: 164px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .families-head { grid-template-columns: minmax(0, 1fr); }
  .families-head .arc { display: none; }
  .sticker { width: 88px; height: 88px; font-size: 18px; right: 2%; }
  .hide-sm { display: none; }
  .mailbox { border-radius: var(--radius-md); }
  /* Familien zum Wischen statt einer langen Liste */
  .fam-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    padding-bottom: var(--space-3);
    scrollbar-width: thin;
  }
  .fam { flex: 0 0 78%; scroll-snap-align: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  [data-depth] { transform: none; }
}

/* ========== WordPress ========== */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-md) 0;
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; }
#inhalt:focus { outline: none; }

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list .current-menu-item > a,
.nav-list .current_page_item > a { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }

.foot-logo { display: inline-block; }
.foot-logo svg { width: 150px; height: auto; }
.mail-address { user-select: all; overflow-wrap: anywhere; }

/* Verstecktes Feld gegen Spam-Eintragungen */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--link);
  font-weight: 600;
}
.title-link { color: inherit; text-decoration: none; }
.title-link:hover { text-decoration: underline; text-decoration-thickness: 3px; }

/* Kopf einer Unterseite */
.page-head {
  position: relative;
  z-index: 2;
  overflow: clip;
  background: var(--surface);
  padding-block: clamp(40px, 6vw, 88px) clamp(24px, 4vw, 48px);
}
.page-head .wrap { display: grid; gap: var(--space-3); position: relative; z-index: 1; }
.page-title { max-width: 14em; }
.page-head + .section { padding-top: clamp(24px, 3vw, 48px); }

/* Fließtext aus dem Editor */
.entry {
  display: grid;
  gap: var(--space-4);
  max-width: 40rem;
  font-size: var(--fs-body-lg);
  line-height: 1.6;
}
.entry > * { margin: 0; }
.entry h2 { font-size: var(--fs-title); line-height: 1.25; margin-top: var(--space-4); }
.entry h3 { font-size: var(--fs-body-lg); font-weight: 600; margin-top: var(--space-3); }
.entry ul, .entry ol { display: grid; gap: var(--space-2); padding-left: 1.25em; }
.entry img, .entry figure img { border-radius: var(--radius-md); }
.entry figure { display: grid; gap: var(--space-2); }
.entry figcaption { font-size: var(--fs-small); color: var(--ink-muted); }
.entry blockquote {
  display: grid;
  gap: var(--space-2);
  padding-left: var(--space-4);
  border-left: 4px solid var(--c, var(--himmelblau));
  font-size: var(--fs-title);
  line-height: 1.35;
}
.entry hr { border: 0; border-top: 1px solid var(--line); }
.entry table { width: 100%; border-collapse: collapse; }
.entry th, .entry td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--line); text-align: left; }
.entry .wp-block-table { overflow-x: auto; }

/* Übersicht aller Bücher */
.book-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: clamp(32px, 5vw, 72px);
}
.book-card {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  min-width: 0;
}
.book-card .book-scene { padding-block: var(--space-4); }
.book-card .series { font-size: var(--fs-small); color: var(--ink-muted); }
.book-card h2 { font-size: var(--fs-title); line-height: 1.25; }
.book-card p { color: var(--ink-muted); }

.empty {
  display: grid;
  gap: var(--space-3);
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--line);
  max-width: 40rem;
}

/* Blätterfunktion */
.pager { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.pager .page-numbers.current { background: var(--action); color: var(--on-action); box-shadow: none; }

/* Hinweis im Vorschaumodus des Customizers */
.wb-hint {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 2px var(--sonnengelb);
  max-width: 40rem;
}
