/* ==========================================================================
   Zauberreich Verlag — Design-System
   Haltung: editorial, zurückhaltend. Papier, Tinte, ein Akzent.
   Die Farbe gehört auf die Buchcover, nicht auf die Seite.
   Schrift: Literata (Überschriften) + Inter (Text)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Literata:opsz,wght@7..72,400;7..72,500;7..72,600&family=Inter:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Papier und Tinte — Cremeton direkt aus den Buchcovern gemessen */
  --paper:        #FAF6EC;
  --paper-sunk:   #F3EEE1;
  --surface:      #FFFFFF;
  --ink:          #2A2740;   /* kein Schwarz: tiefes Violettnavy */
  --ink-2:        #4A4664;
  --ink-3:        #676283;
  --rule:         #E7E0D0;
  --rule-strong:  #D2C9B4;

  /* Akzent = das Titelviolett vom Elena-Cover */
  --accent:       #472765;
  --accent-hover: #6A3E90;
  --accent-wash:  #F0EAF5;

  /* Dunkle Fläche = das Nachtblau des Apfelbaumschlosses */
  --dark:         #293859;
  --dark-2:       #35456B;
  --on-dark:      #FFFFFF;
  --on-dark-2:    #BAC3D9;

  /* Gold aus den Turmdächern — ausschließlich dekorativ, nie Text */
  --gold:         #C9A227;

  /* Signalfarbe ausschließlich für Fehler — nie dekorativ */
  --danger:       #A4271B;
  --danger-wash:  #FBF0EE;

  /* Schriften */
  --font-display: 'Literata', Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --font-text:    'Inter', -apple-system, BlinkMacSystemFont, system-ui, 'Segoe UI', sans-serif;

  /* Typo-Skala — enger gefasst als zuvor, Hierarchie über Gewicht und Weißraum */
  --fs-display: clamp(2.125rem, 1.5rem + 2.6vw, 3.5rem);
  --fs-h1:      clamp(1.875rem, 1.45rem + 1.9vw, 2.75rem);
  --fs-h2:      clamp(1.5rem, 1.25rem + 1.1vw, 2.125rem);
  --fs-h3:      clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-lead:    clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-body:    1.0625rem;
  --fs-sm:      0.9375rem;
  --fs-xs:      0.8125rem;

  /* Abstände — 4/8-Raster */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 3rem;     --sp-8: 4.5rem;
  --sp-9: 6.5rem;

  /* Radien — klein und sachlich, keine Pillen */
  --r-xs: 4px; --r-sm: 6px; --r-md: 10px; --r-lg: 14px;

  /* Schatten — sparsam, fast unsichtbar */
  --shadow-sm: 0 1px 2px rgba(23,23,26,.04), 0 2px 8px rgba(23,23,26,.04);
  --shadow-md: 0 2px 4px rgba(23,23,26,.05), 0 10px 28px rgba(23,23,26,.07);

  /* Buchformat der Reihe (gemessen: 1:1,428) */
  --cover-ratio: 1 / 1.43;

  /* Layout */
  --wrap: 1120px;
  --wrap-narrow: 680px;

  /* Bewegung — kritisch gedämpft, kein Überschwingen */
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --t-press: 100ms; --t-quick: 160ms; --t-base: 240ms;

  /* Z-Index */
  --z-raised: 10; --z-sticky: 40; --z-overlay: 100; --z-modal: 1000;
}

/* --------------------------------------------------------------------------
   2. Reset & Basis
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-feature-settings: 'kern' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Tracking und Zeilenhöhe sind grössenabhängig — ein fester Wert waere
   in mindestens einer Grösse falsch. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: var(--fs-h1); line-height: 1.1;  letter-spacing: -0.021em; }
h2 { font-size: var(--fs-h2); line-height: 1.16; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-h3); line-height: 1.32; letter-spacing: -0.008em; }

p  { margin: 0 0 var(--sp-4); max-width: 68ch; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 var(--sp-4); padding-left: 1.25em; }
li { margin-bottom: var(--sp-2); }
strong { font-weight: 600; color: var(--ink); }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-quick) var(--ease-out);
}
a:hover { color: var(--accent-hover); }

/* Antippen darf nicht 300 ms warten */
a, button, input, select, textarea, summary { touch-action: manipulation; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip-link {
  position: absolute; left: var(--sp-4); top: -100px;
  background: var(--ink); color: #fff; padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-sm); font-weight: 500; font-size: var(--fs-sm);
  z-index: var(--z-modal); text-decoration: none;
  transition: top var(--t-base) var(--ease-out);
}
.skip-link:focus { top: var(--sp-4); color: #fff; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

::selection { background: var(--accent-wash); color: var(--ink); }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2.5rem, var(--wrap-narrow)); margin-inline: auto; }
@media (min-width: 768px) {
  .wrap { width: min(100% - 5rem, var(--wrap)); }
  .wrap-narrow { width: min(100% - 5rem, var(--wrap-narrow)); }
}

.section { padding-block: var(--sp-8); }
@media (min-width: 768px) { .section { padding-block: var(--sp-9); } }
.section--tight { padding-block: var(--sp-7); }
.section--sunk  { background: var(--paper-sunk); }
.section--ruled { border-top: 1px solid var(--rule); }

.stack > * + * { margin-top: var(--sp-4); }
.grid { display: grid; gap: var(--sp-6); }
@media (min-width: 720px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

.section-head { max-width: 58ch; margin-bottom: var(--sp-7); }
.section-head p { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-3); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center p { margin-inline: auto; }

/* --------------------------------------------------------------------------
   4. Kleinteile — Eyebrow, Buttons, Tags
   -------------------------------------------------------------------------- */
/* Editoriale Kolumnenzeile statt farbiger Pille */
.eyebrow {
  display: block;
  font-family: var(--font-text);
  font-size: var(--fs-xs); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--rule);
  max-width: 58ch;
}
.section-head--center .eyebrow { border-bottom: 0; padding-bottom: 0; margin-bottom: var(--sp-3); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px; padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-text); font-size: var(--fs-sm); font-weight: 500;
  letter-spacing: 0.005em;
  border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; text-align: center;
  transition: background-color var(--t-quick) var(--ease-out),
              border-color var(--t-quick) var(--ease-out),
              color var(--t-quick) var(--ease-out),
              transform var(--t-press) var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }

/* Rückmeldung liegt auf dem Druck, nicht auf dem Loslassen */
.btn:active { transform: scale(0.985); }

.btn--lg { min-height: 54px; padding-inline: var(--sp-6); font-size: var(--fs-body); }
.btn--block { width: 100%; }
.btn[aria-disabled="true"], .btn:disabled { opacity: .45; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* Sachliche Auszeichnung statt farbiger Badge */
.tag {
  display: inline-flex; align-items: center;
  font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0.02em;
  padding: 3px var(--sp-3);
  border: 1px solid var(--rule-strong); border-radius: var(--r-xs);
  color: var(--ink-3); background: transparent;
  white-space: nowrap;
}
.tag--solid { background: var(--accent-wash); border-color: transparent; color: var(--accent); }
.tag-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* --------------------------------------------------------------------------
   5. Karten
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-5);
  transition: border-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.card h3 { margin-bottom: var(--sp-3); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--ink-2); }

/* Icon ohne farbige Kachel — nur die Linie */
/* Aufzählung von Stückzahlen (Reihenumfang) */
.tally { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.tally li {
  display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--sp-3);
  align-items: baseline; margin: 0;
  padding-block: var(--sp-3);
  border-top: 1px solid var(--rule);
  color: var(--ink-2); font-size: var(--fs-sm);
}
.tally li:first-child { border-top: 0; padding-top: 0; }
.tally strong {
  font-family: var(--font-display); font-size: 1.375rem; font-weight: 500;
  color: var(--ink); font-variant-numeric: tabular-nums; text-align: right;
}

.card__icon { color: var(--ink-3); margin-bottom: var(--sp-4); }
.card__icon svg { width: 24px; height: 24px; stroke-width: 1.5; }

/* Buchkarte */
.book-card {
  position: relative;
  display: flex; flex-direction: column;
  background: transparent;
  height: 100%;
}

/* --------------------------------------------------------------------------
   5b. Dreidimensionales Buch
   Deckel, Rücken und Rückseite stehen als echte Flächen im Raum. Der Winkel
   in --angle ist fest: das Buch steht ruhig da und dreht sich nicht.
   -------------------------------------------------------------------------- */
.book3d {
  position: relative;
  container-type: inline-size;
  perspective: 1700px;
  perspective-origin: 34% 48%;
  padding-left: 4%;          /* Platz für den ausgestellten Rücken */
  max-width: 264px;          /* Bücher stehen im Regal, nicht im Schaufenster */
  transition: transform 220ms var(--ease-out);
}

.book3d__body {
  --depth: 34px;
  --angle: 18deg;
  position: relative;
  width: 100%;
  aspect-ratio: var(--cover-ratio);
  transform-style: preserve-3d;
  transform: rotateY(var(--angle));
}
/* 12 % der Breite entspricht bei 148 mm rund 18 mm Buchrücken */
@supports (width: 1cqw) { .book3d__body { --depth: 12cqw; } }

/* Der Winkel bleibt konstant. Die Räumlichkeit ist Darstellung, keine
   Bewegung — es gibt weder eine Einblenddrehung noch eine Drehung bei Hover.
   Rückmeldung gibt allein ein kleiner Hub am Rahmen (siehe .book3d). */

/* Zuwendung bei Maus und Tastatur: ein kleiner Hub, keine Drehung */
.book-card:hover .book3d,
.book-card:focus-within .book3d,
.book3d:hover { transform: translateY(-4px); }

.book3d__face { position: absolute; inset: 0; }

.book3d__front {
  transform: translateZ(calc(var(--depth) / 2));
  overflow: hidden;
  border-radius: 1px 3px 3px 1px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px rgba(42, 39, 64, .12);
}
.book3d__front img { width: 100%; height: 100%; object-fit: cover; display: block; }

.book3d__back {
  transform: translateZ(calc(var(--depth) / -2)) rotateY(180deg);
  background: var(--spine-bg, var(--paper-sunk));
  border-radius: 1px 3px 3px 1px;
  box-shadow: inset 0 0 0 1px rgba(42, 39, 64, .12);
}

/* Der Rücken steht senkrecht auf der linken Kante */
.book3d__spine {
  position: absolute; top: 0; left: 0;
  width: var(--depth); height: 100%;
  transform-origin: 0% 50%;
  transform: rotateY(-90deg) translateX(calc(var(--depth) / -2));
  background: var(--spine-bg, var(--paper-sunk));
  color: var(--spine-fg, var(--ink));
  display: grid; grid-template-rows: 1fr auto;
  justify-items: center;
  overflow: hidden;
  /* Falzschatten innen, Lichtkante außen */
  box-shadow: inset -7px 0 14px -7px rgba(0, 0, 0, .45),
              inset 7px 0 12px -8px rgba(255, 255, 255, .35);
}
.book3d__spine-text {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-size: clamp(8px, 2.4cqw, 12px);
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  max-height: 100%;
  padding-top: 9%;
}
.book3d__spine-text span { font-weight: 400; opacity: .72; }
.book3d__spine-mark {
  width: 46%; aspect-ratio: 1; margin-bottom: 11%;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: .5;
}

/* Schlagschatten auf dem Papier */
.book3d::after {
  content: "";
  position: absolute; left: 8%; right: 4%; bottom: -14px; height: 22px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(42, 39, 64, .30), rgba(42, 39, 64, 0) 72%);
  transition: opacity 560ms var(--ease-out);
  pointer-events: none;
}
.book-card:hover .book3d::after,
.book-card:focus-within .book3d::after { opacity: .6; }

/* Auf der Buchseite steht der Band größer und etwas frontaler */
.book-hero__cover { max-width: 300px; }
/* Einspaltig steht der Band mittig statt an der linken Kante zu kleben */
@media (max-width: 899px) { .book-hero__cover { margin-inline: auto; } }
.book-hero__cover .book3d { max-width: 300px; }
.book-hero__cover .book3d__body { --angle: 16deg; }

.book-card__body { padding: var(--sp-7) 0 0; display: flex; flex-direction: column; flex: 1; gap: var(--sp-3); }
.book-card__body h3 { margin: 0; }
.book-card__meta { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; }
.book-card__text { margin: 0; color: var(--ink-2); font-size: var(--fs-sm); flex: 1; }
.book-card__link {
  font-size: var(--fs-sm); font-weight: 500; color: var(--accent);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
}
.book-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-sm); }
.book-card__link svg { width: 16px; height: 16px; transition: transform var(--t-base) var(--ease-out); }
.book-card:hover .book-card__link svg { transform: translateX(3px); }
.book-card__link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Amazon-Kaufknopf

   Amazons eigene Kauffläche: gelb (#FFD814), dunkle Schrift, runde Kapsel.
   Bewusst die einzige Stelle, an der die Seite aus ihrer Farbwelt heraustritt —
   ein Kaufknopf soll als Kaufknopf erkennbar sein.
   -------------------------------------------------------------------------- */
.btn-amazon {
  --amazon-gelb: #FFD814;
  --amazon-gelb-hover: #F7CA00;
  --amazon-rand: #FCD200;
  --amazon-schrift: #0F1111;

  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 var(--sp-5);
  background: var(--amazon-gelb); color: var(--amazon-schrift);
  border: 1px solid var(--amazon-rand); border-radius: 100px;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  line-height: 1; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 5px rgba(15, 17, 17, .12);
  transition: background var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
}
.btn-amazon svg { width: 17px; height: 17px; flex: none; }
.btn-amazon:hover {
  background: var(--amazon-gelb-hover); color: var(--amazon-schrift);
  box-shadow: 0 4px 10px rgba(15, 17, 17, .16);
}
.btn-amazon:active { transform: scale(0.985); box-shadow: 0 1px 3px rgba(15, 17, 17, .12); }
.btn-amazon:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.btn-amazon--lg { min-height: 54px; padding-inline: var(--sp-6); font-size: var(--fs-body); }
.btn-amazon--lg svg { width: 19px; height: 19px; }

/* In Kacheln: eine Leiste in Kachelbreite. Der Knopf darf die Rasterzelle
   niemals überragen – bei den Ausmalbüchern ist sie nur rund 140 px breit. */
.btn-amazon--sm {
  max-width: 100%;
  min-height: 34px; padding: 0 var(--sp-4); gap: 6px;
  font-size: 0.8125rem;
  box-shadow: none;
}
.btn-amazon--sm svg { width: 14px; height: 14px; }
.btn-amazon--sm:hover { box-shadow: 0 2px 6px rgba(15, 17, 17, .14); }

@media (prefers-contrast: more) { .btn-amazon { border-color: var(--amazon-schrift); } }
@media (prefers-reduced-motion: reduce) {
  .btn-amazon { transition: none; }
  .btn-amazon:active { transform: none; }
}

/* Die Reihenkachel ist über .book-card__link::after ganz anklickbar,
   deshalb muss der Kaufknopf darüberliegen. */
.book-card__actions {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-3) var(--sp-5); margin-top: var(--sp-2);
}
.book-card__actions .btn-amazon { position: relative; z-index: 1; }

/* Die Kaufknöpfe stehen in einer Zeile, auch wenn die Texte ungleich lang sind */
.volume { height: 100%; }
.volume__body { display: flex; flex-direction: column; flex: 1; }
.volume__body p { margin-bottom: var(--sp-3); }
.volume__body .btn-amazon { margin-top: auto; align-self: start; }

/* --------------------------------------------------------------------------
   5c. Bandübersicht einer Reihe
   -------------------------------------------------------------------------- */
.volume-grid {
  display: grid;
  gap: var(--sp-7) var(--sp-5);
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
@media (min-width: 720px) {
  .volume-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
}
.volume-grid--dense { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (min-width: 720px) {
  .volume-grid--dense { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); }
}

.volume { display: flex; flex-direction: column; }
.volume__body { padding-top: var(--sp-5); }
.volume__body h3 { font-size: 1.0625rem; margin-bottom: var(--sp-2); }
.volume__body p { font-size: var(--fs-sm); color: var(--ink-2); margin: 0; }

/* In der Übersicht füllt der Band seine Rasterzelle */
.book3d--sm { max-width: 100%; }

/* Platzhalter, solange ein Cover fehlt — ehrlicher als ein graues Rechteck */
.cover-pending {
  aspect-ratio: var(--cover-ratio);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  display: grid; place-items: center;
  color: var(--ink-3); font-size: var(--fs-xs);
  letter-spacing: .04em;
}

/* --------------------------------------------------------------------------
   6. Header / Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: rgba(251, 250, 249, .72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease-out),
              background-color var(--t-base) var(--ease-out);
  padding-top: env(safe-area-inset-top);
}
/* Die Trennlinie erscheint erst, wenn Inhalt darunterläuft */
body.is-scrolled .site-header {
  border-bottom-color: var(--rule);
  background: rgba(251, 250, 249, .88);
}

.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); min-height: 68px;
}
.brand, .nav-toggle { position: relative; z-index: 2; }

.brand {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem;
  letter-spacing: -0.015em;
  color: var(--ink); text-decoration: none; line-height: 1.1;
  min-height: 48px;
}
.brand:hover { color: var(--accent); }
.brand img { width: 34px; height: 34px; flex: none; }
.brand span small {
  display: block; font-family: var(--font-text);
  font-size: .625rem; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 2px;
}

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-sm);
  background: transparent; border: 1px solid var(--rule-strong);
  color: var(--ink); cursor: pointer;
  transition: background-color var(--t-quick) var(--ease-out),
              border-color var(--t-quick) var(--ease-out),
              transform var(--t-press) var(--ease-out);
}
.nav-toggle:hover { background: var(--surface); border-color: var(--ink); }
.nav-toggle:active { transform: scale(0.96); }
.nav-toggle svg { width: 20px; height: 20px; stroke-width: 1.75; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-1); align-items: center; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm);
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0.005em;
  color: var(--ink-2); text-decoration: none;
  transition: color var(--t-quick) var(--ease-out), background-color var(--t-quick) var(--ease-out);
}
.site-nav a:hover { color: var(--ink); background: rgba(23,23,26,.04); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.site-nav .nav-cta { margin-left: var(--sp-3); }
.site-nav .nav-cta a {
  background: var(--ink); color: #fff; padding-inline: var(--sp-4);
  border-radius: var(--r-sm);
}
.site-nav .nav-cta a:hover { background: var(--accent); color: #fff; }

@media (max-width: 959px) {
  .site-nav {
    position: fixed; inset: 0 0 auto; top: 0; z-index: 1;
    padding: calc(76px + env(safe-area-inset-top)) var(--sp-5) var(--sp-6);
    background: var(--paper); border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%); visibility: hidden;
    transition: transform var(--t-base) var(--ease-out), visibility var(--t-base);
    max-height: 100dvh; overflow-y: auto;
  }
  .site-nav[data-open="true"] { transform: translateY(0); visibility: visible; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav li + li { border-top: 1px solid var(--rule); }
  .site-nav a { min-height: 54px; font-size: 1.0625rem; justify-content: flex-start; border-radius: 0; }
  .site-nav .nav-cta { margin: var(--sp-4) 0 0; border-top: 0; }
  .site-nav .nav-cta a { justify-content: center; border-radius: var(--r-sm); width: 100%; }
}
@media (min-width: 960px) { .nav-toggle { display: none; } }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--sp-8); }
@media (min-width: 768px) { .hero { padding-block: var(--sp-9) var(--sp-8); } }
.hero__grid { display: grid; gap: var(--sp-7); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1fr .88fr; gap: var(--sp-8); } }

.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.06;
  letter-spacing: -0.024em;   /* grosse Schrift braucht negatives Tracking */
  font-weight: 500;
}
.hero__lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.hero__art img { border-radius: var(--r-md); width: 100%; }

/* Bildplatte: der Grund hat exakt das Nachtblau der Aquarelle,
   dadurch geht das Motiv randlos in die Fläche über. */
.plate {
  margin: 0;
  background: var(--dark);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  box-shadow: var(--shadow-md);
}
.plate img { width: 100%; border-radius: var(--r-xs); }

/* Helle Variante für Motive auf weißem Grund (Karten, Tagillustrationen) */
.plate--light {
  background: var(--surface);
  border: 1px solid var(--rule);
  padding: var(--sp-4);
}
.plate.plate--light figcaption { color: var(--ink-3); }
.plate figcaption {
  margin-top: var(--sp-3);
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--on-dark-2);
  text-align: center;
}

.hero__facts {
  display: grid; gap: var(--sp-5); margin-top: var(--sp-7);
  padding-top: var(--sp-5); border-top: 1px solid var(--rule);
}
@media (min-width: 560px) { .hero__facts { grid-template-columns: repeat(3, 1fr); } }
.hero__fact strong {
  display: block; font-family: var(--font-display); font-size: 1.5rem;
  font-weight: 500; color: var(--ink); line-height: 1.1;
  letter-spacing: -0.015em; font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}
.hero__fact span { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.45; }

/* --------------------------------------------------------------------------
   8. Zweispalter Text + Bild
   -------------------------------------------------------------------------- */
.split { display: grid; gap: var(--sp-6); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } .split--reverse .split__media { order: -1; } }
.split__media img { border-radius: var(--r-md); }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); }
.check-list li { display: grid; grid-template-columns: 20px 1fr; gap: var(--sp-3); align-items: start; margin: 0; }
.check-list svg { width: 20px; height: 20px; stroke-width: 1.5; color: var(--ink-3); margin-top: 4px; }

/* Nummerierte Schritte — Ziffern in Serife, ohne Kachel */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 0; }
.steps li {
  display: grid; grid-template-columns: 3rem 1fr; gap: var(--sp-4);
  align-items: baseline; margin: 0;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--rule);
}
.steps li:last-child { border-bottom: 1px solid var(--rule); }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 500;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.steps h3 { margin-bottom: var(--sp-2); }
.steps p { margin: 0; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   9. Buch-Detailseite
   -------------------------------------------------------------------------- */
.book-hero { padding-block: var(--sp-6) var(--sp-8); }
.book-hero__grid { display: grid; gap: var(--sp-6); align-items: start; }
@media (min-width: 900px) { .book-hero__grid { grid-template-columns: 380px 1fr; gap: var(--sp-8); } }
.book-hero__subtitle {
  font-family: var(--font-display); font-size: var(--fs-lead);
  font-style: italic; color: var(--ink-3); margin-bottom: var(--sp-5);
  letter-spacing: -0.005em;
}

.spec-list { list-style: none; padding: 0; margin: var(--sp-6) 0 0; display: grid; gap: 0; }
.spec-list div {
  display: grid; grid-template-columns: 11rem 1fr; gap: var(--sp-4);
  padding-block: var(--sp-3); border-top: 1px solid var(--rule);
}
.spec-list div:last-child { border-bottom: 1px solid var(--rule); }
.spec-list dt { font-size: var(--fs-sm); color: var(--ink-3); }
.spec-list dd { margin: 0; font-size: var(--fs-sm); color: var(--ink); font-variant-numeric: tabular-nums; }
@media (max-width: 559px) { .spec-list div { grid-template-columns: 1fr; gap: 2px; } }

.quote {
  border-left: 2px solid var(--rule-strong);
  padding: var(--sp-1) 0 var(--sp-1) var(--sp-5);
  margin: var(--sp-6) 0;
}
.quote p {
  font-family: var(--font-display); font-size: var(--fs-lead); line-height: 1.5;
  font-style: italic; color: var(--ink); letter-spacing: -0.005em;
}
.quote footer { font-size: var(--fs-sm); color: var(--ink-3); font-style: normal; }

.prose p { color: var(--ink-2); }
.prose h2 { margin-top: var(--sp-7); }
.prose h3 { margin-top: var(--sp-6); }
.prose > :first-child { margin-top: 0; }
.prose ul { color: var(--ink-2); }
.prose li { padding-left: 0.25em; }

/* --------------------------------------------------------------------------
   10. Brotkrumen
   -------------------------------------------------------------------------- */
.breadcrumb { padding-block: var(--sp-5) 0; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; font-size: var(--fs-xs); }
.breadcrumb li { margin: 0; display: flex; align-items: center; gap: var(--sp-2); color: var(--ink-3); }
.breadcrumb li + li::before { content: "/"; color: var(--rule-strong); }
.breadcrumb a { color: var(--ink-3); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. Formular
   -------------------------------------------------------------------------- */
.form { display: grid; gap: var(--sp-5); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.field .req { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea, .field select {
  width: 100%; min-height: 48px; padding: var(--sp-3) var(--sp-4);
  font-family: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  transition: border-color var(--t-quick) var(--ease-out), box-shadow var(--t-quick) var(--ease-out);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--ink-3); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-wash);
}
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); margin: 0; }
.field .error { display: none; font-size: var(--fs-xs); color: var(--danger); font-weight: 500; align-items: center; gap: 6px; margin: 0; }
.field .error svg { width: 14px; height: 14px; flex: none; stroke-width: 2; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea { border-color: var(--danger); }
.field[data-invalid="true"] .error { display: flex; }

.checkbox { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-3); align-items: start; }
.checkbox input { width: 20px; height: 20px; min-height: 20px; margin-top: 3px; accent-color: var(--accent); box-shadow: none; }
.checkbox label { font-size: var(--fs-sm); font-weight: 400; color: var(--ink-2); line-height: 1.5; }

.form-note {
  display: none; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-4); border-radius: var(--r-sm); font-size: var(--fs-sm);
  background: var(--accent-wash); color: var(--ink); border: 1px solid transparent;
  margin-bottom: var(--sp-5);
}
.form-note svg { width: 20px; height: 20px; flex: none; stroke-width: 1.5; color: var(--accent); }
.form-note[data-visible="true"] { display: flex; }
/* Fehlermeldung des Formulars — dieselbe Fläche, andere Bedeutung */
.form-note[data-state="fehler"] { background: var(--danger-wash); color: var(--danger); }
.form-note[data-state="fehler"] svg { color: var(--danger); }
.form-note a { color: inherit; }

/* --------------------------------------------------------------------------
   12. Akzentabschnitt (eine dunkle Fläche je Seite, mehr nicht)
   -------------------------------------------------------------------------- */
.panel {
  background: var(--dark); color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: var(--sp-7) var(--sp-5);
}
@media (min-width: 768px) { .panel { padding: var(--sp-8) var(--sp-7); } }
.panel h2 { color: var(--on-dark); }
.panel p { color: var(--on-dark-2); font-size: var(--fs-lead); line-height: 1.55; max-width: 48ch; }
.panel .btn--primary { background: #fff; color: var(--ink); border-color: #fff; }
.panel .btn--primary:hover { background: var(--accent-wash); color: var(--ink); border-color: var(--accent-wash); }
.panel .btn--ghost { color: var(--on-dark); border-color: rgba(255,255,255,.32); }
.panel .btn--ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); color: #fff; }

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--dark); color: var(--on-dark-2);
  padding: var(--sp-8) 0 calc(var(--sp-5) + env(safe-area-inset-bottom));
  margin-top: var(--sp-9);
  font-size: var(--fs-sm);
}
.site-footer h2 { color: var(--on-dark); font-family: var(--font-text); font-size: var(--fs-xs);
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: var(--sp-3); }
.site-footer a { color: var(--on-dark-2); text-decoration: none; transition: color var(--t-quick) var(--ease-out); }
.site-footer a:hover { color: var(--on-dark); text-decoration: underline; }
.site-footer__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: var(--sp-7); } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 40px; }
.site-footer p { color: var(--on-dark-2); max-width: 40ch; }
.footer-brand {
  display: inline-flex; align-items: center; gap: var(--sp-3); min-height: 44px;
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 600;
  letter-spacing: -0.015em; color: var(--on-dark); text-decoration: none; margin-bottom: var(--sp-4);
}
.footer-brand img { width: 30px; height: 30px; }
.site-footer__bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  justify-content: space-between; align-items: center;
  font-size: var(--fs-xs);
}
.site-footer__bottom ul { display: flex; flex-wrap: wrap; gap: var(--sp-5); }
.site-footer__bottom li a { min-height: 32px; }

/* --------------------------------------------------------------------------
   14. Bewegung
   -------------------------------------------------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(10px); }
[data-reveal].is-visible {
  opacity: 1; transform: none;
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

/* --------------------------------------------------------------------------
   15. Systemeinstellungen respektieren
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .btn:active, .nav-toggle:active { transform: none; }
  .book-card:hover .book3d,
  .book-card:focus-within .book3d,
  .book3d:hover { transform: none; }
}

/* Weniger Transparenz: Milchglas wird zur festen Fläche */
@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--paper);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    border-bottom-color: var(--rule);
  }
}

/* Mehr Kontrast: Konturen treten hervor */
@media (prefers-contrast: more) {
  :root { --rule: #B0A895; --rule-strong: #756E5E; --ink-2: #322E4A; --ink-3: #4A4664; }
  .card, .field input, .field textarea, .field select { border-width: 1px; border-color: var(--rule-strong); }
  a { text-decoration: underline; }
  .site-header { background: var(--paper); backdrop-filter: none; border-bottom-color: var(--rule-strong); }
}

/* --------------------------------------------------------------------------
   16. Hilfsklassen
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-6 { margin-top: var(--sp-6); }
.muted { color: var(--ink-3); }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); }
.note {
  border: 1px solid var(--rule-strong); border-left: 2px solid var(--ink-3);
  border-radius: var(--r-sm); padding: var(--sp-4) var(--sp-5);
  background: var(--surface); font-size: var(--fs-sm); margin-block: var(--sp-5);
}
.note p { margin-bottom: 0; color: var(--ink-2); }
