
/* Footer hierarchy: the clinical card occupies the inherited SVG stage; the
   HAMUY kinetic wordmark has its own stage immediately afterwards. */
.mod-footer .mod-footer__content {
  /* Preserve the original oversized footer canvas: its project card is not
     allowed to collide with the wordmark stage that follows. */
  min-height: clamp(38rem, 72vw, 86rem);
}
.mod-footer .hamuy-footer__identity-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  /* The wordmark starts complete and then H/Y lengthen across this whole
     section. The taller canvas makes the scroll-driven elongation readable
     rather than presenting only a final static pose. */
  min-height: clamp(58rem, 150svh, 108rem);
  display: grid;
  place-items: start center;
  overflow: hidden;
  margin: clamp(2rem, 6vw, 7rem) 0 clamp(2.5rem, 6vw, 6rem);
  padding-top: clamp(3rem, 8vw, 10rem);
  box-sizing: border-box;
}
.mod-footer .hamuy-footer__wordmark {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: max-content;
  min-width: 100%;
  padding: 0.1em 0 0.2em;
  font-family: var(--f-regular);
  font-size: clamp(9rem, 29vw, 37rem);
  font-weight: 400;
  line-height: 0.74;
  letter-spacing: -0.105em;
  white-space: nowrap;
  color: inherit;
}
.mod-footer .hamuy-footer__letter {
  display: inline-block;
  color: inherit;
  opacity: 1;
  will-change: transform;
}
.mod-footer .hamuy-footer__h {
  transform-origin: 13% 0%;
}
.mod-footer .hamuy-footer__y {
  transform-origin: 87% 0%;
  margin-right: 0.035em;
}
.mod-footer .hamuy-footer__middle {
  transform-origin: center 72%;
}
.mod-footer .hamuy-footer__runtime-guard {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* The final chapter retains the original section and pacing, but words must
   survive as readable units rather than SplitText characters. */
.mod-title--chapter .hamuy-journey-title {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(13rem, 24vw, 28rem);
  overflow: visible;
}
.mod-title--chapter .hamuy-journey-title__copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: 0.28em;
  row-gap: 0.14em;
  max-width: 12ch;
  text-align: center;
}
.mod-title--chapter .hamuy-journey-title__word {
  display: inline-block;
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .mod-title--chapter .hamuy-journey-title__word {
    animation: hamuy-journey-word-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .mod-title--chapter .hamuy-journey-title__word:nth-child(2) { animation-delay: 80ms; }
  .mod-title--chapter .hamuy-journey-title__word:nth-child(3) { animation-delay: 160ms; }
}
@keyframes hamuy-journey-word-in {
  from { opacity: 0; transform: translateY(0.34em); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 950px) {
  .mod-footer .mod-footer__content { min-height: 0; }
  .mod-footer .hamuy-footer__identity-stage {
    min-height: 130svh;
    margin-top: 2rem;
    padding-top: 12vw;
  }
  .mod-footer .hamuy-footer__wordmark {
    font-size: 28vw;
    letter-spacing: -0.16em;
  }
}
