/* =====================================================================
   29/11/2026: auditoria mobile (todas as páginas)
   - botão de topo recua enquanto você desce a página
   - botões flutuantes menores e espaço livre no fim da página
   - "Acha complicado fazer o cadastro?": janela do anúncio do tamanho do conteúdo,
     anúncio publicado inteiro (sem cortar as laterais) e rótulos 01-02-03 sem corte
   - "Cada dúvida respondida": no celular, uma pergunta por vez sobre o rascunho do site
   ===================================================================== */
@media (max-width: 999px) {

  /* cadastro do anúncio */
  html.js:not(.reduce) .ho__flow { justify-content: center; padding: 72px 0 calc(var(--whatsapp-diameter) + 30px); }
  html.js:not(.reduce) .ho__stage { flex: 0 1 auto; display: block; container-type: inline-size; }
  html.js:not(.reduce) .ho__webwrap { height: auto; max-height: none; }
  html.js:not(.reduce) .ho__web { height: auto; aspect-ratio: auto; }
  .ho__shot { object-fit: contain; object-position: top center; }
  html.js:not(.reduce) .ho__steps h3 { hyphens: auto; overflow-wrap: break-word; }

  /* dúvidas do hóspede: as três perguntas ocupam o mesmo lugar */
  .qa__stage.is-mpin { gap: 18px; }
  .qa__stage.is-mpin .qa__list { grid-template-areas: "q"; }
  .qa__stage.is-mpin .qa__item { grid-area: q; padding: 16px 18px; }
  .qa__stage.is-mpin .qa__q { font-size: 1.25rem; }
}
@media (max-width: 640px) {
  :root { --whatsapp-diameter: 52px; --top-diameter: 40px; --floating-edge: 14px; }
  .back-top svg { width: 19px; height: 19px; }
  .waf__ico { width: 23px; height: 23px; padding: 4px; right: -5px; bottom: -3px; }
  .waf__on { width: 11px; height: 11px; right: 2px; top: 2px; }
}

/* baralho "O que acontece hoje": a carta inteira cabe na tela, mesmo com a barra do navegador */
@media (max-width: 999px) {
  html.js:not(.reduce) .pains__pin { padding-top: 84px; gap: 12px; align-content: start; }
  html.js:not(.reduce) .pains__deck { height: clamp(310px, 44svh, 380px); margin-top: min(6svh, 56px); }
  .pain { padding: clamp(20px, 6vw, 34px); gap: 14px; }
  .pain h3 { font-size: clamp(1.65rem, 7vw, 2.35rem); }
  .pain p { font-size: clamp(1rem, 4.2vw, 1.18rem); }
}

/* ---------- tokens de breakpoint (padronização mobile/desktop) ---------- */
:root {
  --bp-xs: 480px;
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
}

/* ---------- safe areas: notch / Dynamic Island / barras de sistema ---------- */
.header { padding-top: max(18px, env(safe-area-inset-top, 0px)); padding-bottom: max(18px, env(safe-area-inset-bottom, 0px)); }
.stage__hud { left: max(var(--gutter), env(safe-area-inset-left, 0px)); right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.waf { right: max(var(--floating-edge), env(safe-area-inset-right, 0px)); bottom: max(var(--floating-edge), env(safe-area-inset-bottom, 0px)); }
.back-top {
  right: calc(max(var(--floating-edge), env(safe-area-inset-right, 0px)) + (var(--whatsapp-diameter) - var(--top-diameter)) / 2);
  bottom: calc(max(var(--floating-edge), env(safe-area-inset-bottom, 0px)) + var(--whatsapp-diameter) + 12px);
}
.footer { padding-bottom: calc(max(var(--floating-edge), env(safe-area-inset-bottom, 0px)) + var(--whatsapp-diameter) * .92 + 36px); }

/* ---------- movimento reduzido: desliga 3D, animações pesadas e transform-style ---------- */
@media (prefers-reduced-motion: reduce) {
  html.reduce .stage__world,
  html.reduce .wheel__view,
  html.reduce .pains__deck,
  html.reduce .globe__ball,
  html.reduce .pz-card,
  html.reduce .resp__scene,
  html.reduce .fan,
  html.reduce .cat,
  html.reduce .dest__world,
  html.reduce .exp__cam,
  html.reduce .exp__me {
    perspective: none !important;
    transform-style: flat !important;
    will-change: auto !important;
  }
  html.reduce .pane,
  html.reduce .pain,
  html.reduce .rcard {
    position: relative !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: auto !important;
  }
  html.reduce .gate,
  html.reduce .dot {
    display: none !important;
  }
}

/* ---------- 3D só em pointer fino (desktop/tablet com mouse) ---------- */
@media (max-width: 999px) and (pointer: coarse) {
  html.js:not(.reduce) .stage__view { perspective: 640px; perspective-origin: 50% 50%; }
  html.js:not(.reduce) .pains__deck { perspective: 600px; }
  html.js:not(.reduce) .wheel__view { perspective: 800px; }
}

/* ---------- svh no palco 3D e cenas imersivas ---------- */
@media (max-width: 999px) {
  html.js:not(.reduce) .stage__pin { height: 100svh; min-height: 600px; }
  html.js:not(.reduce) .pains__pin { min-height: 100svh; }
  html.js:not(.reduce) .wheel__pin { min-height: 100svh; }
  html.js:not(.reduce) .imm__pin { min-height: 100svh; }
}

/* =====================================================================
   29/11/2026 (refação mobile): CENA PRESA (.mscene, criada por ES.mScene em js/site.js)
   O visual que anima e a legenda que o explica ficam juntos e presos no centro da tela.
   Nada da página passa por cima enquanto a cena roda (pinSpacing ligado).
   ===================================================================== */
@media (max-width: 999px) {
  .mscene { display: flex; flex-direction: column; gap: 16px; width: 100%; min-width: 0; position: relative; z-index: 2; }
  .mscene > * { margin-top: 0 !important; margin-bottom: 0; }
  /* passos 01-02-03: um por vez, no mesmo lugar, com a trilha de progresso no topo */
  .mscene__steps { display: grid !important; grid-template-areas: "s"; list-style: none; margin: 0 !important; padding: 0 !important; gap: 0 !important; counter-reset: none; }
  .mscene__steps > li { grid-area: s; opacity: 0; visibility: hidden; translate: 0 10px; transition: opacity .35s ease, translate .35s ease, visibility .35s; pointer-events: none; }
  .mscene__steps > li.is-on { opacity: 1 !important; visibility: visible; translate: 0 0; pointer-events: auto; }
  .mscene__steps > li::before, .mscene__steps::before { display: none !important; }
  /* "Abriu rápido, ficou.": a busca e o ranking logo abaixo dos dois celulares */
  .mscene--spd { gap: 18px; }
  .mscene--spd .spd__serp { margin: 0 !important; }
  /* "Seu site no ar por um ano": texto antes, calendário + checklist juntos */
  .ano__copy { display: contents; }
  .ano__copy > :not(.ano__checks) { order: -1; }
  .ano__checks { order: 1; }
  .ano .ano__checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .9rem; }
  .mscene--sync .sync__list { display: grid; gap: 8px; margin: 0; font-size: .92rem; }
}
/* "Aberto 24 horas" (Tour virtual): no celular o título vem antes do relógio, e o relógio cabe junto na tela presa */
@media (max-width: 999px) {
  .clock { gap: 26px; }
  .clock__copy { order: -1; }
  .clock__dial { width: min(270px, 66vw, 38svh); }
}
/* "O que você recebe": o passo ativo em cima do roteiro; a legenda interna repetida sai */
@media (max-width: 999px) {
  .mscene--rr .rr__cap { display: none !important; }
  .mscene--rr .recebe__list li { opacity: 1; border-color: rgba(212,255,58,.45); background: rgba(212,255,58,.05); padding: 12px 14px; gap: 12px; }
  .mscene--rr .recebe__list span { width: 34px; height: 34px; }
  .mscene--rr .recebe__list h3 { font-size: 1.1rem; margin-bottom: 2px; }
  .mscene--rr .recebe__list p { font-size: .88rem; line-height: 1.4; }
}
/* "Publicado. E trabalhando por você.": título primeiro, relógio + horários do dia juntos, cartões depois */
@media (max-width: 760px) {
  .after__grid { gap: 22px; }
  .after__copy { display: contents; }
  .after__copy > .eyebrow { order: -3; }
  .after__copy > .h2 { order: -2; }
  .mscene--after { align-items: center; gap: 14px; }
  .mscene--after .after__dial { width: min(100%, 290px, 40svh); }
  .mscene--after .after__ev { position: static; display: grid; gap: 8px; width: 100%; pointer-events: auto; }
  .mscene--after .after__ev li { position: static; transform: none; max-width: none; width: auto; font-size: .85rem; padding: 10px 14px; }
}
/* Perfil do Google, "Do cadastro à ficha": etapa + editor + ficha numa cena presa */
.mscene--gbp { gap: 10px; }
.mscene--gbp .gbp-build__detail { margin-top: 0; min-height: 0 !important; height: 6.4em; gap: 4px; overflow: hidden; }
.mscene--gbp .gbp-build__detail h3 { font-size: 1.15rem; }
.mscene--gbp .gbp-build__detail p { font-size: .84rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mscene--gbp .gbp-editor__card { min-height: 0; }
.mscene--gbp .gbp-editor { margin: 0; }
.gbp-build.is-mpinned .gbp-build__pin { min-height: 0; padding-block: 0; }
/* Consultoria, "Conheço a hospedagem": palco mais baixo (sem vazio entre 01/04 e os degraus),
   degraus viram cartões inteiros (sem o fim cortado) e respiro entre a chamada e o título */
@media (max-width: 999px) {
  .exp__copy { display: grid; gap: 16px; }
  html.js:not(.reduce) .exp__stage { height: min(560px, 72svh); }
  html.js:not(.reduce) .exp__step { height: auto; top: calc(40% - var(--i) * 13%); }
  html.js:not(.reduce) .exp__col { height: auto; min-height: 210px; border-radius: 22px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
  html.js:not(.reduce) .exp__step--3 .exp__col { border-bottom-color: var(--cobalt); }
  html.js:not(.reduce) .exp__count { top: 14px; }
}
/* Redes sociais (topo): os ícones do Instagram e do WhatsApp entram no fluxo, abaixo do cabeçalho, sem ficar escondidos */
@media (max-width: 1023px) {
  .phero:has(.rapps) { display: flex; flex-direction: column; }
  .phero .rapps { position: static; order: -1; align-self: flex-start; margin: 0 0 18px; }
  .phero .rapps__ico { width: 48px; height: 48px; }
  .phero .rapps__ico--wa { margin-top: 0; }
}

/* 29/11/2026: Fotografia no celular, galerias presas com o título (ES.mScene .mscene--ps) */
@media (max-width: 999px) {
  .mscene--ps { gap: 18px; }
  .mscene--ps .sec__head { margin: 0; }
  .mscene--ps .sec__lead { font-size: .92rem; line-height: 1.45; }
  .mscene--ps .photo-spaces__frame { width: min(68vw, 300px); }
  .mscene--ps.photo-spaces--details .photo-spaces__frame, .photo-spaces--details .mscene--ps .photo-spaces__frame { width: min(58vw, 260px); }
}

/* Portfólio no celular: a janela de desktop permanece paisagem no fluxo. */
@media (max-width: 999px) {
  .pz-show__cases .pz-site { gap: 16px; padding-block: clamp(24px, 7vw, 54px); }
  .pz-site__info { gap: 8px; }
  .pz-site__name { font-size: clamp(1.9rem, 8.4vw, 2.8rem); max-width: none; }
  .pz-site .case-url { display: none; }
  .pz-site__tags { gap: 6px; }
  .pz-site__tags li { padding: 5px 11px; font-size: .78rem; }
  .pz-site__links { margin-top: 2px; }
  .pz-show__cases .pz-browser__bar { height: 32px; }
}

/* =====================================================================
   29/11/2026 (revisão): CELULAR COM O MESMO MOVIMENTO DO COMPUTADOR (classe .lite: telas até 999px ou toque)
   O visual volta a ser o do computador: piso 3D inclinado na abertura, piso 3D no túnel "Vale a pena?",
   desfoque de vidro nos botões e no cabeçalho. A proteção de memória do iPhone fica só no TAMANHO das camadas,
   que não se vê: o piso do túnel tinha 600vw x 600vw (no iPhone, com tela retina, mais de 7.000 px de lado);
   aqui ele tem 240vw, com a grade na mesma escala aparente.
   ===================================================================== */
/* granulado: mesma textura, do tamanho da tela (antes era o dobro, sem necessidade: ele não se move) */
html.lite .grain { inset: 0; }
/* camadas permanentes: o GSAP já cria a camada enquanto anima */
html.lite .stage__world, html.lite .pane, html.lite .pain, html.lite .pz-card, html.lite .pz-hero__copy { will-change: auto !important; }
/* desfoque de vidro: mais leve no celular (mesmo efeito, raio menor) */
html.lite .header.is-solid { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
/* abertura da Home no celular: o selo "Elói Savedra" ficava embaixo da busca digitada (o nome já está no cabeçalho) */
@media (max-width: 640px) { html.lite .stage__eyebrow { display: none !important; } }
/* balão do WhatsApp: entra sem desfoque (filtro animado pesa no iPhone e deixava o balão cortado no meio da animação) */
html.lite .waf__bubble { filter: none !important; }
/* 29/11/2026 (revisão): "Todas as acomodações em um só lugar" presa com o título no celular */
@media (max-width: 899px) {
  .mscene--merge { gap: 10px; }
  .mscene--merge .sec__lead { font-size: .9rem; line-height: 1.45; }
  /* as etiquetas Airbnb/Booking ficam acima das telas: a cena desce 46px para não encostarem no texto */
  .mscene--merge .merge__stage { width: 100%; top: 46px; margin-bottom: 62px; }
}

/* =====================================================================
   29/11/2026 (rolagem rápida no iPhone)
   - .is-far: seção a mais de 1,5 tela de distância (js/site.js, finish). Continua no lugar e com o mesmo
     tamanho, só não é desenhada; as animações contínuas dela pausam. Volta antes de chegar à tela.
   - respiro no fim das seções para marcar a transição na rolagem
   ===================================================================== */
html.lite .is-far { visibility: hidden; }
/* elementos que o JS deixa visíveis um a um (telas do 3D da Home e do Portfólio) também somem */
html.lite .is-far [style*="visibility: visible"] { visibility: hidden !important; }
html.lite .is-far *, html.lite .is-far *::before, html.lite .is-far *::after { animation-play-state: paused !important; }
@media (max-width: 999px) {
  html.lite main > section.sec:not(.final) { padding-bottom: clamp(88px, 13svh, 150px); }
}

/* Hierarquia de leitura em telas estreitas. As legendas dentro de mockups
   mantêm a escala própria de cada demonstração. */
@media (max-width: 760px) {
  main :is(h1, h2, h3) { min-width: 0; overflow-wrap: anywhere; }
  main .air-hero h1 { font-size: clamp(2.65rem, 12vw, 5rem); line-height: .98; }

  main {
    --mobile-lead: clamp(1.08rem, 4.6vw, 1.3rem);
    --mobile-section-title: clamp(2.4rem, 10.5vw, 3.5rem);
    --mobile-page-title: clamp(2.7rem, 11.5vw, 4.25rem);
  }

  main :is(.phero, .service-intro, .travel-hero, .pz-hero, .fhero) .ptitle {
    font-size: var(--mobile-page-title);
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  main :is(.sec__head, .gains__head, .extra__head, .after__copy) .h2 {
    font-size: var(--mobile-section-title);
    max-width: 100%;
    text-wrap: balance;
  }

  main :is(.lead, .sec__lead, .cta-lead, .final__lead, .pz-more__lead, .ho__lead, .ano__lead),
  main .ctaband > p {
    font-size: var(--mobile-lead);
    line-height: 1.48;
  }

  main :is(.gain, .cat, .stepc, .after__cards article, .seo__grid article, .exp__col, .apple__pts li, .faq__a) p,
  main .pz-case-summary {
    font-size: clamp(1rem, 4.2vw, 1.15rem);
    line-height: 1.48;
  }

  main .inside__text {
    font-size: clamp(2.45rem, min(12.5vw, 9svh), 4.4rem);
    max-width: 15ch;
    line-height: 1.02;
    text-wrap: balance;
  }

  main .inside__decision {
    font-size: clamp(1.2rem, min(5.5vw, 4svh), 1.65rem);
    line-height: 1.35;
  }

  html.js:not(.reduce) body[data-page="home"] .inside {
    min-height: 82svh;
    padding-block: clamp(76px, 12svh, 114px) clamp(44px, 8svh, 76px);
  }

  html.js:not(.reduce) main .imm__lead {
    font-size: var(--mobile-lead);
    line-height: 1.42;
  }

  html.js:not(.reduce) main .ig__cards .istep:nth-child(n) {
    font-size: clamp(1rem, 4vw, 1.15rem);
  }
}

@media (max-width: 999px) {
  /* O cartão anterior sai imediatamente. Só o atual anima na entrada. */
  .mscene--rr .mscene__steps > li:not(.is-on) { opacity: 0; visibility: hidden; transition: none; }
  .mscene--rr .mscene__steps > li.is-on { transition: translate .24s ease-out; }

  .gains__pin { min-height: 0; gap: 24px; padding-block: clamp(64px, 11svh, 112px); }
  .gains__track { width: 100%; grid-template-columns: minmax(0, 1fr); }
  .gain { min-width: 0; min-height: 0; padding: clamp(20px, 5vw, 32px); overflow-wrap: anywhere; }
}

@media (max-width: 999px) {
  .contact { gap: 16px; padding-block: 88px 44px; }
  .contact__copy { gap: 6px; }
  .contact__copy :is(.crumb, .eyebrow, .btn) { display: none; }
  .contact__copy .ptitle { font-size: clamp(1.8rem, 7.8vw, 3rem); text-wrap: initial; }
  .contact__copy .lead { font-size: clamp(.98rem, 3.8vw, 1.15rem); line-height: 1.35; }
  .composer { gap: 10px; padding: clamp(12px, 4vw, 22px); }
  .composer__t { font-size: clamp(1.2rem, 5.2vw, 1.8rem); line-height: 1.1; }
  .composer__preview { gap: 3px; padding: 8px 10px; }
  .composer__msg { max-width: 100%; padding: 6px 8px; font-size: .94rem; line-height: 1.3; }
  .composer__go { justify-self: stretch; padding-inline: 10px; }
}

@media (max-width: 999px) and (max-height: 650px) {
  .contact { gap: 10px; padding-top: 78px; }
  .contact__copy .lead, .composer__preview small { display: none; }
  .composer { gap: 7px; }
}

@media (max-width: 640px) {
  .composer__topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .composer__topics span { justify-content: center; width: 100%; padding-inline: 4px; text-align: center; }
}

@media (max-width: 999px) {
  .mscene--hook { gap: 12px; }
  .mscene--hook .hook__full { top: auto; bottom: 0; translate: none; }
  .mscene--hook .hook__closing { gap: 8px; text-align: center; }
  .mscene--hook .actions { justify-content: center; }
}
