/* Esfiha Mix V9 — curvas contínuas, hover cinético evidente e movimento em camadas. */

/* A última fala conserva o til e todos os acentos durante a entrada. */
.experience-copy h3 {
  overflow: visible !important;
  padding-top: .12em;
}

/* Experiência → avaliações: a superfície creme sobe em forma de onda. */
.reviews-v4 {
  position: relative;
  z-index: 32 !important;
  overflow: visible !important;
}
.reviews-v4::before {
  content: "" !important;
  position: absolute !important;
  z-index: 36 !important;
  left: -7% !important;
  right: -7% !important;
  top: -112px !important;
  height: 158px !important;
  border: 0 !important;
  border-radius: 49% 51% 0 0 / 96% 76% 0 0 !important;
  background: var(--v4-paper) !important;
  clip-path: none !important;
  transform: rotate(.28deg) !important;
  pointer-events: none;
}
.reviews-v4::after {
  z-index: 38 !important;
  top: -76px !important;
  left: 13% !important;
  width: clamp(170px,25vw,450px) !important;
  height: clamp(10px,1.15vw,18px) !important;
  border-radius: 50% !important;
  background: var(--red) !important;
  transform: rotate(-1.7deg) !important;
}
.reviews-v4-sticky { z-index: 1; }

/* O terceiro card volta a usar exatamente o mesmo plano 3D dos dois anteriores. */
.story-reasons-v5 .story-reason:nth-child(3),
.story-reasons-v5 .story-reason:nth-child(3):hover,
.story-reasons-v5 .story-reason:nth-child(3):focus-visible {
  transform: perspective(1200px)
    translate3d(var(--reason-scroll-x),var(--reason-scroll-y),var(--reason-lift))
    rotateX(var(--reason-tilt-y)) rotateY(var(--reason-tilt-x)) rotateZ(var(--reason-scroll-r)) !important;
}
/* Só a caixa inclina; a composição interna conserva as mesmas coordenadas. */
.story-reasons-v5 .story-reason:nth-child(3) h3,
.story-reasons-v5 .story-reason:nth-child(3):hover h3,
.story-reasons-v5 .story-reason:nth-child(3):focus-visible h3,
.story-reasons-v5 .story-reason:nth-child(3) p,
.story-reasons-v5 .story-reason:nth-child(3):hover p,
.story-reasons-v5 .story-reason:nth-child(3):focus-visible p,
.story-reasons-v5 .story-reason:nth-child(3) .reason-context,
.story-reasons-v5 .story-reason:nth-child(3):hover .reason-context,
.story-reasons-v5 .story-reason:nth-child(3):focus-visible .reason-context {
  transform: translateZ(52px) !important;
}
.story-reasons-v5 .story-reason:nth-child(3) .reason-context { transform: translateZ(44px) !important; }

/* Colagem Axisform-inspired: fan, máscara de entrada, foco e parallax do ponteiro. */
.story-collage { --v9-mx: 0; --v9-my: 0; }
.story-frame {
  clip-path: inset(100% 0 0 0 round clamp(18px,2vw,34px));
  opacity: .15;
  transition: clip-path .95s var(--ease), opacity .65s ease, transform .48s var(--ease), box-shadow .35s var(--ease), filter .35s ease;
}
.story-collage.is-v9-visible .story-frame { clip-path: inset(0 round clamp(18px,2vw,34px)); opacity: 1; }
.story-collage.is-v9-visible .story-frame--night { transition-delay: .11s; }
.story-collage.is-v9-visible .story-frame--family { transition-delay: .22s; }
.story-frame--food {
  transform: translate3d(calc(var(--v8-frame-x) + var(--v9-card-x,0px)),calc(var(--v8-frame-y) + var(--v9-card-y,0px)),0)
    rotate(calc(-2deg + var(--v9-card-r,0deg))) rotateX(var(--depth-y)) rotateY(var(--depth-x)) scale(var(--v8-frame-scale));
}
.story-frame--night {
  transform: translate3d(calc(var(--v8-frame-x) + var(--v9-card-x,0px)),calc(var(--v8-frame-y) + var(--v9-card-y,0px)),0)
    rotate(calc(2.5deg + var(--v9-card-r,0deg))) rotateX(var(--depth-y)) rotateY(var(--depth-x)) scale(var(--v8-frame-scale));
}
.story-frame--family {
  transform: translate3d(calc(var(--v8-frame-x) + var(--v9-card-x,0px)),calc(var(--v8-frame-y) + var(--v9-card-y,0px)),0)
    rotate(calc(-1.5deg + var(--v9-card-r,0deg))) rotateX(var(--depth-y)) rotateY(var(--depth-x)) scale(var(--v8-frame-scale));
}
.story-frame figcaption { transform: translateY(calc(100% + 22px)); transition: transform .55s var(--ease); }
.story-frame:hover figcaption,
.story-frame:focus-within figcaption { transform: translateY(0); }
.story-frame:hover,
.story-frame:focus-within { --v8-frame-scale: 1.065; box-shadow: 22px 28px 0 rgba(17,17,17,.9); }

/* Unidades: cada foto é revelada por uma cortina gráfica, em vez de apenas surgir. */
#unidades .location-photo { isolation: isolate; clip-path: inset(0 round 0); }
#unidades .location-photo::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -2px;
  background: var(--red);
  transform: translate3d(0,0,0);
  transition: transform .92s var(--ease);
  transition-delay: calc(var(--v8-unit-delay,0ms) + 120ms);
  pointer-events: none;
}
#unidades .location-card:nth-child(3n+2) .location-photo::after { background: var(--yellow); }
#unidades .location-card:nth-child(3n) .location-photo::after { background: var(--ink); }
#unidades .location-card.is-v8-visible .location-photo::after { transform: translate3d(0,-105%,0); }
#unidades .location-body > * { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .7s var(--ease); }
#unidades .location-card.is-v8-visible .location-body > * { opacity: 1; transform: none; }
#unidades .location-card.is-v8-visible .location-body > *:nth-child(2) { transition-delay: .1s; }
#unidades .location-card.is-v8-visible .location-body > *:nth-child(3) { transition-delay: .17s; }
#unidades .location-card.is-v8-visible .location-body > *:nth-child(4) { transition-delay: .24s; }

@media (max-width: 900px) {
  .reviews-v4::before { top: -76px !important; height: 112px !important; }
  .reviews-v4::after { top: -50px !important; }
  .experience-copy h3 { padding-top: .16em; }
  .story-frame figcaption { transform: none; }
}

@media (hover: none) and (prefers-reduced-motion: no-preference) {
  .v8-kinetic-title.is-v8-visible .v8-letter {
    animation: v9TouchTitle .64s var(--ease) both !important;
    animation-delay: calc(var(--v8-i) * 11ms) !important;
  }
  @keyframes v9TouchTitle {
    from { opacity: 0; transform: translate3d(0,.38em,0) rotate(3deg); }
    to { opacity: 1; transform: translate3d(0,0,0) rotate(0); }
  }
  .story-frame { --v9-card-x: 0px !important; --v9-card-y: 0px !important; --v9-card-r: 0deg !important; }
}

@media (prefers-reduced-motion: reduce) {
  .story-frame { clip-path: none; opacity: 1; transition: none; }
  #unidades .location-photo::after { display: none; }
  #unidades .location-body > * { opacity: 1; transform: none; transition: none; }
}
