/* ============================================================
   Die Katzen und das leuchtende Geheimnis der Nacht
   Hochmodern · CSS-3D-Buch · scroll-getrieben
   ============================================================ */
:root {
  --ink: #eae6ff;
  --muted: rgba(234, 230, 255, 0.74);
  --gold: #f4c87a;
  --gold-soft: #ffe6b3;
  --violet: #b79bff;
  --sky: #3b6fd0;
  --sky-deep: #1d3a7a;
  --night-1: #070f29;
  --night-2: #04091b;
  --night-3: #01030a;
  --paper-1: #fbf6ea;
  --paper-2: #efe3c9;
  --paper-ink: #3a3050;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --script: "Dancing Script", "Fraunces", cursive;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Buchmaße — über JS feinjustiert */
  --ph: clamp(330px, 74vh, 700px);
  --pw: calc(var(--ph) * 0.618);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }

body {
  min-height: 100vh;             /* Scroll-Weg liefert jetzt .experience */
  font-family: var(--ui);
  color: var(--ink);
  background:
    radial-gradient(1300px 900px at 80% -10%, #102350 0%, transparent 50%),
    radial-gradient(1100px 820px at 6% 8%, #0a1538 0%, transparent 54%),
    radial-gradient(1000px 1000px at 50% 118%, #081030 0%, transparent 48%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 56%, var(--night-3) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Dezenter Aurora-Shader (WebGL) — hinterste Ebene
   ============================================================ */
.shader-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.12; mix-blend-mode: screen;
  /* weicher Übergang in die Atmosphäre, Ränder leicht abdunkeln */
  -webkit-mask: radial-gradient(130% 110% at 50% 42%, #000 55%, transparent 100%);
  mask: radial-gradient(130% 110% at 50% 42%, #000 55%, transparent 100%);
}
.shader-bg canvas { display: block; width: 100% !important; height: 100% !important; }

/* ============================================================
   Hintergrund-Ebenen (Sterne, Stadt, Parallax)
   ============================================================ */
.sky-layers { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }

/* Milchstraße / Nebelband — ferne Tiefenebene, dezent */
.milkyway {
  position: absolute; inset: -12%;
  background-repeat: no-repeat; background-position: center;
  background-size: cover;
  opacity: 0.95; mix-blend-mode: screen;
  will-change: transform;
  -webkit-mask: radial-gradient(170% 160% at 50% 42%, #000 80%, transparent 100%);
  mask: radial-gradient(170% 160% at 50% 42%, #000 80%, transparent 100%);
}

/* Sternschnuppe — kurzer heller Strich mit Schweif */
.shooting-star {
  position: fixed; z-index: 2; height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(214,228,255,0.7) 70%, #fff 100%);
  border-radius: 2px; pointer-events: none; opacity: 0;
  transform: translate(0,0) rotate(var(--a, 25deg));
  transform-origin: 100% 50%;
  filter: drop-shadow(0 0 6px rgba(180,210,255,0.85));
  animation-name: shoot; animation-timing-function: ease-out; animation-fill-mode: forwards;
}
/* Träume (Gold) & Erinnerungen (Violett) — agieren wie Sternschnuppen */
.shooting-star.gold {
  background: linear-gradient(90deg, rgba(255,214,150,0) 0%, rgba(255,222,168,0.78) 70%, #fff3d6 100%);
  filter: drop-shadow(0 0 8px rgba(255,196,110,0.95));
}
.shooting-star.violet {
  background: linear-gradient(90deg, rgba(184,162,255,0) 0%, rgba(196,180,255,0.78) 70%, #efeaff 100%);
  filter: drop-shadow(0 0 8px rgba(170,150,255,0.95));
}
@keyframes shoot {
  0%   { opacity: 0; transform: translate(0vw, 0vh) rotate(var(--a)); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--a)); }
}

.stars {
  position: absolute; inset: -10%;
  background-repeat: repeat;
  will-change: transform;
}
.stars.s1 { opacity: 0.9; }
.stars.s2 { opacity: 0.6; }
.stars.s3 { opacity: 0.85; }

/* Funkelnde Akzent-Sterne (Einzelelemente, GPU-schonend über opacity/transform).
   Pulsieren sanft per Sinus-artiger ease-in-out-Kurve — angelehnt an das
   Flackern des Aurora-Shaders. */
.twinkle { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.tw-star {
  position: absolute; width: var(--s, 2px); height: var(--s, 2px);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, rgba(233,240,255,0.65) 42%, transparent 72%);
  box-shadow: 0 0 6px 1px rgba(255,255,255,0.4);
  opacity: var(--min, 0.2);
  will-change: opacity, transform;
  animation: twinkle var(--dur, 4s) ease-in-out var(--delay, 0s) infinite;
}
.tw-star.gold {
  background: radial-gradient(circle, #fff4d8 0%, rgba(255,206,138,0.7) 42%, transparent 72%);
  box-shadow: 0 0 9px 2px rgba(255,196,110,0.5);
}
@keyframes twinkle {
  0%, 100% { opacity: var(--min, 0.18); transform: scale(0.82); }
  50%      { opacity: var(--max, 0.9);  transform: scale(1.15); }
}

/* Auroraschimmer */
.aura {
  position: absolute; left: 50%; top: 46%;
  width: 120vmin; height: 120vmin; translate: -50% -50%;
  background: radial-gradient(circle, rgba(110,140,255,0.09) 0%, rgba(110,140,255,0.035) 32%, transparent 62%);
  filter: blur(14px); will-change: transform; mix-blend-mode: screen;
}

/* Silhouette der Stadt am unteren Rand */
.skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: 34vh;
  background:
    radial-gradient(60% 90% at 12% 100%, rgba(8,16,46,0.0) 60%, transparent 61%),
    linear-gradient(180deg, transparent 0%, rgba(7,12,34,0.55) 60%, rgba(6,10,28,0.92) 100%);
  will-change: transform;
}
.skyline::before {
  content: ""; position: absolute; inset: 0;
  -webkit-mask: var(--skyline-mask) bottom center / cover no-repeat;
  mask: var(--skyline-mask) bottom center / cover no-repeat;
  background: linear-gradient(180deg, #16234f 0%, #0a1233 100%);
  opacity: 0.9;
}

/* schwebende Laternen (DOM) */
.lantern {
  position: fixed; z-index: 2; width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #fff3cf 0%, #ffcf85 28%, #ff9d52 60%, rgba(255,140,60,0) 72%);
  box-shadow: 0 0 26px 8px rgba(255,178,96,0.55), 0 0 70px 26px rgba(255,150,70,0.22);
  pointer-events: none; will-change: transform; filter: saturate(1.05);
}

/* ============================================================
   3D-Bühne + Buch
   ============================================================ */
.scene-3d {
  position: fixed; inset: 0; z-index: 4;
  perspective: 2300px; perspective-origin: 50% 44%;
  display: grid; place-items: center; pointer-events: none;
}

/* Aura/Bloom hinter dem Buch */
.book-glow {
  position: absolute; left: 50%; top: 47%; translate: -50% -50%;
  width: calc(var(--pw) * 2.6); height: calc(var(--ph) * 1.5);
  background: radial-gradient(closest-side, rgba(255,228,184,0.40), rgba(255,206,138,0.14) 46%, transparent 72%);
  filter: blur(8px); will-change: opacity, transform; z-index: -1;
}

.book {
  position: relative; width: var(--pw); height: var(--ph);
  transform-style: preserve-3d; will-change: transform;
}

/* Bodenschatten */
.book-shadow {
  position: absolute; left: 50%; bottom: -7%; translate: -50% 0;
  width: calc(var(--pw) * 1.9); height: calc(var(--ph) * 0.22);
  background: radial-gradient(closest-side, rgba(3,6,20,0.6), transparent 70%);
  filter: blur(10px); transform: rotateX(72deg); z-index: -2; will-change: transform, opacity;
}

/* Statische Grundseite rechts (innere Buchrückseite / Klappentext) */
.base {
  position: absolute; inset: 0; transform-origin: left center;
  transform: translateZ(-7px);
  border-radius: 5px 14px 14px 5px; overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.18);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}

/* Echtes Vordercover — wird beim Outro-Herumdrehen sichtbar.
   rotateY(180deg) + Gruppendrehung auf -180deg ergibt eine reine
   Rotation (Summe 0) → das Cover erscheint korrekt, nie gespiegelt. */

/* Buchdeckel-Kante / Seiten-Stapel am rechten Rand */
.book-pages-edge {
  position: absolute; top: 2px; bottom: 2px; right: -3px;
  width: 7px;
  background: linear-gradient(90deg,
    rgba(240,230,200,0.85) 0%,
    rgba(255,252,240,0.95) 30%,
    rgba(245,238,215,0.90) 60%,
    rgba(220,210,185,0.80) 100%);
  border-radius: 0 3px 3px 0;
  box-shadow: 2px 0 6px rgba(0,0,0,0.18);
}

/* Ein Blatt = Vorder- + Rückseite, dreht um den Buchrücken (linke Kante) */
.leaf {
  position: absolute; inset: 0; transform-origin: left center;
  transform-style: preserve-3d; will-change: transform;
}
.face {
  position: absolute; inset: 0; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 5px 14px 14px 5px;
  box-shadow:
    inset 0 0 1px rgba(255,255,255,0.25),
    0 18px 40px rgba(5,8,24,0.28);
}
.face.back { transform: rotateY(180deg); border-radius: 14px 5px 5px 14px; }

/* Schattierung beim Wenden (vom JS über --curl gesteuert) */
.face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(0,0,0,0.62) 0%,
      rgba(0,0,0,0.28) 10%,
      rgba(0,0,0,0.10) 24%,
      rgba(255,255,255,0.07) 40%,
      rgba(255,255,255,0.14) 52%,
      rgba(255,255,255,0.04) 64%,
      transparent 80%),
    linear-gradient(180deg,
      rgba(255,255,255,0.08) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0,0,0,0.08) 100%);
  opacity: var(--curl, 0); transition: none;
}
.face.back::after {
  background:
    linear-gradient(270deg,
      rgba(0,0,0,0.62) 0%,
      rgba(0,0,0,0.28) 10%,
      rgba(0,0,0,0.10) 24%,
      rgba(255,255,255,0.07) 40%,
      rgba(255,255,255,0.14) 52%,
      rgba(255,255,255,0.04) 64%,
      transparent 80%),
    linear-gradient(180deg,
      rgba(255,255,255,0.08) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0,0,0,0.08) 100%);
}

/* Bindungsschatten an der Buchrücken-Kante jeder Innenseite */
/* Opake Grundfarbe als Sicherheitsnetz: keine Seite kann je durchscheinen */
.pg { position: absolute; inset: 0; background-color: var(--paper-1); }
.pg::before {
  content: ""; position: absolute; top: 0; bottom: 0; width: 16%; pointer-events: none; z-index: 3;
}
.face .pg::before { left: 0; background: linear-gradient(90deg, rgba(40,28,12,0.30), transparent); }
.face.back .pg::before { right: 0; left: auto; background: linear-gradient(270deg, rgba(40,28,12,0.30), transparent); }

/* ---------- Seitentypen ---------- */
.pg-cover, .pg-backcover { background-size: cover; background-position: center; }
.pg-cover::before, .pg-backcover::before { display: none; }
/* Cover-Blau etwas abdunkeln, damit es zum dunkleren Nachthimmel passt */
.pg-cover::after, .pg-backcover::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6,12,32,0.20), rgba(6,12,32,0.30));
}

.pg-paper {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,0.5), transparent 55%),
    linear-gradient(160deg, var(--paper-1), var(--paper-2));
  color: var(--paper-ink);
  display: flex; flex-direction: column;
  padding: clamp(20px, 3.4vh, 42px);
}
/* Inneres Endpapier (innere hintere Buchdecke) — ruhige Cremefläche */
.pg-endpaper {
  background:
    radial-gradient(120% 90% at 80% 100%, rgba(0,0,0,0.06), transparent 55%),
    radial-gradient(120% 80% at 20% 0%, rgba(255,255,255,0.45), transparent 55%),
    linear-gradient(160deg, var(--paper-2), var(--paper-1));
  box-shadow: inset 22px 0 40px -24px rgba(40,28,12,0.35);
}

.pg-night {
  background:
    radial-gradient(120% 70% at 50% 4%, rgba(110,150,245,0.26), transparent 55%),
    linear-gradient(180deg, #1f3c82 0%, #14254f 55%, #0c1838 100%);
  background-color: #101c44;     /* opakes Backing (nach der Kurzform, damit es greift) */
  color: #f3f1ff;
  display: flex; flex-direction: column;
  padding: clamp(20px, 3.4vh, 42px);
}
.pg-night .stars-mini {
  position: absolute; inset: 0; opacity: 0.85; pointer-events: none;
}

/* Innenseiten-Inhalt */
.page-eyebrow {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: 0.3em;
  font-size: clamp(0.5rem, 1.1vh, 0.66rem); font-weight: 600;
}
.pg-paper .page-eyebrow { color: #b07a36; }
.pg-night .page-eyebrow { color: var(--gold-soft); }

.page-title {
  font-family: var(--display); font-weight: 500; line-height: 1.06;
  font-size: clamp(1.1rem, 3.1vh, 1.9rem); margin-top: 0.4em;
}
.page-body {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(0.82rem, 2.05vh, 1.12rem); line-height: 1.62;
  margin-top: auto; margin-bottom: auto;
}
.pg-paper .page-body { color: #4a3f5c; }
.pg-night .page-body { color: rgba(244,242,255,0.92); }
.page-body.lead::first-letter {
  font-family: var(--display); float: left; font-size: 3.1em; line-height: 0.72;
  padding: 0.06em 0.12em 0 0; color: var(--gold);
}
.page-foot {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--ui); font-size: clamp(0.55rem, 1.2vh, 0.7rem); letter-spacing: 0.12em;
  opacity: 0.6; margin-top: 12px;
}

/* Illustrationsband (echtes Cover-Crop, weich getönt) */
.illus {
  position: relative; height: 30%; min-height: 78px; border-radius: 10px; overflow: hidden;
  margin-bottom: 12px; box-shadow: 0 10px 26px rgba(20,30,70,0.28);
  background-image: var(--illus-img); background-size: 150%; background-position: var(--illus-pos, center 38%);
}
.illus::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40,70,150,0.05), rgba(20,35,90,0.28));
  mix-blend-mode: multiply;
}

/* zentrierte Sternchen / Laternenmotive */
.motif { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 6px 0 2px; }
.star4 {
  width: 16px; height: 16px; background: var(--gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 6px rgba(244,200,122,0.7));
}
.star4.sm { width: 9px; height: 9px; opacity: 0.8; }
.lantern-mini {
  width: 22px; height: 30px; border-radius: 40% 40% 46% 46%;
  background: radial-gradient(circle at 50% 38%, #fff2cd, #ffc578 55%, #ef9a4a);
  box-shadow: 0 0 22px 6px rgba(255,180,96,0.6); position: relative;
}
.lantern-mini::before {
  content: ""; position: absolute; left: 50%; top: -10px; translate: -50% 0;
  width: 1px; height: 10px; background: rgba(255,220,170,0.6);
}

.dedication {
  margin: auto; text-align: center; font-family: var(--display); font-style: italic;
  font-size: clamp(0.95rem, 2.5vh, 1.35rem); line-height: 1.5; max-width: 80%;
}
.pg-night .dedication { color: #f0eeff; }

.colophon { margin: auto; text-align: center; }
.colophon .ttl { font-family: var(--display); font-size: clamp(1rem, 2.8vh, 1.6rem); line-height: 1.12; }
.colophon .by { font-family: var(--script); font-size: clamp(1rem, 2.6vh, 1.5rem); color: var(--gold-soft); margin-top: 0.5em; }
.colophon .meta { font-family: var(--ui); font-size: clamp(0.55rem,1.2vh,0.7rem); letter-spacing: 0.14em; opacity: 0.7; margin-top: 1.4em; }
.colophon .rule { width: 40px; height: 1px; background: currentColor; opacity: 0.4; margin: 1.1em auto; }
.colophon .price { font-family: var(--display); font-size: clamp(1.05rem, 2.6vh, 1.5rem); margin-top: 0.2em; }
.pg-paper .colophon .price { color: #8a5a1c; }

/* ---------- Echte Innenseiten: Titel, Inhalt, Fließtext ---------- */
.titlepage { margin: auto 0; text-align: center; display: flex; flex-direction: column; gap: 0.6em; }
.titlepage .tp-orn { display: flex; gap: 10px; justify-content: center; margin-bottom: 0.4em; }
.titlepage .tp-title {
  font-family: var(--display); font-weight: 500; line-height: 1.08;
  font-size: clamp(1.2rem, 3.3vh, 2.05rem);
}
.titlepage .tp-sub {
  font-family: var(--display); font-style: italic; font-size: clamp(0.78rem, 1.9vh, 1.05rem);
  color: #6a5c44; line-height: 1.45; max-width: 84%; margin: 0.2em auto 0;
}
.titlepage .tp-author { font-family: var(--script); font-size: clamp(1.1rem, 2.8vh, 1.7rem); color: #b0762e; margin-top: 0.8em; }

.contents { margin: auto 0; width: 100%; }
.contents h3 {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: 0.3em;
  font-size: clamp(0.6rem, 1.4vh, 0.8rem); color: #b07a36; text-align: center; margin-bottom: 1.1em;
}
.toc { display: flex; flex-direction: column; gap: clamp(4px, 1vh, 9px); }
.toc-item {
  display: flex; align-items: baseline; gap: 8px;
  font-family: var(--display); font-size: clamp(0.66rem, 1.55vh, 0.92rem); color: #4a3f5c;
}
.toc-item .no { color: #b0762e; font-variant-numeric: tabular-nums; min-width: 1.4em; }
.toc-item .dots { flex: 1; border-bottom: 1px dotted rgba(74,63,92,0.35); transform: translateY(-3px); }

.chapter-title { margin: auto; text-align: center; display: flex; flex-direction: column; gap: 0.7em; align-items: center; }
.chapter-title .ch-no {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: 0.34em;
  font-size: clamp(0.6rem, 1.4vh, 0.78rem); color: var(--gold-soft);
}
.chapter-title .ch-name {
  font-family: var(--display); font-weight: 500; line-height: 1.12;
  font-size: clamp(1.15rem, 3vh, 1.85rem); max-width: 90%;
}

/* Fließtext-Seiten */
.body-dense {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(0.66rem, 1.55vh, 0.92rem); line-height: 1.46;
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
  margin: 4px 0; flex: 1; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 90%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 90%, transparent 100%);
}
.pg-paper .body-dense { color: #43394f; }
.body-dense.lead::first-letter {
  font-family: var(--display); float: left; font-size: 3.2em; line-height: 0.72;
  padding: 0.04em 0.1em 0 0; color: var(--gold); font-weight: 500;
}
.run-head {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: 0.24em;
  font-size: clamp(0.5rem, 1.05vh, 0.62rem); text-align: center; opacity: 0.5; margin-bottom: 4px;
}
.pg-paper .run-head { color: #8a7a5c; }

/* Große Zitatseiten (Nacht) */
.quote-big {
  margin: auto; text-align: center; font-family: var(--display); font-style: italic;
  font-size: clamp(1rem, 2.7vh, 1.5rem); line-height: 1.4; max-width: 86%;
}
.quote-sub {
  text-align: center; font-family: var(--display); font-size: clamp(0.72rem, 1.7vh, 0.98rem);
  color: rgba(244,242,255,0.78); margin-top: 1em; max-width: 82%; margin-left: auto; margin-right: auto;
  line-height: 1.5;
}


/* ============================================================
   Atmosphäre: Vignette + Grain
   ============================================================ */
/* Katzen-auf-dem-Dach (aus dem Cover) als Vordergrund am unteren Rand */
.rooftop {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  height: clamp(360px, 56vh, 700px); pointer-events: none;
  background-image: url("assets/rooftop.jpg");   /* eigenes Dach-Katzen-Bild */
  background-size: cover;
  background-position: center 50%;     /* mehr von den Katzen (Kopf bis Sitzbasis) */
  /* oben sanft in den (eigenen) Nachthimmel überblenden */
  -webkit-mask: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 13%, #000 32%);
  mask: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 13%, #000 32%);
}
/* leichte Farbangleichung an die dunklere Nacht-Palette */
.rooftop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,15,41,0.40) 0%, rgba(4,9,27,0.22) 60%, rgba(2,5,15,0.18) 100%);
  mix-blend-mode: multiply;
}

.vignette {
  position: fixed; inset: 0; z-index: 6; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 40%, transparent 50%, rgba(4,8,24,0.62) 100%);
}
.grain {
  position: fixed; inset: -50%; z-index: 7; pointer-events: none;
  opacity: 0.04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(6) infinite;
}
@keyframes grain {
  0%,100%{ transform: translate(0,0) } 20%{ transform: translate(-4%,2%) }
  40%{ transform: translate(3%,-3%) } 60%{ transform: translate(-2%,4%) } 80%{ transform: translate(4%,1%) }
}

/* ============================================================
   Loader
   ============================================================ */
.loader {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; gap: 22px;
  align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #16245a 0%, #0a1230 70%);
  color: var(--gold-soft);
  transition: opacity 0.9s ease, visibility 0.9s;
}
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 46px; height: 46px; border-radius: 50%;
  border: 2px solid rgba(244,200,122,0.18);
  border-top-color: var(--gold);
  box-shadow: 0 0 26px rgba(244,200,122,0.45);
  animation: spin 1s linear infinite;
}
.loader-text { font-size: 0.9rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ============================================================
   Topbar (Glas)
   ============================================================ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(18px, 4vw, 54px);
}
.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 600; font-size: 1.2rem; letter-spacing: 0.01em;
}
.brand-mark {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #fff2cd, #ffc578 55%, #ef9a4a);
  box-shadow: 0 0 18px rgba(255,180,96,0.7);
}
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 30px); }
.nav a {
  position: relative; color: var(--ink); text-decoration: none;
  font-size: 0.9rem; opacity: 0.84; transition: opacity 0.2s;
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 1px;
  background: var(--gold); transition: width 0.25s ease;
}
.nav a:not(.btn):hover { opacity: 1; }
.nav a:not(.btn):hover::after { width: 100%; }

.btn {
  --glow: rgba(244,200,122,0.45);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--ui); font-weight: 600; font-size: 0.95rem;
  color: #2a1c05;
  background: linear-gradient(180deg, #ffd98a 0%, #efb45f 100%);
  padding: 13px 26px; border-radius: 999px; text-decoration: none; border: 0; cursor: pointer;
  box-shadow: 0 10px 30px var(--glow), inset 0 1px 0 rgba(255,255,255,0.5);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px var(--glow), inset 0 1px 0 rgba(255,255,255,0.6); }
.btn-small { padding: 10px 18px; font-size: 0.86rem; }
.btn-ghost {
  color: var(--ink); background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.22); box-shadow: none;
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.5); box-shadow: 0 10px 30px rgba(0,0,0,0.25); }

/* ============================================================
   Overlays (scroll-gebundene Textebenen)
   ============================================================ */
.overlays { position: relative; z-index: 20; pointer-events: none; }
.panel {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: min(440px, 86vw); padding: 0 clamp(18px, 4vw, 40px);
  opacity: 0; will-change: opacity, transform;
  pointer-events: none;   /* per JS aktiviert, nur wenn sichtbar */
}
.panel.left  { left: clamp(18px, 5vw, 70px); }
.panel.right { right: clamp(18px, 5vw, 70px); text-align: right; }
.panel.hero  { left: clamp(18px, 6vw, 88px); width: min(560px, 90vw); }
.panel.cta {
  left: clamp(18px, 6vw, 88px); text-align: left; width: min(600px, 56vw);
}
/* Finaler Bestell-Bereich – bewusst größer */
.panel.cta .eyebrow { font-size: clamp(0.82rem, 1.1vw, 1rem); letter-spacing: 0.32em; margin-bottom: 20px; }
.panel.cta h2 { font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: 1.08; margin-bottom: 20px; }
.panel.cta .price { font-size: clamp(1.05rem, 1.45vw, 1.35rem); margin-top: 12px; }
.panel.cta .price strong { font-size: clamp(1.9rem, 2.6vw, 2.4rem); }
.panel.cta .cta-row { gap: 18px; margin: 32px 0 18px; }
.panel.cta .btn { font-size: clamp(1.02rem, 1.25vw, 1.2rem); padding: 17px 34px; border-radius: 999px; }
.panel.cta .reassure { font-size: clamp(0.9rem, 1.05vw, 1.05rem); line-height: 1.6; }

.eyebrow, .kicker {
  font-family: var(--ui); text-transform: uppercase;
  letter-spacing: 0.28em; font-size: 0.72rem; font-weight: 600;
  color: var(--gold); margin-bottom: 16px;
}
.kicker { color: var(--violet); letter-spacing: 0.22em; }

.display { font-family: var(--display); font-weight: 500; font-optical-sizing: auto; }
.script-accent { font-family: var(--script); font-weight: 600; color: var(--gold-soft); }
.panel h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.01em;
  margin-bottom: 22px; text-shadow: 0 10px 50px rgba(0,0,0,0.45);
}
.panel h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.01em;
  margin-bottom: 16px; text-shadow: 0 8px 40px rgba(0,0,0,0.45);
}
.panel p, .panel .lede { font-size: clamp(0.98rem, 1.3vw, 1.16rem); line-height: 1.66; color: var(--muted); }
.panel .lede { max-width: 480px; }
.panel.cta .lede { margin: 0 auto; }

.scrollhint {
  margin-top: 36px; display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.scrollhint .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 0 0 rgba(244,200,122,0.6);
  animation: pulse 2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(244,200,122,0.55) } 70% { box-shadow: 0 0 0 14px rgba(244,200,122,0) }
  100% { box-shadow: 0 0 0 0 rgba(244,200,122,0) }
}

.price { margin-top: 8px; color: var(--muted); }
.price strong { font-family: var(--display); font-size: 1.5rem; color: var(--gold-soft); }
.cta-row { display: flex; gap: 14px; justify-content: flex-start; margin: 26px 0 16px; flex-wrap: wrap; }
.reassure { font-size: 0.82rem; color: rgba(234,230,255,0.55); }

/* Fortschritt */
.progress {
  position: fixed; left: 0; right: 0; bottom: 0; height: 3px;
  background: rgba(255,255,255,0.08); z-index: 30;
}
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--violet));
  box-shadow: 0 0 18px rgba(244,200,122,0.7);
}

@media (max-width: 720px) {
  .nav a:not(.btn) { display: none; }
  .panel.right { text-align: left; right: auto; left: clamp(18px,5vw,70px); }
  :root { --ph: clamp(300px, 56vh, 520px); }
}
@media (prefers-reduced-motion: reduce) {
  .grain, .loader-ring, .scrollhint .dot, .lantern { animation: none; }
}

/* ============================================================
   Zugänglichkeit: Skip-Link & Fokus
   ============================================================ */
.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 100;
  background: var(--gold); color: #2a1c05;
  padding: 10px 18px; border-radius: 8px;
  font-family: var(--ui); font-weight: 600; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* Marke als Link */
.brand { text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--display); font-weight: 600; }
@media (max-width: 720px) { .brand-name { display: none; } }

/* ============================================================
   Scroll-Treiber + Übergang Erlebnis → Inhalt
   ============================================================ */
.experience { position: relative; z-index: 0; height: 820vh; pointer-events: none; }

.scene-3d, .rooftop, .overlays, .progress { transition: opacity 0.6s ease; }
body.reading .scene-3d,
body.reading .rooftop,
body.reading .overlays,
body.reading .progress { opacity: 0 !important; pointer-events: none !important; }
body.reading .shader-bg { opacity: 0.08; }
body.reading .topbar {
  background: rgba(6, 10, 26, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   Inhalt (echte, gescrollte Bereiche)
   ============================================================ */
.site {
  position: relative; z-index: 10;
  background: linear-gradient(180deg,
    rgba(4, 8, 22, 0) 0%, rgba(4, 8, 22, 0.5) 7%,
    rgba(3, 6, 18, 0.86) 26%, rgba(2, 4, 14, 0.95) 100%);
}
.wrap { width: min(1080px, 90vw); margin: 0 auto; }
.wrap-narrow { width: min(760px, 90vw); }
.sect { padding: clamp(64px, 12vh, 140px) 0; }

.sect-eyebrow {
  font-family: var(--ui); text-transform: uppercase; letter-spacing: 0.28em;
  font-size: 0.74rem; font-weight: 600; color: var(--gold); margin-bottom: 14px;
}
.sect-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem); line-height: 1.1;
  letter-spacing: -0.01em; color: var(--ink); max-width: 24ch;
}
.sect-lead {
  font-size: clamp(1.02rem, 1.3vw, 1.2rem); line-height: 1.7;
  color: var(--muted); margin-top: 20px; max-width: 62ch;
}
.sect-lead strong { color: var(--gold-soft); font-weight: 600; }

/* Reveal beim Einscrollen (per IntersectionObserver umgeschaltet) */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1), transform 0.7s cubic-bezier(0.2,0.7,0.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* --- Über das Buch: Feature-Karten --- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 44px; }
.feature {
  padding: 26px 24px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(244, 200, 122, 0.4); background: rgba(255, 255, 255, 0.06); }
.feature-ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.15rem; color: #2a1c05;
  background: radial-gradient(circle at 50% 40%, #fff2cd, #ffc578 55%, #ef9a4a);
  box-shadow: 0 0 20px rgba(255, 180, 96, 0.5); margin-bottom: 16px;
}
.feature h3 { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin-bottom: 8px; }
.feature p { font-size: 0.96rem; line-height: 1.6; color: var(--muted); }

/* --- Leseprobe --- */
.excerpt { margin-top: 30px; max-width: 64ch; font-family: var(--display); color: rgba(234, 230, 255, 0.9); }
.excerpt p { font-size: clamp(1rem, 1.25vw, 1.16rem); line-height: 1.8; margin-bottom: 1.1em; }
.excerpt-lead::first-letter { font-family: var(--display); float: left; font-size: 3.4em; line-height: 0.72; padding: 0.05em 0.12em 0 0; color: var(--gold); font-weight: 500; }
.excerpt-quote { font-style: italic; color: var(--gold-soft); border-left: 2px solid rgba(244, 200, 122, 0.5); padding-left: 20px; }
.excerpt-more { margin-top: 26px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.excerpt-hint { font-size: 0.9rem; color: var(--muted); }
.excerpt a, .faq a, .stimmen-invite a, .footer-note a, .legal a { color: var(--gold-soft); }

/* --- Über die Autorin --- */
.author-wrap { display: grid; grid-template-columns: 200px 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.author-portrait {
  width: 200px; height: 200px; border-radius: 50%; display: grid; place-items: center;
  object-fit: cover; object-position: 50% 40%;
  background: radial-gradient(circle at 50% 35%, #24356e, #0c1636 70%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), inset 0 0 40px rgba(120, 150, 255, 0.15);
}
.author-initial { font-family: var(--display); font-size: 3.4rem; color: var(--gold-soft); letter-spacing: 0.04em; }
.author-ded {
  font-family: var(--display); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.5; color: var(--gold-soft); margin-top: 22px; padding-left: 20px;
  border-left: 2px solid rgba(244, 200, 122, 0.5);
}
@media (max-width: 720px) { .author-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } .author-ded { text-align: left; } }

/* --- Stimmen --- */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 40px; }
.pullquote { position: relative; padding: 40px 28px 30px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.10); }
.pullquote::before { content: "\201C"; position: absolute; top: 8px; left: 18px; font-family: var(--display); font-size: 3.4rem; color: rgba(244, 200, 122, 0.45); line-height: 1; }
.pullquote blockquote { font-family: var(--display); font-style: italic; font-size: 1.1rem; line-height: 1.55; color: rgba(234, 230, 255, 0.92); }
.stimmen-invite { margin-top: 30px; font-size: 0.98rem; color: var(--muted); }

/* --- Details --- */
.spec { margin-top: 34px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 16px; overflow: hidden; }
.spec > div { display: flex; justify-content: space-between; gap: 16px; padding: 16px 22px; background: rgba(8, 12, 30, 0.6); }
.spec dt { color: var(--muted); font-size: 0.92rem; }
.spec dd { color: var(--ink); font-weight: 500; text-align: right; }
@media (max-width: 560px) { .spec { grid-template-columns: 1fr; } }

/* --- FAQ --- */
.faq { margin-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.faq details { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font-family: var(--display); font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--gold); transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); line-height: 1.7; max-width: 64ch; }

/* --- Bestellen --- */
.order-wrap { display: grid; grid-template-columns: minmax(240px, 360px) 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.order-cover img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06); transform: perspective(1000px) rotateY(-8deg); transition: transform 0.5s ease; }
.order-cover img:hover { transform: perspective(1000px) rotateY(0deg) translateY(-4px); }
.order-price { display: flex; align-items: baseline; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.order-price strong { font-family: var(--display); font-size: 2.4rem; color: var(--gold-soft); }
.order-price span { color: var(--muted); }
.order-cta { margin: 26px 0 14px; }
.order-reassure { font-size: 0.9rem; color: rgba(234, 230, 255, 0.55); }
.btn-lg { font-size: 1.1rem; padding: 17px 38px; }
@media (max-width: 720px) { .order-wrap { grid-template-columns: 1fr; justify-items: center; text-align: center; } .order-cover { max-width: 260px; } .order-price, .share { justify-content: center; } }

/* --- Teilen --- */
.share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.share-label { font-size: 0.85rem; color: var(--muted); margin-right: 4px; }
.share-btn { font-family: var(--ui); font-size: 0.86rem; color: var(--ink); background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px; padding: 9px 16px; cursor: pointer; text-decoration: none; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.share-btn:hover { border-color: rgba(244, 200, 122, 0.5); background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.share-btn.copied { border-color: var(--gold); color: var(--gold-soft); }

/* --- Footer --- */
.site-footer { position: relative; z-index: 10; background: rgba(2, 4, 12, 0.96); border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 46px 0; }
.footer-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 1rem; color: var(--ink); }
.footer-brand .brand-mark { width: 20px; height: 20px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; transition: color 0.2s; }
.footer-nav a:hover { color: var(--gold-soft); }
.footer-copy { width: 100%; color: rgba(234, 230, 255, 0.4); font-size: 0.82rem; line-height: 1.6; margin-top: 8px; }
.footer-note { color: rgba(234, 230, 255, 0.32); }

/* --- Zurück nach oben --- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(6, 10, 26, 0.7);
  color: var(--gold-soft); font-size: 1.2rem; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, border-color 0.2s;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
body.reading .to-top { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: rgba(244, 200, 122, 0.6); }

/* ============================================================
   Rechtstexte (impressum.html / datenschutz.html)
   ============================================================ */
.legal { position: relative; z-index: 10; width: min(760px, 90vw); margin: 0 auto; padding: 120px 0 90px; }
.legal .back { display: inline-block; margin-bottom: 30px; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.legal .back:hover { color: var(--gold-soft); }
.legal h1 { font-family: var(--display); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 8px; color: var(--ink); }
.legal h2 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: 34px 0 10px; color: var(--gold-soft); }
.legal p, .legal li { color: var(--muted); line-height: 1.7; margin-bottom: 12px; font-size: 1rem; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal .todo { color: #ffce8a; background: rgba(244, 200, 122, 0.10); border: 1px dashed rgba(244, 200, 122, 0.4); border-radius: 6px; padding: 1px 7px; font-size: 0.92em; }
.legal .muted-note { font-size: 0.85rem; color: rgba(234, 230, 255, 0.45); margin-top: 44px; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition-duration: 0.001s; transform: none; }
  .order-cover img { transform: none; }
  .to-top { transition: none; }
}
