/* ===========================================================
   merle.stuttgart-birkach.de — Design System
   =========================================================== */

:root {
  --bg: #0c0a09;
  --bg-soft: #15110f;
  --bg-card: #1b1614;
  --ink: #f5efe6;
  --ink-soft: #b8ada0;
  --ink-mute: #847868;
  --accent: #d97757;          /* warm pferde-leder */
  --accent-2: #e8c07d;        /* heu-gold */
  --accent-3: #6a8e7f;        /* moos-grün */
  --danger: #b94a3a;
  --line: rgba(245, 239, 230, 0.08);
  --line-strong: rgba(245, 239, 230, 0.18);
  --doc-bg: #f6f1e8;
  --doc-ink: #1a1612;
}

html.light {
  --bg: #f3ece0;
  --bg-soft: #e8dfcc;
  --bg-card: #fbf5e8;
  --ink: #1c160f;
  --ink-soft: #4c4233;
  --ink-mute: #847868;
  --accent: #b85a3a;
  --accent-2: #b48946;
  --accent-3: #4a6e5e;
  --danger: #9a3a2c;
  --line: rgba(28, 22, 15, 0.10);
  --line-strong: rgba(28, 22, 15, 0.22);
  --serif: "Fraunces", "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;
  --radius: 18px;
  --shadow: 0 30px 60px -30px rgba(0,0,0,0.8), 0 8px 24px -16px rgba(0,0,0,0.6);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--accent); color: var(--bg); }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } .custom-cursor { display: none !important; } }

/* film grain overlay */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

/* custom cursor */
.custom-cursor {
  position: fixed; top: 0; left: 0;
  width: 28px; height: 28px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease), width 0.2s var(--ease), height 0.2s var(--ease), background 0.2s var(--ease);
}
.custom-cursor.dot { width: 6px; height: 6px; background: var(--ink); }
.custom-cursor.hover { width: 56px; height: 56px; background: var(--accent); border-color: var(--accent); mix-blend-mode: normal; opacity: 0.85; }

/* ===== typography ===== */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
h1 { font-size: clamp(3rem, 9vw, 8.5rem); }
h2 { font-size: clamp(2.2rem, 5.5vw, 4.5rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
h4 { font-size: clamp(1.1rem, 1.5vw, 1.35rem); }
p { color: var(--ink-soft); font-size: 1.05rem; max-width: 64ch; }
p.lead { font-size: 1.3rem; color: var(--ink); max-width: 56ch; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
a.link { border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
a.link:hover { color: var(--accent); border-color: var(--accent); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--ink-mute);
}
.eyebrow.accent { color: var(--accent); }

/* ===== nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.4rem 2.4rem;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  background: linear-gradient(to bottom, rgba(12,10,9,0.7), rgba(12,10,9,0.1));
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s, background 0.4s;
}
.nav.scrolled { border-color: var(--line); background: rgba(12,10,9,0.85); }
.nav-brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-style: italic;
  display: flex; align-items: center; gap: 0.6rem;
}
.nav-brand .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.4; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
.nav-menu { display: flex; gap: 2rem; list-style: none; }
.nav-menu a {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-soft);
  position: relative;
  padding: 0.3rem 0;
}
.nav-menu a::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-menu a:hover { color: var(--ink); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }
.nav-menu a.active { color: var(--ink); }
@media (max-width: 820px) {
  .nav { padding: 1rem 1.2rem; }
  .nav-menu { gap: 0.9rem; flex-wrap: wrap; justify-content: flex-end; }
  .nav-menu a { font-size: 0.65rem; letter-spacing: 0.1em; }
}

/* ===== container ===== */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 2.4rem; }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding: 0 2.4rem; }
section { padding: 8rem 0; position: relative; }
@media (max-width: 720px) { section { padding: 5rem 0; } .wrap, .wrap-narrow { padding: 0 1.4rem; } }

/* ===== hero (homepage) ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  position: relative;
  padding-top: 7rem;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url("/img/IMG_0543_lg.jpg");
  background-size: cover; background-position: center 30%;
  filter: grayscale(0.6) contrast(1.05) brightness(0.5);
  z-index: 0;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, transparent 0%, var(--bg) 80%);
}
.hero-inner { position: relative; z-index: 2; }
.hero h1 {
  font-style: italic;
  max-width: 14ch;
}
.hero h1 .glow {
  background: linear-gradient(120deg, var(--accent-2), var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .sub {
  font-family: var(--mono);
  margin-top: 2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.hero-scroll {
  position: absolute; bottom: 2.4rem; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.7rem; letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-mute);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
}
.hero-scroll::after {
  content: "";
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--ink-mute), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line { 0%,100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }

/* ===== marquee thesis line ===== */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.4rem 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: var(--ink-soft);
}
.marquee-track {
  display: inline-block;
  animation: scroll-left 40s linear infinite;
  padding-left: 100%;
}
.marquee-track span { padding: 0 2rem; }
.marquee-track span::after { content: "✦"; color: var(--accent); padding-left: 2rem; }
@keyframes scroll-left { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

/* ===== chapter intro / split ===== */
.chapter-num {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: 2.5rem; } }

.split-content h2 { margin-bottom: 1.6rem; }
.split-content .eyebrow { display: block; margin-bottom: 1.2rem; }

.figure {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.figure img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease); }
.figure:hover img { transform: scale(1.04); }
.figure .caption {
  position: absolute; left: 1rem; bottom: 1rem;
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  background: rgba(12,10,9,0.7); color: var(--ink);
  padding: 0.4rem 0.7rem; border-radius: 4px;
  backdrop-filter: blur(6px);
}
.figure.duotone img {
  filter: grayscale(1) contrast(1.15) brightness(0.95);
  mix-blend-mode: luminosity;
}
.figure.duotone { background: linear-gradient(135deg, var(--accent), var(--bg-soft)); }

/* ===== card grid ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 880px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.4s var(--ease), border-color 0.4s, background 0.4s;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card .num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 1rem;
  display: block;
}
.card h3 { margin-bottom: 0.8rem; }
.card p { font-size: 0.95rem; }
.card.glow::before {
  content: "";
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent, var(--accent), transparent 40%);
  opacity: 0;
  transition: opacity 0.4s;
}
.card.glow:hover::before { opacity: 0.12; }
.card > * { position: relative; z-index: 1; }

/* ===== big quote ===== */
.quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
  line-height: 1.2;
  max-width: 28ch;
  margin: 0 auto;
  text-align: center;
}
.quote::before, .quote::after { color: var(--accent); }
.quote cite {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 2rem;
}

/* ===== escalation timeline (Gegen-Seite) ===== */
.timeline { position: relative; padding-left: 2.6rem; }
.timeline::before {
  content: "";
  position: absolute; left: 0.7rem; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--accent-3), var(--accent-2), var(--accent), var(--danger));
}
.timeline-item { position: relative; padding-bottom: 4rem; }
.timeline-item::before {
  content: "";
  position: absolute; left: -2.6rem; top: 0.4rem;
  width: 16px; height: 16px;
  background: var(--bg);
  border: 2px solid var(--accent);
  border-radius: 50%;
  transition: background 0.3s, transform 0.3s;
}
.timeline-item:hover::before { background: var(--accent); transform: scale(1.3); }
.timeline-item .level {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}
.timeline-item h3 { margin: 0.5rem 0 0.8rem; }

/* ===== gallery ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  grid-auto-rows: 140px;
}
.gallery .g {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: none;
}
.gallery .g img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.4s;
}
.gallery .g:hover img { transform: scale(1.05); filter: brightness(1.15) saturate(1.2); }
.gallery .g::after {
  content: attr(data-cap);
  position: absolute; left: 0.8rem; bottom: 0.8rem;
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink);
  opacity: 0; transition: opacity 0.3s;
  background: rgba(0,0,0,0.55); padding: 0.3rem 0.55rem; border-radius: 3px;
}
.gallery .g:hover::after { opacity: 1; }
.g1 { grid-column: span 6; grid-row: span 3; }
.g2 { grid-column: span 3; grid-row: span 2; }
.g3 { grid-column: span 3; grid-row: span 2; }
.g4 { grid-column: span 4; grid-row: span 2; }
.g5 { grid-column: span 4; grid-row: span 2; }
.g6 { grid-column: span 4; grid-row: span 2; }
.g7 { grid-column: span 6; grid-row: span 3; }
.g8 { grid-column: span 6; grid-row: span 3; }
@media (max-width: 720px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 90px; }
  .g1, .g7, .g8 { grid-column: span 4; grid-row: span 3; }
  .g2, .g3, .g4, .g5, .g6 { grid-column: span 2; grid-row: span 2; }
}

/* ===== document (attest page) ===== */
.doc {
  background: #f6f1e8;
  color: #1a1612;
  border-radius: var(--radius);
  padding: 3.5rem;
  font-family: var(--serif);
  position: relative;
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
}
.doc::before {
  content: "BEISPIEL · KEIN ECHTES DOKUMENT";
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: rgba(26,22,18,0.4);
}
.doc .header { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(26,22,18,0.15); margin-bottom: 1.6rem; }
.doc .header h4 { font-size: 1.2rem; line-height: 1.3; }
.doc .header small { font-family: var(--mono); font-size: 0.7rem; color: rgba(26,22,18,0.6); }
.doc .row { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; margin: 0.5rem 0; font-size: 0.95rem; }
.doc .row .k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.15em; color: rgba(26,22,18,0.55); text-transform: uppercase; padding-top: 4px; }
.doc .row .v { color: #1a1612; }
.doc .stamp {
  margin-top: 2rem;
  border: 2px solid rgba(185,74,58,0.55);
  color: rgba(185,74,58,0.85);
  padding: 0.8rem 1.4rem;
  display: inline-block;
  transform: rotate(-4deg);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ===== facts strip ===== */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts .f { padding: 2rem; border-right: 1px solid var(--line); }
.facts .f:last-child { border-right: 0; }
.facts .n { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; color: var(--accent-2); }
.facts .l { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-mute); margin-top: 0.6rem; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr 1fr; } .facts .f:nth-child(2) { border-right: 0; } .facts .f:nth-child(1), .facts .f:nth-child(2) { border-bottom: 1px solid var(--line); } }

/* ===== footer ===== */
footer {
  border-top: 1px solid var(--line);
  padding: 4rem 0 2rem;
  background: var(--bg-soft);
}
footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; align-items: start; }
footer h4 { font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1.2rem; font-weight: 500; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 0.6rem; font-size: 0.9rem; }
footer ul li a { color: var(--ink-soft); transition: color 0.2s; }
footer ul li a:hover { color: var(--accent); }
footer .bottom { border-top: 1px solid var(--line); margin-top: 3rem; padding-top: 1.6rem; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-mute); letter-spacing: 0.15em; }
footer .secret-link { cursor: none; }
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; } footer .bottom { flex-direction: column; gap: 0.5rem; } }

/* ===== reveal animations (only when JS is on) ===== */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 1rem 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.2em;
  text-transform: uppercase;
  background: transparent; color: var(--ink);
  transition: all 0.3s var(--ease);
  cursor: none;
}
.btn:hover { background: var(--ink); color: var(--bg); transform: translateY(-2px); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn.solid:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn svg { width: 14px; height: 14px; }

/* ===== sound toggle ===== */
.sound-toggle {
  position: fixed; bottom: 1.6rem; right: 1.6rem;
  width: 52px; height: 52px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 80;
  cursor: none;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}
.sound-toggle:hover { background: var(--accent); border-color: var(--accent); }
.sound-toggle svg { width: 20px; height: 20px; color: var(--ink); }
.sound-toggle.on::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: ring 2s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(0.8); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }

/* ===== easter egg modal ===== */
.modal {
  position: fixed; inset: 0;
  background: rgba(12,10,9,0.85);
  backdrop-filter: blur(12px);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
  padding: 2rem;
}
.modal.open { display: flex; }
.modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 3rem;
  max-width: 480px;
  text-align: center;
  position: relative;
}
.modal-inner h3 { margin-bottom: 1rem; }
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: transparent; border: 0; color: var(--ink-mute);
  font-family: var(--mono); font-size: 0.8rem;
  cursor: none;
}

/* ===== easter egg: hidden horse silhouette in corner ===== */
.horse-egg {
  position: fixed;
  left: 0.5rem;
  bottom: 0.5rem;
  width: 32px; height: 32px;
  opacity: 0.06;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 50;
  cursor: none;
}
.horse-egg:hover { opacity: 1; transform: scale(1.2) rotate(-8deg); }

/* ===== utility ===== */
.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  margin-right: 0.4rem;
}
.divider { height: 1px; background: var(--line); margin: 5rem 0; }
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; } .mt-4 { margin-top: 4rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }

/* ===== page hero (subpages) ===== */
.page-hero {
  min-height: 70vh;
  display: flex; align-items: flex-end;
  padding: 10rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: grayscale(0.7) brightness(0.45) contrast(1.05);
}
.page-hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 5%, transparent 70%);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { font-style: italic; max-width: 18ch; }
.page-hero .crumb { display: flex; gap: 0.7rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1.5rem; }
.page-hero .crumb a:hover { color: var(--accent); }
.page-hero .crumb span { color: var(--ink-mute); }

/* ===== reading content ===== */
.prose { max-width: 68ch; margin: 0 auto; }
.prose h2 { margin: 4rem 0 1.4rem; }
.prose h3 { margin: 3rem 0 1rem; }
.prose p { margin-bottom: 1.2rem; font-size: 1.05rem; line-height: 1.75; }
.prose p.lead { margin-bottom: 2rem; }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.3rem 0 0.3rem 1.6rem;
  margin: 2rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.4rem;
  color: var(--ink);
}
.prose ul, .prose ol { margin: 1rem 0 1.6rem 1.4rem; }
.prose li { color: var(--ink-soft); margin-bottom: 0.5rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 4rem 0; }

/* easter egg flash */
@keyframes flash { 0% { background: var(--bg); } 50% { background: var(--accent); } 100% { background: var(--bg); } }
body.flash { animation: flash 0.4s; }

/* ===== progress bar ===== */
.progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 200;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px var(--accent);
}

/* ===== theme toggle ===== */
.theme-toggle {
  position: fixed; bottom: 1.6rem; right: 5.4rem;
  width: 52px; height: 52px;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  z-index: 80;
  cursor: none;
  transition: all 0.3s;
  color: var(--ink);
}
.theme-toggle:hover { background: var(--accent-2); color: var(--bg); }
.theme-toggle svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .theme-toggle { right: 4.4rem; width: 42px; height: 42px; bottom: 1rem; }
  .sound-toggle { width: 42px; height: 42px; bottom: 1rem; right: 1rem; }
}

/* ===== 3D tilt cards ===== */
.tilt { transition: transform 0.2s var(--ease); transform-style: preserve-3d; will-change: transform; }
.tilt-inner { transition: transform 0.2s var(--ease); transform: translateZ(20px); }

/* ===== accordion ===== */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-q {
  padding: 1.6rem 0;
  cursor: none;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem;
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.3;
  transition: color 0.2s;
}
.acc-q:hover { color: var(--accent); }
.acc-q .plus {
  font-family: var(--mono); font-size: 0.9rem;
  color: var(--ink-mute);
  flex-shrink: 0; padding-top: 0.3rem;
  transition: transform 0.3s var(--ease);
}
.acc-item.open .acc-q .plus { transform: rotate(45deg); color: var(--accent); }
.acc-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.acc-body-inner { padding: 0 0 1.6rem; color: var(--ink-soft); max-width: 64ch; }
.acc-item.open .acc-body { max-height: 800px; }

/* ===== quiz ===== */
.quiz {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3rem;
  min-height: 480px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative;
}
.quiz-progress { display: flex; gap: 0.4rem; margin-bottom: 2rem; }
.quiz-progress span {
  flex: 1; height: 3px;
  background: var(--line);
  border-radius: 2px;
  transition: background 0.3s;
}
.quiz-progress span.done { background: var(--accent); }
.quiz-progress span.current { background: var(--accent-2); }
.quiz-question { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; margin-bottom: 0.8rem; }
.quiz-hint { color: var(--ink-mute); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 2rem; }
.quiz-options { display: grid; gap: 0.8rem; }
.quiz-option {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 1.2rem 1.4rem;
  border-radius: 12px;
  text-align: left;
  font-family: var(--sans); font-size: 1rem;
  cursor: none;
  transition: all 0.25s var(--ease);
}
.quiz-option:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); transform: translateX(4px); }
.quiz-result {
  text-align: center;
}
.quiz-result .verdict {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.1;
  margin-bottom: 1.4rem;
  color: var(--accent);
}
.quiz-restart { margin-top: 2rem; }
@media (max-width: 640px) { .quiz { padding: 1.8rem; } }

/* ===== letter (handwriting feel) ===== */
.letter {
  background: var(--doc-bg);
  color: var(--doc-ink);
  border-radius: var(--radius);
  padding: 4rem 3.5rem;
  font-family: "Caveat", "Bradley Hand", cursive;
  font-size: 1.5rem;
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  position: relative;
  background-image:
    linear-gradient(var(--doc-bg) 39px, rgba(122,90,40,0.18) 40px),
    linear-gradient(135deg, rgba(122,90,40,0.08), transparent 60%);
  background-size: 100% 40px, 100% 100%;
  background-position: 0 1.6rem, 0 0;
}
.letter::before {
  content: "";
  position: absolute; left: 3rem; top: 0; bottom: 0;
  width: 1px; background: rgba(185,74,58,0.4);
}
.letter h3 { font-family: inherit; font-size: 2.2rem; margin-bottom: 1.4rem; color: var(--doc-ink); }
.letter p { color: var(--doc-ink); max-width: none; margin-bottom: 1.2rem; font-size: 1.5rem; }
.letter .sig { margin-top: 2.4rem; font-size: 2rem; }
.letter .ps { margin-top: 1.5rem; font-size: 1.25rem; color: rgba(26,22,18,0.7); }
@media (max-width: 640px) { .letter { padding: 2.5rem 1.6rem; font-size: 1.25rem; } .letter::before { display: none; } .letter p { font-size: 1.25rem; } }

/* ===== history timeline (horizontal-ish) ===== */
.history-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}
.history-item:last-child { border-bottom: 1px solid var(--line); }
.history-item .year {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--accent-2);
  line-height: 1;
}
.history-item h3 { margin-bottom: 0.8rem; }
.history-item .meta { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 0.4rem; }
@media (max-width: 720px) { .history-item { grid-template-columns: 1fr; gap: 0.6rem; } }

/* ===== glossary ===== */
.gloss-letter { font-family: var(--serif); font-style: italic; font-size: clamp(3rem, 5vw, 5rem); color: var(--accent); margin: 3rem 0 1rem; line-height: 1; }
.gloss-item { padding: 1.4rem 0; border-top: 1px solid var(--line); }
.gloss-item:last-child { border-bottom: 1px solid var(--line); }
.gloss-item dt { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--ink); }
.gloss-item dd { color: var(--ink-soft); max-width: 70ch; font-size: 0.95rem; }
.gloss-item .ref { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.2em; color: var(--ink-mute); text-transform: uppercase; margin-left: 0.6rem; }

/* ===== horse profile / steckbrief ===== */
.steckbrief {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.5rem;
}
.steckbrief dl { display: grid; grid-template-columns: 140px 1fr; gap: 0.8rem 1.4rem; }
.steckbrief dt { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mute); padding-top: 4px; }
.steckbrief dd { color: var(--ink); font-family: var(--serif); font-size: 1.1rem; }
@media (max-width: 520px) { .steckbrief dl { grid-template-columns: 1fr; gap: 0.2rem 0; } .steckbrief dd { margin-bottom: 0.8rem; } }

/* ===== heuregen (rain) ===== */
.heu-piece {
  position: fixed;
  top: -30px;
  width: 3px; height: 16px;
  background: var(--accent-2);
  border-radius: 1px;
  z-index: 150;
  pointer-events: none;
  animation: heu-fall linear forwards;
}
@keyframes heu-fall {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ===== galopp loader ===== */
.galopp {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.galopp.on { opacity: 1; }
.galopp svg { width: 120px; height: 120px; color: var(--accent); animation: gallop 0.6s ease-in-out infinite; }
@keyframes gallop {
  0%, 100% { transform: translateX(-100px) scale(1); }
  50% { transform: translateX(100px) scale(1.05); }
}

/* ===== running horse on M-doubleclick ===== */
.running-horse {
  position: fixed;
  left: -200px; bottom: 30vh;
  width: 100px; height: 100px;
  z-index: 100;
  pointer-events: none;
  color: var(--accent);
  animation: run-across 2.5s linear forwards;
}
@keyframes run-across {
  0% { left: -200px; transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
  100% { left: 110vw; transform: rotate(-2deg); }
}

/* ===== print ===== */
@media print {
  body { background: #fff; color: #000; cursor: auto; }
  body::after, .custom-cursor, .nav, footer, .sound-toggle, .theme-toggle, .horse-egg, .progress { display: none !important; }
  .page-hero, .hero { min-height: auto; padding: 1rem 0; }
  .page-hero-bg, .hero-bg { display: none; }
  .prose { max-width: 100%; color: #000; }
  .prose p, .prose li { color: #222; }
  .doc { box-shadow: none; border: 1px solid #ccc; }
  a { color: #000; text-decoration: underline; }
  .marquee, .marquee-track { display: none; }
}

/* ===== reveal animations safety: also show after delay no matter what ===== */
.js .reveal { animation: reveal-safety 0.01s 3s forwards; }
@keyframes reveal-safety { to { opacity: 1; transform: translateY(0); } }

/* ===== quiz card variant in homepage ===== */
.cta-card {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
  padding: 3rem;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: "";
  position: absolute; top: -50%; right: -20%;
  width: 60%; height: 200%;
  background: radial-gradient(circle, rgba(245,239,230,0.2), transparent 60%);
}
.cta-card h2 { font-style: italic; max-width: 18ch; }
.cta-card p { color: rgba(12,10,9,0.85); max-width: 38ch; margin-top: 1rem; }
.cta-card .btn { background: var(--bg); color: var(--ink); border-color: transparent; margin-top: 2rem; }
.cta-card .btn:hover { background: var(--bg-soft); color: var(--ink); }

/* secret page */
.secret {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 4rem 2rem;
}
.secret h1 { font-style: italic; color: var(--accent); }
.secret .pixel-horse { font-family: var(--mono); white-space: pre; line-height: 1; font-size: 0.7rem; color: var(--accent-2); margin: 2rem auto; }
