/* ==========================================================================
   fotita — site

   A identidade vem do APP e da TIRA, não de uma escolha nova: branco puro,
   quase-preto #111, Inter em pesos leves, tudo minúsculo, muito respiro. O logo
   é o mesmo PNG desenhado à mão que sai impresso no rodapé da tira.
   Antes o site usava serif e paleta bege — não tinha relação com o produto.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500&display=swap');

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

:root {
  --bg: #ffffff;
  --bg2: #f5f5f5;
  --border: #e0e0e0;
  --text: #111111;
  --text-dim: #888888;
  --text-faint: #bbbbbb;
  --orange: #ff8c00;
  --font: 'Prompt', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* A regra do navegador para [hidden] é apenas display:none — qualquer display
   declarado depois ganharia dela e o bloco escondido voltaria a aparecer. */
[hidden] { display: none !important; }

/* Todo destaque do site é MEDIUM (500). O navegador usa "bold" (700) por padrão em <strong>, <b>
   e títulos, e só carregamos os pesos 400 e 500 da fonte: sem esta regra viraria um negrito
   sintético, borrado. */
strong, b, h1, h2, h3, h4, th { font-weight: 500; }

/* Clique em link âncora (a setinha ↓) desliza em vez de pular — menos para quem pediu menos animação. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 620px; margin: 0 auto; padding: 0 1.75rem; }

a { color: inherit; }

/* ── HERO ────────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.75rem 5rem;
  position: relative;
}

.hero-logo {
  width: min(260px, 62vw);
  height: auto;
  display: block;
  margin-bottom: 1.75rem;
}

.tagline {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  line-height: 2;
  margin-bottom: 3rem;
}

.scroll-cta {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.2s;
}

.scroll-cta:hover { color: var(--text); }

/* ── CAMPO DO CÓDIGO ─────────────────────────────────────────────────────── */
/* Fica no alto, dentro do hero: a maior parte de quem entra aqui acabou de sair
   da cabine e quer a foto — não pode ter que rolar a página institucional. */

.codigo-bloco { width: 100%; max-width: 340px; }

.codigo-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
}

.codigo-form { display: flex; flex-direction: column; gap: 0.6rem; }

.codigo-input {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
  padding: 0.85rem 0.5rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  outline: none;
  transition: border-color 0.15s;
}

.codigo-input::placeholder { color: var(--text-faint); letter-spacing: 0.18em; }
.codigo-input:focus { border-color: var(--text); }

.codigo-btn {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.5rem;
  color: var(--bg);
  background: var(--text);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.codigo-btn:hover { opacity: 0.85; }

/* Campo-armadilha: invisível para gente, preenchível por robô.

   Não usa `display: none` nem `hidden` de propósito — robô minimamente esperto pula campo
   escondido assim, que é o jeito óbvio de esconder. Tirar da tela por posicionamento mantém
   o campo "normal" aos olhos de quem lê o HTML.

   `tabindex=-1` e `aria-hidden` no HTML garantem que teclado e leitor de tela também não
   caiam nele: ninguém deve preencher isto sem querer. */
.armadilha {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.codigo-erro {
  color: var(--orange);
  font-size: 0.8rem;
  margin-top: 0.6rem;
}

.codigo-prazo {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 0.85rem;
}

/* ── SEÇÕES ──────────────────────────────────────────────────────────────── */

.section { padding: 5.5rem 0; }
.section--alt { background: var(--bg2); }

.section h2 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
  margin-bottom: 1.25rem;
}

.body-text { color: var(--text-dim); font-weight: 400; }
.body-text.small { font-size: 0.875rem; }
.body-text a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); }
.body-text a:hover { border-color: var(--text); }

/* ── COMO FUNCIONA ───────────────────────────────────────────────────────── */

.steps { list-style: none; margin-top: 2.5rem; }

.step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.step:last-child { border-bottom: 1px solid var(--border); }

.step-num {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  padding-top: 0.35rem;
  flex: none;
}

.step strong { display: block; font-weight: 500; font-size: 1rem; margin-bottom: 0.2rem; }
.step p { color: var(--text-dim); font-size: 0.875rem; }

/* ── A TIRA ──────────────────────────────────────────────────────────────── */
/* Representação, não foto de cliente: proporção real, fundo preto e o mesmo logo
   que vai impresso no rodapé. Os quadros ficam vazios de propósito — pôr foto
   inventada aqui seria anunciar um resultado que não é o seu. */

.tira-wrap { display: flex; justify-content: center; margin-top: 3rem; }

.tira {
  display: block;
  width: 190px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.13);
}

/* ── ONDE ────────────────────────────────────────────────────────────────── */

.locations { list-style: none; margin: 2rem 0 1.75rem; }

.location {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.location:last-child { border-bottom: 1px solid var(--border); }
.location-city { font-weight: 400; font-size: 0.95rem; }
.location-place { color: var(--text-faint); font-size: 0.8rem; letter-spacing: 0.02em; }

/* ── RODAPÉ ──────────────────────────────────────────────────────────────── */

.footer { background: #111; color: #fff; padding: 4rem 0 3.5rem; text-align: center; }
.footer-logo { width: 96px; height: auto; margin: 0 auto 1.5rem; display: block; opacity: 0.9; }
.footer-links { font-size: 0.85rem; color: #777; }
.footer-links a { color: #bbb; text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }


/* ── PÁGINA DE PRIVACIDADE (/privacidade/) ───────────────────────────────── */
/* Texto corrido para ser LIDO: coluna estreita, entrelinha folgada, títulos pequenos. */

.politica { max-width: 620px; margin: 0 auto; padding: 3rem 1.75rem 4.5rem; }

.politica-logo { display: block; width: 120px; height: auto; margin-bottom: 2.5rem; }

.politica h1 { font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.3; margin-bottom: 0.9rem; }

.politica-intro { color: var(--text-dim); margin-bottom: 1rem; }

.politica h2 {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.7rem;
}

.politica p { color: var(--text-dim); margin-bottom: 0.9rem; }

.politica ul { list-style: none; margin: 0 0 0.9rem; }

.politica li {
  color: var(--text-dim);
  padding: 0.85rem 0 0.85rem 1.1rem;
  border-top: 1px solid var(--border);
  position: relative;
}

.politica li:last-child { border-bottom: 1px solid var(--border); }
.politica li::before { content: ''; position: absolute; left: 0; top: 1.5rem; width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint); }

.politica strong { color: var(--text); font-weight: 500; }

.politica a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.politica a:hover { border-color: var(--text); }

.politica code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 0.85em;
  background: var(--bg2);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.politica-voltar { font-size: 0.85rem; margin-top: 2.4rem; }

/* Cadeado ao lado da palavra "privacidade": passa a ideia de dados protegidos. */
/* O TAMANHO vem dos atributos width/height do próprio desenho (em "em", acompanhando o texto).
   Aqui só o espaçamento e o alinhamento: base do cadeado na linha de base das letras. */
.icone-cadeado {
  margin-right: 0.3em;
  vertical-align: -0.08em;
  flex: none;
}

.icone-cadeado--titulo { margin-right: 0.4em; vertical-align: 0; }

/* Link discreto para a privacidade, no rodapé do site e na página da foto. */
.link-privacidade { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; opacity: 0.8; }
.link-privacidade:hover { opacity: 1; }

/* ── PÁGINA DA FOTO (/f/) ────────────────────────────────────────────────── */

.foto-page {
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.25rem;
}

/* Coluna que ocupa a tela inteira: a imagem fica com o que sobrar depois do logo,
   do botão e dos avisos. É o que faz o botão salvar caber sem rolagem em qualquer
   celular, em vez de depender de uma altura chutada para um aparelho só. */
.foto-wrap {
  width: 100%;
  max-width: 420px;
  height: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.foto-logo { flex: none; display: block; width: 108px; height: auto; margin-bottom: 1.5rem; }

.foto-achou {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.foto-status { padding: 2rem 0; }
.foto-status p { color: var(--text-dim); font-size: 0.9rem; }

.foto-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 1rem; }

.foto-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint);
  animation: foto-pulse 1.2s ease-in-out infinite;
}

.foto-dots span:nth-child(2) { animation-delay: 0.15s; }
.foto-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes foto-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.85); }
  40% { opacity: 1; transform: scale(1); }
}

/* A tira é 1:3 — muito mais alta que larga. Quem manda aqui é a ALTURA: dar a ela
   largura total a prenderia numa caixa larga e baixa, com sobra dos dois lados. */
.foto-achou img {
  display: block;
  min-height: 0;
  flex: 0 1 auto;
  height: 100%;
  width: auto;
  max-width: 100%;
  margin: 0 auto 1.25rem;
  border-radius: 2px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.14);
}

.btn-baixar {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  padding: 0.9rem 2.4rem;
  color: var(--bg);
  background: var(--text);
  border-radius: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.btn-baixar:hover { opacity: 0.85; }

.foto-dica { margin-top: 1rem; font-size: 0.8rem; color: var(--text-dim); line-height: 1.6; }
.foto-dica strong { font-weight: 500; }
.foto-prazo { margin-top: 1.4rem; font-size: 0.75rem; color: var(--text-faint); }

.foto-erro-titulo { font-size: 1.15rem; font-weight: 500; margin-bottom: 0.75rem; }
.foto-erro-texto { color: var(--text-dim); font-size: 0.875rem; margin-bottom: 1.5rem; }
.foto-erro-texto.small { font-size: 0.8rem; margin-bottom: 0; }
.foto-erro-texto a { color: var(--text-dim); }
.foto-page .codigo-form { max-width: 300px; margin: 0 auto; }

/* ── EFEITOS ─────────────────────────────────────────────────────────────────
   Só `opacity`, `transform` e `clip-path`: a placa de vídeo cuida disso, não pesa nem no
   celular simples. Nada aqui esconde conteúdo por si só — quem põe a classe "rev" é o
   efeitos.js, e as entradas do topo e da foto são animações que terminam visíveis. */

@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes entrar { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes respirar {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
/* A tira/foto sendo "impressa": revelada de cima para baixo. As bordas vão para -50px no fim
   para a sombra da imagem não ser cortada junto. */
@keyframes imprimir {
  from { clip-path: inset(0 -50px 100% -50px); }
  to { clip-path: inset(-50px -50px -50px -50px); }
}

/* Entrada do topo da página inicial */
.hero-logo { animation: entrar 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.tagline { animation: entrar 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both; }
.codigo-bloco { animation: entrar 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s both; }
.scroll-cta { animation: aparecer 0.8s ease 0.9s both, respirar 2.6s ease-in-out 1.7s infinite; }

/* Blocos que aparecem ao rolar (a classe vem do efeitos.js) */
.rev {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--atraso, 0s);
}
.rev.visto { opacity: 1; transform: none; }

/* A tira da seção "o resultado" sai da impressora */
.imprime .tira {
  clip-path: inset(0 -50px 100% -50px);
  transition: clip-path 1.8s cubic-bezier(0.45, 0.1, 0.25, 1) 0.15s;
}
.imprime.visto .tira { clip-path: inset(-50px -50px -50px -50px); }

/* Página da foto: a tira do cliente é impressa na tela e o resto vem logo depois */
#achou:not([hidden]) #tira { animation: imprimir 1.5s cubic-bezier(0.45, 0.1, 0.25, 1) both; }
#achou:not([hidden]) .btn-baixar,
#achou:not([hidden]) .foto-dica,
#achou:not([hidden]) .foto-prazo { animation: aparecer 0.6s ease 1.1s both; }

/* Reação ao toque no botão e ao foco no campo */
.codigo-btn, .btn-baixar { transition: opacity 0.15s, transform 0.12s; }
.codigo-btn:active, .btn-baixar:active { transform: scale(0.97); }
.codigo-input { transition: border-color 0.15s, box-shadow 0.2s; }
.codigo-input:focus { box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.06); }

/* Transição suave entre as páginas (ex.: digitar o código e ir para a foto). Chrome e Edge;
   nos outros navegadores é só ignorado e a navegação segue normal. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.28s; }

/* Quem pediu menos animação no sistema: sem movimento — só aparecer com suavidade (fade). */
@media (prefers-reduced-motion: reduce) {
  .hero-logo, .tagline, .codigo-bloco { animation: aparecer 0.6s ease both; }
  .scroll-cta { animation: aparecer 0.6s ease 0.6s both; }
  .rev { transform: none; transition: opacity 0.6s ease; transition-delay: var(--atraso, 0s); }
  .imprime .tira { clip-path: none; opacity: 0; transition: opacity 0.8s ease; }
  .imprime.visto .tira { opacity: 1; }
  #achou:not([hidden]) #tira { animation: aparecer 0.6s ease both; }
  .codigo-btn:active, .btn-baixar:active { transform: none; }
}
