/* ============================================================
   Gesellschaftsrecht – Extras
   • Animierte Mini-Grafiken über "Unternehmensnachfolge" und
     "Umwandlung & Restrukturierung"
   • Hover-Effekt + Stagger-Slide-In für die Checklist-Items
   ============================================================ */

/* --- Section visual --- */
.section-visual {
  position: relative;
  width: clamp(140px, 28vw, 200px);
  height: clamp(90px, 18vw, 130px);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.section-visual svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Nachfolge: figure → building (animated) → figure ---------- */
.section-visual--nachfolge .nf-building {
  transform-box: fill-box;
  transform-origin: center;
  animation: nf-handover 5.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes nf-handover {
  0%   { transform: translateX(0)    translateY(0)    scale(1);    opacity: 1; }
  35%  { transform: translateX(0)    translateY(-6px) scale(1.05); opacity: 1; }
  55%  { transform: translateX(58px) translateY(-6px) scale(1.05); opacity: 1; }
  85%, 100% { transform: translateX(58px) translateY(0) scale(1); opacity: 1; }
}
.section-visual--nachfolge .nf-arrow {
  transform-box: fill-box;
  transform-origin: center;
  animation: nf-arrow-flow 5.5s linear infinite;
}
@keyframes nf-arrow-flow {
  0%, 100% { opacity: 0.3; }
  40%, 70% { opacity: 1;   }
}
.section-visual--nachfolge .nf-glow-left {
  transform-box: fill-box;
  transform-origin: center;
  animation: nf-glow-l 5.5s ease-in-out infinite;
}
.section-visual--nachfolge .nf-glow-right {
  transform-box: fill-box;
  transform-origin: center;
  animation: nf-glow-r 5.5s ease-in-out infinite;
}
@keyframes nf-glow-l {
  0%, 30%  { opacity: 1;   }
  60%, 100%{ opacity: 0.35;}
}
@keyframes nf-glow-r {
  0%, 50%  { opacity: 0.35; }
  85%, 100%{ opacity: 1;    }
}
.section-visual--nachfolge .nf-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: nf-dot-pulse 5.5s ease-in-out infinite;
}
.section-visual--nachfolge .nf-dot:nth-child(2) { animation-delay: 0.6s; }
.section-visual--nachfolge .nf-dot:nth-child(3) { animation-delay: 1.2s; }
.section-visual--nachfolge .nf-dot:nth-child(4) { animation-delay: 1.8s; }
.section-visual--nachfolge .nf-dot:nth-child(5) { animation-delay: 2.4s; }
@keyframes nf-dot-pulse {
  0%, 100% { opacity: 0.3; transform: scale(1);    }
  50%      { opacity: 1;   transform: scale(1.4);  }
}

/* ---------- Umwandlung: two boxes with rotating loop arrows ---------- */
.section-visual--umwandlung .uw-loop {
  transform-box: fill-box;
  transform-origin: center;
  animation: uw-rotate 6s linear infinite;
}
@keyframes uw-rotate {
  to { transform: rotate(360deg); }
}
.section-visual--umwandlung .uw-box-left {
  transform-box: fill-box;
  transform-origin: center;
  animation: uw-box-l 4.5s ease-in-out infinite;
}
.section-visual--umwandlung .uw-box-right {
  transform-box: fill-box;
  transform-origin: center;
  animation: uw-box-r 4.5s ease-in-out infinite;
}
@keyframes uw-box-l {
  0%, 100% { transform: translateY(0)    scale(1); }
  25%      { transform: translateY(-4px) scale(1.06); }
  50%      { transform: translateY(0)    scale(0.94); }
  75%      { transform: translateY(4px)  scale(1.06); }
}
@keyframes uw-box-r {
  0%, 100% { transform: translateY(0)    scale(1); }
  25%      { transform: translateY(4px)  scale(0.94); }
  50%      { transform: translateY(0)    scale(1.06); }
  75%      { transform: translateY(-4px) scale(1.06); }
}
.section-visual--umwandlung .uw-spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: uw-spark 2.5s ease-in-out infinite;
}
.section-visual--umwandlung .uw-spark:nth-child(2) { animation-delay: 0.4s; }
.section-visual--umwandlung .uw-spark:nth-child(3) { animation-delay: 0.8s; }
.section-visual--umwandlung .uw-spark:nth-child(4) { animation-delay: 1.2s; }
@keyframes uw-spark {
  0%, 100% { opacity: 0;   transform: scale(0.5); }
  50%      { opacity: 1;   transform: scale(1.2); }
}

/* ---------- Checklist polish: stagger + hover ---------- */
.bg-cream .checklist li {
  position: relative;
  padding-left: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
              color 0.3s ease;
  border-radius: 8px;
  margin: 0 -0.6rem;
  padding: 0.45rem 0.6rem;
}
.bg-cream .checklist li:hover {
  transform: translateX(4px);
  background: linear-gradient(90deg, rgba(212, 179, 106, 0.10) 0%, transparent 100%);
}
.bg-cream .checklist li svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
  flex-shrink: 0;
}
.bg-cream .checklist li:hover svg {
  color: #B08856;
  transform: scale(1.18) rotate(-6deg);
}

/* Staggered entrance for checklist items */
.reveal.is-visible .checklist--staggered li {
  opacity: 0;
  transform: translateX(-12px);
  animation: cl-slide-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.reveal.is-visible .checklist--staggered li:nth-child(1) { animation-delay: 0.15s; }
.reveal.is-visible .checklist--staggered li:nth-child(2) { animation-delay: 0.30s; }
.reveal.is-visible .checklist--staggered li:nth-child(3) { animation-delay: 0.45s; }
.reveal.is-visible .checklist--staggered li:nth-child(4) { animation-delay: 0.60s; }
.reveal.is-visible .checklist--staggered li:nth-child(5) { animation-delay: 0.75s; }
@keyframes cl-slide-in {
  to { opacity: 1; transform: translateX(0); }
}

/* Subtle decorative background dots for the section */
.section-visual--nachfolge::after,
.section-visual--umwandlung::after {
  content: "";
  position: absolute;
  top: 0;
  right: -10%;
  width: 30%;
  height: 30%;
  background: radial-gradient(circle, rgba(212, 179, 106, 0.18) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

/* ============================================================
   Stat callout — Navy card mit Gold-Akzent.
   Sitzt zwischen Paragraph und Checklist.
   ============================================================ */
.section-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 1.4rem);
  margin: 1.5rem 0 1.75rem;
  padding: 1.1rem 1.4rem 1.1rem 1.6rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #14213D 0%, #1f3258 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 14px 32px -22px rgba(20, 33, 61, 0.4);
}
.section-stat::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #D4B36A 0%, #B08856 100%);
}
.section-stat::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 160%;
  background: radial-gradient(circle, rgba(212, 179, 106, 0.18) 0%, transparent 65%);
  pointer-events: none;
  z-index: -1;
}

.section-stat__num {
  font-family: var(--font-display, "Instrument Serif", serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 2.6rem);
  line-height: 1;
  color: #D4B36A;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  display: inline-block;
}
/* Platzhalter reserviert die Breite des Endwerts; bleibt unsichtbar. */
.section-stat__num .ss-placeholder {
  visibility: hidden;
  display: inline-block;
}
/* Sichtbarer animierter Wert liegt absolut darüber, links bündig. */
.section-stat__num [data-counter] {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  text-align: left;
}
.section-stat__body {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.section-stat__label {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #D4B36A;
  font-weight: 600;
}
.section-stat__text {
  font-size: 0.95rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}
.section-stat__text strong { color: #fff; font-weight: 600; }

/* ============================================================
   Tag-row mit kleinen Fakten-Pills (Paragraphen / Schlagworte)
   ============================================================ */
.section-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0.75rem;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem 0.4rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(212, 179, 106, 0.10);
  color: #B08856;
  border: 1px solid rgba(212, 179, 106, 0.30);
  transition: background 0.3s ease, transform 0.3s ease, color 0.3s ease;
}
.section-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #D4B36A;
}
.section-tag:hover {
  background: rgba(212, 179, 106, 0.20);
  color: #14213D;
  transform: translateY(-1px);
}

/* ============================================================
   Pull-quote (Inhabervorlage)
   ============================================================ */
.section-quote {
  position: relative;
  margin: 1.5rem 0 0.5rem;
  padding: 1.1rem 1.25rem 1.1rem 2.4rem;
  border-left: 3px solid #D4B36A;
  background: linear-gradient(90deg, rgba(212, 179, 106, 0.08) 0%, transparent 80%);
  border-radius: 0 12px 12px 0;
  font-family: var(--font-display, "Instrument Serif", serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1.8vw, 1.18rem);
  color: #14213D;
  line-height: 1.5;
}
.section-quote::before {
  content: "\201C";
  position: absolute;
  left: 0.5rem;
  top: -0.4rem;
  font-size: 2.6rem;
  color: #D4B36A;
  line-height: 1;
  font-style: normal;
}
.section-quote em { color: #B08856; font-style: italic; }

@media (prefers-reduced-motion: reduce) {
  .section-visual * {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .bg-cream .checklist li,
  .bg-cream .checklist li svg {
    transition: none !important;
  }
  .reveal.is-visible .checklist--staggered li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}
