/* ==========================================================================
   Rechtsanwalt Detlef G.O. Baarth — Kanzlei für Immobilienrecht, Magdeburg
   Design System & Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Farben – „Classical“: Pergament, Tinte & Gold */
  --ink-900: #251b0d;
  --ink-800: #2f2312;
  --ink: #2a2012;
  --ink-soft: #4a3a1f;
  --paper: #faf5e9;
  --paper-warm: #f1e8d3;
  --white: #fffdf6;
  --brass: #a9762f;
  --brass-bright: #c1913f;
  --brass-soft: rgba(169, 118, 47, 0.13);
  --text: #382c1a;
  --text-muted: #6d5c40;
  --text-on-dark: #f1e9d7;
  --text-on-dark-muted: #c0af8d;
  --line: rgba(58, 44, 25, 0.16);
  --line-on-dark: rgba(241, 233, 215, 0.16);

  /* Typografie */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;

  /* Layout */
  --container: 1200px;
  --container-narrow: 780px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-pad: clamp(4.5rem, 10vw, 8.5rem);
  --radius: 4px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.7s;

  --header-h: 84px;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

ul[class],
ol[class] {
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

::selection {
  background: var(--brass);
  color: var(--white);
}

/* Skip-Link (Barrierefreiheit) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 1rem;
}

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

/* --------------------------------------------------------------------------
   3. Typografie
   -------------------------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

.kicker::before {
  content: '';
  width: 2.5rem;
  height: 1px;
  background: var(--brass);
  flex-shrink: 0;
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.125rem);
  max-width: 22ch;
  margin-bottom: 1.5rem;
}

.section-title em {
  font-style: italic;
  color: var(--brass);
}

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--text-muted);
  max-width: 60ch;
}

/* Auf dunklem Grund */
.on-dark h1,
.on-dark h2,
.on-dark h3,
.on-dark .section-title {
  color: var(--white);
}

.on-dark,
.on-dark p {
  color: var(--text-on-dark);
}

.on-dark .lead {
  color: var(--text-on-dark-muted);
}

/* --------------------------------------------------------------------------
   4. Layout-Hilfen
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--section-pad);
  position: relative;
}

/* Verhindert, dass die fixe Kopfzeile Inhalte verdeckt, egal wie zum Anker gescrollt wird */
#kanzlei,
#honorar,
#ablauf,
#faq,
#kontakt-anfahrt {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section--dark {
  background: linear-gradient(180deg, var(--ink-800) 0%, var(--ink) 100%);
}

.section--warm {
  background: var(--paper-warm);
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

/* --------------------------------------------------------------------------
   5. Buttons & Links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 1rem 1.875rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background-color 0.25s, color 0.25s, border-color 0.25s;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--brass);
  color: var(--white);
  box-shadow: 0 10px 24px -10px rgba(169, 118, 47, 0.55);
}

.btn--primary:hover {
  background: var(--brass-bright);
  box-shadow: 0 14px 30px -10px rgba(169, 118, 47, 0.65);
}

.btn--ghost {
  border: 1px solid var(--line-on-dark);
  color: var(--white);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(4px);
}

.btn--ghost:hover {
  border-color: var(--brass);
  color: var(--brass-bright);
}

.btn--outline {
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--brass);
  color: var(--brass);
}

.btn .btn-arrow {
  transition: transform 0.25s var(--ease-out);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--brass);
}

.link-more::after {
  content: '→';
  transition: transform 0.25s var(--ease-out);
}

.link-more:hover::after {
  transform: translateX(5px);
}

/* --------------------------------------------------------------------------
   6. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.35s, box-shadow 0.35s, height 0.35s;
}

.site-header.is-scrolled {
  height: 68px;
  background: rgba(250, 245, 233, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--ink);
}

/* Auf dunklen Flächen (Footer) bleibt die Marke hell */
.site-footer .brand {
  color: var(--white);
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--brass);
  transition: background-color 0.3s;
}

.site-footer .brand-mark,
.portrait-placeholder .brand-mark {
  color: var(--brass-bright);
}

.brand:hover .brand-mark {
  background: var(--brass-soft);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-footer .brand-sub {
  color: var(--text-on-dark-muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.site-nav a:not(.btn) {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  padding-block: 0.5rem;
  transition: color 0.25s;
}

.site-nav a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}

.site-nav a:not(.btn):hover,
.site-nav a[aria-current='page']:not(.btn) {
  color: var(--brass);
}

.site-nav a:not(.btn):hover::after,
.site-nav a[aria-current='page']:not(.btn)::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-nav .btn {
  padding: 0.7rem 1.375rem;
  font-size: 0.875rem;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  z-index: 120;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s;
}

.nav-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 110;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    background: linear-gradient(160deg, var(--paper), var(--paper-warm));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .site-nav a:not(.btn) {
    font-family: var(--font-display);
    font-size: 1.75rem;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out),
      color 0.25s;
  }

  .site-nav.is-open a:not(.btn) {
    opacity: 1;
    transform: translateY(0);
  }

  .site-nav.is-open a:nth-child(1) { transition-delay: 0.08s; }
  .site-nav.is-open a:nth-child(2) { transition-delay: 0.14s; }
  .site-nav.is-open a:nth-child(3) { transition-delay: 0.2s; }
  .site-nav.is-open a:nth-child(4) { transition-delay: 0.26s; }
  .site-nav.is-open a:nth-child(5) { transition-delay: 0.32s; }

  body.nav-locked {
    overflow: hidden;
  }
}

/* Scroll-Fortschrittsbalken */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 101;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brass), var(--brass-bright));
  transform-origin: left;
  transform: scaleX(0);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: calc(var(--header-h) + 3rem) 6rem;
  background:
    radial-gradient(1100px 600px at 78% 18%, rgba(169, 118, 47, 0.10), transparent 60%),
    radial-gradient(900px 700px at 12% 90%, rgba(193, 145, 63, 0.12), transparent 65%),
    linear-gradient(165deg, #fdfaf1 0%, var(--paper) 55%, var(--paper-warm) 100%);
  overflow: hidden;
}

/* Feines Linienraster */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 44, 25, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 44, 25, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, black 30%, transparent 75%);
}

.hero .container {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1rem;
  margin-bottom: 1.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--brass);
  border: 1px solid rgba(169, 118, 47, 0.4);
  border-radius: 100px;
  background: rgba(169, 118, 47, 0.07);
}

.hero-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 0 rgba(169, 118, 47, 0.5);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(169, 118, 47, 0); }
  100% { box-shadow: 0 0 0 0 rgba(169, 118, 47, 0); }
}

.hero h1 {
  font-size: clamp(2.625rem, 6.2vw, 4.625rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 1.625rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--brass);
}

.hero .lead {
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Gestaffelte Einblendung */
.hero-stagger > * {
  opacity: 0;
  transform: translateY(26px);
  animation: rise 0.9s var(--ease-out) forwards;
}

.hero-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.hero-stagger > *:nth-child(2) { animation-delay: 0.22s; }
.hero-stagger > *:nth-child(3) { animation-delay: 0.34s; }
.hero-stagger > *:nth-child(4) { animation-delay: 0.46s; }
.hero-stagger > *:nth-child(5) { animation-delay: 0.58s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Skyline-Illustration */
.hero-art {
  position: relative;
}

.hero-art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.skyline-path {
  fill: none;
  stroke: rgba(169, 118, 47, 0.85);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skyline-path--faint {
  stroke: rgba(58, 44, 25, 0.3);
  stroke-width: 1.2;
}

.js .skyline-path {
  stroke-dasharray: var(--path-len, 1200);
  stroke-dashoffset: var(--path-len, 1200);
  animation: draw 2.6s var(--ease-out) forwards;
  animation-delay: var(--draw-delay, 0.5s);
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.hero-art-caption {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Scroll-Hinweis */
.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-hint::after {
  content: '';
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--brass), transparent);
  animation: drip 2s var(--ease-out) infinite;
}

@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-art {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   8. Vertrauensleiste & Kennzahlen
   -------------------------------------------------------------------------- */
.stats-band {
  border-block: 1px solid var(--line-on-dark);
  background-color: rgba(255, 255, 255, 0.02);
}

.award-note {
  max-width: 640px;
  margin: 0 auto 2rem;
  padding: 1.25rem 1.75rem;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-on-dark);
}

.award-note strong {
  color: var(--brass-bright);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat {
  padding: 2.5rem 2rem;
  text-align: center;
  border-inline-start: 1px solid var(--line-on-dark);
}

.stat:first-child {
  border-inline-start: none;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  font-weight: 600;
  color: var(--brass-bright);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--text-on-dark-muted);
}

@media (max-width: 720px) {
  .stat {
    border-inline-start: none;
    border-top: 1px solid var(--line-on-dark);
    padding: 1.75rem 1rem;
  }

  .stat:first-child {
    border-top: none;
  }
}

/* --------------------------------------------------------------------------
   9. Kompetenz-Karten (Rechtsgebiete)
   -------------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.25rem 2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.35s;
}

.area-card:hover {
  transform: translateY(-6px);
  border-color: rgba(169, 118, 47, 0.45);
  box-shadow: 0 24px 48px -20px rgba(58, 44, 25, 0.22);
}

/* Cursor-Spotlight (wird per JS mit --mx/--my versorgt) */
.area-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    340px circle at var(--mx, 50%) var(--my, 50%),
    rgba(169, 118, 47, 0.09),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.area-card:hover::before {
  opacity: 1;
}

.area-card-num {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--brass);
  margin-bottom: 1.375rem;
}

.area-card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 1.375rem;
  color: var(--brass);
}

.area-card-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.area-card p {
  font-size: 0.9688rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.area-card .link-more {
  font-size: 0.875rem;
}

.area-card-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(var(--brass), var(--brass-bright));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.4s var(--ease-out);
}

.area-card:hover .area-card-line {
  transform: scaleY(1);
}

/* --------------------------------------------------------------------------
   10. Über / Portrait
   -------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: center;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 440px;
}

.portrait-frame::before {
  content: '';
  position: absolute;
  inset: 1.375rem -1.375rem -1.375rem 1.375rem;
  border: 1px solid var(--brass);
  border-radius: var(--radius);
  transition: inset 0.45s var(--ease-out);
}

.portrait-frame:hover::before {
  inset: 0.875rem -0.875rem -0.875rem 0.875rem;
}

.portrait-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--ink-soft), var(--ink-900));
  display: grid;
  place-items: center;
}

.portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--text-on-dark-muted);
  text-align: center;
  padding: 2rem;
}

.portrait-placeholder .brand-mark {
  width: 72px;
  height: 72px;
  font-size: 2.25rem;
}

.about-quote {
  margin-block: 1.75rem;
  padding-inline-start: 1.5rem;
  border-inline-start: 2px solid var(--brass);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--ink);
}

.about-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  margin-top: 2rem;
}

.about-fact {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.about-fact svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 3px;
  stroke: var(--brass);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kanzlei-gallery {
  margin-top: clamp(3rem, 7vw, 5.5rem);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -32px rgba(58, 44, 25, 0.3);
}

.kanzlei-gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.kanzlei-gallery figcaption {
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .portrait-frame {
    margin-inline: auto;
  }
}

/* --------------------------------------------------------------------------
   11. Ablauf / Prozess-Zeitleiste
   -------------------------------------------------------------------------- */
.process-list {
  counter-reset: step;
  display: grid;
  gap: 0;
  position: relative;
}

.process-step {
  counter-increment: step;
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.75rem;
  padding-block: 2.25rem;
  border-top: 1px solid var(--line-on-dark);
}

.process-step:last-child {
  border-bottom: 1px solid var(--line-on-dark);
}

.process-step-num {
  position: relative;
}

.process-step-num::before {
  content: '0' counter(step);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-style: italic;
  color: var(--brass-bright);
  line-height: 1;
}

.process-step h3 {
  font-size: 1.4375rem;
  margin-bottom: 0.5rem;
}

.process-step p {
  color: var(--text-on-dark-muted);
  font-size: 0.9688rem;
  max-width: 62ch;
}

.process-step .step-bar {
  position: absolute;
  left: 0;
  top: -1px;
  height: 1px;
  width: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease-out);
}

.process-step.is-visible .step-bar {
  transform: scaleX(1);
}

@media (max-width: 620px) {
  .process-step {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   12. Zitat-Band
   -------------------------------------------------------------------------- */
.quote-band {
  text-align: center;
}

.quote-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.375rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink);
  max-width: 26ch;
  margin-inline: auto;
}

.quote-band blockquote span {
  color: var(--brass);
}

.quote-band figcaption {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.6;
  color: var(--brass);
  opacity: 0.55;
  display: block;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   13. FAQ / Akkordeon
   -------------------------------------------------------------------------- */
.faq-list {
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 2vw, 1.4375rem);
  font-weight: 600;
  color: var(--ink);
  transition: color 0.25s;
}

.faq-question:hover {
  color: var(--brass);
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color 0.3s, background-color 0.3s, transform 0.4s var(--ease-out);
}

.faq-icon::before,
.faq-icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease-out);
}

.faq-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-item.is-open .faq-icon {
  background: var(--brass);
  border-color: var(--brass);
  color: var(--white);
  transform: rotate(135deg);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.faq-answer > div {
  overflow: hidden;
}

.faq-item.is-open .faq-answer {
  grid-template-rows: 1fr;
}

.faq-answer p {
  padding-bottom: 1.75rem;
  color: var(--text-muted);
  font-size: 0.9688rem;
  max-width: 68ch;
}

/* --------------------------------------------------------------------------
   14. CTA-Band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(800px 400px at 85% 20%, rgba(169, 118, 47, 0.18), transparent 60%),
    linear-gradient(150deg, var(--ink-900), var(--ink-soft));
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cta-inner h2 {
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  color: var(--white);
  max-width: 20ch;
}

.cta-inner h2 em {
  font-style: italic;
  color: var(--brass-bright);
}

.cta-contacts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.cta-phone {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  transition: color 0.25s;
}

.cta-phone:hover {
  color: var(--brass-bright);
}

.cta-phone svg {
  width: 22px;
  height: 22px;
  stroke: var(--brass-bright);
  fill: none;
  stroke-width: 1.6;
}

/* --------------------------------------------------------------------------
   15. Kontakt-Seite
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: flex-start;
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.info-card {
  display: flex;
  gap: 1.125rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  transition: transform 0.3s var(--ease-out), border-color 0.3s;
}

.info-card:hover {
  transform: translateX(6px);
  border-color: rgba(169, 118, 47, 0.45);
}

.info-card-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--brass-soft);
  border-radius: var(--radius);
  color: var(--brass);
}

.info-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.info-card h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.info-card p,
.info-card a {
  font-size: 1.0313rem;
  color: var(--ink);
  font-weight: 500;
}

.info-card a:hover {
  color: var(--brass);
}

.info-card small {
  display: block;
  color: var(--text-muted);
  font-size: 0.8438rem;
  font-weight: 400;
}

/* Formular */
.contact-form {
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(58, 44, 25, 0.18);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-field {
  position: relative;
  margin-bottom: 1.25rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 1.375rem 1rem 0.625rem;
  font: inherit;
  font-size: 0.9688rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.form-field textarea {
  min-height: 150px;
  resize: vertical;
}

.form-field label {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 0.9688rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: top 0.22s var(--ease-out), font-size 0.22s, color 0.22s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(169, 118, 47, 0.18);
}

.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label,
.form-field select:focus ~ label,
.form-field select:valid ~ label {
  top: 0.375rem;
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: transparent;
}

.form-field .field-error {
  display: none;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #b0413e;
}

.form-field.has-error input,
.form-field.has-error textarea {
  border-color: #b0413e;
}

.form-field.has-error .field-error {
  display: block;
}

.form-consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  font-size: 0.8438rem;
  color: var(--text-muted);
}

.form-consent input {
  margin-top: 4px;
  accent-color: var(--brass);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.form-consent a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-consent a:hover {
  color: var(--brass);
}

.form-success {
  display: none;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  background: rgba(63, 125, 88, 0.1);
  border: 1px solid rgba(63, 125, 88, 0.4);
  border-radius: var(--radius);
  color: #2e5f43;
  font-size: 0.9375rem;
}

.form-success.is-visible {
  display: block;
}

.form-note {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   16. Unterseiten-Hero & Rechtsgebiets-Detail
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding-block: calc(var(--header-h) + clamp(3.5rem, 8vw, 6rem)) clamp(3.5rem, 7vw, 5.5rem);
  background:
    radial-gradient(900px 480px at 82% 10%, rgba(169, 118, 47, 0.10), transparent 60%),
    linear-gradient(160deg, #fdfaf1 0%, var(--paper) 70%, var(--paper-warm) 100%);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(58, 44, 25, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 44, 25, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 90% 90% at 50% 0%, black 20%, transparent 80%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(2.375rem, 5.5vw, 3.875rem);
  font-weight: 500;
  color: var(--ink);
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--brass);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-bottom: 2rem;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--brass);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin-inline-start: 0.625rem;
  opacity: 0.5;
}

/* Detail-Abschnitte mit Sprungnavigation */
.detail-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: flex-start;
}

.detail-nav {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  border-inline-start: 1px solid var(--line);
}

.detail-nav a {
  padding: 0.625rem 1.125rem;
  font-size: 0.9063rem;
  color: var(--text-muted);
  border-inline-start: 2px solid transparent;
  margin-inline-start: -1.5px;
  transition: color 0.25s, border-color 0.25s;
}

.detail-nav a:hover,
.detail-nav a.is-active {
  color: var(--brass);
  border-inline-start-color: var(--brass);
}

@media (max-width: 860px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    border: none;
  }

  .detail-nav a {
    border: 1px solid var(--line);
    border-radius: 100px;
    padding: 0.5rem 1rem;
    margin: 0;
  }

  .detail-nav a:hover,
  .detail-nav a.is-active {
    border-color: var(--brass);
  }
}

.detail-section {
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 2rem);
}

.detail-section:first-child {
  padding-top: 0;
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h2 {
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  margin-bottom: 1rem;
}

.detail-section h2 .detail-num {
  font-style: italic;
  color: var(--brass);
  margin-inline-end: 0.75rem;
}

.detail-section p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  max-width: 68ch;
}

.detail-section p strong {
  color: var(--ink);
}

.check-list {
  display: grid;
  gap: 0.75rem;
  margin-block: 1.25rem;
}

.check-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9688rem;
  color: var(--text);
}

.check-list svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  stroke: var(--brass);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.highlight-box {
  padding: 1.5rem 1.75rem;
  margin-block: 1.5rem;
  background: var(--brass-soft);
  border-inline-start: 3px solid var(--brass);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.highlight-box p {
  margin: 0;
  color: var(--ink);
  font-size: 0.9688rem;
}

/* --------------------------------------------------------------------------
   17. Rechtstexte (Impressum / Datenschutz)
   -------------------------------------------------------------------------- */
.legal-content h2 {
  font-size: 1.625rem;
  margin: 2.75rem 0 1rem;
}

.legal-content h3 {
  font-size: 1.1875rem;
  font-family: var(--font-body);
  font-weight: 600;
  margin: 1.75rem 0 0.625rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  font-size: 0.9688rem;
  margin-bottom: 0.875rem;
}

.legal-content ul {
  padding-inline-start: 1.25rem;
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-content address {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.9688rem;
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   18. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink-900);
  color: var(--text-on-dark-muted);
  padding-top: clamp(3.5rem, 7vw, 5.5rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-about p {
  font-size: 0.9063rem;
  max-width: 34ch;
  margin-top: 1.25rem;
}

.footer-col h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col ul {
  display: grid;
  gap: 0.625rem;
}

.footer-col a {
  font-size: 0.9375rem;
  transition: color 0.25s;
}

.footer-col a:hover {
  color: var(--brass-bright);
}

.footer-col address {
  font-style: normal;
  font-size: 0.9375rem;
  line-height: 1.8;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line-on-dark);
  font-size: 0.8125rem;
}

.footer-bottom nav {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom a:hover {
  color: var(--brass-bright);
}

/* Nach-oben-Button */
.to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 90;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--white);
  border: 1px solid var(--line-on-dark);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease-out),
    background-color 0.25s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--brass);
  border-color: var(--brass);
}

.to-top svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------------------------------
   19. Cookie- / Datenschutzhinweis
   -------------------------------------------------------------------------- */
.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 140%);
  z-index: 150;
  width: min(560px, calc(100% - 2rem));
  padding: 1.375rem 1.5rem;
  background: var(--ink);
  color: var(--text-on-dark);
  border: 1px solid var(--line-on-dark);
  border-radius: 8px;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
  transition: transform 0.5s var(--ease-out);
}

.consent-banner.is-visible {
  transform: translate(-50%, 0);
}

.consent-banner p {
  font-size: 0.875rem;
  color: var(--text-on-dark-muted);
  margin-bottom: 1rem;
}

.consent-banner a {
  color: var(--brass-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-banner .btn {
  padding: 0.625rem 1.375rem;
  font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   20. Scroll-Reveal-Animationen
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

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

.js .reveal--left {
  transform: translateX(-36px);
}

.js .reveal--right {
  transform: translateX(36px);
}

.js .reveal--left.is-visible,
.js .reveal--right.is-visible {
  transform: translateX(0);
}

.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.js [data-reveal-group].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.js [data-reveal-group].is-visible > *:nth-child(1) { transition-delay: 0s; }
.js [data-reveal-group].is-visible > *:nth-child(2) { transition-delay: 0.1s; }
.js [data-reveal-group].is-visible > *:nth-child(3) { transition-delay: 0.2s; }
.js [data-reveal-group].is-visible > *:nth-child(4) { transition-delay: 0.3s; }
.js [data-reveal-group].is-visible > *:nth-child(5) { transition-delay: 0.4s; }
.js [data-reveal-group].is-visible > *:nth-child(6) { transition-delay: 0.5s; }

/* --------------------------------------------------------------------------
   21. Reduzierte Bewegung & Druck
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal,
  .js [data-reveal-group] > *,
  .hero-stagger > * {
    opacity: 1;
    transform: none;
  }

  .js .skyline-path {
    stroke-dashoffset: 0;
    animation: none;
  }
}

@media print {
  .site-header,
  .scroll-progress,
  .to-top,
  .consent-banner,
  .scroll-hint,
  .cta-band {
    display: none !important;
  }

  body {
    background: #fff;
  }
}

/* --------------------------------------------------------------------------
   22. Brand Motion (aus Claude Design: „Baarth Legal Brand Motion“)
   Ein Bewegungsprinzip: die laufende Linie (stroke-dashoffset),
   Kurve cubic-bezier(0.22, 1, 0.36, 1). Endzustände stehen im Markup —
   bei prefers-reduced-motion steht alles sofort.
   -------------------------------------------------------------------------- */
@keyframes mg-draw {
  from { stroke-dashoffset: 100; }
}

@keyframes mg-letter {
  from { opacity: 0; filter: blur(6px); transform: translateY(4px); }
}

@keyframes mg-fade {
  from { opacity: 0; }
}

/* 08 · Logo-Aufbau — Original-Zeichen: fünf Balken wachsen vom Fuß auf.
   Farben aus dem Original-Logo (#e78b41 / #f0a668 / #f6bd8e), sie tragen
   auf Papier wie auf Tinte. */
@keyframes bar-rise {
  from { transform: scaleY(0); }
}

@keyframes bar-wave {
  0% { transform: translateY(0); }
  40% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

.brand-logo {
  display: block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.logo-bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.js .logo-bar {
  animation: bar-rise 0.45s var(--ease-out) calc(var(--bar-i, 0) * 0.06s) both;
}

.portrait-placeholder .brand-logo {
  width: 92px;
  height: 52px;
}

/* 04 · Skyline hinter dem Porträt: Linien zeichnen vom Porträt nach außen */
.hero-skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 260px;
  z-index: 0;
  pointer-events: none;
}

.hero-skyline path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.js .hero-skyline path {
  animation: mg-draw var(--sky-dur, 1.2s) var(--ease-out) var(--sky-delay, 0.6s) both;
}

.hero-portrait {
  position: relative;
  z-index: 1;
}

.portrait-frame-line {
  position: absolute;
  inset: 0;
  transform: translate(16px, 16px);
  overflow: visible;
  pointer-events: none;
}

.portrait-frame-line rect {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.js .hero-portrait .portrait-frame-line rect {
  animation: mg-draw 1.4s var(--ease-out) 0.35s both;
}

.hero-portrait-img {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-warm);
}

.js .hero-portrait-img {
  animation: mg-fade 1s var(--ease-out) 0.55s both;
}

.hero-portrait-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 12%;
  filter: saturate(0.88) contrast(1.03);
}

/* Leiser Tinte-Verlauf am Fuß bindet das Bild an den Grund */
.hero-portrait-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42, 32, 18, 0.32), rgba(42, 32, 18, 0) 38%);
}

.hero--no-portrait .hero-portrait {
  display: none;
}

.hero--no-portrait .container {
  grid-template-columns: 1fr;
}

/* Schmale Viewports: Porträt bleibt sichtbar und rückt an den Seitenanfang,
   kompakt über der Headline */
@media (max-width: 900px) {
  .hero {
    padding-block: calc(var(--header-h) + 1.5rem) 5.5rem;
  }

  .hero-portrait {
    order: -1;
    width: min(58vw, 270px);
    justify-self: start;
  }

  .hero-portrait .portrait-frame-line {
    transform: translate(10px, 10px);
  }

  .hero-skyline {
    height: 190px;
  }

  .scroll-hint {
    display: none;
  }
}

/* 03 · Kanzlei Scroll-Reveal: Porträt tritt aus dem Duoton in die Farbe */
.portrait-reveal {
  position: relative;
  max-width: 440px;
}

.portrait-reveal .frame-svg {
  position: absolute;
  inset: 0;
  transform: translate(16px, 16px);
  overflow: visible;
  pointer-events: none;
}

.portrait-reveal .frame-svg rect {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.5s var(--ease-out) 0.3s;
}

.portrait-stack {
  position: relative;
  isolation: isolate;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--ink-soft), var(--ink-900));
}

.portrait-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 12%;
}

/* Duoton ohne Verfremdung: Graustufen + Tinte (lighten) + Papier (darken) */
.portrait-grey {
  filter: grayscale(1) contrast(1.04);
}

.overlay-ink,
.overlay-paper {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.overlay-ink {
  background: var(--ink);
  mix-blend-mode: lighten;
}

.overlay-paper {
  background: var(--paper-warm);
  mix-blend-mode: darken;
}

.portrait-color {
  opacity: 0;
  transition: opacity 1.1s var(--ease-out) 0.45s;
}

#kanzlei.is-inview .portrait-reveal .frame-svg rect {
  stroke-dashoffset: 0;
}

#kanzlei.is-inview .portrait-color {
  opacity: 1;
}

/* Fallback, solange kein Porträtfoto hinterlegt ist */
.portrait-reveal .portrait-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
}

.portrait-reveal.portrait-missing .portrait-fallback {
  display: grid;
  place-items: center;
}

.portrait-reveal.portrait-missing .portrait-stack img,
.portrait-reveal.portrait-missing .overlay-ink,
.portrait-reveal.portrait-missing .overlay-paper {
  display: none;
}

/* 06 · Sektions-Trennlinie: die laufende Linie mit Monogramm-Quadrat */
@keyframes dv-draw {
  0% { stroke-dashoffset: 100; }
  40% { stroke-dashoffset: 53.2; }
  70% { stroke-dashoffset: 46.8; }
  100% { stroke-dashoffset: 0; }
}

.brand-divider {
  display: block;
  width: min(720px, 100%);
  height: 64px;
  margin-inline: auto;
}

.brand-divider path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.js .brand-divider path {
  stroke-dashoffset: 100;
}

.js .brand-divider.is-visible path {
  animation: dv-draw 2.2s var(--ease-out) both;
}

/* --------------------------------------------------------------------------
   23. Kontakt-Sichtbarkeit: Header-Telefon, Kontaktleiste, Karte, Quickbar
   -------------------------------------------------------------------------- */
/* Telefonnummer im Header */
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: color 0.25s;
}

.nav-phone svg {
  width: 17px;
  height: 17px;
  stroke: var(--brass);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-phone:hover {
  color: var(--brass);
}

@media (max-width: 1080px) and (min-width: 901px) {
  .nav-phone span {
    display: none; /* nur Icon, wenn es eng wird */
  }
}

/* Kontaktzeile im Hero */
.hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin-top: 1.75rem;
  font-size: 0.9688rem;
  color: var(--text-muted);
}

.hero-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.hero-contact a:hover {
  color: var(--brass);
}

.hero-contact svg {
  width: 17px;
  height: 17px;
  stroke: var(--brass);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Kontakt-Kacheln (dunkle Sektion, groß und unübersehbar) */
.contact-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.contact-tile {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.625rem 1.5rem;
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

.contact-tile:hover {
  border-color: var(--brass);
  transform: translateY(-4px);
}

.contact-tile-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
}

.contact-tile-label svg {
  width: 16px;
  height: 16px;
  stroke: var(--brass-bright);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-tile-value {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}

a.contact-tile:hover .contact-tile-value {
  color: var(--brass-bright);
}

.contact-tile small {
  font-size: 0.8438rem;
  color: var(--text-on-dark-muted);
}

/* Google-Maps-Einbindung (Zwei-Klick, DSGVO) */
.map-embed {
  position: relative;
  aspect-ratio: 16 / 8;
  min-height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-on-dark);
  background:
    radial-gradient(600px 300px at 70% 20%, rgba(169, 118, 47, 0.12), transparent 60%),
    linear-gradient(160deg, var(--ink-soft), var(--ink-900));
}

.section:not(.on-dark) .map-embed {
  border-color: var(--line);
  background:
    radial-gradient(600px 300px at 70% 20%, rgba(169, 118, 47, 0.1), transparent 60%),
    var(--paper-warm);
}

.map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
}

.map-consent p {
  max-width: 46ch;
  font-size: 0.9063rem;
  margin: 0;
}

.map-consent .map-address {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
}

.map-consent-note {
  font-size: 0.8125rem !important;
  opacity: 0.8;
}

.map-consent-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.map-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
}

/* Mobile Schnellkontakt-Leiste */
.quickbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink-900);
  border-top: 1px solid var(--line-on-dark);
  padding-bottom: env(safe-area-inset-bottom);
}

.quickbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 0.5rem;
  font-size: 0.8438rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
}

.quickbar a + a {
  border-inline-start: 1px solid var(--line-on-dark);
}

.quickbar svg {
  width: 17px;
  height: 17px;
  stroke: var(--brass-bright);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 720px) {
  .quickbar {
    display: grid;
  }

  body {
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }

  body.nav-locked .quickbar {
    display: none;
  }

  .to-top {
    bottom: calc(60px + env(safe-area-inset-bottom));
  }
}
