/* The original hero remains the layout source and the interactive first scene. */
.vx-hero {
  --vx-reveal-width: 44%;
  --vx-shake-x: 0px;
  --vx-shake-y: 0px;
  isolation: isolate;
  overflow: hidden;
}

.vx-paper-source {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  min-height: inherit;
  width: 100%;
  background: #fff;
}

.vx-portrait-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #e2f2fc 0%, #cfe7f8 55%, #bddaf0 100%);
}

.vx-portrait-content {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: calc(var(--vx-reveal-width) - 36px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.vx-hero .vx-portrait-scene img {
  display: block;
  min-height: 0;
  height: auto;
  width: 112%;
  max-height: calc(100% - 112px);
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  flex: 0 1 auto;
}

/* Move both scene layers together, inside the fixed hero frame. */
.vx-portrait-scene,
.vx-paper-halves {
  translate: var(--vx-shake-x) var(--vx-shake-y);
}

.vx-paper-halves {
  position: absolute;
  inset: 0;
  z-index: 2;
  visibility: hidden;
  pointer-events: none;
}

.vx-hero .vx-portrait-chat {
  position: relative;
  flex: none;
  display: block;
  text-align: center;
  width: max-content;
  max-width: 100%;
  padding: 17px 24px;
  border: 1px solid rgba(255, 255, 255, .95);
  border-radius: 20px;
  background: linear-gradient(155deg, #fff 45%, #f4faff 100%);
  box-shadow: 0 20px 50px -14px rgba(37, 84, 118, .23), 0 3px 8px rgba(37, 84, 118, .04);
  color: #16324a;
  font-size: 20px;
  font-weight: 700;
  font-family: "Raleway", sans-serif;
  line-height: 1.4;
  text-decoration: none;
  visibility: hidden;
  opacity: 0;
}

.vx-portrait-chat::before {
  content: "";
  position: absolute;
  bottom: -8px;
  left: calc(50% - 8px);
  width: 16px;
  height: 16px;
  background: #f8fcff;
  border-radius: 0 0 0 5px;
  transform: rotate(-45deg);
}

.vx-hero .vx-portrait-chat:hover,
.vx-hero .vx-portrait-chat:focus-visible {
  color: #16324a;
  text-decoration: none;
  box-shadow: 0 24px 54px -12px rgba(37, 84, 118, .3), 0 3px 8px rgba(37, 84, 118, .06);
}

.vx-portrait-chat:focus-visible {
  outline: 3px solid #2f86c9;
  outline-offset: 5px;
}

.vx-hero[data-scene="portrait"] .vx-portrait-chat {
  visibility: visible;
  opacity: 1;
  transition: opacity .35s ease, box-shadow .2s ease;
}

@media (max-width: 991px), (max-aspect-ratio: 1/1) {
  .vx-hero {
    --vx-reveal-width: 70%;
  }
}

@media (max-width: 540px) {
  .vx-hero .vx-portrait-chat {
    padding: 14px 18px;
    font-size: 17px;
  }
}

.vx-paper-half,
.vx-paper-face,
.vx-paper-surface,
.vx-paper-crumple,
.vx-paper-edge {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.vx-paper-crumple {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background-image: url('/img/HeroSection/crumpled-paper.png');
  background-size: auto 115%;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  filter: contrast(1.35) brightness(1.02);
}

.vx-paper-filters {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.vx-paper-half {
  will-change: transform;
}

.vx-paper-half .vx-paper-source {
  height: 100%;
  min-height: 0;
}

.vx-paper-edge {
  overflow: visible;
  fill: none;
}

.vx-hero[data-scene="tear"] > .vx-paper-source,
.vx-hero[data-scene="portrait"] > .vx-paper-source {
  visibility: hidden;
}

.vx-hero[data-scene="tear"] .vx-paper-halves,
.vx-hero[data-scene="portrait"] .vx-paper-halves {
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .vx-hero .vx-paper-halves,
  .vx-hero .vx-portrait-scene {
    display: none;
  }

  .vx-hero > .vx-paper-source {
    visibility: visible !important;
  }
}
