/* =========================================================
   Hero B — particles gather into a challenger, then the call
   to enter lands like a freshly printed manga-page stamp.
   All selectors are intentionally scoped to .hero2.
   ========================================================= */

.hero2 {
  position: relative;
  isolation: isolate;
  width: min(calc(100% - 40px), var(--maxw));
  height: calc(100svh - 68px - 36px);
  min-height: 640px;
  overflow: hidden;
  margin-top: 18px;
  padding: 0;
  background:
    radial-gradient(ellipse at 73% 45%, rgba(255, 255, 255, 0.98) 0 9%, rgba(255, 253, 247, 0.92) 22%, rgba(255, 246, 190, 0.92) 46%, rgba(255, 210, 63, 0.95) 74%, #ffb64d 112%),
    var(--paper-alt);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--yellow);
}

.hero2::before,
.hero2::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 460px;
  height: 390px;
  pointer-events: none;
  opacity: 0.86;
}

.hero2::before {
  top: -146px;
  left: -132px;
  background:
    linear-gradient(66deg, transparent 46%, var(--pink) 46.5% 50.5%, transparent 51% 100%),
    linear-gradient(54deg, transparent 46%, var(--blue) 46.5% 49.5%, transparent 50% 100%),
    linear-gradient(77deg, transparent 45%, var(--yellow) 45.5% 50%, transparent 50.5% 100%),
    linear-gradient(39deg, transparent 47%, var(--ink) 47.5% 49%, transparent 49.5% 100%);
  transform: rotate(-10deg);
  transform-origin: right bottom;
  animation: hero2-rays-left 8s ease-in-out infinite;
}

.hero2::after {
  top: -174px;
  right: -136px;
  background:
    linear-gradient(112deg, transparent 46%, var(--blue) 46.5% 50%, transparent 50.5% 100%),
    linear-gradient(126deg, transparent 46%, var(--pink) 46.5% 50.5%, transparent 51% 100%),
    linear-gradient(99deg, transparent 45%, var(--white) 45.5% 49.5%, transparent 50% 100%),
    linear-gradient(139deg, transparent 47%, var(--ink) 47.5% 49.2%, transparent 49.7% 100%);
  transform: rotate(8deg);
  transform-origin: left bottom;
  animation: hero2-rays-right 7.4s -1.8s ease-in-out infinite;
}

.hero2 .hero2-texture {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle, rgba(22, 17, 34, 0.16) 1.25px, transparent 1.4px) 0 0 / 12px 12px,
    repeating-linear-gradient(101deg, transparent 0 27px, rgba(255, 255, 255, 0.2) 28px, transparent 30px 58px);
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.3) 58%, rgba(0, 0, 0, 0.08));
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.3) 58%, rgba(0, 0, 0, 0.08));
}

.hero2 .hero2-sweep-light {
  position: absolute;
  z-index: 1;
  top: -8%;
  bottom: -8%;
  left: 0;
  width: 28%;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0, rgba(255, 77, 141, 0.1) 35%, rgba(255, 255, 255, 0.82) 67%, rgba(255, 210, 63, 0.18) 84%, transparent 100%);
  opacity: 0;
  transform: translateX(-145%) skewX(-13deg);
}

.hero2.is-sequencing .hero2-sweep-light {
  animation: hero2-sweep-light 2300ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero2 .hero2-canvas,
.hero2 .hero2-character {
  position: absolute;
  z-index: 6;
  pointer-events: none;
}

.hero2 .hero2-canvas {
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero2 .hero2-character {
  right: 3%;
  bottom: 0;
  width: auto;
  height: 98%;
  max-width: none;
  object-fit: contain;
  object-position: right bottom;
  opacity: 0;
  transition: opacity 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero2.is-image-settling .hero2-canvas {
  opacity: 0;
}

.hero2.is-image-settling .hero2-character,
.hero2.is-static .hero2-character {
  opacity: 1;
}

.hero2 .hero2-copy {
  position: absolute;
  z-index: 4;
  top: 43%;
  left: clamp(32px, 4.3vw, 58px);
  width: min(59%, 690px);
  isolation: isolate;
  transform: translateY(-50%);
}

.hero2 .hero2-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -72px;
  right: -86px;
  bottom: -64px;
  left: -74px;
  pointer-events: none;
  background: radial-gradient(ellipse at 34% 48%, rgba(255, 253, 247, 0.96) 0 42%, rgba(255, 248, 214, 0.78) 58%, rgba(255, 248, 214, 0) 79%);
}

.hero2 .hero2-eyebrow {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 5px 16px;
  color: var(--white);
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: "Mochiy Pop One", "M PLUS Rounded 1c", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: rotate(-1.5deg) scale(0.4);
  transform-origin: 36% 70%;
  animation: none;
}

.hero2.show-eyebrow .hero2-eyebrow {
  animation: hero2-eyebrow-pop 320ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.hero2 .hero2-title {
  max-width: none;
  margin: 21px 0 14px;
  font-family: 'Noto Sans TC', "Mochiy Pop One", "M PLUS Rounded 1c", "Noto Sans SC", sans-serif;
  font-weight: 900;
  font-size: clamp(40px, 5vw, 64px);
  font-feature-settings: "palt";
  line-height: 1.28;
  letter-spacing: 0.03em;
  animation: none;
}

.hero2 .hero2-title-line {
  display: block;
  overflow: hidden;
  padding: 0.06em 0 0.09em;
  margin: -0.06em 0 -0.09em;
}

.hero2 .hero2-line {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
}

.hero2.show-line-one .hero2-line-one,
.hero2.show-line-two .hero2-line-two {
  animation: hero2-line-rise 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero2 .hero2-marker {
  position: relative;
  z-index: 0;
  white-space: nowrap;
}

.hero2 .hero2-marker::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -5px;
  bottom: 0.04em;
  left: -5px;
  height: 0.28em;
  background: var(--pink);
  border-radius: 5px 2px 6px 3px;
  opacity: 0.72;
  transform: rotate(-2deg) scaleX(0);
  transform-origin: left center;
}

.hero2.show-marker .hero2-marker::after {
  animation: hero2-marker-sweep 380ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero2 .hero2-subcopy {
  max-width: 610px;
  margin: 0;
  color: #413849;
  font-size: clamp(14px, 1.45vw, 17px);
  font-weight: 800;
  line-height: 1.85;
  letter-spacing: 0.025em;
  opacity: 0;
  transform: translateY(14px);
  animation: none;
}

.hero2.show-subcopy .hero2-subcopy {
  animation: hero2-subcopy-rise 420ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero2 .hero2-stamp-wrap {
  position: relative;
  width: fit-content;
  margin-top: 23px;
}

.hero2 .hero2-stamp {
  position: relative;
  z-index: 2;
  display: inline-flex;
  min-width: 254px;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  padding: 10px 28px 11px;
  color: var(--white);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.16) 0.8px, transparent 1px) 0 0 / 7px 7px,
    linear-gradient(177deg, transparent 0 43%, rgba(255, 255, 255, 0.08) 44% 47%, transparent 48% 100%),
    var(--ink);
  border: 3px solid var(--white);
  outline: 2px solid var(--ink);
  box-shadow: 0 0 0 rgba(22, 17, 34, 0);
  font-family: "Mochiy Pop One", "M PLUS Rounded 1c", sans-serif;
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1;
  letter-spacing: 0.17em;
  opacity: 0;
  clip-path: polygon(1.2% 3%, 98.4% 0, 100% 89%, 96.7% 100%, 1.8% 97%, 0 12%);
  transform: rotate(-3deg) scale(1.7);
  transform-origin: 52% 52%;
}

.hero2 .hero2-impact-flash {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 390px;
  height: 190px;
  pointer-events: none;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.98) 0 18%, rgba(255, 255, 255, 0.78) 39%, rgba(255, 255, 255, 0) 72%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.25);
}

.hero2.is-impact .hero2-stamp {
  animation: hero2-stamp-hit 180ms cubic-bezier(0.87, 0, 0.13, 1) both;
}

.hero2.is-impact .hero2-impact-flash {
  animation: hero2-impact-flash 120ms linear both;
}

.hero2.is-impact {
  animation: hero2-impact-shake 60ms linear 1;
}

.hero2 .hero2-scroll {
  position: absolute;
  z-index: 7;
  bottom: 16px;
  left: 50%;
  display: flex;
  align-items: center;
  flex-direction: column;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero2 .hero2-scroll-label {
  position: relative;
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 11px 30px 12px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.025em;
  white-space: nowrap;
  transform: rotate(-1deg);
  transition:
    background-color 160ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero2 .hero2-scroll-label::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -7px;
  left: calc(50% - 7px);
  width: 13px;
  height: 13px;
  background: var(--yellow);
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg);
  transition: background-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero2 .hero2-scroll-arrow {
  display: block;
  width: 66px;
  height: 46px;
  margin-top: 8px;
  overflow: visible;
  fill: none;
  stroke: var(--ink);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero2.show-scroll .hero2-scroll {
  opacity: 1;
}

.hero2.show-scroll .hero2-scroll-label,
.hero2.show-scroll .hero2-scroll-arrow {
  animation: hero2-scroll-breathe 1.8s 320ms ease-in-out infinite;
}

.hero2 .hero2-scroll:hover .hero2-scroll-label,
.hero2 .hero2-scroll:focus-visible .hero2-scroll-label {
  background: var(--white);
  box-shadow: 6px 6px 0 var(--pink);
}

.hero2 .hero2-scroll:hover .hero2-scroll-label::after,
.hero2 .hero2-scroll:focus-visible .hero2-scroll-label::after {
  background: var(--white);
}

.hero2 .hero2-scroll:hover .hero2-scroll-arrow,
.hero2 .hero2-scroll:focus-visible .hero2-scroll-arrow {
  stroke: var(--pink);
}

.hero2.is-scroll-hovered::after {
  opacity: 1;
  animation-duration: 1.4s;
}

.hero2.is-static .hero2-eyebrow,
.hero2.is-static .hero2-line,
.hero2.is-static .hero2-subcopy,
.hero2.is-static .hero2-stamp,
.hero2.is-static .hero2-scroll {
  opacity: 1;
}

.hero2.is-static .hero2-eyebrow {
  transform: rotate(-1.5deg) scale(1);
}

.hero2.is-static .hero2-line {
  transform: translateY(0);
}

.hero2.is-static .hero2-marker::after {
  transform: rotate(-2deg) scaleX(1);
}

.hero2.is-static .hero2-subcopy {
  transform: translateY(0);
}

.hero2.is-static .hero2-stamp {
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(-3deg) scale(1);
}

@keyframes hero2-rays-left {
  0%,
  100% {
    transform: rotate(-10deg) scale(1);
  }
  50% {
    transform: rotate(-7.5deg) scale(1.025);
  }
}

@keyframes hero2-rays-right {
  0%,
  100% {
    transform: rotate(8deg) scale(1);
  }
  50% {
    transform: rotate(11deg) scale(1.02);
  }
}

@keyframes hero2-eyebrow-pop {
  0% {
    opacity: 0;
    transform: rotate(-8deg) scale(0.4);
  }
  72% {
    opacity: 1;
    transform: rotate(0.5deg) scale(1.08);
  }
  100% {
    opacity: 1;
    transform: rotate(-1.5deg) scale(1);
  }
}

@keyframes hero2-sweep-light {
  0% {
    opacity: 0;
    transform: translateX(-145%) skewX(-13deg);
  }
  12% {
    opacity: 0.78;
  }
  78% {
    opacity: 0.48;
  }
  100% {
    opacity: 0;
    transform: translateX(455%) skewX(-13deg);
  }
}

@keyframes hero2-line-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero2-marker-sweep {
  from {
    transform: rotate(-2deg) scaleX(0);
  }
  to {
    transform: rotate(-2deg) scaleX(1);
  }
}

@keyframes hero2-subcopy-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero2-stamp-hit {
  0% {
    opacity: 0;
    box-shadow: 0 0 0 rgba(22, 17, 34, 0);
    transform: rotate(-3deg) scale(1.7);
  }
  72% {
    opacity: 1;
    box-shadow: 1px 1px 0 var(--ink);
    transform: rotate(-3.4deg) scale(0.97);
  }
  100% {
    opacity: 1;
    box-shadow: 7px 7px 0 var(--ink);
    transform: rotate(-3deg) scale(1);
  }
}

@keyframes hero2-impact-flash {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.25);
  }
  34% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

@keyframes hero2-impact-shake {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-2px, 1px);
  }
  50% {
    transform: translate(2px, -1px);
  }
  75% {
    transform: translate(-1px, -1px);
  }
}

@keyframes hero2-scroll-breathe {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-6px) rotate(-0.35deg);
  }
}

@media (max-width: 900px) {
  .hero2 {
    width: min(calc(100% - 28px), var(--maxw));
  }

  .hero2 .hero2-copy {
    top: 39%;
    width: 70%;
  }

  .hero2 .hero2-title {
    font-size: clamp(40px, 7vw, 56px);
  }

  .hero2 .hero2-character {
    right: 1.5%;
  }

  .hero2 .hero2-scroll {
    bottom: 13px;
  }
}

@media (max-width: 640px) {
  .hero2 {
    width: min(calc(100% - 22px), var(--maxw));
    height: calc(100svh - 62px - 28px);
    min-height: 700px;
    box-shadow: 6px 6px 0 var(--yellow);
  }

  .hero2::before,
  .hero2::after {
    width: 330px;
    height: 280px;
  }

  .hero2 .hero2-copy {
    top: 34px;
    left: 22px;
    width: calc(100% - 44px);
    transform: none;
  }

  .hero2 .hero2-copy::before {
    top: -48px;
    right: -50px;
    bottom: -52px;
    left: -42px;
    background: radial-gradient(ellipse at 33% 38%, rgba(255, 253, 247, 0.98) 0 45%, rgba(255, 248, 214, 0.84) 62%, rgba(255, 248, 214, 0) 82%);
  }

  .hero2 .hero2-title {
    margin-top: 18px;
    font-size: clamp(38px, 9.4vw, 48px);
    line-height: 1.3;
  }

  .hero2 .hero2-subcopy {
    max-width: 84%;
    font-size: 14px;
    line-height: 1.7;
  }

  .hero2 .hero2-stamp-wrap {
    margin-top: 19px;
  }

  .hero2 .hero2-stamp {
    min-width: 218px;
    min-height: 56px;
    padding-inline: 21px;
    font-size: 20px;
  }

  .hero2 .hero2-character {
    right: 3%;
    height: 96%;
    opacity: 0;
  }

  .hero2 .hero2-scroll-label {
    padding-inline: 13px;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .hero2 .hero2-title {
    font-size: 35px;
  }

  .hero2 .hero2-eyebrow {
    font-size: 10px;
  }

  .hero2 .hero2-subcopy {
    max-width: 94%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero2::before {
    transform: rotate(-9deg) scale(1.012);
  }

  .hero2::after {
    transform: rotate(9deg) scale(1.01);
  }

  .hero2 .hero2-canvas {
    display: none;
  }

  .hero2 .hero2-scroll-label,
  .hero2 .hero2-scroll-arrow {
    transform: translateY(-3px) rotate(-0.7deg);
  }
}
