/* ============================================================================
   /leistung/ — A4-One-Pager im PDF-Reader-Look (Warm Navigator v1.7.3).
   Ausgelagert wegen CSP (style-src 'self', kein Inline-CSS). Fonts und Tokens
   kommen aus colors_and_type.css. Print-CSS gibt nur das Blatt randfest aus.
   ============================================================================ */

* { box-sizing: border-box; margin: 0; }
html, body { background: var(--color-surface-sunken-dark); }

/* ---- Viewer (simulierter PDF-Reader) ---- */
.viewer { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 56px 16px 72px; }
/* Kopfleiste: Desktop transparent (Logo links, Toolbar rechts wie gehabt),
   mobil deckend und fixiert. pointer-events durchlässig, damit die leere
   Mitte am Desktop keine Klicks schluckt. */
.viewer-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; pointer-events: none;
}
.viewer-bar > * { pointer-events: auto; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
/* Icon-Buttons (Desktop wie mobil): Lucide 24px (icon.lg), 44px-Touch-Ziele.
   Barrierefreier Name über aria-label + title an den Buttons, kein Textlabel. */
.tb-ico { display: block; width: 24px; height: 24px; flex: none; }
.zoom-group {
  display: flex; align-items: center; gap: 2px;
  background: var(--color-surface-raised-dark);
  border: 1px solid var(--line-on-dark-default);
  border-radius: var(--radius-base); padding: 3px;
}
.zoom-btn {
  width: 34px; height: 34px; border: none; cursor: pointer;
  background: transparent; color: var(--fg-on-dark-default);
  font-family: var(--font-body); font-size: 18px; line-height: 1;
  border-radius: var(--radius-md);
  transition: background-color var(--motion-fast) var(--ease-out);
}
.zoom-btn:hover { background: var(--color-surface-sunken-dark); }
.zoom-val {
  min-width: 52px; text-align: center; font-family: var(--font-body);
  font-size: 13px; color: var(--fg-on-dark-muted);
  font-feature-settings: "tnum" 1;
}
.pdf-link, .share-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  color: var(--fg-on-dark-default); text-decoration: none;
  background: transparent; cursor: pointer;
  border: 1px solid var(--line-on-dark-strong); border-radius: var(--radius-base);
  transition: border-color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out);
}
.pdf-link:hover, .share-btn:hover { border-color: var(--fg-on-dark-muted); background: var(--color-surface-raised-dark); }
.toolbar .btn-primary { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.viewer-logo {
  display: inline-flex;
  opacity: 0.92;
  transition: opacity var(--motion-fast) var(--ease-out);
}
.viewer-logo:hover, .viewer-logo:focus-visible { opacity: 1; }

/* Mobiler Buchungsweg — Basis versteckt; nur < 820px sichtbar (Regel im Media-Block).
   Steht bewusst VOR dem Media-Block, damit die mobile Regel in der Kaskade gewinnt —
   Media-Queries erhöhen die Spezifität nicht, bei Gleichstand zählt die spätere Regel. */
.book-mobile { display: none; }
/* ---- Mobil (< 820px): fixe, deckende Kopfleiste (Logo + Icon-Aktionen),
   Zoom-Buttons aus (Pinch-Zoom ist nativ), Blatt per transform eingepasst.
   iOS Safari rendert CSS-zoom fehlerhaft (kappte das Blatt unten) und
   berechnet var()-basierte transforms beim First Paint falsch — deshalb
   setzt onepager.js transform und margin-bottom direkt als Inline-Styles
   und justiert nach dem load-Event nach. ---- */
@media (max-width: 820px) {
  .viewer { padding: 78px 12px 48px; align-items: flex-start; overflow-x: clip; }
  .viewer-bar {
    background: var(--color-surface-sunken-dark);
    border-bottom: 1px solid var(--line-on-dark-default);
    padding: 10px 12px;
  }
  .viewer-logo img { width: 128px; height: auto; }
  .zoom-group { display: none; }
  .viewer-title { margin-bottom: 14px; }
  .book-mobile { display: inline-flex; width: 100%; margin-bottom: 16px; }
  .sheet { zoom: 1 !important; transform-origin: top left; }
}
.viewer-title {
  font-family: var(--font-body); font-size: 13px; letter-spacing: 0.06em;
  color: var(--fg-on-dark-soft); margin-bottom: 18px;
}
.viewer-back {
  margin-top: 22px; font-family: var(--font-body); font-size: 14px;
  color: var(--fg-on-dark-soft); text-decoration: none;
  transition: color var(--motion-fast) var(--ease-out);
}
.viewer-back:hover { color: var(--fg-on-dark-default); }

/* Toast-Rückmeldung „Link kopiert" (nur wenn der Teilen-Knopf auf den
   Zwischenablage-Fallback zurückfällt). Sanft ein-/ausgeblendet. */
.share-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px);
  background: var(--color-surface-raised-dark); color: var(--fg-on-dark-default);
  border: 1px solid var(--line-on-dark-default);
  padding: 10px 18px; border-radius: var(--radius-base);
  font-family: var(--font-body); font-size: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--motion-fast) var(--ease-out), transform var(--motion-fast) var(--ease-out);
  z-index: 3;
}
.share-toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ---- Das A4-Blatt (794 × 1123 px = A4 bei 96 dpi) ---- */
.sheet {
  width: 794px; height: 1123px; flex: none;
  zoom: var(--z, 1);
  background: var(--color-brand-cream);
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  overflow: hidden;
  display: flex; flex-direction: column;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}

/* ---- Kopf (Deep Sea, Dark-Layer) ---- */
.head {
  background: var(--grad-dark-depth);
  padding: 38px 44px 34px;
  display: flex; gap: 28px; align-items: center;
}
.head-foto {
  width: 118px; height: 118px; flex: none; border-radius: var(--radius-xl);
  object-fit: cover; object-position: top;
}
.head .eyebrow { color: var(--color-brand-teal); margin-bottom: 7px; }
.head-name {
  font-family: var(--font-headline); font-size: 40px; font-weight: 400;
  line-height: 1.1; letter-spacing: -0.02em; color: var(--fg-default);
}
.head-name strong { font-weight: 700; }
.head-claim {
  font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  color: var(--fg-muted); margin-top: 9px; max-width: 560px; text-wrap: pretty;
}

/* ---- Blatt-Körper ---- */
.body-area { flex: 1; padding: 28px 44px 26px; display: flex; flex-direction: column; }

/* Kennzahlen-Leiste */
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 26px; padding: 6px 0 18px; border-bottom: 1px solid var(--line-default); }
.stat-n {
  font-family: var(--font-headline); font-size: 32px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--fg-default);
  font-feature-settings: "tnum" 1, "lnum" 1;
}
.stat-n em { font-style: normal; color: var(--color-brand-teal); }
.stat-t { font-family: var(--font-body); font-size: 12.5px; line-height: 1.5; color: var(--fg-soft); margin-top: 4px; text-wrap: pretty; }

/* Leistungs-Säulen */
.section-label { margin: 18px 0 12px; display: flex; align-items: center; gap: 10px; }
.section-label .tick { width: 22px; height: 2px; flex: none; background: var(--color-brand-teal); border-radius: 1px; }
.section-label .eyebrow { font-size: 13px; }
.cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.col {
  background: var(--color-surface-card);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-lg);
  padding: 20px 18px 18px;
}
.col h3 {
  font-family: var(--font-headline); font-size: 17.5px; font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--fg-default);
  margin-bottom: 12px;
}
.col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.col li {
  font-family: var(--font-body); font-size: 12.5px; line-height: 1.5;
  color: var(--fg-muted); padding-left: 14px; position: relative; text-wrap: pretty;
}
.col li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--color-brand-teal);
}

/* D4-Mini-Case */
.case {
  margin-top: 18px;
  background: var(--color-surface-sunken);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
}
.case-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.case .eyebrow { font-size: 12.5px; }
.case-src { font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--fg-strong-muted); }
.case-p { font-family: var(--font-body); font-size: 13.5px; line-height: 1.6; color: var(--fg-muted); text-wrap: pretty; }
.case-quote {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-default);
  font-family: var(--font-headline); font-size: 16px; font-weight: 600;
  letter-spacing: -0.02em; color: var(--fg-default);
}

/* Kontakt + CTA */
.foot { margin-top: auto; padding-top: 14px; }
.foot .sig-line { margin-bottom: 16px; }
.foot-row { display: flex; align-items: center; gap: 22px; }
.foot-contact { flex: 1; }
.foot-contact .who { font-family: var(--font-headline); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-default); }
.foot-contact .lines { margin-top: 6px; font-family: var(--font-body); font-size: 12.5px; line-height: 1.7; color: var(--fg-muted); }
.foot-contact a { color: inherit; text-decoration: none; }
.qr-block { flex: none; display: flex; align-items: center; gap: 14px; }
.qr-label { text-align: right; }
.qr-label .l1 { font-family: var(--font-headline); font-size: 15px; font-weight: 600; letter-spacing: -0.02em; color: var(--fg-default); }
.qr-label .l2 { font-family: var(--font-body); font-size: 11px; color: var(--fg-soft); margin-top: 3px; }
.qr-img { width: 84px; height: 84px; display: block; }

/* ---- Druck: nur das Blatt, randfest ---- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: none; }
  .viewer { padding: 0; display: block; min-height: 0; }
  .viewer-bar, .viewer-logo, .toolbar, .viewer-title, .viewer-back, .book-mobile { display: none; }
  .sheet { width: 210mm; height: 297mm; box-shadow: none; zoom: 1 !important; transform: none !important; margin: 0 !important; }
}
