/* Thome & Partner — Editorial Minimal Tax Advisory */

:root {
  --bg: #f6f7f9;
  --bg-soft: #eceff4;
  --bg-deep: #dfe4ec;
  --ink: #141b3c;
  --ink-2: #232b50;
  --muted: #5b6377;
  --muted-2: #8e96a9;
  --line: rgba(20, 27, 60, 0.16);
  --line-soft: rgba(20, 27, 60, 0.09);
  --accent: oklch(0.52 0.1 185);
  --accent-soft: oklch(0.52 0.1 185 / 0.12);
  --tone: #2a3a7c; /* navy duotone for toned imagery (separate from the teal UI accent) */
  /* Bildmarke in den Originalfarben aus Ralphs Logo-PDF (CMYK 100/100/10/50 · 80/10/40/10) */
  --brand: #2d2652;
  --brand-check: #039898;
  --brand-panel: #2d2652; /* Markenfläche hinter den Partnerfotos */
  --error: #b04a3a;

  --serif: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", Times, serif;
  --sans: "Inter", "Inter Fallback", Arial, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(20px, 4vw, 64px);
  --max: 1440px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11"; /* Inter single-story 'a'; ss01 dropped so it can't trigger Fraunces' wonky alternates globally */
  font-optical-sizing: auto;     /* drives Fraunces' opsz axis from font-size (display vs text cut) */
}

a { color: inherit; text-decoration: none; }

/* ─── Layout ─── */
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.row { display: flex; }
.col { display: flex; flex-direction: column; }

/* ─── Nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  border-bottom: 0.5px solid var(--line-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-size: 13.5px;
  letter-spacing: 0.005em;
}
.nav-links a {
  position: relative;
  color: var(--ink-2);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 0.5px;
  background: var(--ink);
  transition: right 0.35s cubic-bezier(.2,.7,.1,1);
}
.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--ink); }

.nav-cta {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 18px;
  border: 0.5px solid var(--ink);
  border-radius: 0;
  transition: background 0.25s ease, color 0.25s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--bg); }

.nav-right { display: flex; align-items: center; gap: 16px; }

.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 0;
  border: 0.5px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--ink); color: var(--ink); }
.theme-toggle svg { display: block; }
/* Spezifität bewusst ≥ .theme-toggle svg — sonst zeigt der helle Modus Mond UND Sonne */
.theme-toggle .theme-icon-sun { display: none; }
[data-theme="charcoal"] .theme-toggle .theme-icon-moon { display: none; }
[data-theme="charcoal"] .theme-toggle .theme-icon-sun { display: block; }

/* ─── Wordmark ─── */
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 620;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.wordmark .glyph {
  height: 30px;
  aspect-ratio: 64.4 / 73.9;
  flex: none;
  position: relative;
}
/* Die Wortmarke steht in den Logofarben, damit Bildmarke und Name eine Einheit bilden */
.wordmark { color: var(--brand); }
.wordmark em {
  font-style: normal;
  font-weight: 620;
  color: var(--brand-check);
}

/* ─── Bildmarke — die echten Vektorpfade aus Ralphs Logo-PDF ───
   Klammern als Flächen, der Haken ist ein Strich entlang seiner Mittellinie, auf die exakte
   Hakenform beschnitten (clipPath) — so kann er sich zeichnen und steht im Ruhezustand pixelgenau. */
.tp-mark { display: block; width: 100%; height: 100%; overflow: visible; }
.tp-mark .tp-a, .tp-mark .tp-b { fill: var(--brand); }
.tp-mark .tp-ck {
  fill: none;
  stroke: var(--brand-check);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 44 60;
  stroke-dashoffset: 0;
}
@keyframes tp-in-a { from { transform: translate(-14px, 4.8px); opacity: 0; } 40% { opacity: 1; } }
@keyframes tp-in-b { from { transform: translate(14px, -4.8px); opacity: 0; } 40% { opacity: 1; } }
@keyframes tp-draw { from { stroke-dashoffset: 46; } }
/* Betreten der Seite: Klammern schließen sich, dann setzt sich der Haken (Klasse aus dem Head-Skript) */
html.tp-intro .nav .tp-a { animation: tp-in-a 1.05s cubic-bezier(.22,1,.36,1) 0.1s both; }
html.tp-intro .nav .tp-b { animation: tp-in-b 1.05s cubic-bezier(.22,1,.36,1) 0.1s both; }
html.tp-intro .nav .tp-ck { animation: tp-draw 0.65s cubic-bezier(.65,0,.35,1) 0.6s both; }
/* Startseite: wartet auf die 3D-Szene (Head-Skript setzt/entfernt tp-hold) */
html.tp-hold .nav .tp-a, html.tp-hold .nav .tp-b, html.tp-hold .nav .tp-ck { animation-play-state: paused; }
/* Hover: der Haken wird neu gesetzt */
.wordmark:hover .tp-ck { animation: tp-draw 0.55s cubic-bezier(.5,0,.2,1) both; }

/* ─── Type ─── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .num { color: var(--accent); }
.eyebrow::before {
  content: "";
  width: 24px;
  height: 0.5px;
  background: var(--muted-2);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 640;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
}

.display {
  font-family: var(--sans);
  font-weight: 660;
  font-size: clamp(44px, 7.6vw, 118px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}
.display em {
  font-style: normal;
  font-weight: 660;
  color: var(--accent);
}

.h1 { font-size: clamp(40px, 6vw, 88px); line-height: 1.0; letter-spacing: -0.03em; }
.h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.08; letter-spacing: -0.025em; }
.h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; letter-spacing: -0.015em; }

/* Accent emphasis inside headings — upright, brand teal */
.h1 em, .h2 em, .accent-em {
  font-style: normal;
  font-weight: inherit;
  color: var(--accent);
}

.lede {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
  font-weight: 300;
}

.body { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.muted { color: var(--muted); }

.mono { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ─── Buttons / Links ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 0;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  border: 0.5px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn .arrow { transition: transform 0.3s cubic-bezier(.2,.7,.1,1); }
.btn:hover .arrow { transform: translateX(4px); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 0.5px solid var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--bg); }

.link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  border-bottom: 0.5px solid currentColor;
  padding-bottom: 2px;
  transition: gap 0.25s ease;
}
.link:hover { gap: 14px; }

/* ─── Hairlines ─── */
.hr { height: 0.5px; background: var(--line); border: 0; margin: 0; }
.hr-soft { background: var(--line-soft); }

/* ─── Sections ─── */
section { padding: clamp(80px, 10vw, 160px) 0; position: relative; }
section.tight { padding: clamp(48px, 6vw, 96px) 0; }

/* Inverted navy panel — a visual caesura without imagery. Flips the local
   design tokens, so everything inside (eyebrows, rules, accents) adapts
   automatically. Constant navy in BOTH themes: clearly darker than porcelain
   in light mode, clearly lifted above the near-black bg in charcoal. */
section.panel {
  background: #151f42;
  --ink: #edf0f7;
  --ink-2: #ccd3e6;
  --muted: #8a93ad;
  --muted-2: #5a6480;
  --line: rgba(237, 240, 247, 0.16);
  --line-soft: rgba(237, 240, 247, 0.08);
  --accent: oklch(0.75 0.1 180);
  --accent-soft: oklch(0.75 0.1 180 / 0.14);
  color: var(--ink);
}

.section-header {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: var(--gutter);
  align-items: end;
  padding-bottom: 48px;
  border-bottom: 0.5px solid var(--line);
  margin-bottom: 48px;
}
@media (max-width: 760px) {
  .section-header { grid-template-columns: 1fr; gap: 24px; align-items: start; }
}

/* ─── Reveal ─── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.1,1), transform 0.9s cubic-bezier(.2,.7,.1,1);
}
.reveal.in { opacity: 1; transform: none; }

/* Stagger by data-i */
.reveal[data-i="1"] { transition-delay: 0.06s; }
.reveal[data-i="2"] { transition-delay: 0.12s; }
.reveal[data-i="3"] { transition-delay: 0.18s; }
.reveal[data-i="4"] { transition-delay: 0.24s; }
.reveal[data-i="5"] { transition-delay: 0.30s; }
.reveal[data-i="6"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .wordmark:hover .tp-ck { animation: none; }
  .hero-title .line-inner,
  .hero-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { scroll-behavior: auto !important; }
}

/* ─── Footer ─── */
.footer {
  border-top: 0.5px solid var(--line);
  padding: 80px var(--gutter) 40px;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 48px;
}
/* Tablet: Marke über die volle Breite, darunter vier Spalten; Telefon: zwei Spalten */
@media (max-width: 1100px) {
  .footer-inner { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
  .footer-inner > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
}
.footer a[href^="mailto:"] { overflow-wrap: anywhere; } /* nur die lange Adresse darf umbrechen */
.footer h4, .footer-h {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--ink-2); font-size: 14px; transition: color 0.2s; }
.footer a:hover { color: var(--accent); }
.footer .wordmark, .footer .wordmark:hover { color: var(--brand); } /* Logo bleibt Logo */
/* Öffnungszeiten: Tage als Label, Zeit in Tabellenziffern — ruhig, eindeutig */
.footer .hours { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.footer .hours + .hours { margin-top: 14px; }
.footer .hours-days { font-size: 14px; color: var(--ink-2); }
.footer .hours-time {
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.footer .hours-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 26ch; }
.footer-bottom {
  max-width: var(--max);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 0.5px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Density tweak ─── */
body[data-density="compact"] section { padding: clamp(48px, 6vw, 96px) 0; }
body[data-density="comfy"] section { padding: clamp(120px, 14vw, 200px) 0; }

/* ─── Theme variants ─── */
[data-theme="ivory"] {
  --bg: #fafbfd;
  --bg-soft: #f0f2f7;
  --bg-deep: #e6eaf2;
}
[data-theme="charcoal"] {
  --bg: #0e1326;
  --bg-soft: #161d36;
  --bg-deep: #1e2643;
  --ink: #e9ecf4;
  --ink-2: #ccd3e6;
  --muted: #828ba3;
  --muted-2: #525b74;
  --line: rgba(233, 236, 244, 0.16);
  --line-soft: rgba(233, 236, 244, 0.08);
  /* Lift the accent + error on near-navy so small text clears WCAG AA */
  --accent: oklch(0.75 0.1 180);
  --accent-soft: oklch(0.75 0.1 180 / 0.14);
  --error: #e08a78;
  --brand: #e9ecf4;
  --brand-check: oklch(0.75 0.1 180);
  --brand-panel: #312c63; /* auf Fast-Schwarz leicht angehoben */
}
[data-theme="sage"] {
  --bg: #e8e9e0;
  --bg-soft: #dcdfd1;
  --bg-deep: #cdd2bf;
  --ink: #1a1f17;
  --ink-2: #2c3326;
}

/* ─── Form ─── */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.field label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 0.5px solid var(--line);
  padding: 10px 0;
  font: inherit;
  color: var(--ink);
  outline: none;
  font-size: 16px;
  font-family: var(--sans);
  font-weight: 450;
  transition: border-color 0.25s ease;
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--ink);
}
.field.error input,
.field.error textarea { border-color: var(--error); }
.field .err {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--error);
  position: absolute;
  bottom: -18px;
  left: 0;
}

/* ─── Marginalia ─── */
.marg {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: baseline;
}
.marg .num {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 6px;
}
@media (max-width: 760px) {
  .marg { grid-template-columns: 1fr; gap: 8px; }
}

/* ─── Image placeholder ─── */
.placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      var(--bg-soft) 0 12px,
      var(--bg-deep) 12px 24px
    );
  border: 0.5px solid var(--line);
  position: relative;
  overflow: hidden;
}
.placeholder::after {
  content: attr(data-label);
  position: absolute;
  top: 16px; left: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 4px 8px;
  border: 0.5px solid var(--line-soft);
}

/* ─── Selection ─── */
::selection { background: var(--accent); color: var(--bg); }

/* ════════════════════════════════════════════════════════════
   Home page sections
   (extracted from the prototype's inline styles + <style> blocks)
   ════════════════════════════════════════════════════════════ */

/* ─── Hero ─── */
.hero {
  padding-top: clamp(60px, 9vw, 140px);
  padding-bottom: clamp(80px, 10vw, 160px);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
  padding-top: 48px;
  border-top: 0.5px solid var(--line);
}
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

/* ─── Partnerfoto im Kanzlei-Abschnitt ───
   Freigestellte Partner vor der Markenfläche; die Köpfe ragen über die Fläche hinaus.
   Fläche = CSS (folgt dem Theme), Personen = transparentes WebP. Maße aus der Bildkomposition. */
.hero-grid.has-partner { grid-template-columns: 1.2fr 1fr; }
.hero-copy { display: grid; gap: 36px; align-content: end; padding-bottom: 8px; }
.partner-fig {
  position: relative;
  margin: 0;
  width: 100%;
  max-width: 500px;
  justify-self: end;
  aspect-ratio: 1200 / 1080;
  clip-path: inset(-40% -20% 0 -20%); /* nach oben frei (Köpfe), unten bündig: kein Schatten unter der Fläche */
}
.partner-fig::before {
  content: "";
  position: absolute;
  left: 5%; right: 5%; top: 52%; bottom: -40px; /* reicht unter die Kante – die Tiefenbewegung zeigt nie eine Lücke */
  background: var(--brand-panel);
  border-radius: clamp(14px, 2.2vw, 24px) clamp(14px, 2.2vw, 24px) 0 0;
  transform: translate3d(0, calc(var(--fig-p, 0) * 44px), 0);
}
.partner-fig img {
  position: absolute;
  left: 6.67%; bottom: -3.26%; /* 3,26 % Körper-Reserve unterhalb der Kante (im Bild enthalten) */
  width: 86.67%; height: auto;
  filter: drop-shadow(0 12px 20px rgb(12 14 34 / 0.2));
  transform: translate3d(0, calc(var(--fig-p, 0) * -18px), 0);
}
/* Tiefenbewegung über eine Scroll-Zeitleiste (Chrome/Edge, Safari 26+): läuft im Compositor, auch
   beim Schwung-Scrollen auf dem Handy flüssig. Strecke wie im Skript: Figur tritt unten ein (−0,5)
   bis sie oben verlässt (+0,5) → Fläche −22…+22 px, Personen +9…−9 px. Ohne Unterstützung setzt
   main.js --fig-p (alle Geräte); mit „Bewegung reduzieren“ bleibt die Ruhelage. */
@keyframes fig-panel { from { transform: translate3d(0, -22px, 0); } to { transform: translate3d(0, 22px, 0); } }
@keyframes fig-people { from { transform: translate3d(0, 9px, 0); } to { transform: translate3d(0, -9px, 0); } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .partner-fig { view-timeline: --fig block; view-timeline-inset: 0; }
    .partner-fig::before { animation: fig-panel linear both; animation-timeline: --fig; }
    .partner-fig img { animation: fig-people linear both; animation-timeline: --fig; }
  }
}

.stats-wrap { margin-top: clamp(80px, 10vw, 140px); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
}
.stats-grid > .stat {
  padding: 26px 24px 22px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-grid > .stat:last-child { border-right: none; }
.stat-i { color: var(--muted); }
.stat-k {
  font-family: var(--sans);
  font-weight: 640;
  font-size: clamp(34px, 3.6vw, 48px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.stat-l {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-top: 6px;
}
.stat-note { color: var(--muted); margin-top: 2px; }

/* ─── Manifest ─── */
.manifest { padding-bottom: clamp(40px, 5vw, 80px); }
.manifest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.manifest-item { padding: 0 24px 0 0; }
.manifest-grid > .manifest-item + .manifest-item {
  border-left: 0.5px solid var(--line);
  padding-left: 32px;
}
.manifest-num {
  font-family: var(--mono);
  font-style: normal;
  font-weight: 500;
  font-size: 13px;
  color: var(--accent);
  display: block;
  margin-bottom: 18px;
}
.manifest-item h3 { margin-bottom: 14px; }
.manifest-d { color: var(--ink-2); max-width: 32ch; }

/* ─── Leistungen ─── */
.leistungen { background: var(--bg-soft); }
/* Journal rows — each service is a Position: check, entry, dotted leader, Pos.-Nr. */
.leistung-row {
  display: grid;
  grid-template-columns: 34px minmax(0, auto) 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 22px 12px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  transition: background-color 0.3s ease;
}
.leistung-row:last-child { border-bottom: 1px solid var(--line); }
.leistung-row:hover { background-color: var(--accent-soft); }
.check {
  width: 18px; height: 18px;
  border: 1.5px solid var(--muted-2);
  position: relative;
  align-self: center;
  transition: border-color 0.2s ease;
}
.check::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5 6 12 13.5 3' fill='none' stroke='%231f8a7d' stroke-width='2.4'/%3E%3C/svg%3E");
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(.2,.7,.1,1);
}
.leistung-row:hover .check { border-color: var(--accent); }
.leistung-row:hover .check::after { opacity: 1; transform: scale(1); }
.leistung-mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.leader { border-bottom: 1.5px dotted var(--muted-2); transform: translateY(-4px); }
.leistung-pos { color: var(--muted); }
.leistung-row:hover .leistung-pos { color: var(--accent); }
.leistung-n { color: var(--muted); }
.leistung-t {
  font-family: var(--sans);
  font-weight: 580;
  font-size: clamp(18px, 1.8vw, 24px);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.leistung-d { color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 50ch; }
.leistung-arrow {
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.3s, color 0.3s;
}
.leistung-row:hover .leistung-arrow { transform: translateX(4px); color: var(--accent); }

/* ─── Papierarchitektur: Material, Tiefe und ein nahtloser Sektionsabschluss ─── */
.paper-interlude {
  position: relative;
  isolation: isolate;
  height: clamp(400px, 46vw, 640px);
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  scroll-margin-top: 24px; /* combines with the page's 76px navigation scroll padding */
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 76%, var(--bg) 100%);
}
.paper-depth-layer {
  position: absolute;
  inset: -160px -4%; /* reserve exceeds the foreground’s maximum ±150px scroll shift */
}
.paper-depth-layer img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  user-select: none;
}
.paper-depth-rear { inset: -28px -4%; z-index: 0; opacity: 0.35; }
.paper-depth-rear img { transform: translateY(-12%) scale(0.94); }
.paper-depth-main { z-index: 1; }
.paper-depth-front { z-index: 2; }
.paper-depth-front img { transform: translate(-8%, 12%) scale(1.1); }
.paper-interlude::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  height: clamp(100px, 14vw, 200px);
  background: linear-gradient(180deg, transparent 0%, var(--bg) 84%, var(--bg) 100%);
}
@media (max-width: 760px) {
  .paper-interlude { height: 340px; }
  .paper-depth-layer { inset: -28px -25%; }
  .paper-depth-rear { opacity: 0.24; }
  .paper-depth-front img { transform: translate(-10%, 10%) scale(1.06); }
  .paper-interlude::after { height: 110px; }
}
/* Tiefenbewegung über eine Scroll-Zeitleiste (Chrome/Edge, Safari 26+), wie beim Partnerfoto:
   jede Ebene wandert über ihre Gesamtstrecke --depth (= data-depth), linear von „tritt unten ein“
   bis „verlässt oben“. Auf dem Handy ist das Fenster ~0,55× so hoch → Strecken entsprechend kürzer.
   Ohne Unterstützung übernimmt main.js (alle Geräte, gleiche Strecken); reduziert: Ruhelage. */
.paper-depth-main { --depth: 120px; }
.paper-depth-front { --depth: 300px; }
@media (max-width: 760px) {
  .paper-depth-main { --depth: 66px; }
  .paper-depth-front { --depth: 165px; }
}
@keyframes paper-depth {
  from { transform: translate3d(0, calc(var(--depth) * -0.5), 0); }
  to { transform: translate3d(0, calc(var(--depth) * 0.5), 0); }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .paper-interlude { view-timeline: --paper block; view-timeline-inset: 0; } /* ohne Nav-Abzug: gleiche Strecke wie das Skript */
    .paper-depth-main,
    .paper-depth-front { animation: paper-depth linear both; animation-timeline: --paper; }
  }
}
@media print {
  .paper-interlude { display: none; }
}

/* ─── Branchen ─── */
.branchen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.branchen-item {
  padding: 40px 28px 40px 0;
  border-top: 0.5px solid var(--line);
}
.branchen-grid > .branchen-item:nth-child(3n+2),
.branchen-grid > .branchen-item:nth-child(3n) {
  border-left: 0.5px solid var(--line);
  padding-left: 32px;
}
.branchen-grid > .branchen-item:nth-child(n+4) {
  border-bottom: 0.5px solid var(--line);
}
.branchen-n { color: var(--muted); display: block; margin-bottom: 18px; }
.branchen-item h3 { margin-bottom: 12px; }
.branchen-d { color: var(--ink-2); font-size: 14.5px; }

/* ─── Kontakt-Teaser ─── */
.kontakt-teaser-section {
  padding-top: clamp(80px, 10vw, 140px);
  padding-bottom: clamp(80px, 10vw, 140px);
}
.kontakt-teaser {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.kontakt-h { margin-top: 28px; margin-bottom: 32px; }
.kontakt-lede { margin-bottom: 40px; }
.kontakt-card {
  padding: 40px;
  background: var(--bg-soft);
  border: 0.5px solid var(--line);
}
.kontakt-card .marg + .marg { margin-top: 28px; }
.marg-label { color: var(--muted); display: block; margin-bottom: 6px; }
.marg-val { font-family: var(--sans); font-size: 16.5px; font-weight: 480; letter-spacing: -0.01em; }

/* ─── Footer extras ─── */
.footer-tag { margin-top: 18px; max-width: 280px; color: var(--muted); font-size: 13px; }
.footer-legal { display: flex; gap: 24px; }

/* ════════════════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════════════════ */

@media (max-width: 860px) {
  .leistung-row { grid-template-columns: 28px 1fr auto; gap: 14px; }
  .leistung-d, .leistung-row .leader { display: none; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: 32px; }
  .hero-grid.has-partner { grid-template-columns: 1fr; gap: 44px; }
  .partner-fig { justify-self: center; max-width: 440px; }

  .kontakt-teaser { grid-template-columns: 1fr; }

  .manifest-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid > .stat { border-right: none; border-bottom: 0.5px solid var(--line); }
  .stats-grid > .stat:nth-child(odd) { border-right: 0.5px solid var(--line); }

  .manifest-grid > .manifest-item,
  .manifest-grid > .manifest-item + .manifest-item {
    border-left: none;
    padding-left: 0;
    padding-top: 32px;
    padding-bottom: 32px;
    border-top: 0.5px solid var(--line);
  }
  /* The section header already draws the rule above the first principle. */
  .manifest-grid > .manifest-item:first-child { border-top: none; }

  .branchen-grid { grid-template-columns: 1fr; }
  .branchen-grid > .branchen-item:nth-child(n) {
    border-left: none;
    padding-left: 0;
  }
}

/* Compact nav for narrower screens (the prototype had no mobile nav).
   The "Mandant werden" CTA duplicates the "Kontakt" link + hero CTAs,
   so it is the first thing to drop once space gets tight. */
@media (max-width: 960px) {
  .nav-links { gap: 24px; }
}
@media (max-width: 860px) {
  .nav-cta { display: none; }
}
@media (max-width: 640px) {
  .nav-links { gap: 18px; font-size: 12.5px; }
}
/* Phones: the Inter wordmark is wider than the old serif one — keep the bar on ONE line.
   "Kanzlei" (= home) goes first: the wordmark itself links home. */
@media (max-width: 560px) {
  .nav-inner { gap: 14px; }
  .wordmark { font-size: 15px; gap: 8px; white-space: nowrap; }
  .wordmark .glyph { height: 26px; }
  .nav-links a:first-child { display: none; }
  .nav-links { gap: 12px; font-size: 12px; }
  .nav-right { gap: 10px; }
  .theme-toggle { width: 32px; height: 32px; }
}
@media (max-width: 420px) {
  .nav-inner { gap: 12px; }
  .nav-links { gap: 10px; font-size: 11.5px; }
}
@media (max-width: 399px) {
  .nav-inner { gap: 10px; }
  .wordmark { font-size: 14px; gap: 7px; }
  .nav-links { gap: 9px; font-size: 11px; }
  .nav-right { gap: 8px; }
}
@media (max-width: 378px) {
  .nav-inner { gap: 8px; }
  .wordmark .glyph { height: 23px; }
  .wordmark { font-size: 13px; gap: 5px; }
  .nav-links { gap: 7px; font-size: 10.5px; }
  .theme-toggle { width: 28px; height: 28px; }
}
@media (max-width: 349px) {
  .theme-toggle { display: none; } /* kleinste Telefone: Darstellung folgt dem System */
}

/* ════════════════════════════════════════════════════════════
   Premium motion polish
   ════════════════════════════════════════════════════════════ */

/* Smooth same-origin page transitions (progressive enhancement;
   unsupported browsers just navigate normally). */
@view-transition { navigation: auto; }

/* Nav gains a faint lift once the page is scrolled */
.nav { transition: box-shadow 0.3s ease, border-color 0.3s ease; }
.nav.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -20px rgba(14, 14, 12, 0.35);
}

/* ─── Hero entrance choreography ───
   Hidden initial states apply ONLY when JS confirms motion is allowed
   (html.anim-ready, set synchronously in <head>). Without JS or with
   reduced motion, the hero shows immediately. A <head> failsafe adds
   .is-loaded after 2.5s so the hero can never get stuck hidden. */
.hero-title .line {
  display: block;
  /* Maske fürs Einfahren: unten bündig (Polster 0,2em für Unterlängen), oben und seitlich frei —
     bei Zeilenhöhe 0,98 ragen Ü-Punkte & Akzente über die Zeilenbox und wurden mit overflow:hidden
     (v. a. in Safari/iOS) abgeschnitten. clip-path ändert das Layout nicht. */
  clip-path: inset(-0.3em -0.2em 0 -0.2em);
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}
.hero-title .line-inner { display: block; }

html.anim-ready .hero-title .line-inner {
  transform: translateY(120%);
  transition: transform 0.95s cubic-bezier(.2,.7,.1,1);
}
html.anim-ready .hero-fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2,.7,.1,1);
}

html.anim-ready.is-loaded .hero-title .line .line-inner { transform: translateY(0); }
html.anim-ready.is-loaded .hero-title .line:nth-child(1) .line-inner { transition-delay: 0.05s; }
html.anim-ready.is-loaded .hero-title .line:nth-child(2) .line-inner { transition-delay: 0.15s; }
html.anim-ready.is-loaded .hero-title .line:nth-child(3) .line-inner { transition-delay: 0.25s; }
html.anim-ready.is-loaded .hero-fade { opacity: 1; transform: none; }
html.anim-ready.is-loaded .hero-fade.d1 { transition-delay: 0s; }
html.anim-ready.is-loaded .hero-fade.d2 { transition-delay: 0.45s; }

/* ════════════════════════════════════════════════════════════
   Cover hero — full-bleed toned image with the headline overlaid.
   Light text over a darkened, bronze-duotone photo (both themes).
   ════════════════════════════════════════════════════════════ */
.hero-cover {
  position: relative;
  min-height: clamp(480px, 78vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-cover-media { position: absolute; inset: 0; z-index: 0; }
.hero-cover-media picture { display: block; width: 100%; height: 100%; }
.hero-cover-media img,
.hero-cover-media video,
.hero-cover-media canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04) brightness(0.72);
}
/* Bronze duotone */
.hero-cover-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--tone);
  mix-blend-mode: color;
  opacity: 0.3;
}
/* Dark scrim — strongest on the left where the headline sits */
.hero-cover-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,10,22,0.78) 0%, rgba(7,10,22,0.58) 42%, rgba(7,10,22,0.22) 72%, rgba(7,10,22,0) 100%),
    linear-gradient(to top, rgba(7,10,22,0.45), rgba(7,10,22,0) 46%);
}
.hero-cover-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: clamp(72px, 11vh, 132px);
  padding-bottom: clamp(56px, 9vh, 112px);
}
.hero-cover .display { font-size: clamp(42px, 7.4vw, 120px); color: #f2f5fa; }
/* Deliberate navy-&-gold pairing: the em accent over imagery stays scene-lit warm,
   while the UI accent below is brand teal. */
.hero-cover .display em { color: oklch(0.82 0.1 72); }
.hero-cover .eyebrow { color: rgba(242, 245, 250, 0.82); }
.hero-cover .eyebrow::before { background: rgba(242, 245, 250, 0.5); }
.hero-cover .eyebrow .num { color: oklch(0.82 0.1 72); }

/* Always available alongside the cinematic story, including without scripts. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  margin-top: 32px;
}
.hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.4;
}
/* Same behaviour as .btn, inverted for the always-dark image: a porcelain
   fill that empties on hover. No teal over imagery — gold stays the only
   accent there (see .hero-cover .display em). */
.hero-action-primary {
  padding: 14px 20px;
  border: 0.5px solid #f2f5fa;
  background: #f2f5fa;
  color: #141b3c;
  transition: background 0.25s ease, color 0.25s ease;
}
.hero-action-primary:hover { background: transparent; color: #f2f5fa; }
.hero-action-secondary {
  padding: 10px 0;
  color: #f2f5fa;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.hero-action-secondary:hover { text-decoration-thickness: 2px; }
.hero-actions a:focus-visible { outline-color: #f2f5fa; }
@media (max-width: 560px) {
  .hero-actions { flex-direction: column; align-items: flex-start; margin-top: 24px; }
}
@media (max-height: 700px) and (min-aspect-ratio: 1/1) {
  .hero-cover:not([data-story]) { padding: 0; }
  .hero-cover:not(.is-scrub) { min-height: calc(100svh - 76px); }
  .hero-cover-inner { padding-top: 24px; padding-bottom: 96px; }
  .hero-cover .display { font-size: clamp(42px, 12vh, 84px); }
  .hero-actions { margin-top: 24px; }
}
[data-theme="charcoal"] .hero-cover-media img,
[data-theme="charcoal"] .hero-cover-media video,
[data-theme="charcoal"] .hero-cover-media canvas { filter: grayscale(1) contrast(1.05) brightness(0.64); }

/* Content that follows the cover hero (lede / cta / stats / lead grid) */
.hero-tail {
  padding: clamp(48px, 6vw, 96px) 0 clamp(72px, 9vw, 140px);
  scroll-margin-top: 24px;
}

@media (max-width: 760px) {
  .hero-cover { min-height: clamp(440px, 82vh, 600px); }
  .hero-cover-media::before {
    background: linear-gradient(to top, rgba(7,10,22,0.74) 6%, rgba(7,10,22,0.4) 48%, rgba(7,10,22,0.2) 100%);
  }
}

/* ════════════════════════════════════════════════════════════
   Editorial signature — Drop-Cap + Leitsatz / Credo
   A printed-page voice: an initial that opens the page, and a
   single set statement that carries the firm's Haltung.
   ════════════════════════════════════════════════════════════ */

/* ─── Leitsatz / Credo ─── */
.credo .shell { text-align: center; max-width: 1000px; }
.credo-eyebrow { justify-content: center; margin-bottom: clamp(28px, 4vw, 48px); }
.credo-quote {
  margin: 0;
  font-family: var(--sans);
  font-weight: 630;
  font-size: clamp(24px, 3.6vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-wrap: balance;
}
.credo-quote em { font-style: italic; color: var(--accent); }
.credo-line { display: block; overflow: hidden; }
.credo-line > span { display: block; will-change: transform; padding-bottom: 0.04em; }

/* Masked line-rise — gated on .anim-ready, so no-JS and reduced-motion always show the text */
html.anim-ready .credo-line > span {
  transform: translateY(118%);
  transition: transform 1s cubic-bezier(.2, .7, .1, 1);
}
html.anim-ready .credo-quote.reveal.in .credo-line > span { transform: none; }
html.anim-ready .credo-line:nth-child(1) > span { transition-delay: 0.02s; }
html.anim-ready .credo-line:nth-child(2) > span { transition-delay: 0.10s; }
html.anim-ready .credo-line:nth-child(3) > span { transition-delay: 0.18s; }
html.anim-ready .credo-line:nth-child(4) > span { transition-delay: 0.26s; }

.credo-cite {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: clamp(36px, 5vw, 60px);
}
.credo-cite-rule { width: 40px; height: 0.5px; background: var(--muted-2); }
.credo-cite cite { font-style: normal; color: var(--muted); font-size: 11px; }

/* On small screens the manual line breaks would double-wrap and clip — let the
   statement flow naturally instead (inline also nullifies the transform, so the
   lines simply fade in with the block). */
@media (max-width: 560px) {
  .credo-line,
  .credo-line > span { display: inline; overflow: visible; }
}

/* ════════════════════════════════════════════════════════════
   Scroll-depth (parallax) + premium detail polish
   ════════════════════════════════════════════════════════════ */

/* ─── Hero parallax ───
   The drift is applied by main.js as an inline transform on the media child
   ONLY, and ONLY while body.has-parallax is set (desktop, fine-pointer, motion
   allowed). The overscan/scale therefore never touches the iOS/touch/no-JS/
   reduced-motion majority — their hero stays a pixel-exact object-fit:cover.
   The ::before scrim and ::after duotone live on .hero-cover-media and are
   never transformed, so the toning stays pinned while the photo drifts. */
.hero-cover { --parallax-headroom: 7%; }
body.has-parallax .hero-cover-media .hero-cover-video,
body.has-parallax .hero-cover-media picture {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--parallax-headroom) / -2);
  height: calc(100% + var(--parallax-headroom));
  will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
  /* belt-and-suspenders: neutralize even if .has-parallax somehow lands */
  body.has-parallax .hero-cover-media .hero-cover-video,
  body.has-parallax .hero-cover-media picture { transform: none !important; top: 0; height: 100%; }
}

/* ─── Keyboard focus ring (a11y) ───
   Neutral var(--ink) — highest-contrast token in BOTH themes, and it clears
   3:1 over the new bronze card-hover wash where a bronze ring would not. */
/* No border-radius here: the outline follows each element's own radius, so
   pill/circle controls (.btn/.nav-cta/.theme-toggle) keep their shape on focus. */
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
/* Form fields carry outline:none for their underline look — restore a ring for
   keyboard users (additive: they get the bottom-border darken AND the ring). */
.field input:focus-visible,
.field textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ─── Tabular figures so the count-up never reflows ─── */
.stat-k { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ─── Tactile press feedback (suppressed under reduced motion) ─── */
.btn { transition: background 0.25s ease, color 0.25s ease, transform 0.12s ease; }
.nav-cta { transition: background 0.25s ease, color 0.25s ease, transform 0.12s ease; }
.theme-toggle { transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.12s ease; }
@media (prefers-reduced-motion: no-preference) {
  .btn:active { transform: translateY(1px) scale(0.985); }
  .nav-cta:active, .theme-toggle:active { transform: scale(0.97); }
}

/* ─── Hover micro-feedback on the inert grid cards ───
   Background/colour only — NO translate lift: these cells share 0.5px hairline
   borders with their neighbours, and lifting one would notch the continuous
   editorial rule. @media(hover:hover) keeps it off sticky-:hover touch screens. */
@media (hover: hover) {
  .stat, .branchen-item, .manifest-item { transition: background-color 0.35s ease; }
  .stat:hover,
  .branchen-item:hover,
  .manifest-item:hover { background-color: color-mix(in oklab, var(--accent-soft) 60%, transparent); }
  .branchen-item h3, .manifest-item h3 { transition: color 0.3s ease; }
  .branchen-item:hover h3, .manifest-item:hover h3 { color: var(--accent); }
}

/* ─── Smooth in-page scrolling, clearing the sticky nav ───
   The reduced-motion block above already forces scroll-behavior:auto. */
html { scroll-behavior: smooth; scroll-padding-top: 76px; }

/* ─── Themed, restrained scrollbar ─── */
html { scrollbar-width: thin; scrollbar-color: var(--muted-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: color-mix(in oklab, var(--muted-2) 70%, transparent);
  border-radius: 999px;
  border: 2px solid var(--bg);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ─── Footer sign-off: firm punchline + RapidSpark maker credit ─── */
.footer-signoff {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: var(--max);
  margin: 32px auto 0;
  padding-top: 30px;
  border-top: 0.5px solid var(--line-soft);
  text-align: center;
}
/* Schlusszeichen: die Marke groß über der Punchline — beim Hereinscrollen schließen sich die
   Klammern und der Haken setzt sich („Zahlen, die aufgehen.“). Ohne Bewegung: steht einfach da. */
.signoff-mark { display: block; height: 64px; aspect-ratio: 64.4 / 73.9; margin-bottom: 4px; }
html.anim-ready .signoff-mark .tp-a,
html.anim-ready .signoff-mark .tp-b { transition: transform 1s cubic-bezier(.2,.7,.1,1) 0.15s; }
html.anim-ready .signoff-mark .tp-a { transform: translate(-13px, 4.5px); }
html.anim-ready .signoff-mark .tp-b { transform: translate(13px, -4.5px); }
html.anim-ready .signoff-mark .tp-ck { stroke-dashoffset: 46; transition: stroke-dashoffset 0.6s cubic-bezier(.5,0,.2,1) 0.85s; }
html.anim-ready .signoff-mark.in .tp-a,
html.anim-ready .signoff-mark.in .tp-b { transform: none; }
html.anim-ready .signoff-mark.in .tp-ck { stroke-dashoffset: 0; }
.footer-punch {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 620;
  font-size: clamp(18px, 2.1vw, 25px);
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}
.footer-punch em { font-style: italic; color: var(--accent); }
/* Maker credit — links to rapidspark.de. Higher specificity than `.footer a`
   so the wordmark text (currentColor) reads muted, not the footer-link colour. */
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.footer .footer-credit { color: var(--muted); transition: color 0.3s ease; }
.footer-credit-by {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-credit-mark { display: block; width: 116px; height: auto; }
.footer-credit-mark text { font-family: "Space Grotesk", var(--sans); }
.footer .footer-credit:hover { color: var(--ink-2); }
@media (max-width: 480px) {
  .footer-credit { flex-direction: column; gap: 8px; }
}

/* ─── Inline icon glyphs — arrows drawn in the site's own hairline voice
   (the → / ↗ glyphs are not in the font subsets and fell back to system fonts) ─── */
.ic { display: inline-block; flex: none; }

/* ─── Footer trust line (Kammer + Verschwiegenheit — real, verifiable signals) ─── */
.footer-trust {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.9;
}

/* ─── Body copy micro-polish ─── */
.body, .lede { text-wrap: pretty; hyphens: auto; }
.nowrap { white-space: nowrap; }

/* ─── Print: mandates print things — readable, chrome-free, always light ─── */
@media print {
  :root, [data-theme="charcoal"] {
    --bg: #fff; --bg-soft: #fff; --bg-deep: #fff;
    --ink: #111; --ink-2: #222; --muted: #555; --muted-2: #777;
    --line: #ccc; --line-soft: #ddd; --accent: #555; --accent-soft: transparent;
  }
  body { background: #fff; }
  body::after { display: none !important; } /* film grain */
  .nav, .theme-toggle, .hero-cover-media, .hero-cta, .hero-actions, .footer-signoff { display: none !important; }
  .hero-cover { min-height: auto; }
  .hero-cover .display { color: #111; }
  .hero-cover .eyebrow { color: #555; }
  .hero-cover .eyebrow .num { color: #555; }
  .reveal, .hero-fade, .hero-title .line-inner, .credo-line > span {
    opacity: 1 !important; transform: none !important;
  }
  section { padding: 24px 0; }
}

/* ─── Hero Ken-Burns montage (home) — CSS-only crossfade + slow zoom ───
   Three toned stills cross-dissolve on a calm 24s loop, each with a gentle
   Ken-Burns push. Pure CSS: autoplays everywhere, no JS, no scroll-jack.
   The ::before scrim + ::after duotone (on .hero-cover-media) tone it as one. */
.kb { position: absolute; inset: 0; z-index: 0; }
.kb-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: kbFade 24s linear infinite both;
}
.kb-slide:first-child { opacity: 1; } /* static fallback before/without animation */
.kb-slide:nth-child(2) { animation-delay: 8s; }
.kb-slide:nth-child(3) { animation-delay: 16s; }
.kb-slide img { animation: kbZoom 24s ease-out infinite both; animation-delay: inherit; }
.kb-slide:nth-child(2) img { transform-origin: top right; }
.kb-slide:nth-child(3) img { transform-origin: bottom left; }

@keyframes kbFade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  33% { opacity: 1; }
  38% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes kbZoom {
  0% { transform: scale(1.02); }
  38% { transform: scale(1.14); }
  100% { transform: scale(1.14); }
}

@media (prefers-reduced-motion: reduce) {
  .kb-slide,
  .kb-slide img { animation: none; }
  .kb-slide { opacity: 0; }
  .kb-slide:first-child { opacity: 1; }
  .kb-slide:first-child img { transform: none; }
}

/* ─── Hero scroll-scrub (home · desktop · motion) — JS-driven cinematic sequence ───
   The hero pins while a tall track scrolls; scroll progress draws the matching
   frame to a canvas. Applied only when main.js adds these classes, so mobile /
   reduced-motion / no-JS keep the untouched Ken-Burns montage hero. */
.hero-scrub-track { position: relative; height: 280vh; } /* 3 acts (Ankommen → Zahlen → Ruhe) */

/* Per-act statements that cross-dissolve in lockstep with the scrub acts.
   Stacked absolutely so only one shows at a time (opacity driven by main.js);
   on mobile / no-scrub only the masthead (act 0) is ever visible. */
.hero-heads { position: relative; }
.hero-stmt {
  position: absolute;
  top: 0; left: 0; right: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  text-wrap: balance;
}
.hero-cover.is-scrub {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 100vh;
}
.hero-scrub-canvas { position: absolute; inset: 0; z-index: 0; }
/* The purpose-built ledger clip is already warm and on-palette — let its natural
   colour breathe rather than forcing it through the grayscale→bronze duotone.
   The ::before scrim stays for headline legibility; the ::after duotone is off. */
.hero-cover-media .hero-scrub-canvas { filter: contrast(1.04) brightness(0.9) saturate(1.05); }
[data-theme="charcoal"] .hero-cover-media .hero-scrub-canvas { filter: contrast(1.05) brightness(0.78) saturate(1.04); }
.hero-cover.is-scrub .hero-cover-media::after { opacity: 0; }

/* ─── Handy-Menü (≤ 760 px, nur mit JS: html.navjs) ───
   Ohne JS bleibt die einzeilige Linkleiste. Mit JS: Menü-Knopf + aufklappende Liste
   mit großen Tippflächen und direkter Anruf-Zeile. */
.nav-toggle, .nav-phone { display: none; }
@media (max-width: 760px) {
  html.navjs .nav-toggle {
    display: inline-flex; align-items: center; gap: 10px;
    height: 40px; padding: 0 14px;
    border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink);
    font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer;
  }
  html.navjs .nav-toggle-icon { position: relative; width: 14px; height: 8px; }
  html.navjs .nav-toggle-icon::before, html.navjs .nav-toggle-icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform 0.25s ease, top 0.25s ease;
  }
  html.navjs .nav-toggle-icon::before { top: 0; }
  html.navjs .nav-toggle-icon::after { top: 6.5px; }
  html.navjs .nav.is-open .nav-toggle-icon::before { top: 3.25px; transform: rotate(45deg); }
  html.navjs .nav.is-open .nav-toggle-icon::after { top: 3.25px; transform: rotate(-45deg); }

  html.navjs .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; gap: 0;
    padding: 4px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -24px rgba(7, 10, 22, 0.35);
  }
  html.navjs .nav.is-open .nav-links { display: flex; }
  html.navjs .nav-links a,
  html.navjs .nav-links a:first-child {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 52px; padding: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 18px; font-weight: 580; letter-spacing: -0.01em; color: var(--ink);
  }
  html.navjs .nav-links a::after { display: none; }
  html.navjs .nav-links a.active { color: var(--accent); }
  html.navjs .nav-links .nav-phone {
    margin-top: 14px; justify-content: center; min-height: 48px;
    border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
    font-size: 15px; font-weight: 560;
  }
  html.navjs .nav-inner { gap: 12px; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) {
  html.navjs .nav-toggle-icon::before, html.navjs .nav-toggle-icon::after { transition: none; }
}

/* ════════════════════════════════════════════════════════════
   Startseite: Marken-Hero „Klammer zu“ — Motion Graphics statt 3D-Story (17.10.)
   Text links; rechts die echte Bildmarke auf feinem Rechenpapier. Ablauf nach dem Laden
   (≈ 2,6 s, Start mit der Headline bzw. sobald die Bühne im Bild ist): Konturen zeichnen sich → füllen sich →
   die Klammern gleiten entlang ihrer Schräge zusammen, die „Differenz“ zählt auf 0,00
   (main.js) → Einrasten → der Haken setzt sich, im Gleichschritt mit dem Haken der Navigation.
   Nur mit html.hm-intro (Head-Skript, Bewegung erlaubt); ohne JS / mit „Bewegung reduzieren“
   steht sofort das fertige Bild. Bühne in Logo-Einheiten: viewBox −42 −16 148,4 × 116.
   ════════════════════════════════════════════════════════════ */
:root { --hm-cone: #fbfcfd; --hm-grid: rgba(20, 27, 60, 0.055); }
[data-theme="charcoal"] { --hm-cone: #161d36; --hm-grid: rgba(237, 240, 247, 0.045); }

.hero-mark {
  position: relative;
  padding: 0;                     /* Abstände trägt .hm-inner (die globale section-Polsterung wäre hier zu viel) */
  min-height: max(560px, min(calc(100svh - 77px), 940px));
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(60% 70% at 71% 50%, var(--hm-cone) 0%, var(--bg) 70%);
}
.hm-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: clamp(48px, 8vh, 112px);
  padding-bottom: clamp(48px, 8vh, 112px);
}
.hm-copy { max-width: min(600px, 46vw); }
.hm-eyebrow { margin-bottom: 32px; }
/* Zeilenhöhe etwas offener als sonst (0,98): das Ü am Zeilenanfang braucht Luft zur Zeile darüber */
.hero-mark .display { font-size: clamp(40px, 5.2vw, 84px); line-height: 1.05; color: var(--ink); }
.hero-mark .display em { color: var(--accent); }
.hm-lede {
  margin: 28px 0 0;
  max-width: 30ch;
  font-size: clamp(17px, 1.35vw, 20px);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: balance;
}
/* Die Hero-Aktionen sind für das dunkle Foto gebaut — hier auf heller (bzw. dunkler) Seitenfläche */
.hero-mark .hero-action-primary { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.hero-mark .hero-action-primary:hover { background: transparent; color: var(--ink); }
.hero-mark .hero-action-secondary { color: var(--ink-2); }
.hero-mark .hero-action-secondary:hover { color: var(--accent); }
.hero-mark .hero-actions a:focus-visible { outline-color: var(--ink); }

/* Bühne: rechts, zentriert um 71 % / 50 %; Seitenverhältnis = viewBox */
.hm-stage {
  position: absolute;
  left: 71%;
  top: 50%;
  width: min(46vw, calc(78svh * 1.2793), 720px);
  aspect-ratio: 148.4 / 116;
  translate: -50% -50%;
  pointer-events: none;
}
.hm-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hm-a, .hm-b { fill: var(--brand); }
.hm-ck {
  fill: none;
  stroke: var(--brand-check);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 44 60;
}
.hm-g { transform-box: fill-box; transform-origin: center; }
/* Rechenpapier: feine Karos, die zum Rand hin auslaufen */
.hm-grid {
  position: absolute;
  inset: -16% -20%;
  background-image:
    linear-gradient(to right, var(--hm-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hm-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: center;
  -webkit-mask-image: radial-gradient(closest-side at 50% 46%, #000 35%, transparent);
          mask-image: radial-gradient(closest-side at 50% 46%, #000 35%, transparent);
}
/* Vorspann: Buchungszeilen auf dem Rechenpapier (SVG-Einheiten; nur während der Animation) */
.hm-ledger { display: none; }
.hm-l-rule {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: left center;
}
.hm-l-k { font-family: var(--mono); font-size: 2.5px; letter-spacing: 0.12em; fill: var(--muted); }
.hm-l-v { font-family: var(--mono); font-size: 3.4px; font-variant-numeric: tabular-nums; fill: var(--ink-2); }
.hm-l-ck {
  fill: none;
  stroke: var(--brand-check);
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 3;
}
/* Prüfvermerk unter der Marke: „Differenz … 0,00“ mit Summenstrich — erscheint aus den Zeilen,
   zählt mit den Klammern auf null, steht eine Sekunde und blendet dann aus (nur während der Animation) */
.hm-row {
  display: none;
  position: absolute;
  left: 28.3%;
  right: 28.3%;
  top: 86%;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0 11px;
  font-family: var(--mono);
}
.hm-row::before,
.hm-row::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  transform-origin: left;
}
.hm-row::before { top: 0; border-top: 1px solid var(--line); }
.hm-row::after {
  bottom: 0;
  height: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hm-row-k { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hm-row-v {
  font-size: clamp(13px, 1.05vw, 16px);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--brand-check);
}

/* Hochformat (Handy, Tablet hochkant): Text oben, Bühne darunter */
@media (max-aspect-ratio: 1/1) {
  .hero-mark { flex-direction: column; align-items: stretch; min-height: 0; }
  .hm-inner { padding-top: clamp(24px, 4svh, 56px); padding-bottom: 0; }
  .hm-copy { max-width: 640px; }
  .hm-eyebrow { margin-bottom: 20px; }
  .hm-lede { margin-top: 20px; }
  /* Buttons nebeneinander, solange sie passen (sonst bricht der zweite um) — spart eine Zeile */
  .hero-mark .hero-actions { flex-direction: row; align-items: center; margin-top: 24px; }
  .hm-stage {
    position: relative;
    left: auto;
    top: auto;
    translate: none;
    width: min(calc(100% - 2 * var(--gutter)), calc(40svh * 1.2793), 520px);
    margin: clamp(8px, 2svh, 24px) auto clamp(24px, 4svh, 48px);
  }
}
@media (max-height: 700px) and (min-aspect-ratio: 1/1) {
  .hero-mark .display { font-size: clamp(40px, 12vh, 84px); }
  .hm-lede { margin-top: 18px; }
}

/* ─── Choreografie — Zeiten ab html.hm-go (Headline startet UND Bühne zu gut der Hälfte im Bild,
   main.js); vorher steht alles pausiert im Startbild. Gesamt ≈ 5,9 s:
     0,15–1,5   Vorspann: fünf Buchungszeilen erscheinen, je Zeile ein Häkchen
     1,45–1,6   Prüfvermerk „Differenz 2.418,40“ entsteht, die Zeilen blenden aus
     --hm-t +    Marke: Konturen → Füllung → Klammern gleiten zusammen (Differenz → 0,00)
                 → Einrasten → Haken (+ Nav-Haken); 1 s später blendet der Prüfvermerk langsam aus ─── */
:root { --hm-t: 1.85s; --hm-out: cubic-bezier(.23, 1, .32, 1); }
@keyframes hm-grid-in { from { opacity: 0; transform: scale(0.96); } }
@keyframes hm-trace { from { stroke-dashoffset: 101; } }   /* 101/102: kein Rest-Punkt an der Naht */
@keyframes hm-fill { from { fill-opacity: 0; } }
@keyframes hm-unstroke { to { stroke-opacity: 0; } }
@keyframes hm-glide-a { from { transform: translate(-22.7px, 7.8px); } }   /* entlang der Armschräge */
@keyframes hm-glide-b { from { transform: translate(22.7px, -7.8px); } }
@keyframes hm-lock { 45% { transform: scale(0.988); } }
@keyframes hm-rule { from { transform: scaleX(0); } }
@keyframes hm-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes hm-teal { from { color: var(--ink); } }
@keyframes hm-l-in { from { opacity: 0; transform: translateY(1.6px); } }    /* SVG-Einheiten */
@keyframes hm-l-out { to { opacity: 0; transform: translateY(-1.2px); } }
@keyframes hm-l-draw { from { stroke-dashoffset: 1.12; } }  /* runde Kappe ragt sonst als Punkt vor */
@keyframes hm-fade-out { to { opacity: 0; } }

html.hm-intro .hm-ledger { display: inline; }
html.hm-intro .hm-row { display: flex; }
html.hm-intro .hm-a,
html.hm-intro .hm-b {
  stroke: var(--brand);
  stroke-width: 0.45;
  stroke-linejoin: round;
  stroke-dasharray: 100 102;
}
html.hm-intro .hm-grid { animation: hm-grid-in 1s var(--hm-out) both; }

/* Vorspann: Zeile für Zeile */
html.hm-intro .hm-l-rule { animation: hm-rule 0.5s var(--hm-out) calc(0.15s + var(--i) * 0.13s) both; }
html.hm-intro .hm-l-k { animation: hm-l-in 0.4s var(--hm-out) calc(0.2s + var(--i) * 0.13s) both; }
html.hm-intro .hm-l-v { animation: hm-l-in 0.4s var(--hm-out) calc(0.26s + var(--i) * 0.13s) both; }
html.hm-intro .hm-l-ck { animation: hm-l-draw 0.26s cubic-bezier(.65, 0, .35, 1) calc(0.72s + var(--i) * 0.15s) both; }
html.hm-intro .hm-l { animation: hm-l-out 0.45s cubic-bezier(.4, 0, .2, 1) calc(1.72s + var(--i) * 0.06s) both; }

/* Prüfvermerk */
html.hm-intro .hm-row { animation: hm-fade-out 1.3s cubic-bezier(.4, 0, .2, 1) calc(var(--hm-t) + 2.77s) both; }
html.hm-intro .hm-row::before { animation: hm-rule 0.55s var(--hm-out) 1.45s both; }
html.hm-intro .hm-row-k { animation: hm-rise 0.5s var(--hm-out) 1.55s both; }
html.hm-intro .hm-row-v {
  animation:
    hm-rise 0.5s var(--hm-out) 1.6s both,
    hm-teal 0.3s ease calc(var(--hm-t) + 1.77s) backwards;
}
html.hm-intro .hm-row::after { animation: hm-rule 0.5s var(--hm-out) calc(var(--hm-t) + 1.8s) both; }

/* Marke */
html.hm-intro .hm-a {
  animation:
    hm-trace 0.8s cubic-bezier(.65, 0, .35, 1) calc(var(--hm-t) + 0.1s) both,
    hm-fill 0.4s var(--hm-out) calc(var(--hm-t) + 0.64s) both,
    hm-unstroke 0.3s ease calc(var(--hm-t) + 0.86s) both,
    hm-glide-a 0.85s cubic-bezier(.77, 0, .175, 1) calc(var(--hm-t) + 0.92s) both;
}
html.hm-intro .hm-b {
  animation:
    hm-trace 0.8s cubic-bezier(.65, 0, .35, 1) calc(var(--hm-t) + 0.18s) both,
    hm-fill 0.4s var(--hm-out) calc(var(--hm-t) + 0.7s) both,
    hm-unstroke 0.3s ease calc(var(--hm-t) + 0.9s) both,
    hm-glide-b 0.85s cubic-bezier(.77, 0, .175, 1) calc(var(--hm-t) + 0.92s) both;
}
html.hm-intro .hm-g { animation: hm-lock 0.32s var(--hm-out) calc(var(--hm-t) + 1.77s) both; }
html.hm-intro .hm-ck { animation: tp-draw 0.7s cubic-bezier(.65, 0, .35, 1) calc(var(--hm-t) + 1.86s) both; }

html.hm-intro:not(.hm-go) :is(.hm-grid, .hm-l, .hm-l-rule, .hm-l-k, .hm-l-v, .hm-l-ck, .hm-row, .hm-row-k, .hm-row-v, .hm-a, .hm-b, .hm-g, .hm-ck),
html.hm-intro:not(.hm-go) .hm-row::before,
html.hm-intro:not(.hm-go) .hm-row::after { animation-play-state: paused; }
/* Die Marke in der Navigation steht und setzt ihren Haken im Gleichschritt mit dem großen neu */
html.hm-intro.hm-go .nav .wordmark .tp-ck { animation: tp-draw 0.7s cubic-bezier(.65, 0, .35, 1) calc(var(--hm-t) + 1.86s) forwards; }
html.hm-intro .nav .wordmark:hover .tp-ck { animation: tp-draw 0.55s cubic-bezier(.5, 0, .2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .hm-stage :is(.hm-grid, .hm-a, .hm-b, .hm-g, .hm-ck),
  .hm-row::before,
  .hm-row::after { animation: none !important; }
  .hm-ledger, .hm-row { display: none !important; }
}
