/* Unsere Philosophie — Satz + Papierstapel
   Ergänzt /style.css (nutzt dessen Farb-Variablen und ABC Areal). */

/* Blätter gleiten beim Umblättern seitlich hinaus – kein horizontales Scrollen */
.home { overflow-x: clip; }

.philosophy {
  max-width: 680px;
  margin: 24px auto 0;
  text-align: center;
}
.philosophy + .history { margin-top: 96px; }

/* Die Blätter liegen unter den Kunden; ein Klick auf einen Begriff holt sie als Overlay nach oben */
.stack-home { max-width: 680px; margin: 0 auto 120px; text-align: center; }

.stack-dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.stack-dialog::backdrop {
  background: var(--veil);
  backdrop-filter: blur(6px);
}
body:has(.stack-dialog[open]) { overflow: hidden; }

.stack-dialog-inner {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 72px 24px 40px;
  text-align: center;
}
.stack-dialog .stack-wrap { width: 100%; max-width: 680px; margin: 0 auto; }

.stack-dialog-close {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--graphite);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.stack-dialog-close:hover { color: var(--ink); }
.stack-dialog-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.philosophy > h2 {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite);
}

/* Der Satz */
.manifest {
  max-width: 26em;
  margin: 22px auto 0;
  color: var(--ink);
  font-size: clamp(21px, 2.4vw, 25px);
  line-height: 1.55;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

/* ohne Punkte trennen Ziffer und Zeilenumbruch die Begriffe: nie mitten im Begriff umbrechen */
.manifest a {
  margin-inline: 0.12em;
  white-space: nowrap;
  padding-block: 6px;
  text-decoration-color: var(--hair);
  text-underline-offset: 0.22em;
}
.manifest a:hover { text-decoration-color: var(--ink); }
.manifest a[aria-current="true"] {
  text-decoration-color: var(--sinopia);
  text-decoration-thickness: 2px;
}
.manifest sup {
  margin-left: 2px;
  font-size: 0.5em;
  line-height: 0;
  color: var(--sinopia);
}

/* Der Stapel – ohne JavaScript einfach untereinander lesbar */
.stack {
  display: grid;
  gap: 24px;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.sheet {
  display: flex;
  flex-direction: column;
  padding: 40px 40px 26px;
  background: var(--marble);
  border: 1px solid var(--hair);
  box-shadow: 0 1px 2px rgb(20 18 16 / 5%), 0 14px 34px rgb(20 18 16 / 7%);
  scroll-margin-top: 24px;
}

.sheet .sheet-number {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--sinopia);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.1em;
}
.sheet-number::after {
  content: "";
  width: 32px;
  border-top: 1px solid var(--sinopia);
}

.sheet h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.term-help { position: relative; }
.term-help h3 button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-decoration: underline dotted var(--hair);
  text-underline-offset: 0.2em;
  cursor: help;
}
.term-help h3 button:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.term-explainer {
  position: absolute;
  z-index: 5;
  top: 100%;
  left: 0;
  width: min(340px, 100%);
  padding: 16px 18px;
  border: 1px solid var(--hair);
  background: var(--page);
  box-shadow: 0 6px 20px rgb(0 0 0 / 12%);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.sheet .term-explainer p { margin: 0 0 10px; font-size: inherit; line-height: inherit; }

.sheet p {
  margin-top: 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
}

/* Zitate als Motto unter dem Titel, Quellen ganz klein */
.sheet-quote { margin: 14px 0 0; }
.sheet-quote blockquote { margin: 0; }
.sheet .sheet-quote p {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: -0.005em;
}
.sheet-quote figcaption {
  margin-top: 3px;
  color: var(--graphite);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sheet-quote:last-of-type {
  margin-bottom: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hair);
}

.sheet footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 26px;
  color: var(--graphite);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

/* Stapel-Modus (per JavaScript aktiviert) */
.stack.is-stacked {
  gap: 0;
  padding: 0 16px 44px;
  touch-action: pan-y;
}
.stack.is-stacked .sheet {
  grid-area: 1 / 1;
  transform-origin: 50% 60%;
  transition: transform 0.42s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.stack.is-stacked .sheet[aria-hidden="false"] { cursor: grab; }
.stack.is-dragging,
.stack.is-dragging .sheet { cursor: grabbing; user-select: none; }
.stack:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }

.stack-controls {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 4px;
}
.stack-wrap.is-ready .stack-controls { display: flex; }

.stack-controls button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.stack-controls button:hover { background: var(--ink); color: var(--page); }
.stack-controls button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.stack-controls .arrow { transition: transform 0.2s; }
.stack-controls button:hover .arrow { transform: translateX(3px); }

.stack-controls .stack-prev {
  justify-content: center;
  width: 44px;
  padding: 0;
  border-color: var(--hair);
}

.stack-hint {
  display: none;
  margin-top: 12px;
  color: var(--graphite);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (pointer: coarse) {
  .stack-wrap.is-ready .stack-hint { display: block; }
}
@media (max-width: 480px) {
  .sheet { padding: 28px 24px 20px; }
  .stack.is-stacked { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .stack.is-stacked .sheet { transition: none; }
}
