/* ==========================================================================
   Komponenten
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-fog);
  --btn-border: color-mix(in srgb, var(--c-fog) 38%, transparent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.35em;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-s);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-med) var(--ease-out);
}
.btn:hover { --btn-border: var(--c-fog); color: var(--btn-fg); }
.btn--primary { --btn-bg: var(--c-gold); --btn-fg: var(--c-night); --btn-border: var(--c-gold); }
.btn--primary:hover { --btn-bg: #f3c989; --btn-border: #f3c989; }
.btn[disabled] { opacity: 0.55; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-s); }

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.12em 0.45em;
  border: 1px solid var(--c-slate-2);
  border-bottom-width: 2px;
  border-radius: var(--radius-s);
  background: var(--c-slate);
  font-family: var(--font-sans);
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: var(--c-fog-soft);
}

/* ---------- Kopfleiste ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background var(--dur-med), backdrop-filter var(--dur-med), border-color var(--dur-med);
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled {
  background: color-mix(in srgb, var(--c-night) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--c-slate-2);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-l);
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--space-s) var(--gutter);
  min-height: 4rem;
}
/* Wortmarke „Jens Papp“ – identisch oben in der Leiste und groß unter dem Video.
   Die Konturstärke wächst mit der Schriftgröße (em), dadurch ist die kleine Version
   eine maßstabsgetreue Verkleinerung der großen. */
.name-mark {
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--c-fog);
}
.name-mark span { display: inline-block; white-space: nowrap; }
.name-mark span + span { color: transparent; -webkit-text-stroke: max(0.6px, 0.014em) var(--c-fog); }

.topbar__brand {
  font-size: 1.5rem;
  text-decoration: none;
  white-space: nowrap;
}
.topbar__brand:hover { color: var(--c-fog); opacity: 0.8; }
.topbar__links {
  display: flex;
  gap: var(--space-m);
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}
.topbar__links a { text-decoration: none; color: var(--c-fog-soft); padding-block: 0.4rem; }
.topbar__links a:hover, .topbar__links a[aria-current="true"] { color: var(--c-fog); }
.topbar__tools { display: flex; gap: var(--space-xs); align-items: center; }

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1px solid var(--c-slate-2);
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--c-night) 55%, transparent);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--c-fog-soft);
  cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast), background var(--dur-fast);
}
.tool-btn:hover { color: var(--c-fog); border-color: var(--c-stone); }
.tool-btn svg { width: 1rem; height: 1rem; flex: none; }
.tool-btn[aria-pressed="true"] { color: var(--c-night); background: var(--c-gold); border-color: var(--c-gold); }
.tool-btn kbd { border: 0; background: none; padding: 0; min-width: 0; font-size: inherit; color: inherit; }
.tool-btn .label-mobile { display: none; }

@media (max-width: 60rem) {
  .topbar__links { display: none; }
  .topbar__tools { margin-left: auto; }
  .tool-btn .label-desktop { display: none; }
  .tool-btn .label-mobile { display: inline; }
}

/* ---------- Hero: Kamerabild einer Drohne ---------- */
/* Aufbau: oben das Video als ungestörtes Kamerabild im Rahmen (nur OSD im Bild),
   darunter Name, Satz und Buttons auf der ruhigen Seitenfläche. */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--c-night);
  padding: calc(4.5rem + var(--space-s)) var(--gutter) 0;
}
.hero__frame {
  position: relative;
  height: max(20rem, calc(100svh - 4.5rem - var(--space-s) - 15rem));
  max-height: 58rem;
  overflow: hidden;
  border-radius: var(--radius-m);
  background: var(--c-slate);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__frame .osd { inset: 0; z-index: 2; }
.hero__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s var(--ease-in-out);
}
.hero__layer.is-active { opacity: 1; }
.hero__layer img,
.hero__layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__layer video { opacity: 0; transition: opacity 0.8s; }
.hero__layer video.is-playing { opacity: 1; }
.hero__layer.is-active img { animation: hero-drift 14s linear both; }

@keyframes hero-drift {
  from { transform: scale(1.08) translate3d(-1%, 0, 0); }
  to   { transform: scale(1.02) translate3d(1%, -1%, 0); }
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Nur so viel Abdunklung, dass REC-Zeile und Telemetrie lesbar bleiben – das Bild bleibt frei */
  background:
    linear-gradient(to bottom, rgb(13 19 24 / 0.5) 0%, rgb(13 19 24 / 0) 16%),
    linear-gradient(to top, rgb(13 19 24 / 0.55) 0%, rgb(13 19 24 / 0) 22%);
}

.hero__grain {
  position: absolute;
  inset: -50%;
  z-index: 2;
  opacity: 0.07;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-2%, -1%); }
  100% { transform: translate(1%, 3%); }
}

/* On-Screen-Display (OSD) */
.osd {
  position: absolute;
  inset: var(--frame-top, calc(4.5rem + var(--space-s))) var(--frame-x, var(--gutter)) var(--frame-bottom, var(--gutter));
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: rgb(236 240 236 / 0.86);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.55);
  font-variant-numeric: tabular-nums;
}
.osd__corner {
  position: absolute;
  width: clamp(18px, 3vw, 34px);
  aspect-ratio: 1;
  border: 0 solid rgb(236 240 236 / 0.75);
  animation: osd-corner var(--dur-slow) var(--ease-out) both;
}
.osd__corner--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.osd__corner--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.osd__corner--bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.osd__corner--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
@keyframes osd-corner { from { opacity: 0; scale: 1.6; } }

.osd__cross {
  position: absolute;
  top: 50%; left: 50%;
  width: 22px; height: 22px;
  translate: -50% -50%;
  opacity: 0.55;
  animation: osd-fade 0.6s 0.5s both;
}
.osd__cross::before, .osd__cross::after {
  content: "";
  position: absolute;
  background: rgb(236 240 236 / 0.8);
}
.osd__cross::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.osd__cross::after { top: 50%; left: 0; right: 0; height: 1px; }

.osd__top {
  position: absolute;
  top: var(--space-s);
  left: calc(clamp(18px, 3vw, 34px) + var(--space-s));
  right: calc(clamp(18px, 3vw, 34px) + var(--space-s));
  display: flex;
  justify-content: space-between;
  gap: var(--space-m);
  animation: osd-fade 0.6s 0.35s both;
}
.osd__group { display: flex; gap: var(--space-m); align-items: center; }
.osd__rec { display: inline-flex; align-items: center; gap: 0.45em; }
.osd__rec::before {
  content: "";
  width: 0.55em; height: 0.55em;
  border-radius: 50%;
  background: #ff4d3d;
  box-shadow: 0 0 6px #ff4d3d;
  animation: rec-blink 1.6s steps(2, jump-none) infinite;
}
@keyframes rec-blink { 50% { opacity: 0.15; } }

.osd__battery { display: inline-flex; align-items: center; gap: 0.45em; }
.osd__battery-icon {
  position: relative;
  width: 1.7em; height: 0.8em;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 1px;
}
.osd__battery-icon::after {
  content: "";
  position: absolute;
  right: -3px; top: 50%;
  width: 2px; height: 40%;
  translate: 0 -50%;
  background: currentColor;
}
.osd__battery-icon span { display: block; height: 100%; width: var(--charge, 80%); background: currentColor; transition: width 1s; }

.osd__telemetry {
  position: absolute;
  right: calc(clamp(18px, 3vw, 34px) + var(--space-s));
  bottom: var(--space-s);
  display: grid;
  grid-template-columns: auto auto;
  column-gap: var(--space-m);
  row-gap: 0.15rem;
  text-align: right;
  animation: osd-fade 0.6s 0.7s both;
}
.osd__telemetry dt { color: rgb(236 240 236 / 0.55); }
.osd__telemetry dd { margin: 0; min-width: 11ch; }
.osd__place { grid-column: 1 / -1; margin-bottom: 0.35rem; color: var(--c-gold); }
@keyframes osd-fade { from { opacity: 0; } }

/* Name und Text/Buttons stehen direkt nebeneinander, getrennt durch eine feine Linie –
   nicht über die ganze Bildschirmbreite auseinandergezogen. */
.hero__content {
  display: grid;
  grid-template-columns: auto minmax(0, 30rem);
  justify-content: start;
  gap: var(--space-l) var(--space-xl);
  align-items: center;
  padding: var(--space-l) 0 var(--space-xl);
}
.hero__side {
  padding-left: var(--space-xl);
  border-left: 1px solid var(--c-slate-2);
}

.hero__title {
  font-size: clamp(2.75rem, 1rem + 5.2vw, 7rem);
  animation: title-in 1.1s 0.25s var(--ease-out) both;
}
@keyframes title-in {
  from { clip-path: inset(0 -20% 100% 0); translate: 0 0.25em; }
  to   { clip-path: inset(-10% -20% -10% 0); translate: 0 0; }
}
.hero__claim {
  margin: 0 0 var(--space-m);
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--c-fog-soft);
  animation: osd-fade 0.8s 0.9s both;
}
.hero .btn-row { animation: osd-fade 0.8s 1.05s both; }

@media (max-width: 60rem) {
  .hero__content { grid-template-columns: 1fr; gap: var(--space-m); }
  .hero__side { padding-left: 0; border-left: 0; }
}

.hero__caption {
  position: absolute;
  z-index: 3;
  margin: 0;
  left: calc(clamp(18px, 3vw, 34px) + var(--space-s));
  bottom: var(--space-s);
  font-size: var(--step--1);
  color: var(--c-fog-soft);
  animation: osd-fade 0.8s 1.2s both;
}
.hero__controls {
  display: inline-flex;
  gap: var(--space-xs);
  margin-left: var(--space-s);
  vertical-align: middle;
}
.hero__controls button {
  width: 1.9rem; height: 1.9rem;
  display: inline-grid; place-items: center;
  border: 1px solid rgb(236 240 236 / 0.35);
  border-radius: 50%;
  background: rgb(13 19 24 / 0.35);
  color: var(--c-fog);
  cursor: pointer;
}
.hero__controls button:hover { border-color: var(--c-fog); }
.hero__controls svg { width: 0.8rem; height: 0.8rem; }

@media (max-width: 40rem) {
  .osd__telemetry { display: none; }
  .osd__hide-s { display: none; }
  .hero__frame { height: 62svh; min-height: 18rem; }
}

/* ---------- Über mich ---------- */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-xl) var(--space-l);
}
.about__lead { grid-column: 1 / span 7; }
.about__lead h2 { font-size: var(--step-4); font-stretch: 112%; margin-bottom: var(--space-l); }
.about__body { grid-column: 8 / span 5; padding-top: calc(var(--step-4) * 1.2); }
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-xs) var(--space-m);
  margin: var(--space-l) 0 0;
  padding-top: var(--space-m);
  border-top: 1px solid var(--c-slate-2);
  font-size: var(--step--1);
}
.facts dt { color: var(--c-stone); }
.facts dd { margin: 0; color: var(--c-fog); }

@media (max-width: 52rem) {
  .about__lead, .about__body { grid-column: 1 / -1; padding-top: 0; }
}

/* ---------- Buch ---------- */
.book {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-xl);
  align-items: center;
}
.book__visual { justify-self: center; width: min(100%, 22rem); }
.book__body h2 { font-size: clamp(2rem, 1.2rem + 2.6vw, 3.5rem); font-stretch: 108%; margin-bottom: var(--space-m); overflow-wrap: break-word; }
.book__subtitle { font-size: var(--step-1); color: var(--c-fog-soft); margin-bottom: var(--space-l); max-width: 36ch; line-height: 1.45; }
.book__note { margin-top: var(--space-m); font-size: var(--step--1); color: var(--c-stone); }

@media (max-width: 52rem) {
  .book { grid-template-columns: 1fr; }
  .book__visual { width: min(70%, 18rem); }
}

/* Echtes Buchcover */
.cover-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 704 / 1132;
  border-radius: 2px 6px 6px 2px;
  box-shadow:
    inset 6px 0 0 rgb(0 0 0 / 0.25),
    0 30px 60px -20px rgb(0 0 0 / 0.7),
    0 12px 24px -12px rgb(0 0 0 / 0.6);
  view-transition-name: buchcover;
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
a:hover > .cover-img,
a:focus-visible > .cover-img {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 40px 70px -24px rgb(0 0 0 / 0.75), 0 16px 30px -14px rgb(0 0 0 / 0.6);
}
.book-hero .cover-img { width: min(100%, 20rem); }
@media (max-width: 52rem) {
  .book-hero .cover-img { width: min(60%, 15rem); }
}

/* Aktionskasten (z. B. Gratis-Exemplare zum Buchstart) */
.promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s) var(--space-m);
  margin-top: var(--space-l);
  padding: var(--space-m);
  border: 1px solid color-mix(in srgb, var(--c-gold) 45%, transparent);
  border-left: 3px solid var(--c-gold);
  border-radius: var(--radius-s);
  background: color-mix(in srgb, var(--c-gold) 8%, var(--c-slate));
  max-width: 40rem;
}
.promo p { margin: 0; flex: 1 1 18rem; color: var(--c-fog); }
.promo strong { color: var(--c-gold); }

/* Platzhalter-Cover in CSS (nicht mehr verwendet, bleibt als Vorlage) */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  padding: 11% 10%;
  display: flex;
  flex-direction: column;
  border-radius: 2px 6px 6px 2px;
  background:
    radial-gradient(120% 70% at 85% 105%, rgb(233 184 114 / 0.55), transparent 60%),
    linear-gradient(160deg, #22313b, #121a20 70%);
  box-shadow:
    inset 6px 0 0 rgb(0 0 0 / 0.25),
    inset 7px 0 0 rgb(255 255 255 / 0.06),
    0 30px 60px -20px rgb(0 0 0 / 0.7),
    0 12px 24px -12px rgb(0 0 0 / 0.6);
  view-transition-name: buchcover;
  overflow: hidden;
}
.cover__tabs { position: relative; height: 34%; }
.cover__tabs span {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: 42%;
  height: 19%;
  border: 1px solid rgb(228 231 225 / 0.35);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  rotate: calc(var(--r) * 1deg);
  background: rgb(13 19 24 / 0.35);
}
.cover__tabs span:last-child {
  border-color: var(--c-gold);
  background: rgb(233 184 114 / 0.16);
}
/* Beim Überfahren ordnen sich die Tabs – vom Chaos zur Ordnung */
.cover__tabs span { transition: rotate 0.7s var(--ease-out), left 0.7s var(--ease-out), top 0.7s var(--ease-out); }
a:hover > .cover .cover__tabs span,
a:focus-visible > .cover .cover__tabs span { rotate: 0deg; left: 29%; top: calc(var(--n, 0) * 15%); }
.cover__tabs span:nth-child(2) { --n: 1; }
.cover__tabs span:nth-child(3) { --n: 2; }
.cover__tabs span:nth-child(4) { --n: 3; }
.cover__tabs span:nth-child(5) { --n: 4; }
.cover__tabs span:nth-child(6) { --n: 5.6; }
.cover__title {
  margin-top: auto;
  font-size: clamp(1.5rem, 1rem + 2.4vw, 2.2rem);
  font-weight: 800;
  font-stretch: 118%;
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.cover__sub { margin-top: 0.8em; font-size: 0.8rem; line-height: 1.35; color: var(--c-fog-soft); }
.cover__author { margin-top: 1.4em; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; color: var(--c-gold); }

/* Fortschritt in Kapiteln: eine echte Abfolge, daher Segmente */
.progress { margin: var(--space-l) 0; max-width: 30rem; }
.progress__bar { display: flex; gap: 4px; height: 8px; }
.progress__seg { flex: 1; border-radius: 1px; background: var(--c-slate-2); }
.progress__seg.is-done { background: var(--c-gold); }
.progress__seg.is-current { background: linear-gradient(to right, var(--c-gold) 50%, var(--c-slate-2) 50%); }
.progress__label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2xs) var(--space-m); margin-top: var(--space-xs); font-size: var(--step--1); color: var(--c-stone); }
.progress__label strong { color: var(--c-fog); font-weight: 600; }

/* ---------- Galerie: Aus der Luft ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(9rem, 16vw, 15rem);
  gap: var(--space-s);
}
.shot { position: relative; margin: 0; grid-column: span 4; }
.shot:nth-child(1) { grid-column: span 8; grid-row: span 2; }
.shot:nth-child(4) { grid-column: span 5; }
.shot:nth-child(5) { grid-column: span 7; }
.shot:nth-child(4):last-child { grid-column: 1 / -1; }
.shot__btn {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-s);
  overflow: hidden;
  background: var(--c-slate);
  cursor: zoom-in;
}
.shot__btn img, .shot__btn video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out), opacity 0.6s;
}
.shot__btn video { opacity: 0; }
.shot__btn video.is-playing { opacity: 1; }
.shot__btn:hover img, .shot__btn:hover video { transform: scale(1.035); }
.shot figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-s);
  padding: var(--space-l) var(--space-m) var(--space-s);
  background: linear-gradient(to top, rgb(13 19 24 / 0.85), transparent);
  font-size: var(--step--1);
  pointer-events: none;
}
.shot__alt { font-family: var(--font-mono); font-size: 0.72rem; color: var(--c-fog-soft); white-space: nowrap; }

@media (max-width: 52rem) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 11rem; }
  .shot, .shot:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .shot:nth-child(1) { grid-column: 1 / -1; grid-row: span 2; }
  .shot:nth-child(5), .shot:nth-child(4):last-child { grid-column: 1 / -1; }
}

/* Lightbox */
.lightbox {
  width: min(92vw, 80rem);
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-fog);
  overflow: visible;
}
.lightbox::backdrop { background: rgb(8 12 15 / 0.9); backdrop-filter: blur(6px); }
.lightbox[open] { animation: pop-in var(--dur-med) var(--ease-out); }
.lightbox__media img, .lightbox__media video {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-s);
  background: #000;
}
.lightbox__caption { display: flex; justify-content: space-between; gap: var(--space-m); margin-top: var(--space-s); color: var(--c-fog-soft); font-size: var(--step--1); }
.lightbox__close {
  position: absolute;
  top: -2.75rem; right: 0;
}
@keyframes pop-in { from { opacity: 0; transform: scale(0.97); } }

/* ---------- Abseits vom Schreibtisch ---------- */
.offdesk {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-l);
}
.panel {
  display: flex;
  flex-direction: column;
  padding: var(--space-l);
  border: 1px solid var(--c-slate-2);
  border-radius: var(--radius-m);
  background: var(--c-slate);
}
.panel h3 { font-size: var(--step-3); font-stretch: 112%; margin: var(--space-l) 0 var(--space-s); }
.panel p { color: var(--c-fog-soft); max-width: 46ch; }
.panel .facts { margin-top: auto; }
.panel__visual { height: 7.5rem; display: flex; align-items: end; }

.elevation { width: 100%; height: 100%; overflow: visible; }
.elevation path.line { fill: none; stroke: var(--c-gold); stroke-width: 2; vector-effect: non-scaling-stroke; }
.elevation path.area { fill: url(#elevFill); }
.elevation text { font-family: var(--font-mono); font-size: 11px; fill: var(--c-stone); }

.keys { display: grid; grid-template-columns: repeat(3, 3.25rem); grid-template-rows: repeat(2, 3.25rem); gap: 6px; }
.keys kbd {
  display: grid;
  place-items: center;
  font-size: 1rem;
  border-bottom-width: 4px;
  border-radius: 6px;
  color: var(--c-fog);
  transition: transform 80ms, border-bottom-width 80ms, color 80ms;
}
.keys kbd:first-child { grid-column: 2; }
.keys kbd.is-down { transform: translateY(3px); border-bottom-width: 1px; color: var(--c-gold); border-color: var(--c-gold); }

@media (max-width: 52rem) {
  .offdesk { grid-template-columns: 1fr; }
}

/* ---------- Kontakt ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-xl);
}
.contact h2 { font-size: var(--step-5); font-stretch: 118%; font-weight: 800; letter-spacing: -0.035em; line-height: 0.92; }
.contact__aside p { color: var(--c-fog-soft); margin-top: var(--space-l); max-width: 32ch; }
.mail-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-m);
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--step-1);
  color: var(--c-fog);
  cursor: copy;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--c-gold) 60%, transparent);
  text-underline-offset: 0.25em;
  text-decoration-thickness: 1px;
}
.mail-copy:hover { color: var(--c-gold); }
.mail-copy svg { width: 1rem; height: 1rem; }

@media (max-width: 52rem) {
  .contact { grid-template-columns: 1fr; }
}

/* ---------- Formulare ---------- */
.form { display: grid; gap: var(--space-m); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.field { display: grid; gap: var(--space-2xs); }
.field label { font-size: var(--step--1); font-weight: 500; color: var(--c-fog-soft); }
.field input, .field textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--c-slate-2);
  border-radius: var(--radius-s);
  background: var(--c-slate);
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--c-stone); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--c-gold); background: #18232b; }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--c-signal); }
.check { display: grid; grid-template-columns: auto 1fr; gap: var(--space-s); align-items: start; font-size: var(--step--1); color: var(--c-fog-soft); }
.check input { width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--c-gold); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { min-height: 1.5em; font-size: var(--step--1); }
.form__status[data-state="ok"] { color: var(--c-ok); }
.form__status[data-state="error"] { color: var(--c-signal); }
.form__legal { font-size: 0.8rem; color: var(--c-stone); }

@media (max-width: 40rem) {
  .form__row { grid-template-columns: 1fr; }
}

/* ---------- Fußzeile ---------- */
.footer {
  border-top: 1px solid var(--c-slate-2);
  padding-block: var(--space-l);
  font-size: var(--step--1);
  color: var(--c-stone);
}
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-m); }
.footer ul { display: flex; flex-wrap: wrap; gap: var(--space-m); margin: 0; padding: 0; list-style: none; }
.footer a { color: var(--c-fog-soft); text-decoration: none; }
.footer a:hover { color: var(--c-gold); }
.footer__hint { display: inline-flex; align-items: center; gap: 0.35em; }
@media (hover: none) { .footer__hint { display: none; } }

/* ---------- Befehlspalette ---------- */
.palette {
  width: min(38rem, calc(100% - 2 * var(--gutter)));
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--c-slate-2);
  border-radius: var(--radius-m);
  background: var(--c-slate);
  color: var(--c-fog);
  box-shadow: 0 40px 80px -20px rgb(0 0 0 / 0.75);
  overflow: hidden;
}
.palette::backdrop { background: rgb(8 12 15 / 0.62); backdrop-filter: blur(3px); }
.palette[open] { animation: pop-in 220ms var(--ease-out); }
.palette__search { display: flex; align-items: center; gap: var(--space-s); padding: 0 var(--space-m); border-bottom: 1px solid var(--c-slate-2); }
.palette__search svg { width: 1.1rem; height: 1.1rem; color: var(--c-stone); flex: none; }
.palette__input {
  flex: 1;
  min-width: 0;
  padding: 1.05rem 0;
  border: 0;
  background: none;
  font-size: var(--step-1);
  outline: none;
}
.palette__input::placeholder { color: var(--c-stone); }
.palette__list { max-height: min(55vh, 24rem); overflow-y: auto; margin: 0; padding: var(--space-xs); list-style: none; }
.palette__group { padding: var(--space-s) var(--space-s) var(--space-2xs); font-size: 0.78rem; font-weight: 600; color: var(--c-stone); }
.palette__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding: 0.6rem var(--space-s);
  border-radius: var(--radius-s);
  cursor: pointer;
  color: var(--c-fog-soft);
}
.palette__item[aria-selected="true"] { background: var(--c-slate-2); color: var(--c-fog); box-shadow: inset 2px 0 0 var(--c-gold); }
.palette__item small { color: var(--c-stone); font-size: 0.78rem; }
.palette__empty { padding: var(--space-l) var(--space-m); color: var(--c-stone); }
.palette__foot { display: flex; gap: var(--space-m); padding: var(--space-xs) var(--space-m); border-top: 1px solid var(--c-slate-2); font-size: 0.78rem; color: var(--c-stone); }
.palette__foot span { display: inline-flex; gap: 0.35em; align-items: center; }
@media (hover: none) { .palette__foot { display: none; } }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; left: 50%; bottom: var(--space-l); z-index: 90; display: grid; gap: var(--space-xs); translate: -50% 0; width: max-content; max-width: calc(100% - 2 * var(--gutter)); }
.toast {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-slate-2);
  border-left: 3px solid var(--c-gold);
  border-radius: var(--radius-s);
  background: var(--c-slate);
  box-shadow: 0 20px 40px -16px rgb(0 0 0 / 0.7);
  font-size: var(--step--1);
  animation: toast-in var(--dur-med) var(--ease-out) both;
}
.toast.is-leaving { animation: toast-out 300ms ease-in both; }
.toast--achievement { border-left-color: var(--c-ok); }
.toast--achievement strong { display: block; color: var(--c-fog); }
.toast__icon { width: 2rem; height: 2rem; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Easter Egg: Drohnen-Überflug ---------- */
.flyby {
  position: fixed;
  z-index: 95;
  top: 30vh;
  left: 0;
  width: 88px;
  pointer-events: none;
  offset-path: path("M -120 120 C 300 -60, 520 320, 900 120 S 1500 -40, 2200 160");
  offset-rotate: 0deg;
  animation: flyby 4.2s var(--ease-in-out) forwards;
}
.flyby svg { width: 100%; height: auto; filter: drop-shadow(0 18px 12px rgb(0 0 0 / 0.5)); }
.flyby .rotor { transform-box: fill-box; transform-origin: center; animation: spin 0.12s linear infinite; }
@keyframes flyby { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- Scroll-Reveal: Überschriften Wort für Wort ---------- */
.js .reveal .w {
  display: inline-block;
  opacity: 0;
  translate: 0 0.4em;
  transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out);
  transition-delay: calc(var(--i) * 45ms);
}
.js .reveal.is-visible .w { opacity: 1; translate: 0 0; }

/* ---------- Unterseiten ---------- */
.page-head { padding: calc(4.5rem + var(--space-xl)) 0 var(--space-xl); }
.page-head h1 { font-size: var(--step-4); font-stretch: 118%; font-weight: 800; letter-spacing: -0.03em; }
.page-head p { margin-top: var(--space-m); color: var(--c-fog-soft); font-size: var(--step-1); max-width: 40ch; }

.book-hero {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--space-xl);
  align-items: end;
  padding-top: calc(4.5rem + var(--space-xl));
  padding-bottom: var(--space-xl);
}
.book-hero .cover { width: min(100%, 20rem); }
.book-hero h1 { font-size: clamp(2.1rem, 1rem + 4vw, 4.75rem); font-stretch: 110%; font-weight: 800; letter-spacing: -0.03em; line-height: 0.95; overflow-wrap: break-word; }
.book-hero__sub { margin: var(--space-m) 0 var(--space-l); font-size: var(--step-2); line-height: 1.35; color: var(--c-fog-soft); max-width: 30ch; }
@media (max-width: 52rem) {
  .book-hero { grid-template-columns: 1fr; }
  .book-hero .cover { width: min(60%, 15rem); }
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--space-l) var(--space-xl);
  padding-block: var(--space-xl);
  border-top: 1px solid var(--c-slate-2);
}
.split > h2 { font-size: var(--step-3); font-stretch: 112%; }
@media (max-width: 52rem) { .split { grid-template-columns: 1fr; } }

.excerpt {
  max-width: 60ch;
  font-size: 1.125rem;
  line-height: 1.75;
}
.excerpt p { color: var(--c-fog); }
.excerpt p:first-of-type::first-letter {
  float: left;
  margin: 0.08em 0.1em 0 0;
  font-size: 3.4em;
  line-height: 0.8;
  font-weight: 800;
  font-stretch: 125%;
  color: var(--c-gold);
}
.excerpt__meta { margin-bottom: var(--space-m); font-size: var(--step--1); color: var(--c-stone); }

.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-s); max-width: 58ch; }
.checklist li { position: relative; padding-left: 1.8rem; color: var(--c-fog-soft); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 0.9rem; height: 0.45rem;
  border-left: 2px solid var(--c-gold);
  border-bottom: 2px solid var(--c-gold);
  rotate: -45deg;
  translate: 0 -30%;
}

.faq { display: grid; gap: 0; max-width: 60ch; }
.faq details { border-bottom: 1px solid var(--c-slate-2); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-m);
  padding: var(--space-m) 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--c-gold); font-weight: 400; font-size: 1.4em; line-height: 1; transition: rotate var(--dur-fast); }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { padding-bottom: var(--space-m); color: var(--c-fog-soft); }

.read-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  height: 2px;
  background: var(--c-gold);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}
@supports (animation-timeline: scroll()) {
  .read-progress { animation: read-grow linear both; animation-timeline: scroll(root); }
  @keyframes read-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

.legal { padding-bottom: var(--space-2xl); }
.legal h2 { font-size: var(--step-2); margin: var(--space-xl) 0 var(--space-s); }
.legal .prose > h2:first-child { margin-top: 0; }
.legal h3 { font-size: var(--step-1); margin: var(--space-l) 0 var(--space-xs); }
.legal p, .legal li { color: var(--c-fog-soft); }
.legal .todo { padding: 0.1em 0.35em; border-radius: var(--radius-s); background: rgb(233 184 114 / 0.14); color: var(--c-gold); }

/* 404 */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; position: relative; padding: var(--gutter); }
.lost .osd { inset: var(--gutter); }
.lost h1 { font-size: var(--step-5); font-stretch: 125%; font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; }
.lost p { margin: var(--space-m) auto var(--space-l); color: var(--c-fog-soft); max-width: 36ch; }
.lost .osd__rec::before { background: var(--c-gold); box-shadow: 0 0 6px var(--c-gold); }
