/* Beautiful SVG mindmap */
.mmf-wrap {
  width: 100%;
  aspect-ratio: 1400 / 820;
  margin-top: 30px;
  position: relative;
  overflow: visible;
}
.mmf-svg {
  width: 100%; height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 30px 60px rgba(60, 40, 10, 0.08));
}

/* Halo subtle pulse */
.mmf-halo {
  animation: mmf-halo-pulse 6s ease-in-out infinite;
  transform-origin: center;
}
@keyframes mmf-halo-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; transform: scale(1.04); }
}
.mmf-pulse {
  opacity: 0;
  transition: opacity 1500ms ease;
}
.mmf-pulse.on {
  opacity: 1;
  animation: mmf-pulse-grow 4s ease-in-out infinite;
  transform-origin: 700px 400px;
}
@keyframes mmf-pulse-grow {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.18); opacity: 0.85; }
}

/* Core reveal */
.mmf-core {
  opacity: 0;
  transform: scale(0.6);
  transform-origin: 700px 300px;
  cursor: pointer;
}
.mmf-core.on {
  animation: mmf-core-in 900ms cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
}
@keyframes mmf-core-in {
  0% { opacity: 0; transform: scale(0.4); }
  60% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

/* Edges draw in */
.mmf-edge .mmf-mainline {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke 350ms ease, stroke-width 350ms ease, opacity 350ms ease;
}
.mmf-edge.on .mmf-mainline {
  animation: mmf-draw 1200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.mmf-edge .mmf-subline {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  transition: stroke 250ms ease, stroke-width 250ms ease, opacity 250ms ease;
}
.mmf-edge.on .mmf-subline {
  animation: mmf-draw-sub 700ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: 800ms;
}
@keyframes mmf-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes mmf-draw-sub {
  to { stroke-dashoffset: 0; }
}

/* Branches reveal */
.mmf-branch {
  opacity: 0;
  cursor: pointer;
  transition: opacity 350ms ease;
}
.mmf-branch.on {
  animation: mmf-branch-in 600ms cubic-bezier(0.2, 0.9, 0.3, 1.1) forwards;
}
@keyframes mmf-branch-in {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}
.mmf-branch.dim { opacity: 0.5; }
.mmf-branch.active .mmf-capsule {
  animation: mmf-capsule-lift 350ms cubic-bezier(0.2, 0.9, 0.3, 1.05) forwards;
}
@keyframes mmf-capsule-lift {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-3px) scale(1.04); }
}
.mmf-branch:not(.active) .mmf-capsule {
  transform: translateY(0) scale(1);
}
.mmf-capsule {
  transition: stroke 300ms ease, opacity 300ms ease;
  transform-box: fill-box;
  transform-origin: center;
}
.mmf-leaf-text { transition: fill 250ms ease, opacity 250ms ease; }
.mmf-accent-line { transition: opacity 300ms ease; }

/* Floating card */
.mmf-card {
  position: absolute;
  top: 50%; right: 24px;
  transform: translateY(-50%) translateX(12px);
  width: 240px;
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--gold-line);
  border-top: 2px solid var(--gold);
  padding: 20px 22px 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
  box-shadow: 0 24px 48px -12px rgba(60, 40, 10, 0.18);
}
.mmf-card.show {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
.mmf-card-tag {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.mmf-card-title {
  font-size: 26px;
  font-style: italic;
  color: var(--ink);
  margin-top: 6px;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.mmf-card-list { display: flex; flex-direction: column; gap: 6px; }
.mmf-card-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: -0.01em;
}

@media (max-width: 900px) {
  .mmf-wrap { aspect-ratio: 4 / 5; }
  .mmf-card { display: none; }
}
