/* =========================================================================
   2wcode — folha de estilo única
   Cores extraídas do logo 2w (assets/2wcode-perfil-escuro.png):
   fundo #101828 · branco #FFFFFF · azul #6C9BFF
   ========================================================================= */

/* ---------- 0. Fontes (local, same-origin) ---------- */
/* Hospedadas aqui de propósito: evita DNS/TLS para dois domínios do Google e
   permite pré-carregar o arquivo que pinta o H1. */

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-normal.woff2") format("woff2");
  font-style: normal; font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic; font-weight: 400; font-display: swap;
}
@font-face {
  /* arquivo variável: cobre 400 a 700 num download só */
  font-family: "Inter";
  src: url("/assets/fonts/inter-normal.woff2") format("woff2");
  font-style: normal; font-weight: 400 700; font-display: swap;
}

/* Fallbacks com métricas ajustadas às fontes reais (medidas no navegador).
   Sem isto, a Instrument Serif entra 24% mais estreita que a Georgia e o
   título inteiro salta quando a fonte chega. */
@font-face {
  font-family: "Instrument Fallback";
  src: local("Georgia"), local("Times New Roman"), local("Times");
  size-adjust: 76.34%;
  ascent-override: 129.7%;
  descent-override: 40.6%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Segoe UI"), local("Helvetica Neue"), local("Arial");
  size-adjust: 108.7%;
  ascent-override: 89.2%;
  descent-override: 22.1%;
  line-gap-override: 0%;
}

/* ---------- 1. Tokens ---------- */
:root {
  /* Marca */
  --bg:          #101828;
  --bg-elev:     #16203A;   /* cards e blocos elevados */
  --bg-soft:     #1B2746;   /* hover / chips */
  --ink:         #FFFFFF;
  --ink-2:       rgba(255, 255, 255, 0.74);  /* texto corrido */
  --ink-3:       rgba(255, 255, 255, 0.56);  /* legendas */
  --accent:      #6C9BFF;
  --accent-soft: rgba(108, 155, 255, 0.14);
  --accent-ink:  #101828;   /* texto sobre o azul — contraste 6.6:1 */
  --ok:          #3ED598;   /* dúvida resolvida: destaca do azul da marca */
  --ok-soft:     #142C28;   /* sólido: o chip fica por cima do aparelho */
  --line:        rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);

  /* Tipografia */
  --font-display: "Instrument Serif", "Instrument Fallback", Georgia, serif;
  --font-sans: "Inter", "Inter Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  /* Escala fluida — mobile 360px → desktop 1280px */
  --t-xs:   0.8125rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-lg:   clamp(1.0625rem, 0.99rem + 0.33vw, 1.1875rem);
  --t-xl:   clamp(1.25rem,  1.15rem + 0.45vw, 1.5rem);
  --t-2xl:  clamp(1.625rem, 1.42rem + 0.9vw,  2.25rem);
  --t-3xl:  clamp(2.125rem, 1.72rem + 1.8vw,  3.25rem);
  --t-4xl:  clamp(2.5rem,   1.95rem + 2.45vw, 4.25rem);

  /* Espaçamento */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.5rem;   --sp-6: 2rem;     --sp-7: 2.5rem;   --sp-8: 3rem;
  --sp-9: 4rem;     --sp-10: 5rem;

  --gutter: 1.25rem;                 /* respiro lateral no mobile */
  --maxw: 68rem;

  --r-sm: 8px;  --r-md: 14px;  --r-lg: 20px;  --r-xl: 28px;  --r-full: 999px;

  --shadow-card: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.28);
  --shadow-cta:  0 6px 20px rgba(108, 155, 255, .28);

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--sp-6);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;            /* trava scroll horizontal sem travar position:sticky */
  /* Protege o layout de palavra longa sem espaço (nome de projeto no config,
     e-mail, URL colada num título). */
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Foco visível e consistente em tudo que é operável */
:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

/* ---------- 3. Utilitários ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 100;
  padding: var(--sp-3) var(--sp-5);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; border-radius: 0 0 var(--r-md) var(--r-md);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* Seções abaixo da dobra: o navegador não gasta layout com o que não está na tela.
   contain-intrinsic-size evita o CLS que isso causaria. */
.section {
  padding-block: var(--sp-9);
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--t-3xl);
  letter-spacing: -0.01em;
}

.lede { color: var(--ink-2); font-size: var(--t-lg); max-width: 46ch; }
.fineprint { color: var(--ink-3); font-size: var(--t-xs); line-height: 1.5; }

/* ---------- 4. Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-2);
  min-height: 52px;                      /* acima dos 48px pedidos */
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  font-weight: 600; font-size: var(--t-base);
  text-align: center;
  transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.btn:active { transform: scale(.98); }

.btn--primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { background: #87AEFF; }

.btn--ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--accent); }

/* No mobile o CTA ocupa quase a largura toda */
.btn--block { display: flex; width: 100%; }
@media (min-width: 40rem) {
  .btn--block { display: inline-flex; width: auto; }
}

.btn__icon { width: 20px; height: 20px; flex: none; }

/* ---------- 5. Traço azul desenhado à mão ---------- */
/* O risco é o mesmo elemento do logo. Desenha com stroke-dashoffset ao entrar na tela. */
.stroke-draw path,
.stroke-draw ellipse,
.stroke-draw line {
  stroke: var(--accent);
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
}
.stroke-draw.is-visible path,
.stroke-draw.is-visible ellipse,
.stroke-draw.is-visible line {
  animation: draw 1s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Traço sob a palavra-chave. Acompanha a largura da palavra, então nunca
   sobra nem falta como acontecia com o círculo. */
.mark {
  position: relative;
  display: inline-block;
  font-style: italic;
  white-space: nowrap;
}
.mark__line {
  position: absolute;
  left: 0; right: 0;
  bottom: -0.08em;
  width: 100%; height: 0.26em;
  pointer-events: none;
  overflow: visible;
}

/* Sublinhado curto sob título de seção */
.underline-draw {
  display: block;
  width: 136px; height: 12px;
  margin-top: var(--sp-3);
  overflow: visible;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  /* svh/dvh: o 100vh sozinho estoura no navegador in-app do Instagram e do TikTok */
  min-height: 100svh;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-block: var(--sp-5) var(--sp-8);
  overflow: hidden;
}

/* Brilho azul de fundo — gradiente, não imagem */
.hero::before {
  content: "";
  position: absolute; inset: -20% -40% auto;
  height: 70%;
  background: radial-gradient(60% 60% at 50% 30%, rgba(108,155,255,.20), transparent 70%);
  pointer-events: none;
}

.hero__inner { position: relative; display: flex; flex-direction: column; flex: 1; }

.hero__brand {
  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: 44px; min-width: 44px;
  margin-bottom: var(--sp-5);
}
/* a marca sobe para antes dos aparelhos */
.hero__mark { order: -2; }
.hero__logo { width: 42px; height: 42px; border-radius: 10px; }

.hero__eyebrow { margin-bottom: var(--sp-4); }

.hero__title {
  font-family: var(--font-display);
  font-size: var(--t-4xl);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-5);
}

.hero__sub {
  color: var(--ink-2);
  font-size: var(--t-lg);
  max-width: 34ch;
  margin-bottom: var(--sp-6);
}

.hero__actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-bottom: var(--sp-5); }

.hero__trust {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--sp-2) var(--sp-3);
  color: var(--ink-3); font-size: var(--t-sm);
}
.hero__trust li { display: flex; align-items: center; gap: var(--sp-2); }
/* O separador fica no fim do item anterior: no ::before do seguinte ele
   sobrava sozinho no começo da linha quando a lista quebrava. */
.hero__trust li:not(:last-child)::after {
  content: "·"; color: var(--line-strong); margin-left: var(--sp-3);
}

/* Mockups de celular flutuando */
.hero__art {
  position: relative;
  order: -1;                 /* no mobile, os aparelhos aparecem antes da copy */
  margin-bottom: var(--sp-6);
  display: flex; justify-content: center; align-items: flex-end;
  gap: var(--sp-3);
  /* reserva a altura desde o primeiro frame: sem salto de layout */
  min-height: 190px;
}
.phone {
  width: clamp(104px, 26vw, 150px);
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.45));
  will-change: transform;
}
/* O feed rola em loop: o conteúdo é desenhado duas vezes e o grupo sobe
   exatamente um ciclo (280), então a emenda não aparece. */
.feed {
  animation: rolar-feed var(--dur, 16s) linear infinite;
  animation-delay: var(--atraso, 0s);
  will-change: transform;
}
@keyframes rolar-feed {
  from { transform: translateY(0); }
  to   { transform: translateY(-280px); }
}
/* Fora da tela não gasta nada. A classe é a exceção, não a regra: se o JS
   falhar, o feed continua rolando em vez de ficar congelado. */
.hero__art.is-off .feed { animation-play-state: paused; }

.phone--a { transform: rotate(-7deg) translateY(10px); }
.phone--b { transform: rotate(2deg)  translateY(-14px); z-index: 2; }
.phone--c { transform: rotate(8deg)  translateY(16px); display: none; }

@media (min-width: 30rem) { .phone--c { display: block; } }

@media (min-width: 48rem) {
  .hero__art { min-height: 280px; margin-bottom: var(--sp-7); }
  .phone { width: clamp(140px, 20vw, 190px); }
}

@media (min-width: 60rem) {
  .hero__inner {
    flex-direction: row; align-items: center; gap: var(--sp-9);
  }
  .hero__copy { flex: 1 1 52%; }
  .hero__art  {
    order: 0;                /* ao lado da copy, não acima */
    flex: 1 1 48%;
    margin-bottom: 0; min-height: 420px; align-items: center;
  }
  .hero__brand { position: absolute; top: 0; left: 0; margin: 0; }
  .hero__actions { flex-direction: row; }
  .phone { width: clamp(150px, 15vw, 210px); }
}

/* ---------- 7. Botão flutuante do WhatsApp ---------- */
.fab {
  position: fixed;
  right: var(--gutter);
  /* safe-area: no iPhone a barra de gestos comeria o botão */
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  z-index: 60;

  display: inline-flex; align-items: center; gap: var(--sp-3);
  min-height: 56px; min-width: 56px;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,.45), var(--shadow-cta);

  /* escondido até rolar ~1 tela */
  opacity: 0;
  transform: translateY(16px) scale(.9);
  pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease);
}
.fab.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.fab__icon { width: 24px; height: 24px; flex: none; }
.fab__label { display: none; }
@media (min-width: 26rem) { .fab__label { display: inline; } }

/* ---------- 8. Movimento reduzido ---------- */
/* Quem pediu menos movimento vê o estado final, sem animação nenhuma. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .stroke-draw path, .stroke-draw ellipse, .stroke-draw line { stroke-dashoffset: 0; }
  .fab { opacity: 1; transform: none; pointer-events: auto; }
  .feed { animation: none; }
  .teia { opacity: 1; animation: none; }
  .duvida__ico { animation: none; }
  .sinal { animation: none; }
  .brilho--perto { animation: none; }

}

/* ---------- 9. História de rolagem ---------- */
/* Sem content-visibility aqui: a seção segura um position:sticky. */
.story { position: relative; }

.story__track { position: relative; height: 300svh; }

.story__stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
}
.story__stage-inner { width: 100%; }


/* As três faixas de rolagem que disparam a troca de passo */
.story__sentinels { position: absolute; inset: 0; display: flex; flex-direction: column; }
.story__sentinels > * { flex: 1; }


/* Textos dos passos: empilhados na mesma célula, sem salto de altura */
.story__texts {
  display: grid;
  margin-top: var(--sp-6);
  min-height: 5.5rem;
  text-align: center;
}
.story__text {
  grid-area: 1 / 1;
  font-size: var(--t-xl);
  line-height: 1.35;
  max-width: 30ch;
  margin-inline: auto;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.story__text.is-on { opacity: 1; transform: none; }

.story__tag {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--t-xs); font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-2);
}

.story__disclaimer { text-align: center; margin-top: var(--sp-5); }

@media (min-width: 48rem) {
  .story__texts { min-height: 6rem; }
}

/* ---------- 10. Estados da cena ---------- */

/* Fora da tela nada anima: a cena não gasta bateria no fundo. */
.scene:not(.is-active) * { animation-play-state: paused !important; }

.scene-wrap {
  position: relative;
  max-width: 40rem;
  margin-inline: auto;
  /* faixas em cima e embaixo: as perguntas ocupam os quatro cantos sem
     encostar no aparelho, que fica no tamanho cheio no meio */
  padding-block: 3.6rem;
}
.scene { width: 100%; max-width: 310px; height: auto; margin-inline: auto; display: block; }

/* A tela esquenta quando a página fica pronta. */
.tela { transition: fill .8s var(--ease); }
.scene[data-step="3"] .tela { fill: #1B2746; }

.brilho { opacity: 0; transition: opacity 1s var(--ease); }
.scene[data-step="3"] .brilho { opacity: 1; }
/* o halo de perto pulsa de leve: a página "acabou de nascer" */
.scene[data-step="3"] .brilho--perto {
  animation: pulsar-brilho 3.2s var(--ease) 1s infinite;
}
@keyframes pulsar-brilho {
  0%, 100% { opacity: .75; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.06); }
}
.brilho--perto { transform-box: fill-box; transform-origin: center; }

/* a moldura ganha contorno azul quando a página está pronta */
.moldura { transition: stroke .8s var(--ease); }
.scene[data-step="3"] .moldura { stroke: #6C9BFF; }

/* Perfil parado: sai de cena quando a página entra. */
.perfil { opacity: 1; transition: opacity .5s var(--ease); }
.scene:not([data-step="1"]) .perfil { opacity: 0; }

/* A teia aparece depois de um tempo, como se o perfil estivesse largado. */
.teia { opacity: 0; animation: surgir-teia 1.4s var(--ease) .5s forwards; }
@keyframes surgir-teia { to { opacity: 1; } }

/* Página: entra no passo 2 e fica */
.site { opacity: 0; transition: opacity .4s var(--ease); }
.scene[data-step="2"] .site,
.scene[data-step="3"] .site { opacity: 1; }

/* Blocos da página se montando, um depois do outro */
.bloco { opacity: 0; transform: translateY(10px); transform-box: fill-box; }
.scene[data-step="2"] .bloco,
.scene[data-step="3"] .bloco {
  animation: montar .5s var(--ease) var(--d, 0s) forwards;
}
@keyframes montar {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Traço azul desenhando em volta do botão do WhatsApp */
.traco-botao {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  opacity: 0;
}
.scene[data-step="2"] .traco-botao,
.scene[data-step="3"] .traco-botao {
  opacity: 1;
  animation: draw .9s var(--ease) 1s forwards;
}

/* A mensagem sai no fim */
.msg { opacity: 0; transform: translateY(12px) scale(.8); transform-box: fill-box; transform-origin: center; }
.scene[data-step="3"] .msg { animation: surgir .6s var(--ease) .5s forwards; }
@keyframes surgir {
  from { opacity: 0; transform: translateY(12px) scale(.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Interrogações soltas em volta: entram no primeiro passo e viram check. */
.sinal__q, .sinal__c { transform-box: fill-box; transform-origin: center; }
.sinal__q { opacity: 1; }
.sinal__c { opacity: 0; }
.sinal { animation: flutuar 4s var(--ease) var(--d, 0s) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flutuar {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.scene[data-step="3"] .sinal__q { animation: sumir-sinal .3s var(--ease) var(--d, 0s) forwards; }
.scene[data-step="3"] .sinal__c { animation: virar-sinal .45s var(--ease) var(--d, 0s) forwards; }
.sinal__c { fill: var(--ok); }
@keyframes sumir-sinal { to { opacity: 0; transform: scale(.5); } }
@keyframes virar-sinal {
  0%   { opacity: 0; transform: scale(.4) rotate(-20deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* ---------- 10b. As dúvidas ---------- */
/* Começam como perguntas sem resposta e viram respostas no último passo. */
/* As perguntas ficam na faixa de cima, soltas e desencontradas: embaixo,
   em bloco, liam como lista; por cima do aparelho, tapavam a cena. */
.duvidas {
  position: absolute; inset: 0;
  margin: 0;
  pointer-events: none;
}

.duvida {
  position: absolute;
  display: flex; align-items: center; gap: var(--sp-2);
  width: max-content; max-width: 7.5rem;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-full);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.2;
  transform: rotate(var(--giro, 0deg));
  transition: background-color .4s var(--ease), border-color .4s var(--ease), color .4s var(--ease);
}
/* espalhadas em volta do aparelho, duas de cada lado */
/* Ficam por cima do aparelho e fora de alinhamento: são dúvidas no ar,
   não uma lista. O giro vem do --giro de cada uma, no HTML. */
.duvida:nth-child(1) { top: 0;    left: 0; }
.duvida:nth-child(2) { top: 0;    right: 0; }
.duvida:nth-child(3) { bottom: 0; left: 0; }
.duvida:nth-child(4) { bottom: 0; right: 0; }

/* O marcador é desenhado no CSS: "?" vira "✓" sem trocar o texto. */
.duvida__ico {
  flex: none;
  display: grid; place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #45567D;
  color: var(--ink);
  font-size: 11px; font-weight: 700;
  transition: background-color .4s var(--ease), transform .4s var(--ease);
}
.duvida__ico::before { content: "?"; }

/* Respondidas */
.scene[data-step="3"] ~ .duvidas .duvida {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ink);
}
.scene[data-step="3"] ~ .duvidas .duvida__ico {
  background: var(--ok);
  color: #06281B;
  animation: virar-check .45s var(--ease) var(--d, 0s) both;
}
.scene[data-step="3"] ~ .duvidas .duvida__ico::before { content: "✓"; }

@keyframes virar-check {
  0%   { transform: scale(1) rotate(0); }
  45%  { transform: scale(.6) rotate(-25deg); }
  100% { transform: scale(1) rotate(0); }
}

/* separado da cena, mas sem descer para debaixo do botão flutuante */
.story__texts { margin-top: var(--sp-7); }

/* Tela baixa: a cena inteira encolhe, senão o texto do passo desce para
   debaixo do botão flutuante. */
/* O conteúdo do palco é centralizado; sem reservar o canto do botão
   flutuante, em tela baixa o texto do passo acaba embaixo dele. */
@media (max-height: 900px) and (max-width: 52rem) {
  .story__stage-inner { padding-bottom: 5rem; }
}

/* Só em tela realmente baixa a cena encolhe. */
@media (max-height: 700px) and (max-width: 52rem) {
  .scene-wrap { padding-block: 3.4rem; }
  .scene { max-width: 282px; }
  .duvida { font-size: 0.7rem; max-width: 8.6rem; }
  .story__texts { margin-top: var(--sp-4); min-height: 4.5rem; }
  .story__text { font-size: var(--t-lg); }
}

/* Só telas realmente estreitas (320px). 360px fica de fora de propósito. */
/* Último degrau: tela muito curta (navegador com barras grandes), onde o
   texto do passo ainda alcançava o botão flutuante. */
@media (max-height: 620px) and (max-width: 52rem) {
  .scene-wrap { padding-block: 2.8rem; }
  .scene { max-width: 256px; }
  .story__texts { margin-top: var(--sp-3); min-height: 4rem; }
}

@media (max-width: 21.5rem) {
  .scene { max-width: 262px; }
  .duvida { font-size: 0.66rem; max-width: 7.6rem; padding: var(--sp-2); }
}

/* No desktop as perguntas cercam o aparelho, como ele pediu. */
@media (min-width: 52rem) {
  .scene { max-width: 282px; }
  .duvida {
    max-width: 11rem;
    font-size: var(--t-sm);
    padding: var(--sp-2) var(--sp-4);
  }
  .duvida:nth-child(1) { top: 0;    left: 3%; }
  .duvida:nth-child(2) { top: 0;    right: 3%; }
  .duvida:nth-child(3) { bottom: 0; left: 5%; }
  .duvida:nth-child(4) { bottom: 0; right: 5%; }
}

/* ---------- 11. História sem movimento ---------- */
/* Com prefers-reduced-motion o JS clona a cena em três cards estáticos
   e a rolagem longa deixa de existir. */
.story--static .story__track { height: auto; }
.story--static .story__stage { position: static; height: auto; overflow: visible; }
.story--static .story__sentinels { display: none; }
.story--static .story__stage-inner > .scene-wrap,
.story--static .story__stage-inner > .story__texts { display: none; }

.story__cards { display: grid; gap: var(--sp-6); }
.story__card {
  position: relative;
  padding: var(--sp-5);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.story__card .scene { max-width: 460px; margin-inline: auto; }
.story__card p { margin-top: var(--sp-4); font-size: var(--t-lg); }
@media (min-width: 60rem) {
  .story__cards { grid-template-columns: repeat(3, 1fr); }
  .story__card p { font-size: var(--t-base); }
}

/* ---------- 12. Blocos de apoio ---------- */
.callout {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-size: var(--t-base);
}

.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: #9CBCFF; }

/* ---------- 13. Simulador ---------- */
.sim__lede { margin-top: var(--sp-5); }

.sim__grid { display: grid; gap: var(--sp-6); margin-top: var(--sp-7); }
.sim__grid > * { min-width: 0; }

/* Item de grid nasce com min-width:auto, ou seja, nunca encolhe abaixo do
   conteúdo mais largo. Uma palavra comprida numa célula estica a coluna
   inteira e empurra o resto para fora da tela. */
.how__list > *, .plans__grid > *,
.plan__list > *, .offer__list > *, .story__cards > *, .foot__inner > * { min-width: 0; }
@media (min-width: 52rem) {
  .sim__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); align-items: center; }
}

.sim__form { display: grid; gap: var(--sp-6); }

.field__label {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3);
  font-size: var(--t-sm); font-weight: 600; color: var(--ink-2);
  margin-bottom: var(--sp-3);
}
.field__value {
  font-size: var(--t-lg); font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.field__money {
  display: flex; align-items: center;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding-left: var(--sp-4);
  transition: border-color .2s var(--ease);
}
.field__money:focus-within { border-color: var(--accent); }
.field__prefix { color: var(--ink-3); font-weight: 600; }
.field__input {
  flex: 1; min-width: 0;
  background: none; border: 0; color: var(--ink);
  font: inherit; font-size: var(--t-xl); font-weight: 700;
  padding: var(--sp-3) var(--sp-4);
  min-height: 52px;
  font-variant-numeric: tabular-nums;
}
.field__input:focus { outline: none; }
/* As setinhas do number atrapalham no toque */
.field__input::-webkit-outer-spin-button,
.field__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* Slider com alvo de toque grande */
.field__range {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 44px;
  background: none; cursor: pointer;
}
.field__range::-webkit-slider-runnable-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(var(--accent), var(--accent)) 0 / var(--fill, 30%) 100% no-repeat,
              var(--bg-soft);
}
.field__range::-moz-range-track {
  height: 8px; border-radius: 4px; background: var(--bg-soft);
}
.field__range::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--accent); }
.field__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; margin-top: -10px;
  border-radius: 50%; background: var(--ink);
  border: 4px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.field__range::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--accent);
}

.sim__out {
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
/* Os dois números são o ponto da seção, então ganham o maior peso da página. */
.calc__placar { display: grid; gap: var(--sp-5); }

.calc__item { display: grid; gap: var(--sp-1); }
.calc__num {
  font-size: var(--t-4xl); font-weight: 700; line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.calc__num--dinheiro { color: var(--ink); }
.calc__unidade { color: var(--ink-2); font-size: var(--t-base); }

.calc__ano {
  color: var(--ink-3); font-size: var(--t-sm);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.calc__ano strong { color: var(--ink-2); font-weight: 700; }

.calc__filtro {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
  font-size: var(--t-sm);
  color: var(--ink);
}
.sim__cta { margin-top: var(--sp-6); }

/* ---------- 14. Portfólio ---------- */
/* ---------- Carrossel do portfólio ---------- */
/* A faixa tem o conjunto duplicado e anda 50% da própria largura: ao
   terminar, o primeiro clone está exatamente onde o original começou, então
   o laço não tem emenda visível. */
.port__viewport {
  margin-top: var(--sp-7);
  overflow: hidden;
  /* as pontas somem no fundo em vez de cortar seco */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.port__track {
  display: flex;
  gap: var(--sp-5);
  width: max-content;
  animation: desfilar var(--dur, 18s) linear infinite;
}
/* Pausa ao passar o dedo/mouse, ao focar pelo teclado e fora da tela. */
.port__track:hover,
.port__track:focus-within,
.port__track.is-off { animation-play-state: paused; }

@keyframes desfilar {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.port__item {
  flex: 0 0 auto;
  width: min(78vw, 20rem);
}
@media (min-width: 48rem) { .port__item { width: 22rem; } }

/* Sem movimento o laço não existe: vira uma faixa que a pessoa rola na mão. */
.port--estatico .port__viewport {
  overflow-x: auto;
  -webkit-mask-image: none; mask-image: none;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--sp-3);
}
.port--estatico .port__track { animation: none; width: auto; }
.port--estatico .port__item { scroll-snap-align: start; }

.card {
  display: flex; flex-direction: column;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.card__media { position: relative; background: var(--bg-soft); }
.card__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.card__badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  background: rgba(16,24,40,.86);
  border: 1px solid var(--line-strong);
  font-size: var(--t-xs); font-weight: 600;
  backdrop-filter: blur(6px);
}
.card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5); flex: 1; }
.card__name { font-size: var(--t-xl); font-family: var(--font-display); }
.card__seg { color: var(--ink-3); font-size: var(--t-sm); }
.card__link {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  margin-top: auto; padding-top: var(--sp-4);
  min-height: 44px;
  color: var(--accent); font-weight: 600;
}
.card__link svg { width: 18px; height: 18px; }
.card__link:hover { color: #9CBCFF; }

/* ---------- 15. Como funciona ---------- */
.how__list {
  display: grid; gap: var(--sp-6);
  margin-top: var(--sp-7);
  position: relative;
}
.how__item {
  position: relative;
  padding-left: calc(var(--sp-7) + var(--sp-2));
}
/* a linha vertical que liga os passos */
.how__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 19px; top: 44px; bottom: calc(var(--sp-6) * -1);
  width: 2px;
  background: linear-gradient(var(--accent), var(--line));
}
.how__num {
  position: absolute; left: 0; top: 0;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 700; font-size: var(--t-base);
}
/* O fundo é declarado nos próprios textos: a linha vertical é um ::before do
   item, e verificadores de contraste a tomam como fundo do texto, apesar de
   ela ficar na coluna do número (x 39-41) e o texto começar em x 68. */
.how__title {
  font-size: var(--t-lg); font-weight: 600; font-family: var(--font-sans);
  line-height: 1.3; padding-top: var(--sp-2);
  background-color: var(--bg);
}
.how__text { color: var(--ink-2); margin-top: var(--sp-2); background-color: var(--bg); }

/* ---------- 17. Oferta ---------- */
.offer__card {
  max-width: 40rem; margin-inline: auto;
  padding: var(--sp-6) var(--sp-5) var(--sp-7);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  text-align: center;
}
@media (min-width: 40rem) { .offer__card { padding: var(--sp-8); } }

.offer__title {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  margin-top: var(--sp-3);
}
.offer__price {
  display: flex; align-items: baseline; justify-content: center; gap: var(--sp-3);
  flex-wrap: wrap;
  margin-top: var(--sp-5);
}
.offer__from { color: var(--ink-3); text-decoration: line-through; font-size: var(--t-xl); }
.offer__now { color: var(--accent); font-size: var(--t-4xl); font-weight: 700; line-height: 1; }
.offer__tag {
  display: inline-block; margin-top: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: var(--t-sm); font-weight: 600;
}
.offer__slots { margin-top: var(--sp-3); font-size: var(--t-base); }
.offer__pay { margin-top: var(--sp-3); color: var(--ink-2); font-size: var(--t-sm); }

.offer__subtitle {
  font-family: var(--font-sans);
  font-size: var(--t-sm); font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  margin-top: var(--sp-7); margin-bottom: var(--sp-4);
  text-align: left;
}
.offer__list { display: grid; gap: var(--sp-3); text-align: left; }
.offer__list li {
  display: grid; grid-template-columns: 24px 1fr; gap: var(--sp-3);
  align-items: start;
  font-size: var(--t-sm); line-height: 1.5;
  color: var(--ink-2);
}
.offer__ico { width: 20px; height: 20px; margin-top: 2px; }
.offer__ico--yes { color: var(--accent); }
.offer__ico--no { color: var(--ink-3); }
.offer__badge {
  display: inline-block; margin-top: var(--sp-5);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: var(--t-sm); font-weight: 600;
}
.offer__badge[hidden] { display: none; }
.offer__cta { margin-top: var(--sp-7); }

/* ---------- 18. Planos ---------- */
.plans__grid { display: grid; gap: var(--sp-5); margin-top: var(--sp-7); }
@media (min-width: 48rem) { .plans__grid { grid-template-columns: repeat(2, 1fr); align-items: start; } }

.plan {
  position: relative;
  display: flex; flex-direction: column;
  padding: var(--sp-6) var(--sp-5);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}
.plan--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.plan__flag {
  position: absolute; top: calc(var(--sp-3) * -1); left: var(--sp-5);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full);
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--t-xs); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.plan__name { font-family: var(--font-display); font-size: var(--t-xl); }
.plan__price { margin-top: var(--sp-3); color: var(--ink-3); }
.plan__price strong { color: var(--ink); font-size: var(--t-2xl); font-weight: 700; }
.plan__intro { margin-top: var(--sp-5); color: var(--ink); font-size: var(--t-sm); font-weight: 600; }
.plan__list { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); margin-bottom: var(--sp-5); }
/* bloco separado por uma linha: o que vem além do relatório */
.plan__list--extra {
  margin-top: 0;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
  margin-bottom: var(--sp-6);
}
.plan__list li {
  display: grid; grid-template-columns: 24px 1fr; gap: var(--sp-3);
  align-items: start;
  font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2);
}
.plan .btn { margin-top: auto; }
.plans__note { margin-top: var(--sp-5); text-align: center; }

/* ---------- 19. FAQ ---------- */
.faq__list { margin-top: var(--sp-7); border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 60px;
  padding: var(--sp-4) 0;
  font-size: var(--t-lg); font-weight: 600;
  list-style: none;
  cursor: pointer;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "";
  flex: none;
  width: 12px; height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease);
}
.faq__item[open] .faq__q::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq__a { padding-bottom: var(--sp-5); color: var(--ink-2); max-width: 62ch; }

/* ---------- 20. CTA final ---------- */
.final { text-align: center; }
.final__inner { max-width: 40rem; }
.final__title { margin-bottom: var(--sp-7); }
.final__cta { margin-inline: auto; }

/* ---------- 21. Rodapé ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: var(--sp-7);
  /* espaço para o botão flutuante não cobrir os links */
  padding-bottom: calc(var(--sp-10) + env(safe-area-inset-bottom, 0px));
}
.foot__inner { display: grid; gap: var(--sp-5); justify-items: center; text-align: center; }
.foot__brand {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
}
.foot__logo { width: 40px; height: 40px; border-radius: 10px; }
.foot__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3) var(--sp-5); }
.foot__nav a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 44px;
  color: var(--ink-2); font-size: var(--t-sm);
}
.foot__nav a:hover { color: var(--accent); }
.foot__copy { color: var(--ink-3); font-size: var(--t-sm); }

@media (min-width: 48rem) {
  .foot__inner { grid-template-columns: auto 1fr auto; align-items: center; text-align: left; }
  .foot__nav { justify-content: center; }
}

/* ---------- 22. Aviso de cookies ---------- */
/* Discreto e no rodapé da tela: informa sem bloquear a leitura. */
.cookies {
  position: fixed;
  left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  max-width: 34rem;
  display: grid; gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.cookies[hidden] { display: none; }
.cookies__text { font-size: var(--t-sm); color: var(--ink-2); line-height: 1.5; }
.cookies__actions { display: flex; gap: var(--sp-3); }
.cookies__btn { flex: 1; min-height: 48px; font-size: var(--t-sm); }

/* No celular o aviso dividiria espaço com o botão flutuante; ele espera a escolha. */
@media (max-width: 40rem) {
  .cookies ~ .fab { display: none; }
}
@media (min-width: 40rem) {
  .cookies { left: auto; right: var(--gutter); width: 34rem; }
  .cookies ~ .fab { bottom: calc(var(--gutter) + 13rem + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- 23. Páginas de texto (privacidade) ---------- */
.legal { padding-block: var(--sp-8) var(--sp-9); }
.legal__inner { max-width: 44rem; }
.legal__title {
  font-family: var(--font-display);
  font-size: var(--t-3xl);
  margin-block: var(--sp-3) var(--sp-3);
}
.legal__lede { color: var(--ink-2); font-size: var(--t-lg); margin-top: var(--sp-5); }
.legal h2 {
  font-family: var(--font-display);
  font-size: var(--t-2xl);
  margin-top: var(--sp-8); margin-bottom: var(--sp-4);
}
.legal h3 {
  font-family: var(--font-sans);
  font-size: var(--t-lg); font-weight: 600;
  margin-top: var(--sp-6); margin-bottom: var(--sp-3);
}
.legal p { color: var(--ink-2); margin-bottom: var(--sp-4); }
.legal__list { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.legal__list li {
  position: relative; padding-left: var(--sp-5);
  color: var(--ink-2);
}
.legal__list li::before {
  content: ""; position: absolute; left: 0; top: .7em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.legal strong { color: var(--ink); }
.legal__back { margin-top: var(--sp-8); }
