/* Selbst gehostete Schriften (SIL OFL 1.1, Lizenzen in fonts/OFL-*.txt). Quelle: Google Fonts, Subsets latin + latin-ext. */
@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-300-700-latin-ext.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-300-700-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Mono";
  src: url("fonts/space-mono-400-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Mono";
  src: url("fonts/space-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Space Mono";
  src: url("fonts/space-mono-700-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Space Mono";
  src: url("fonts/space-mono-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #fbfaf7;
  --text: #1b2432;
  --accent: #c05a24;
  --accent-bg: #f6e7d6;
  --accent-ink: #9a4617; /* dunklerer Akzent für kleinen Text auf --accent-bg und Hover */
  --line: #ddd8cd;
  --card-border: #d3ccbb;
  --muted: #4a4f57;
  --mono-grey: #9a968c;
  --card: #fff;
  --green-bg: #edf4ea;
  --green-line: #9fc494;
  --green-ink: #3f6f48;
  --yellow-bg: #faf0e2;
  --yellow-line: #dba75f;
  --yellow-ink: #8a5a2c;

  --font-text: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Mono", ui-monospace, Menlo, Consolas, monospace;

  --gutter: 16px;
  --content-max: 1080px;
  --legal-max: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: 1rem;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--text);
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-ink);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Layout */

.container {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin-bottom: 1.5rem;
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 2.5rem);
}

.section-intro {
  max-width: 40rem;
  margin: -0.75rem 0 1.75rem;
  color: var(--muted);
  font-size: 1.125rem;
}

@media (min-width: 820px) {
  .section {
    padding-block: 4.5rem;
  }
}

/* Gemeinsame Bausteine */

.nowrap {
  white-space: nowrap;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

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

/* 1. Hero */

.hero {
  padding-block: 2.5rem 3rem;
  border-top: 0;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 0.88;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}

.hero h1 .accent {
  display: block;
  color: var(--accent);
}

/* Der Claim steht im h1 (Keywords), sieht aber aus wie ein eigener Absatz über dem Titel. */
.hero h1 .eyebrow,
.hero h1 .hero__title {
  display: block;
}

.hero h1 .eyebrow {
  line-height: 1.6;
}

.hero__lead {
  max-width: 34rem;
  margin: 1.5rem 0 1rem;
  font-size: 1.25rem;
}

.hero__meta {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.hero__cover {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(27, 36, 50, 0.16), 0 1px 4px rgba(27, 36, 50, 0.12);
}

@media (min-width: 820px) {
  .hero {
    padding-block: 4.5rem;
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
    gap: 4rem;
  }

  .hero h1 {
    font-size: clamp(4.5rem, 9vw, 7.5rem);
  }

  .hero__cover {
    margin-inline: auto 0;
  }
}

/* 2. Aus dem Buch */

.retro {
  max-width: 52rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.retro li {
  position: relative;
  padding: 1rem 0 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.125rem;
}

.retro li::before {
  content: "";
  position: absolute;
  top: 1.65rem;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}

/* 3. Sechs Seiten */

.pages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pages figure {
  margin: 0;
}

.pages img {
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(27, 36, 50, 0.16);
}

.pages__link {
  display: block;
  border-radius: 4px;
}

.pages__link:focus-visible {
  outline-offset: 4px;
}

.pages figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  overflow-wrap: anywhere; /* Notbremse; die Trennung in „Stellenbeschreibung“ steckt als &shy; im Markup (hyphens: auto bräche hässlich) */
}

.pages__ref {
  display: block;
  color: #676c74; /* heller als --muted, aber 5,06:1 auf dem Seitenhintergrund (WCAG AA ab 4,5:1) */
}

@media (min-width: 720px) {
  .pages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* Lightbox (<dialog>, Skript: effects.js): Galerieseite groß, damit der Text auf dem Handy lesbar ist. */

.lightbox {
  max-width: min(92vw, 40rem);
  padding: 0;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(27, 36, 50, 0.88);
}

.lightbox__img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 88vh;
  margin-inline: auto;
  border-radius: 4px;
  background: #fff;
}

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--accent-ink);
}

.lightbox__caption {
  margin: 0.5rem 0 0;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-align: center;
}

/* Seite hinter der offenen Lightbox sperren. Auf <html>, nicht auf <body>: html hat overflow-x: clip, daher reicht das Overflow von body nicht bis zum Viewport. */
html:has(dialog[open]) {
  overflow: hidden;
}

/* 3b. Über das Buch */

.prose {
  max-width: 46rem;
  font-size: 1.125rem;
}

.prose:last-child {
  margin-bottom: 0;
}

/* 4. Für wen: Ticket-Karten */

.tickets {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.ticket {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1rem 1.25rem 1.125rem;
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--card);
}

.ticket__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.ticket__id {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
}

.badge {
  padding: 0.125rem 0.625rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f1eee6;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.4;
}

.badge--green {
  border-color: var(--green-line);
  background: var(--green-bg);
  color: var(--green-ink);
}

.badge--yellow {
  border-color: var(--yellow-line);
  background: var(--yellow-bg);
  color: var(--yellow-ink);
}

.badge--accent {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent-ink);
}

.ticket h3 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.ticket p {
  margin: 0;
  color: var(--muted);
}

.section-cta {
  margin: 2rem 0 0;
}

@media (min-width: 720px) {
  .tickets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .tickets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .ticket__head {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* 5. Drei Akte */

.acts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.act {
  padding-top: 1rem;
  border-top: 2px solid var(--text);
}

.act__label {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.act h3 {
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
}

.act p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

@media (min-width: 820px) {
  .acts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
  }
}

.glance-title {
  margin: 3rem 0 1rem;
  font-size: 1.5rem;
}

.glance {
  width: 100%;
  max-width: 52rem;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--card-border);
  background: var(--card);
}

.glance th,
.glance td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.glance tr:first-child th,
.glance tr:first-child td {
  border-top: 0;
}

.glance th {
  width: 9rem;
  padding-right: 0.5rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

/* 5b. Fragen und Antworten */

.faq {
  max-width: 52rem;
  border-top: 1px solid var(--line);
}

.faq__item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}

.faq__item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  line-height: 1.2;
}

.faq__item p {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
}

/* 6. Über den Autor */

.author {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.author__photo {
  width: 160px;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.author__text {
  max-width: 40rem;
}

.author__text p:last-child {
  margin-bottom: 0;
}

@media (min-width: 600px) {
  .author {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 2rem;
  }
}

/* 7. Schluss-CTA */

.section.cta {
  padding-block: 3.5rem;
  border-top: 0;
  background: var(--text);
  color: var(--bg);
}

.cta h2 {
  max-width: 36rem;
}

.cta__note {
  max-width: 40rem;
  margin: 2rem 0 0;
  color: #b9b4a8;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* 8. Footer */

.footer {
  padding-block: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.footer p {
  margin: 0;
}

.footer a {
  display: inline-block;
  padding-block: 0.35rem;
}

.footer .sep {
  color: var(--mono-grey);
}

/* Unterseiten: Impressum, Datenschutz, Weiterleitung */

.legal {
  max-width: calc(var(--legal-max) + 2 * var(--gutter));
  padding-block: 1.5rem 4rem;
}

.legal .back {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding-block: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.legal h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 1.4rem + 3vw, 3rem);
  hyphens: auto;
  overflow-wrap: anywhere;
}

.legal h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.375rem;
}

.legal h3 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.125rem;
}

.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal address {
  margin: 0 0 1rem;
  font-style: normal;
}

.legal a {
  overflow-wrap: anywhere;
}

/* Tap-Ziele: Vertikales Padding an Inline-Links vergrößert die Klickfläche, ohne den Zeilenabstand zu ändern. */
.author__text a,
.legal a {
  padding-block: 0.35rem;
}

.legal .lead {
  color: var(--muted);
  font-size: 1.125rem;
}

.placeholder {
  padding: 0 0.25rem;
  border-bottom: 1px dashed var(--yellow-line);
  background: var(--yellow-bg);
  color: var(--yellow-ink);
}

/* Effekte (optional, Skript: effects.js). Ohne JavaScript oder bei reduzierter Bewegung bleibt alles statisch sichtbar. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media screen and (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
    transition-delay: calc(var(--i, 0) * 60ms);
  }

  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}

.parallax-on .hero__cover,
.parallax-on .pages figure {
  will-change: transform;
}

/* Mehr Zeilenabstand, damit der gegenläufige Versatz benachbarter Reihen (bis 30 px Differenz) nie überlappt. */
.parallax-on .pages {
  row-gap: 2.5rem;
}


/* Mehr von David Greiner (Linkblock vor dem Footer): Das ganze Listen-Innere ist der Link, das ergibt große Tap-Ziele. */
#mehr { padding-top: 2.5rem; padding-bottom: 2.5rem; }
#mehr h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.links li { border-top: 1px solid var(--line, #ddd8cd); }
.links a { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.85rem 0; text-decoration: none; color: inherit; }
.links__site { font-family: var(--font-mono, "Space Mono", ui-monospace, Menlo, Consolas, monospace); font-size: 0.9rem; font-weight: 700; color: var(--accent-ink, #9a4617); }
.links__desc { font-size: 0.95rem; color: var(--muted, #4a4f57); text-wrap: pretty; }
.links a:hover .links__site, .links a:focus-visible .links__site { text-decoration: underline; }
