/* ============================================================
   MABO IMMOBILIEN – Impressum
   Legal content layout and the plan-sheet model in the hero.
   ============================================================ */

/* ── Legal content ── */
.legal__grid {
  display: grid;
  gap: var(--space-7);
}
.legal__toc {
  align-self: start;
  font-size: var(--fs-sm);
}
.legal__toc ol {
  display: grid;
  gap: 0.15rem;
  list-style: none;
  counter-reset: toc;
  border-left: 1px solid var(--line);
}
.legal__toc li { counter-increment: toc; }
.legal__toc a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  margin-left: -1px;
  padding-left: var(--space-4);
  color: var(--text-muted);
  border-left: 1px solid transparent;
  transition: color var(--dur-2), border-color var(--dur-2);
}
.legal__toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: var(--fs-label);
  font-weight: 600;
  color: var(--accent-text);
}
.legal__toc a:hover,
.legal__toc a[aria-current="true"] { color: var(--text-strong); border-left-color: var(--accent); }
.legal__body { display: grid; gap: clamp(3rem, 2rem + 3vw, 5rem); min-width: 0; }
.legal__section { display: grid; gap: var(--space-5); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.legal__section > .eyebrow { margin-bottom: calc(var(--space-2) * -1); }
.legal__section h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  line-height: 1.15;
}
.legal-facts {
  display: grid;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}
.legal-facts__row {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-4) clamp(1rem, 0.6rem + 1.5vw, 2rem);
}
.legal-facts__row + .legal-facts__row { border-top: 1px solid var(--line); }
.legal-facts dt {
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--accent-text);
}
.legal-facts dd { color: var(--text-strong); overflow-wrap: anywhere; }
.legal-facts a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.legal-facts a:hover { color: var(--text-strong); }
.legal__contact {
  display: grid;
  gap: var(--space-3);
  padding: clamp(1.5rem, 1rem + 2vw, 2.75rem);
  background: var(--lime-100);
  border-left: 2px solid var(--accent);
}
.legal__contact h2 { font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.7rem); }
.legal__contact a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.legal__contact a:hover { color: var(--text-strong); }
@media (min-width: 48em) {
  .legal-facts__row { grid-template-columns: 13rem minmax(0, 1fr); gap: var(--space-5); align-items: baseline; }
}
@media (min-width: 64em) {
  .legal__grid { grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(3rem, 6vw, 7rem); }
  .legal__toc { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* ── Planmappe: stacked plan sheets in the hero ── */
.axo--sheets {
  --axo-turn: -30deg;
  --axo-y: 6%;
  width: min(70vw, 21rem);
  aspect-ratio: 1 / 0.8;
  margin-inline: auto;
}
.axo-sheet {
  --i: 0;
  position: absolute;
  left: 14%;
  top: 24%;
  width: 72%;
  height: 51%;
  color: var(--gold-300);
  background: #1b1a17;
  border: 1px solid rgb(205 176 122 / 0.5);
  box-shadow: 0 1cqw 3cqw rgb(0 0 0 / 0.35);
  transform:
    translateZ(calc(var(--i) * (2.2cqw + var(--p, 0) * 2.4cqw)))
    rotateZ(calc((var(--i) - 2) * (5deg + var(--p, 0) * 5deg)));
  animation: sheet-in 1.2s var(--ease-out) both;
  animation-delay: calc(0.3s + var(--i) * 0.12s);
}
.axo-sheet svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}
.axo-sheet text {
  font-family: var(--font-serif);
  fill: currentColor;
  stroke: none;
}
.axo-sheet .soft { opacity: 0.45; }
.axo-sheet:nth-child(2) { --i: 1; }
.axo-sheet:nth-child(3) { --i: 2; }
.axo-sheet:nth-child(4) { --i: 3; }
.axo-sheet:nth-child(5) { --i: 4; }
.axo-sheet--top {
  background: #25231f;
  border-color: var(--gold-300);
  animation:
    sheet-in 1.2s var(--ease-out) both,
    sheet-lift 5s var(--ease-in-out) 2.1s infinite alternate;
  animation-delay: 0.78s, 2.1s;
}
@keyframes sheet-in {
  from { opacity: 0; translate: 0 0 26cqw; rotate: z 16deg; }
}
@keyframes sheet-lift {
  to { translate: 0 0 3.5cqw; rotate: z -4deg; }
}
@media (min-width: 64em) {
  .page-hero--impressum .page-hero__layout { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
  .axo--sheets { width: 100%; max-width: 22rem; margin: -3rem 0 -4rem auto; }
}
