/* Personagens — hero Pixar 3D + mascote no card 03 */

[data-leaf="chr"] .chr-stage {
  position: relative;
  width: min(100%, 520px);
  height: 620px;
  margin-left: auto;
  perspective: 1200px;
  transform-style: preserve-3d;
}

[data-leaf="chr"] .chr-chip.is-a { top: 6%; left: -2%; }
[data-leaf="chr"] .chr-chip.is-b { top: 14%; right: -2%; }
[data-leaf="chr"] .chr-chip.is-c { bottom: 14%; left: 2%; }

.chr-pixar {
  --chr-glow: 47, 109, 246;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: visible;
  isolation: isolate;
}
.chr-pixar[data-style="3d"] { --chr-glow: 47, 109, 246; }
.chr-pixar[data-style="real"] { --chr-glow: 90, 140, 210; }
.chr-pixar[data-style="2d"] { --chr-glow: 20, 168, 180; }
.chr-pixar[data-style="manga"] { --chr-glow: 70, 120, 210; }
.chr-pixar[data-style="comic"] { --chr-glow: 210, 150, 18; }

.chr-pixar-aura {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 72%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(var(--chr-glow), 0.3) 0%, rgba(var(--chr-glow), 0.12) 38%, transparent 72%);
  filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: background .55s ease;
}

.chr-pixar-beam {
  position: absolute;
  left: 50%;
  top: 8%;
  width: 38%;
  height: 82%;
  translate: -50% 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(var(--chr-glow), 0.2) 42%, transparent 100%);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  opacity: 0;
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 1;
  transition: background .55s ease;
}

.chr-pixar-ring {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: 56%;
  aspect-ratio: 1;
  translate: -50% 0;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--chr-glow), 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transform: rotateX(68deg) scale(0.55);
  transform-origin: center center;
  transition: border-color .55s ease;
}
.chr-pixar-ring.is-b {
  width: 72%;
  bottom: 8%;
  border-color: rgba(var(--chr-glow), 0.16);
}
.chr-pixar-ring.is-c {
  width: 88%;
  bottom: 4%;
  border-color: rgba(4, 16, 44, 0.08);
  border-style: dashed;
}

.chr-pixar-floor {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 58%;
  height: 42px;
  translate: -50% 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
}
.chr-pixar-floor span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(4, 16, 44, 0.22) 0%, rgba(4, 16, 44, 0.08) 42%, transparent 72%);
  filter: blur(1px);
}

.chr-pixar-sparks {
  position: absolute;
  inset: 6% 8% 18%;
  z-index: 4;
  pointer-events: none;
}
.chr-pixar-sparks i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(var(--chr-glow), 0.55);
  opacity: 0;
  scale: 0;
  transition: box-shadow .55s ease;
}
.chr-pixar-sparks i:nth-child(1) { left: 12%; top: 28%; }
.chr-pixar-sparks i:nth-child(2) { left: 78%; top: 22%; width: 4px; height: 4px; }
.chr-pixar-sparks i:nth-child(3) { left: 18%; top: 58%; width: 5px; height: 5px; }
.chr-pixar-sparks i:nth-child(4) { left: 84%; top: 48%; }
.chr-pixar-sparks i:nth-child(5) { left: 8%; top: 42%; width: 3px; height: 3px; }
.chr-pixar-sparks i:nth-child(6) { left: 90%; top: 36%; width: 3px; height: 3px; }
.chr-pixar-sparks i:nth-child(7) { left: 42%; top: 12%; width: 4px; height: 4px; }
.chr-pixar-sparks i:nth-child(8) { left: 58%; top: 18%; width: 5px; height: 5px; }

.chr-pixar-cast {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 0;
  bottom: 64px;
  width: min(72%, 300px);
  translate: -50% 0;
  display: grid;
  place-items: center;
}

.chr-pixar-figure {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 88px, 0) scale(0.78) rotateX(16deg);
  transform-origin: 50% 60%;
  filter: blur(10px) saturate(0.7) brightness(1.15);
  will-change: transform, opacity, filter;
}
.chr-pixar-figure.is-active {
  z-index: 2;
  visibility: visible;
}
.chr-pixar-figure img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: drop-shadow(0 22px 24px rgba(4, 16, 44, 0.26));
  user-select: none;
  pointer-events: none;
}

.chr-pixar-rail {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 0;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
}

.chr-pixar-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--ds-hairline);
  border-radius: 99px;
  background: #fffffff0;
  box-shadow: var(--ds-shadow-sm);
  font-family: var(--ds-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ds-muted);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(12px);
}
.chr-pixar-tag b {
  color: rgb(var(--chr-glow));
  font-weight: 700;
  transition: color .45s ease;
  min-width: 9ch;
}

.chr-pixar-dots {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  transform: translateY(8px);
}
.chr-pixar-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(4, 16, 44, 0.18);
  cursor: pointer;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.chr-pixar-dots button.is-on {
  background: rgb(var(--chr-glow));
  box-shadow: 0 0 0 4px rgba(var(--chr-glow), 0.18);
  transform: scale(1.15);
}
.chr-pixar-dots button:focus-visible {
  outline: 2px solid rgb(var(--chr-glow));
  outline-offset: 3px;
}

/* Armed / idle */
.chr-pixar.is-on .chr-pixar-aura {
  opacity: 1;
  animation: chr-pixar-aura 5.6s ease-in-out infinite;
}
.chr-pixar.is-on .chr-pixar-beam {
  opacity: .55;
  animation: chr-pixar-beam 4.8s ease-in-out infinite;
}
.chr-pixar.is-on .chr-pixar-ring {
  opacity: 1;
  animation: chr-pixar-ring 9s linear infinite;
}
.chr-pixar.is-on .chr-pixar-ring.is-b { animation-duration: 12s; animation-direction: reverse; }
.chr-pixar.is-on .chr-pixar-ring.is-c { animation-duration: 16s; }
.chr-pixar.is-on .chr-pixar-floor { opacity: 1; }
.chr-pixar.is-on:not(.is-swap) .chr-pixar-figure.is-active {
  opacity: 1;
  visibility: visible;
  filter: none;
  transform: translate3d(0, 0, 0) scale(1) rotateX(0deg);
  animation: chr-pixar-breathe 5.2s ease-in-out infinite;
}
.chr-pixar.is-on .chr-pixar-tag,
.chr-pixar.is-on .chr-pixar-dots {
  opacity: 1;
  transform: none;
}
.chr-pixar.is-on .chr-pixar-sparks i {
  animation: chr-pixar-spark 3.6s ease-in-out infinite;
}
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(2) { animation-delay: .4s; }
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(3) { animation-delay: .8s; }
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(4) { animation-delay: 1.1s; }
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(5) { animation-delay: .2s; }
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(6) { animation-delay: 1.4s; }
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(7) { animation-delay: .6s; }
.chr-pixar.is-on .chr-pixar-sparks i:nth-child(8) { animation-delay: 1.7s; }

@keyframes chr-pixar-aura {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes chr-pixar-beam {
  0%, 100% { opacity: .35; }
  50% { opacity: .62; }
}
@keyframes chr-pixar-ring {
  0% { transform: rotateX(68deg) rotateZ(0deg) scale(1); }
  100% { transform: rotateX(68deg) rotateZ(360deg) scale(1); }
}
@keyframes chr-pixar-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -8px, 0) scale(1.012); }
}
@keyframes chr-pixar-spark {
  0%, 100% { opacity: 0; scale: 0; }
  35% { opacity: 1; scale: 1; }
  70% { opacity: .2; scale: .4; }
}

@media (max-width: 980px) {
  [data-leaf="chr"] .chr-stage {
    width: min(100%, 420px);
    height: 540px;
    margin: 8px auto 0;
  }
  .chr-pixar-cast {
    width: min(70%, 260px);
    bottom: 60px;
  }
}

@media (max-width: 720px) {
  [data-leaf="chr"] .chr-stage { height: 480px; }
  .chr-pixar-cast {
    width: min(68%, 220px);
    bottom: 58px;
  }
  .chr-chip.is-a { left: 0; }
  .chr-chip.is-b { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chr-pixar-aura,
  .chr-pixar-beam,
  .chr-pixar-ring,
  .chr-pixar-floor,
  .chr-pixar-figure.is-active,
  .chr-pixar-tag,
  .chr-pixar-dots,
  .chr-pixar-sparks i {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    animation: none !important;
    visibility: visible !important;
  }
  .chr-pixar-sparks i { opacity: .35 !important; scale: 1 !important; }
}

[data-leaf="chr"] .leaf-sec:has(.chr-stakes) .leaf-head {
  margin-bottom: 12px;
}

[data-leaf="chr"] .chr-stakes {
  overflow: visible;
  align-items: stretch;
  padding-top: 24px;
}

[data-leaf="chr"] .chr-stake-lean {
  position: relative;
  z-index: 3;
  overflow: visible;
  padding: 0;
  background: transparent;
  border: 0;
}

[data-leaf="chr"] .chr-lean {
  position: absolute;
  left: 50%;
  width: 70%;
  height: auto;
  max-width: none;
  bottom: calc(100% - 72px);
  pointer-events: none;
  object-fit: contain;
  object-position: center bottom;
  transform: translateX(-50%);
  user-select: none;
}
[data-leaf="chr"] .chr-lean.is-body {
  z-index: 1;
  filter: drop-shadow(0 8px 14px rgba(4, 16, 44, 0.18));
}
[data-leaf="chr"] .chr-lean.is-hands {
  z-index: 3;
  clip-path: inset(55% 0 0 0);
  filter: drop-shadow(0 3px 5px rgba(4, 16, 44, 0.14));
}

[data-leaf="chr"] .chr-stake-body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 36px 22px 20px;
  border: 1px solid var(--ds-hairline);
  border-radius: 18px;
  background: #fff;
}
[data-leaf="chr"] .chr-stake-body > span {
  font-family: var(--ds-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ds-accent);
}

@media (max-width: 1080px) {
  [data-leaf="chr"] .chr-stakes {
    padding-top: 0;
  }
  [data-leaf="chr"] .chr-stake-lean {
    margin-top: 128px;
  }
  [data-leaf="chr"] .chr-lean {
    width: 66%;
    bottom: calc(100% - 64px);
  }
}

@media (max-width: 720px) {
  [data-leaf="chr"] .chr-stake-lean {
    margin-top: 112px;
  }
  [data-leaf="chr"] .chr-lean {
    width: 62%;
    bottom: calc(100% - 58px);
  }
}

/* Equipe em V */
[data-leaf="chr"] .chr-crew-sec .leaf-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
[data-leaf="chr"] .chr-crew {
  position: relative;
  isolation: isolate;
  width: min(100%, 520px);
  height: 400px;
  margin: 8px auto 0;
}
[data-leaf="chr"] .chr-crew figure {
  position: absolute;
  margin: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
[data-leaf="chr"] .chr-crew img {
  display: block;
  width: auto;
  max-width: 132px;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 14px rgba(4, 16, 44, 0.18));
  user-select: none;
}
[data-leaf="chr"] .chr-crew .is-lead img {
  max-width: 148px;
}
[data-leaf="chr"] .chr-crew .is-bl {
  left: 0;
  height: 228px;
  z-index: 1;
  bottom: 44px;
}
[data-leaf="chr"] .chr-crew .is-br {
  right: 0;
  height: 228px;
  z-index: 1;
  bottom: 44px;
}
[data-leaf="chr"] .chr-crew .is-ml {
  left: 14%;
  height: 270px;
  z-index: 3;
  bottom: 14px;
}
[data-leaf="chr"] .chr-crew .is-mr {
  right: 14%;
  height: 270px;
  z-index: 3;
  bottom: 14px;
}
[data-leaf="chr"] .chr-crew .is-lead {
  left: 50%;
  height: 310px;
  z-index: 5;
  bottom: 0;
  transform: translateX(-50%);
}

@media (max-width: 720px) {
  [data-leaf="chr"] .chr-crew {
    height: 320px;
    width: min(100%, 380px);
  }
  [data-leaf="chr"] .chr-crew .is-bl,
  [data-leaf="chr"] .chr-crew .is-br {
    height: 168px;
    bottom: 40px;
  }
  [data-leaf="chr"] .chr-crew .is-ml,
  [data-leaf="chr"] .chr-crew .is-mr {
    height: 210px;
    bottom: 12px;
  }
  [data-leaf="chr"] .chr-crew .is-lead {
    height: 248px;
  }
  [data-leaf="chr"] .chr-crew .is-bl { left: 0; }
  [data-leaf="chr"] .chr-crew .is-br { right: 0; }
  [data-leaf="chr"] .chr-crew .is-ml { left: 10%; }
  [data-leaf="chr"] .chr-crew .is-mr { right: 10%; }
}
