/* Macas RJ, versão 3 da faixa do conforto: a maca real em 3D sai da maleta, se monta e dá lugar ao cliente relaxando.
   Sem JS, sem WebGL ou com movimento reduzido, a faixa fica parada no estado final (foto + texto), como na v1. */

.conforto3 { background: var(--noite); color: var(--branco); }
.v3-palco { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; min-height: min(100svh, 900px); }
.v3-poster, .v3-cena, .v3-legendas { display: none; }

.v3-foto { position: absolute; inset: 0; }
.v3-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.v3-foto::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(29,10,15,0) 38%, rgba(29,10,15,.7) 70%, var(--noite) 100%); }

.v3-texto { position: relative; z-index: 4; width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 72px) 72px; }
.v3-texto h2 { color: var(--branco); max-width: 640px; }
.v3-texto p { color: #e8dcdf; font-size: 17px; margin: 14px 0 30px; max-width: 560px; }

/* Modo animado: trilho alto, palco preso na tela enquanto a rolagem conta a história */
.conforto3.v3-vivo .v3-trilho { height: 460vh; height: 460svh; }
.conforto3.v3-vivo .v3-palco { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0;
  background: radial-gradient(120% 75% at 50% 72%, #3b1821 0%, #220d13 48%, #12060a 100%); }
.conforto3.v3-vivo .v3-cena { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.conforto3.v3-vivo .v3-poster { display: block; position: absolute; z-index: 1; left: 50%; top: 56%; width: min(78vw, 560px); height: auto;
  transform: translate(-50%, -50%); border-radius: 18px; opacity: .92; transition: opacity .6s; }
.conforto3.v3-pronto .v3-poster { opacity: 0; pointer-events: none; }
.conforto3.v3-vivo .v3-foto { z-index: 2; opacity: var(--revela, 0); }
.conforto3.v3-vivo .v3-foto img { transform: scale(calc(1.1 - var(--revela, 0) * .1)); }
.conforto3.v3-vivo .v3-cena { transform: scale(calc(1 + var(--revela, 0) * .08)); transform-origin: 60% 60%; }
.conforto3.v3-vivo .v3-texto { position: absolute; left: 0; right: 0; bottom: 0; opacity: var(--texto, 0);
  transform: translateY(calc((1 - var(--texto, 0)) * 24px)); }
.conforto3.v3-vivo .v3-texto:not(.v3-ativo) { pointer-events: none; visibility: hidden; }

.conforto3.v3-vivo .v3-legendas { display: block; position: absolute; z-index: 3; inset: 0; pointer-events: none; }
/* Enquanto o modulo carrega, a foto final continua visivel, nunca um palco vazio. */
.conforto3.v3-vivo:not(.v3-pronto) .v3-foto { opacity: 1; }
.conforto3.v3-vivo:not(.v3-pronto) .v3-texto { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.conforto3.v3-vivo:not(.v3-pronto) .v3-poster,
.conforto3.v3-vivo:not(.v3-pronto) .v3-legendas { display: none; }
.v3-leg { position: absolute; left: max(clamp(16px, 5vw, 72px), calc((100% - 1280px) / 2 + 72px)); top: 50%; max-width: 420px;
  font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; color: var(--branco);
  opacity: 0; transform: translateY(-50%); }
.v3-leg small { display: block; font-size: 15px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: #e9b9c4; margin-bottom: 10px; }

@media (max-width: 820px) {
  .v3-texto { padding: 0 16px 104px; }
  .v3-texto p { font-size: 15px; margin: 10px 0 20px; }
  .v3-texto .botao { display: block; text-align: center; }
  .v3-leg { left: 16px; right: 16px; top: max(56px, 9svh); max-width: none; font-size: 22px; text-align: center; transform: none; }
  .v3-leg small { font-size: 13px; margin-bottom: 6px; }
  .conforto3.v3-vivo .v3-trilho { height: 420vh; height: 420svh; }
  .conforto3.v3-vivo .v3-poster { top: 58%; width: 88vw; }
}
