/* ================================================================
   MEL DO CHURRASCO — identidade derivada do produto
   Preto carvão · âmbar mel · vermelho pimenta · creme quente
   ================================================================ */

:root {
  --carvao: #0A0705;
  --carvao-2: #120C08;
  --ambar: #E8A317;
  --dourado: #F5C842;
  --pimenta: #C0261E;
  --creme: #F2E6D0;
  --fumaca: #6B5D52;        /* só bordas e detalhes decorativos */
  --fumaca-texto: #9A8977;  /* texto secundário: 5,9:1 sobre o carvão (AA) */

  --fonte-display: "Archivo Black", "Arial Black", sans-serif;
  --fonte-corpo: "Inter", -apple-system, "Segoe UI", sans-serif;
  --fonte-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --gradiente-mel: linear-gradient(180deg, var(--dourado) 0%, var(--ambar) 60%, #B87B10 100%);
  --largura-texto: 38rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--carvao);
  color: var(--creme);
  font-family: var(--fonte-corpo);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--ambar); color: var(--carvao); }

img, video { max-width: 100%; display: block; }

p { max-width: var(--largura-texto); }

/* ---- papéis tipográficos -------------------------------------- */

.display {
  font-family: var(--fonte-display);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.02;
  font-weight: 400; /* Archivo Black já é black */
  color: var(--creme);
}

.mono, .mono dt, .mono dd {
  font-family: var(--fonte-mono);
  font-weight: 400;
  letter-spacing: 0.08em;
}

.dado {
  font-size: 0.8125rem;
  color: var(--fumaca-texto);
  text-transform: uppercase;
}

/* ---- acessibilidade ------------------------------------------- */

.pular {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--ambar);
  color: var(--carvao);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.pular:focus { top: 1rem; }

a:focus-visible, .botao:focus-visible {
  outline: 3px solid var(--dourado);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ================================================================
   FIO DE MEL — assinatura
   ================================================================ */

#fio-de-mel {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  z-index: 2;            /* atrás do conteúdo (z:3), acima dos fundos */
  pointer-events: none;
}
#fio-svg { width: 100%; height: 100%; display: block; }
#fio-path {
  stroke-width: 5px;
  filter: drop-shadow(0 0 6px rgba(232, 163, 23, 0.35));
}

#gota-de-mel {
  position: absolute;
  width: 14px; height: 18px;
  background: var(--gradiente-mel);
  border-radius: 50% 50% 55% 55% / 40% 40% 62% 62%;
  opacity: 0;
  transform: translate(-50%, -4px);
  filter: drop-shadow(0 0 8px rgba(245, 200, 66, 0.5));
}
#gota-de-mel.pingando {
  opacity: 1;
  animation: pingar 1.6s ease-in infinite;
}

@media (max-width: 768px) {
  /* mobile: fio centralizado atrás do conteúdo, mais discreto */
  #fio-de-mel { opacity: 0.5; }
  #fio-path { stroke-width: 3px; filter: none; }
}
@keyframes pingar {
  0%   { transform: translate(-50%, -4px) scaleY(0.8); opacity: 0; }
  25%  { opacity: 1; }
  70%  { transform: translate(-50%, 26px) scaleY(1.1); opacity: 1; }
  100% { transform: translate(-50%, 34px) scaleY(1); opacity: 0; }
}

/* ================================================================
   BASE DAS SEÇÕES
   ================================================================ */

.secao { position: relative; }
.secao > * { position: relative; z-index: 3; }

.video-fundo {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.video-fundo video,
.video-fundo img.poster-fallback {
  width: 100%; height: 100%;
  object-fit: cover;
}
/* Contraste AA vem do overlay, nunca do vídeo */
.video-fundo .overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 5, 0.55);
}
.video-fundo.sutil video { opacity: 0.35; }
.video-fundo.sutil .overlay { background: rgba(10, 7, 5, 0.72); }

/* ================================================================
   SEÇÃO 1 — ABERTURA
   ================================================================ */

#abertura {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.25rem 5rem;
}

/* Vídeo fixo: o texto passa por cima; seções seguintes (fundo opaco)
   cobrem o vídeo naturalmente ao rolar */
#abertura .video-fundo {
  position: fixed;
  inset: 0;
  height: 100svh;
  z-index: 0;
}
body.depois-do-hero #abertura .video-fundo { visibility: hidden; }

.abertura-conteudo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  /* scrim local: contraste AA independe do frame do vídeo */
  padding: 3rem 2.5rem;
  background: radial-gradient(ellipse closest-side,
    rgba(10, 7, 5, 0.6) 0%, rgba(10, 7, 5, 0.42) 55%, rgba(10, 7, 5, 0) 100%);
}

#logo-hero {
  width: min(20rem, 70vw);
  height: auto;
}

#abertura h1 {
  font-size: clamp(1.9rem, 6.5vw, 4.6rem);
  max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

/* sobre vídeo, o dado técnico sobe de fumaça pra creme (contraste AA) */
#abertura .dado {
  color: var(--creme);
  opacity: 0.9;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8);
}

.indicador-scroll {
  position: absolute;
  bottom: 1.75rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--fumaca);
  border-radius: 14px;
}
.indicador-scroll span {
  position: absolute;
  top: 7px; left: 50%;
  width: 4px; height: 9px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--ambar);
  animation: rolar 1.8s ease-in-out infinite;
}
@keyframes rolar {
  0%   { transform: translateY(0); opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ================================================================
   SEÇÃO 2 — O CORTE
   ================================================================ */

/* Base = modo simples (sem JS ou modo reduzido): palavras estáticas.
   O modo cinematográfico entra via .js:not(.reduzido). */

#corte { background: var(--carvao); }

.corte-pin {
  position: relative;
  min-height: 70svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.25rem;
}
.js:not(.reduzido) .corte-pin {
  height: 100svh;
  min-height: 0;
  padding: 0;
}

.corte-foto {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.corte-foto img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.js:not(.reduzido) .corte-foto img {
  transform: scale(1.4);
}
.corte-pin .overlay {
  position: absolute; inset: 0; z-index: 2;
  background: rgba(10, 7, 5, 0.62); /* AA mesmo em trecho claro da foto */
}

.corte-palavras {
  position: relative;
  z-index: 3;
  text-align: center;
  font-size: clamp(2.2rem, 8vw, 6rem);
}
.js:not(.reduzido) .corte-palavras { font-size: clamp(3rem, 11vw, 8.5rem); }

.palavra {
  display: block;
  white-space: nowrap;
  color: var(--creme);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}
.js:not(.reduzido) .palavra {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}
.palavra:last-child { color: var(--dourado); }

/* ================================================================
   SEÇÃO 3 — O QUE É
   ================================================================ */

#produto {
  background: var(--carvao);
  padding: clamp(5rem, 12vh, 9rem) 1.25rem;
}

.grade-produto {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  gap: 3rem;
  align-items: center;
}

.produto-foto { overflow: hidden; border-radius: 4px; }
.produto-foto img { width: 100%; height: auto; }

.produto-texto h2 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 1.5rem; }
.produto-texto p { margin-bottom: 1.1rem; }

.bloco-dados {
  margin-top: 2.25rem;
  border: 1px solid rgba(107, 93, 82, 0.4);
  border-left: 3px solid var(--ambar);
  padding: 1.25rem 1.5rem;
  display: grid;
  gap: 0.55rem;
  font-size: 0.8125rem;
  background: var(--carvao-2);
}
.bloco-dados div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.bloco-dados dt { color: var(--fumaca-texto); }
.bloco-dados dd { color: var(--dourado); text-align: right; }

/* ================================================================
   SEÇÃO 4 — POR QUE O SIF IMPORTA
   ================================================================ */

#sif {
  background: var(--carvao-2);
  padding: clamp(6rem, 16vh, 11rem) 1.25rem;
  overflow: hidden;
}

.sif-conteudo {
  max-width: 54rem;
  margin: 0 auto;
  display: grid;
  gap: 2rem;
}

.destaque-sif {
  font-size: clamp(1.7rem, 4.6vw, 3.6rem);
  max-width: 22ch;
}
.destaque-sif::first-line { color: var(--creme); }

.sif-texto p { margin-bottom: 1.1rem; }
.sif-texto .mono { color: var(--dourado); }

/* ================================================================
   SEÇÃO 5 — GÔNDOLA (horizontal no desktop)
   ================================================================ */

#gondola { background: var(--carvao); }

.gondola-pin {
  padding: clamp(4rem, 10vh, 7rem) 0;
  overflow: hidden;
}

.gondola-titulo {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  padding: 0 1.25rem;
  max-width: 68rem;
  margin: 0 auto 3rem;
}

.trilho {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding: 0 1.25rem;
}

.painel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.painel img {
  width: 100%;
  max-height: 62svh;
  object-fit: contain;
  border-radius: 4px;
}
.painel p {
  font-size: 1rem;
  color: var(--creme);
  border-left: 3px solid var(--pimenta);
  padding-left: 0.9rem;
}

/* ================================================================
   SEÇÃO 6 — REPRESENTANTES (quieta e funcional)
   ================================================================ */

#representantes {
  background: var(--carvao);
  padding: clamp(6rem, 16vh, 11rem) 1.25rem;
}

.rep-conteudo { max-width: 62rem; margin: 0 auto; }

#representantes h2 {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  margin: 1rem 0 3rem;
}

.rep-blocos {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3.5rem;
}
.rep-bloco {
  border: 1px solid rgba(107, 93, 82, 0.35);
  background: var(--carvao-2);
  padding: 1.75rem 1.5rem;
  border-radius: 4px;
}
.rep-bloco h3 {
  font-family: var(--fonte-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--ambar);
  margin-bottom: 0.7rem;
}
.rep-bloco p { font-size: 0.98rem; color: var(--creme); }

.rep-acoes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.botao {
  font-family: var(--fonte-display);
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: center;
  padding: 1.15rem 2rem;
  border-radius: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.botao:active { transform: scale(0.98); }

.botao-primario {
  background: var(--pimenta);
  color: var(--creme);
  box-shadow: 0 6px 24px rgba(192, 38, 30, 0.35);
}
.botao-primario:hover { background: #A82019; } /* escurece: mantém AA no hover */

.botao-secundario {
  background: transparent;
  color: var(--dourado);
  border: 2px solid var(--ambar);
}
.botao-secundario:hover { background: rgba(232, 163, 23, 0.12); }

/* ================================================================
   SEÇÃO 7 — RODAPÉ
   ================================================================ */

#rodape {
  background: var(--carvao-2);
  border-top: 1px solid rgba(107, 93, 82, 0.3);
  padding: 5rem 1.25rem 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
#rodape img { width: min(13rem, 55vw); height: auto; }
#rodape nav a {
  color: var(--dourado);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  padding: 0.6rem 0.75rem; /* alvo de toque ~44px */
  margin: -0.35rem 0;
}
#rodape nav a:hover { text-decoration: underline; }
#rodape .dado { font-size: 0.8125rem; }
#zap-rodape { position: relative; }

/* ================================================================
   BOTÃO FLUTUANTE DE WHATSAPP
   ================================================================ */

#zap-flutuante {
  position: fixed;
  right: 1.1rem; bottom: 1.1rem;
  z-index: 50;
  width: 56px; height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pimenta);
  color: var(--creme);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden; /* fora da ordem de tabulação quando invisível */
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
body.zap-visivel #zap-flutuante {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
body.zap-escondido #zap-flutuante {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
}

/* ================================================================
   REVEALS (JS remove a classe; sem JS, tudo visível)
   ================================================================ */

[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}
.js.reduzido [data-reveal] { transform: none; }
[data-reveal].visivel {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ================================================================
   DESKTOP
   ================================================================ */

@media (min-width: 769px) {
  .grade-produto { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 4.5rem; }

  .rep-blocos { grid-template-columns: repeat(3, 1fr); }
  .rep-acoes { flex-direction: row; }
  .rep-acoes .botao { flex: 1; }

  /* trilho horizontal (pin + translateX via GSAP) — só no modo cinematográfico */
  .js:not(.reduzido) .trilho {
    flex-direction: row;
    gap: 0;
    padding: 0;
    width: 300vw;
  }
  .js:not(.reduzido) .painel {
    width: 100vw;
    height: 72svh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 8vw;
  }
  .js:not(.reduzido) .painel img { max-height: 56svh; }
  .painel p { font-size: 1.15rem; }

  #zap-flutuante { right: 1.75rem; bottom: 1.75rem; }
}

/* ================================================================
   REDUCED MOTION — tudo vira fade simples, sem pin, sem scrub
   ================================================================ */

/* Regras do modo reduzido via classe (JS adiciona .reduzido quando
   prefers-reduced-motion está ligado OU quando o GSAP não carregou) */
html.reduzido #abertura .video-fundo { position: absolute; }
html.reduzido .indicador-scroll span { animation: none; }
html.reduzido #gota-de-mel.pingando {
  animation: none;
  opacity: 1;
  transform: translate(-50%, 10px);
}

/* Rede de segurança pura de CSS (cobre também quem está sem JS) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .indicador-scroll span,
  #gota-de-mel.pingando { animation: none; }
  #gota-de-mel.pingando { opacity: 1; transform: translate(-50%, 10px); }

  [data-reveal], .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none;
  }
}
