.ref-band {
  position: relative;
  z-index: 5;
  width: 100%;
  margin: 0;
  padding: 18px 0 28px;
  overflow: hidden;
  background: #000;
}

.ref-band__inner {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 28px 64px 56px 112px;
  box-sizing: border-box;
}

.ref-band__inner::before {
  content: "";
  position: absolute;
  right: 0;
  top: -8%;
  width: 58%;
  height: 116%;
  pointer-events: none;
  background: radial-gradient(ellipse at 68% 48%, rgba(255, 255, 255, 0.08), transparent 62%);
}

.ref-copy {
  position: relative;
  z-index: 1;
  min-height: 0;
}

.ref-copy__text,
.ref-spiral {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.ref-band.is-in .ref-copy__text,
.ref-band.is-in .ref-spiral {
  opacity: 1;
  transform: none;
}

.ref-band.is-in .ref-spiral { transition-delay: 0.16s; }

.ref-copy {
  display: grid;
  align-items: center;
}

.ref-copy__text {
  width: 100%;
  padding: 48px 56px 44px;
  box-sizing: border-box;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    radial-gradient(520px 180px at 0% 0%, rgba(79, 132, 191, 0.2), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.ref-kicker {
  display: flex;
  align-items: center;
  min-height: 1.15em;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(2.05rem, 3.5vw, 2.9rem);
  font-weight: 900;
  letter-spacing: 0.045em;
  line-height: 1.05;
  text-transform: uppercase;
}

.ref-kicker__ch {
  display: inline-block;
  animation: refInk 1.6s ease-in-out infinite;
}

.ref-kicker__ch:nth-child(even) { animation-delay: 0.8s; }

.ref-kicker__caret {
  width: 4px;
  height: 0.95em;
  margin-left: 6px;
  border-radius: 2px;
  background: #4F84BF;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.55), 0 0 16px #4F84BF;
  animation: refCaret 0.85s steps(1) infinite;
}

.ref-phrase {
  margin: 0 0 26px;
  max-width: 100%;
  color: #f4f7fb;
  font-size: clamp(0.98rem, 1.45vw, 1.32rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  white-space: normal;
  transform-origin: left center;
  background-image: linear-gradient(100deg, #fff 0%, #fff 42%, #4F84BF 50%, #fff 58%, #fff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation-name: doorFall, phraseShine;
  animation-duration: 5.6s, 5.5s;
  animation-timing-function: cubic-bezier(0.55, 0.02, 0.2, 1), linear;
  animation-iteration-count: infinite, infinite;
  animation-play-state: paused, running;
}

.ref-phrase.is-awake { animation-play-state: running, running; }

.ref-answer {
  max-width: none;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(232, 237, 245, 0.9);
  font-size: 1.14rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  text-align-last: left;
}

.ref-answer p {
  position: relative;
  margin: 0 0 0.9em;
  opacity: 0;
  transform: translateY(16px);
}

.ref-answer p::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 26%;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #4F84BF, #fff);
  opacity: 0;
  pointer-events: none;
}

.ref-band.is-in .ref-answer p {
  animation: answerRead 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.ref-band.is-in .ref-answer p:last-child { animation-delay: 0.18s; }

.ref-band.is-in .ref-answer p:first-child {
  animation: answerRead 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards, phraseShine 5.5s linear infinite;
}

.ref-band.is-in .ref-answer p::after {
  animation: answerSweep 6.8s ease-in-out 0.9s infinite;
}

.ref-band.is-in .ref-answer p:last-child::after { animation-delay: 1.15s; }

.ref-answer p:first-child {
  color: #fff;
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background-image: linear-gradient(100deg, #fff 0%, #fff 42%, #4F84BF 50%, #fff 58%, #fff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ref-answer p:first-child::after { display: none; }

.ref-answer p:last-child { margin-bottom: 0; }

.ref-spiral { height: 560px; }

.infinite-spiral {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
}

.infinite-spiral__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.infinite-spiral__item {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 0.24);
  background: rgb(255 255 255 / 0.08);
  box-shadow: 0 14px 38px rgb(8 6 18 / 0.28);
  transform-style: preserve-3d;
  backface-visibility: hidden;
  will-change: transform, opacity, filter;
}

.infinite-spiral__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-position: center;
  user-select: none;
}

@keyframes doorSwing {
  0%, 40% {
    transform: perspective(1100px) rotateY(0deg);
    opacity: 1;
    filter: blur(0);
  }
  56% {
    transform: perspective(1100px) rotateY(-74deg);
    opacity: 0.14;
    filter: blur(1px);
  }
  78%, 100% {
    transform: perspective(1100px) rotateY(0deg);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes doorSwingBack {
  0%, 40% {
    transform: perspective(1100px) rotateY(0deg);
    opacity: 1;
    filter: blur(0);
  }
  56% {
    transform: perspective(1100px) rotateY(74deg);
    opacity: 0.14;
    filter: blur(1px);
  }
  78%, 100% {
    transform: perspective(1100px) rotateY(0deg);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes doorFall {
  0%, 36% {
    transform: perspective(900px) rotateX(0deg);
    opacity: 1;
    filter: blur(0);
  }
  50% {
    transform: perspective(900px) rotateX(86deg);
    opacity: 0.08;
    filter: blur(2px);
  }
  70%, 100% {
    transform: perspective(900px) rotateX(0deg);
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes answerRead {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes answerSweep {
  0% { left: 0; opacity: 0; }
  14% { opacity: 0.95; }
  72% { left: 74%; opacity: 0.95; }
  100% { left: 74%; opacity: 0; }
}

@keyframes phraseShine {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@keyframes refInk {
  0%, 42% { color: #fff; }
  58%, 100% { color: #4F84BF; }
}

@keyframes refCaret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@media (max-width: 980px) {
  .ref-band { margin-top: -48px; }
  .ref-band__inner { padding: 18px 22px 36px; }
  .ref-copy { min-height: 0; }
  .ref-copy__text { padding: 28px 22px 26px; }
  .ref-phrase { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .ref-copy__text,
  .ref-spiral {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .ref-phrase,
  .ref-answer p,
  .ref-kicker__ch,
  .ref-kicker__caret { animation: none; }
  .ref-answer p { opacity: 1; transform: none; }
  .ref-answer p::after { animation: none; opacity: 0; }
  .ref-kicker__ch { color: #fff; }
  .ref-phrase,
  .ref-answer p:first-child {
    -webkit-text-fill-color: #fff;
    color: #fff;
  }
  .infinite-spiral__item { transition: none; }
}
