/* ==========================================================================
   Tapume Fullpack: teaser da nova fase
   Paleta e tipografia do site novo (SITE_FULLPACK_2026/app/globals.css):
   tinta, brasa, laranja, osso; Archivo variável (largura 125 = display).
   A assinatura fica sempre branca.
   ========================================================================== */

@font-face {
  font-family: 'Archivo';
  src: url('fontes/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --tinta: #000000;
  --brasa: #3f1000;
  --brasa-clara: #902c04;
  --laranja: #ff4800;
  --osso: #e1decf;
  --branco: #ffffff;

  --suave: rgb(225 222 207 / 0.62);

  --gutter: clamp(16px, 4vw, 64px);
  --respiro: clamp(18px, 4.2vh, 48px);

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Sem WebGL (ou antes do canvas pintar), o fundo é este: as brasas da cena "tinta" em CSS. */
html {
  height: 100%;
  background:
    radial-gradient(95vmax 95vmax at 102% -8%, rgb(255 72 0 / 0.85), rgb(144 44 4 / 0.35) 38%, transparent 66%),
    radial-gradient(70vmax 70vmax at 4% 112%, rgb(133 36 0 / 0.75), transparent 62%),
    var(--tinta);
  -webkit-text-size-adjust: 100%;
}

body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: 'Archivo', ui-sans-serif, system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--osso);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--laranja);
  color: var(--tinta);
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

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

.fundo {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- Tela (fixa, sem rolagem) ---------- */

.tela {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: max(var(--respiro), env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right))
    max(var(--respiro), env(safe-area-inset-bottom)) max(var(--gutter), env(safe-area-inset-left));
}

.topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topo p {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--suave);
}

.ponto {
  width: 7px;
  height: 7px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--laranja);
  box-shadow: 0 0 10px rgb(255 72 0 / 0.9);
  animation: pulso 2.4s ease-in-out infinite;
}

@keyframes pulso {
  50% {
    opacity: 0.25;
  }
}

.centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vh, 72px);
  min-height: 0;
}

/* ---------- Assinatura ---------- */

.marca {
  position: relative;
  /* A largura respeita a altura da tela: a página nunca rola. */
  width: min(38.2vw, 51svh, 490px);
  aspect-ratio: 555 / 190.1;
  margin: 0;
}

.marca__desenho {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--branco);
}

/* Warp (tapume.js): o canvas passa da marca para os lados, para a distorção não ser cortada.
   Quando ele desenha o primeiro quadro, o SVG sai de vista (sem WebGL, fica o SVG). */
.marca__warp {
  position: absolute;
  top: -20%;
  left: -6%;
  width: 112%;
  height: 140%;
  display: block;
}

.marca--warp .marca__desenho {
  visibility: hidden;
}

/* ---------- Frase ---------- */

.frase {
  /* Altura fixa de duas linhas: a troca de frase não empurra a marca. */
  height: 2.4em;
  max-width: 26ch; /* em caixa alta, as letras são mais largas: com menos, a frase 2 iria a três linhas */
  margin: 0;
  font-size: clamp(0.75rem, 0.425rem + 1.25vw, 1.625rem);
  font-variation-settings: 'wdth' 125;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
}

.frase em {
  font-style: normal;
  color: var(--laranja);
}

@media (max-width: 620px) {
  .marca {
    width: min(43.1vw, 51svh);
  }
}

/* Palavra a palavra: entra subindo e desfocada, sai para cima. */
.com-js .frase .p {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.38em);
  filter: blur(6px);
}

.com-js .frase.is-in .p {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 0.9s var(--ease-out),
    transform 1.1s var(--ease-out),
    filter 0.9s var(--ease-out);
  transition-delay: calc(var(--i) * 60ms);
}

.com-js .frase.is-out .p {
  opacity: 0;
  transform: translateY(-0.24em);
  filter: blur(6px);
  transition:
    opacity 0.45s var(--ease-out),
    transform 0.5s var(--ease-out),
    filter 0.45s var(--ease-out);
  transition-delay: calc(var(--i) * 25ms);
}

/* ---------- Links ---------- */

.rodape {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--osso);
  text-decoration: none;
}

.link--direita {
  align-items: flex-end;
  text-align: right;
}

.link__rotulo {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--suave);
}

.link__valor {
  padding-bottom: 3px;
  font-size: clamp(0.9375rem, 0.85rem + 0.35vw, 1.125rem);
  font-weight: 500;
  line-height: 1.2;
  background: linear-gradient(var(--laranja), var(--laranja)) 0 100% / 0 1px no-repeat;
  transition:
    background-size 0.35s var(--ease-out),
    color 0.2s ease;
}

.link--direita .link__valor {
  background-position: 100% 100%;
}

@media (hover: hover) and (pointer: fine) {
  .link:hover .link__valor {
    background-size: 100% 1px;
    color: var(--branco);
  }
}

/* ---------- Entrada ---------- */

.com-js .marca {
  opacity: 0;
  transform: scale(0.985);
  filter: blur(14px);
}

.com-js .topo,
.com-js .rodape {
  opacity: 0;
  transform: translateY(8px);
}

.com-js:not(.pronto) .frase {
  visibility: hidden;
}

.pronto .marca {
  opacity: 1;
  transform: none;
  filter: blur(0);
  transition:
    opacity 1.6s var(--ease-out) 0.5s,
    transform 2s var(--ease-out) 0.5s,
    filter 1.6s var(--ease-out) 0.5s;
}

.pronto .topo,
.pronto .rodape {
  opacity: 1;
  transform: none;
  transition:
    opacity 1s var(--ease-out) 2.6s,
    transform 1.2s var(--ease-out) 2.6s;
}

.pronto .rodape {
  transition-delay: 2.75s;
}

/* Depois da entrada, a marca fica sem filtro (o blur na caixa toda custaria a cada quadro). */
.entrou .marca {
  filter: none;
  transition: none;
}

/* ---------- Movimento reduzido: sem deslocamento nem desfoque, só opacidade ---------- */

@media (prefers-reduced-motion: reduce) {
  .ponto {
    animation: none;
  }

  .com-js .marca,
  .com-js .topo,
  .com-js .rodape,
  .com-js .frase .p,
  .com-js .frase.is-out .p {
    transform: none;
    filter: none;
  }

  .com-js .frase.is-in .p,
  .com-js .frase.is-out .p {
    transition: opacity 0.6s ease;
    transition-delay: 0s;
  }
}
