/* ============================================
   LEISTUNGEN — individuelle Styles
   Passend zur Startseite (Papier-Design)
   ============================================ */

:root {
  --gold: #A8865A;        /* Messing – Markenakzent */
  --gold-hover: #BD9B6E;  /* Messing, etwas heller */
}

/* Seitenlayout */
body.leistungen main {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

/* Header */
body.leistungen header {
  margin-bottom: 2.5rem;
}

body.leistungen h1 {
  margin-bottom: 0.3rem;
  font-size: 2.1rem;
}

/* Sections */
body.leistungen section {
  margin-bottom: 2.4rem;
}

/* ============================================
   LEISTUNGEN – editoriale, linksbündige Blöcke
   ============================================ */
body.leistungen .leistungen-list {
  text-align: left;
  margin: 2.8rem 0 1rem;
}

body.leistungen .leistung {
  position: relative;
  margin: 0 auto;
  max-width: 62ch;
  padding-left: 3.4rem;
  padding-top: 1.4rem;
  isolation: isolate;            /* eigener Stapelkontext für die Ghost-Ziffer */
}

/* Messing-Held-Ziffer 01–04 – großzügig, halbtransparent, hinter der Überschrift */
body.leistungen .leistung .idx {
  position: absolute;
  left: -0.5rem;
  top: -0.32em;
  z-index: -1;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(4.5rem, 11vw, 7.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--gold);
  opacity: 0.12;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);   /* feine Letterpress-Prägung */
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Aktives Kapitel: Ziffer tritt hervor */
body.leistungen .leistung.is-active .idx {
  opacity: 0.24;
  transform: translateY(0);
}

body.leistungen .leistung h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.55rem, 3.2vw, 1.95rem);
  color: var(--fg);
  text-wrap: balance;
}

body.leistungen .leistung p {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
  text-wrap: pretty;
  hyphens: auto;
}
body.leistungen .leistung p:last-of-type { margin-bottom: 0; }

/* Methoden-Chips – erscheinen erst bei Interesse (Hover/Fokus/aktiv) */
body.leistungen .leistung .tools {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.5s ease, opacity 0.4s ease, transform 0.5s ease;
}

body.leistungen .leistung:hover .tools,
body.leistungen .leistung:focus-within .tools,
body.leistungen .leistung.is-active .tools {
  max-height: 8rem;
  opacity: 1;
  transform: translateY(0);
}

body.leistungen .leistung .tools li {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold);
  background: rgba(168, 134, 90, 0.10);
  border: 1px solid rgba(168, 134, 90, 0.28);
  padding: 0.34rem 0.74rem;
  border-radius: 999px;
}

/* Touch-Geräte ohne Hover: Methoden dauerhaft sichtbar */
@media (hover: none) {
  body.leistungen .leistung .tools {
    max-height: none;
    opacity: 1;
    transform: none;
  }
}

/* Trenner: warme Haarlinie mit Messing-Punkt (Markenmotiv) */
body.leistungen .leistung-sep {
  position: relative;
  width: 100%;
  max-width: 62ch;
  height: 1px;
  margin: 2.4rem auto;
  background: var(--line);
}
body.leistungen .leistung-sep::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

/* Kontakt-Abschnitt bleibt zentriert */
body.leistungen .kontakt {
  margin-top: 3.2rem;
}

@media (max-width: 600px) {
  body.leistungen .leistung {
    padding-left: 0;
    padding-top: 2.6rem;
  }
  body.leistungen .leistung .idx {
    font-size: 4rem;
    left: -0.1rem;
    top: 0;
  }
}

/* Listen zentriert, aber links ausgerichtet */
body.leistungen section ul {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  text-align: left;
  display: inline-block;
}

body.leistungen section li {
  margin: 0 0 0.3rem;
}

/* ============================================
   INLINE-LINKS – feine Messing-Unterstreichung
   ============================================ */

body.leistungen p a {
  color: var(--gold) !important;
  text-decoration: underline;
  text-decoration-color: rgba(168, 134, 90, 0.4);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

body.leistungen p a:hover {
  color: var(--gold-hover) !important;
  text-decoration-color: var(--gold-hover);
}

/* Sichtbarer, markenkonformer Fokus für Tastatur-Navigation */
body.leistungen a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   ZURÜCK-LINK – dezent, mit animierter Linie
   ============================================ */

body.leistungen .back-link {
  margin: 0;
}

body.leistungen .back-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted) !important;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease, gap 0.2s ease;
}

body.leistungen .back-link a span {
  transition: transform 0.2s ease;
}

body.leistungen .back-link a:hover {
  color: var(--gold) !important;
}

body.leistungen .back-link a:hover span {
  transform: translateX(-3px);
}

/* ============================================
   BUTTONS — klare Hierarchie:
   1 primäre Aktion (Messing) + ruhige Sekundär-Buttons
   ============================================ */

body.leistungen nav.links a.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.72rem 1.45rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Primär – gefüllter Messing-Button mit dezentem Schatten */
body.leistungen nav.links a.btn-primary {
  position: relative;
  overflow: hidden;
  background-color: var(--gold) !important;
  color: #16202E !important;
  box-shadow: 0 8px 20px -12px rgba(168, 134, 90, 0.8);
}

/* Gebürstetes Messing: Lichtschimmer folgt dem Cursor (--mx/--my via JS) */
body.leistungen nav.links a.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.5), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

body.leistungen nav.links a.btn-primary:hover::after {
  opacity: 1;
}

body.leistungen nav.links a.btn-primary:hover {
  background-color: var(--gold-hover) !important;
  color: #16202E !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(168, 134, 90, 0.9);
}

/* Sekundär – ruhige Outline-Buttons, füllen sich beim Hover */
body.leistungen nav.links a.btn-ghost {
  background-color: transparent !important;
  color: var(--fg) !important;
  border-color: var(--line);
}

body.leistungen nav.links a.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold) !important;
  transform: translateY(-2px);
}

/* Externe-Link-Pfeil dezent halten */
body.leistungen nav.links a.btn .ext {
  font-size: 0.85em;
  opacity: 0.7;
}

/* Buttonleiste zentriert */
body.leistungen nav.links {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
}

@media (max-width: 480px) {
  body.leistungen nav.links {
    flex-direction: column;
    align-items: stretch;
  }
  body.leistungen nav.links a.btn {
    justify-content: center;
  }
}

/* ============================================
   FOOTER – Links mit Marken-Unterstreichung
   ============================================ */

body.leistungen footer {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--muted);
}

body.leistungen footer a {
  position: relative;
  color: var(--muted) !important;
  text-decoration: none;
  transition: color 0.2s ease;
}

body.leistungen footer a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s ease;
}

body.leistungen footer a:hover {
  color: var(--gold) !important;
}

body.leistungen footer a:hover::after,
body.leistungen footer a:focus-visible::after {
  width: 100%;
}

/* Responsiv */
@media (max-width: 600px) {
  body.leistungen main {
    padding: 2.5rem 1.2rem 3.5rem;
  }
}

/* ============================================
   LESESPUR / BUCHRÜCKEN – Fortschritt links
   ============================================ */
body.leistungen .reading-spine {
  position: fixed;
  top: 0;
  left: 0;
  width: 3px;
  height: 100vh;
  background: var(--line);
  z-index: 60;
}

body.leistungen .reading-spine__fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--gold), var(--gold-hover));
  transition: height 0.12s linear;
}

/* ============================================
   SEITLICHER KAPITEL-INDEX (nur breite Screens)
   ============================================ */
body.leistungen .dossier-index {
  display: none;
}

@media (min-width: 1180px) {
  body.leistungen .dossier-index {
    display: block;
    position: fixed;
    top: 50%;
    left: max(2rem, calc((100vw - 760px) / 2 - 12.5rem));
    transform: translateY(-50%);
    z-index: 55;
    width: 12rem;
  }

  body.leistungen .dossier-index ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
  }

  body.leistungen .dossier-index a {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
    padding-left: 0.9rem;
    text-decoration: none;
    color: var(--muted) !important;
    font-size: 0.85rem;
    line-height: 1.3;
    opacity: 0.5;
    transition: opacity 0.25s ease, color 0.25s ease;
  }

  body.leistungen .dossier-index a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    bottom: 0.3em;
    width: 2px;
    background: var(--gold);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.3s ease;
  }

  body.leistungen .dossier-index .num {
    font-family: var(--font-serif);
    font-size: 0.95rem;
    color: var(--gold) !important;
    flex-shrink: 0;
  }

  body.leistungen .dossier-index a:hover {
    opacity: 1;
    color: var(--fg) !important;
  }

  body.leistungen .dossier-index li.is-active a {
    opacity: 1;
    color: var(--fg) !important;
  }

  body.leistungen .dossier-index li.is-active a::before {
    transform: scaleY(1);
  }
}

/* ============================================
   KONTAKT – Visitenkarte mit Messing-Siegel
   ============================================ */
body.leistungen .kontakt-card {
  position: relative;
  max-width: 34rem;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2.6rem 2rem 2rem;
  box-shadow: 0 30px 60px -36px rgba(22, 32, 46, 0.45);
}

body.leistungen .kontakt-card .seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(168, 134, 90, 0.06);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

body.leistungen .kontakt-card h2 {
  margin-top: 0;
}

/* ============================================
   INSZENIERTER AUFTRITT – sanftes Einblenden
   (nur aktiv, wenn JS bereit ist → ohne JS sichtbar)
   ============================================ */
body.leistungen.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

body.leistungen.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   BEWEGUNG REDUZIEREN – alles ruhig stellen
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  body.leistungen.js-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body.leistungen .leistung .idx,
  body.leistungen .leistung .tools,
  body.leistungen .reading-spine__fill,
  body.leistungen .dossier-index a::before {
    transition: none;
  }
  body.leistungen nav.links a.btn-primary::after {
    display: none;
  }
}