/* v16 — camada visual: profundidade, movimento suave e formas orgânicas.
   Tudo que se move só acontece com html.motion (adicionado só quando a pessoa NÃO pediu "reduzir movimento"). */

/* ---------- Formas orgânicas (blobs) ---------- */
.mo-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.mo-blob {
  position: absolute; display: block; border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, 0) 32%),
    radial-gradient(circle at 60% 65%, var(--c2, #F3C7B8) 0, var(--c1, #FEE2D7) 55%, rgba(254, 226, 215, 0) 72%);
  opacity: var(--o, .75);
  box-shadow: inset -18px -24px 60px rgba(201, 141, 130, .18);
}
.mo-blob.b1 { width: clamp(220px, 34vw, 520px); aspect-ratio: 1; top: -12%; right: -8%; --c1: #FEE2D7; --c2: #EBB9A9; }
.mo-blob.b2 { width: clamp(140px, 20vw, 320px); aspect-ratio: 1; bottom: -10%; left: -6%; --c1: #E3EAE0; --c2: #B7C7B3; --o: .6; }
.mo-blob.b3 { width: clamp(90px, 11vw, 180px); aspect-ratio: 1; top: 38%; left: 46%; --c1: #FAF1ED; --c2: #E8C4B6; --o: .7; }
.mo-blob.b4 { width: clamp(60px, 7vw, 120px); aspect-ratio: 1; top: 12%; left: 8%; --c1: #FFF9F6; --c2: #D9A79A; --o: .55; }
.mo-on-dark .mo-blob { --o: .16; box-shadow: none; }
/* o conteúdo da seção fica acima das formas */
.mo-has-blobs { position: relative; isolation: isolate; }
.mo-has-blobs > .container, .mo-has-blobs > div:not(.mo-blobs):not(.home-hero-mobile-photo) { position: relative; z-index: 1; }

html.motion .mo-blob { animation: mo-float 22s ease-in-out infinite, mo-morph 16s ease-in-out infinite; translate: 0 calc(var(--sy, 0) * var(--d, .1) * 1px); will-change: transform; }
html.motion .mo-blob.b2 { animation-duration: 26s, 19s; animation-delay: -6s, -3s; }
html.motion .mo-blob.b3 { animation-duration: 18s, 13s; animation-delay: -9s, -7s; }
html.motion .mo-blob.b4 { animation-duration: 24s, 15s; animation-delay: -3s, -10s; }
@keyframes mo-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  33% { transform: translate3d(3%, -6%, 0) rotate(12deg) scale(1.04); }
  66% { transform: translate3d(-4%, 4%, 0) rotate(-8deg) scale(.97); }
}
@keyframes mo-morph {
  0%, 100% { border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; }
  50% { border-radius: 61% 39% 38% 62% / 55% 61% 39% 45%; }
}

/* ---------- Degradês que mudam devagar ---------- */
.mo-grad { position: relative; isolation: isolate; }
.mo-grad::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(120deg, #FFF9F6 0%, #FEE2D7 28%, #FAF1ED 52%, #EEF2EC 74%, #FFF9F6 100%);
  background-size: 300% 300%; opacity: .7;
}
.mo-grad.mo-grad-rose::before { background: linear-gradient(120deg, #FEE2D7 0%, #FAF1ED 30%, #F8D6C9 60%, #FEE2D7 100%); background-size: 300% 300%; opacity: .9; }
html.motion .mo-grad::before { animation: mo-grad 28s ease-in-out infinite; }
@keyframes mo-grad { 0%, 100% { background-position: 0% 40%; } 50% { background-position: 100% 60%; } }

/* ---------- Capa com camadas (parallax) ---------- */
html.motion .home-hero { --mx: 0; --my: 0; --sy: 0; }
html.motion .home-hero [data-depth] {
  translate: calc(var(--mx) * var(--d) * 26px) calc(var(--sy) * var(--d) * 1px + var(--my) * var(--d) * 18px);
  transition: translate .25s ease-out;
}
.home-hero-desktop-portrait { perspective: 900px; }
.home-hero-desktop-portrait > div { transform-style: preserve-3d; box-shadow: 0 30px 60px -30px rgba(53, 71, 53, .35); }
html.motion .home-hero-desktop-portrait > div {
  transform: rotateY(calc(var(--mx) * 7deg)) rotateX(calc(var(--my) * -6deg));
  transition: transform .3s ease-out, box-shadow .3s ease-out;
  box-shadow: calc(var(--mx) * -22px) calc(30px + var(--my) * -16px) 60px -28px rgba(53, 71, 53, .4);
}
html.motion .home-hero-desktop-portrait img, html.motion .home-hero-mobile-photo img { animation: mo-kenburns 2.2s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes mo-kenburns { from { scale: 1.08; filter: blur(4px); opacity: .6; } to { scale: 1; filter: blur(0); opacity: 1; } }
html.motion .home-hero-copy > * { animation: mo-rise 1s cubic-bezier(.2, .7, .2, 1) both; }
html.motion .home-hero-copy > *:nth-child(2) { animation-delay: .08s; }
html.motion .home-hero-copy > *:nth-child(3) { animation-delay: .16s; }
html.motion .home-hero-copy > *:nth-child(4) { animation-delay: .24s; }
html.motion .home-hero-copy > *:nth-child(5) { animation-delay: .32s; }
html.motion .home-hero-copy > *:nth-child(n+6) { animation-delay: .4s; }
@keyframes mo-rise { from { opacity: 0; translate: 0 18px; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* ---------- Entrada das seções: leve zoom + desfoque ---------- */
html.motion-ready [data-reveal] {
  opacity: 0; translate: 0 26px; scale: .965; filter: blur(7px);
  transition: opacity .9s cubic-bezier(.2, .7, .2, 1), translate .9s cubic-bezier(.2, .7, .2, 1), scale .9s cubic-bezier(.2, .7, .2, 1), filter .9s ease;
  transition-delay: var(--rd, 0ms);
}
html.motion-ready [data-reveal].is-in { opacity: 1; translate: 0 0; scale: 1; filter: none; }

/* ---------- Cards com inclinação 3D e sombra dinâmica ---------- */
.mo-tilt { position: relative; transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.mo-tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: soft-light;
}
.mo-tilt.is-tilting::after { opacity: 1; }
.mo-tilt.is-tilting { transition: transform .08s linear, box-shadow .12s linear; z-index: 2; }
.mo-zoom img { transition: scale .8s cubic-bezier(.2, .7, .2, 1); }
.mo-zoom:hover img { scale: 1.05; }

/* ---------- Números (contadores) ---------- */
.mo-stats { position: relative; z-index: 2; margin-top: -2.5rem; }
.mo-stats-grid { display: grid; gap: .9rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mo-stat {
  border-radius: 1.25rem; padding: 1.25rem 1rem; text-align: center;
  background: rgba(255, 249, 246, .78); border: 1px solid rgba(233, 216, 207, .9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -26px rgba(53, 71, 53, .35);
}
.mo-stat strong { display: block; font-family: var(--font-display, "Cormorant Garamond", serif); font-weight: 500; font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1; color: #956158; letter-spacing: -.02em; }
.mo-stat span { display: block; margin-top: .45rem; font-size: .875rem; line-height: 1.35; color: #454D44; }
@media (max-width: 639px) {
  .mo-stats { margin-top: 0; padding-top: 1.25rem; }
  .mo-stats-grid { gap: .5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mo-stat { padding: 1rem .5rem; }
  .mo-stat span { font-size: .8rem; }
}

/* ---------- Depoimentos em carrossel 3D ---------- */
.mo-3d { position: relative; perspective: 1200px; }
.mo-3d-stage { position: relative; height: var(--h, 320px); transform-style: preserve-3d; }
.mo-3d-stage > figure {
  position: absolute; left: 50%; top: 0; width: min(440px, 84%); margin: 0;
  transform: translateX(-50%); transition: transform .9s cubic-bezier(.2, .7, .2, 1), opacity .9s, filter .9s;
  box-shadow: 0 30px 60px -36px rgba(53, 71, 53, .45); backface-visibility: hidden; cursor: pointer; height: var(--fh, auto); display: flex; flex-direction: column;
}
.mo-3d-stage > figure[data-pos="0"] { transform: translateX(-50%) translateZ(0) rotateY(0) scale(1); opacity: 1; z-index: 3; cursor: default; }
.mo-3d-stage > figure[data-pos="-1"] { transform: translateX(-112%) translateZ(-180px) rotateY(32deg) scale(.86); opacity: .55; filter: blur(1.2px); z-index: 1; }
.mo-3d-stage > figure[data-pos="1"] { transform: translateX(12%) translateZ(-180px) rotateY(-32deg) scale(.86); opacity: .55; filter: blur(1.2px); z-index: 1; }
.mo-3d-stage > figure[data-pos="hide"] { transform: translateX(-50%) translateZ(-400px) scale(.7); opacity: 0; pointer-events: none; }
@media (max-width: 767px) {
  .mo-3d-stage > figure { width: 82%; }
  .mo-3d-stage > figure[data-pos="-1"] { transform: translateX(-88%) translateZ(-260px) rotateY(40deg) scale(.78); opacity: .22; filter: blur(2px); }
  .mo-3d-stage > figure[data-pos="1"] { transform: translateX(-12%) translateZ(-260px) rotateY(-40deg) scale(.78); opacity: .22; filter: blur(2px); }
}
.mo-3d-nav { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.75rem; }
.mo-3d-nav button.mo-arrow { border: 1px solid #576D57; border-radius: 999px; padding: .7rem; color: #354735; background: transparent; cursor: pointer; line-height: 0; }
.mo-3d-nav button.mo-arrow:hover { background: #576D57; color: #fff; }
.mo-3d-dots { display: flex; gap: .5rem; }
.mo-3d-dots button { width: 9px; height: 9px; border-radius: 999px; border: 0; background: #E9D8CF; cursor: pointer; padding: 0; transition: width .4s, background .4s; }
.mo-3d-dots button[aria-current="true"] { width: 26px; background: #C98D82; }

/* ---------- Pedido de menos movimento: tudo parado ---------- */
@media (prefers-reduced-motion: reduce) {
  .mo-blob, .mo-grad::before, .home-hero-copy > *, .home-hero-desktop-portrait img, .home-hero-mobile-photo img { animation: none !important; }
  [data-reveal] { opacity: 1 !important; translate: none !important; scale: none !important; filter: none !important; }
  .mo-tilt { transform: none !important; }
}
