/* Nosso 2026: base visual compartilhada por todas as páginas.
   Direção: sala escura de revelação de fotos. Fundo marrom de café, luz vermelha
   de laboratório nos botões, dourado nos detalhes e papel de foto claro. */

@font-face { font-family: 'Gloock'; src: url('/fonts/gloock-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('/fonts/caveat-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/fonts/courier-prime-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('/fonts/courier-prime-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* Sala escura */
  --noite: #2B1E19;        /* fundo: marrom de café */
  --chapa: #382720;        /* superfícies (painéis, campos) */
  --chapa-2: #44302A;      /* campo em foco, realce */
  --linha: #5C4338;        /* bordas e divisórias no escuro */
  --suave: #C4B0A0;        /* texto secundário no escuro (contraste 7,6:1) */

  /* Dourado: detalhes, etiquetas e textos pequenos de destaque (contraste 7,6:1) */
  --ouro: #D9B262;

  /* Luz de segurança: a única cor de destaque */
  --luz: #E25A42;          /* botões e textos grandes */
  --luz-forte: #F0674D;    /* botão com o mouse em cima e avisos de perigo */
  --luz-sombra: #A33A27;   /* destaque sobre o papel claro */

  /* Papel de foto */
  --papel: #F2ECE4;        /* texto principal no escuro e cartões claros */
  --tinta: #1A1210;        /* texto sobre o papel */
  --tinta-suave: #5E4D44;  /* texto secundário sobre o papel (6,8:1) */
  --borda-papel: #D6CABD;

  --fonte-titulo: 'Gloock', Georgia, serif;
  --fonte-mao: 'Caveat', 'Comic Sans MS', cursive;
  --fonte-maquina: 'Courier Prime', 'Courier New', monospace;
  --fonte-texto: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --sombra-foto: 0 18px 40px rgba(0, 0, 0, 0.55);

  /* Curvas de movimento do projeto (espelhadas no JS) */
  --curva-entrada: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; background: var(--noite); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--noite);
  color: var(--papel);
  font-family: var(--fonte-texto);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Grão de filme por cima de tudo, sem atrapalhar cliques. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background-image: url('/img/grao.svg');
  background-size: 240px 240px;
  opacity: 0.09;
  mix-blend-mode: screen;
}

[hidden] { display: none !important; }

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

a { color: inherit; }
a:hover { color: var(--ouro); }

:focus-visible {
  outline: 2px solid var(--ouro);
  outline-offset: 3px;
}

h1, h2, h3 { font-family: var(--fonte-titulo); font-weight: 400; line-height: 1.04; margin: 0; letter-spacing: -0.01em; }

p { margin: 0; }

.so-leitor {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.pular:focus {
  position: fixed !important;
  left: 12px; top: 12px;
  width: auto; height: auto; clip: auto;
  padding: 10px 14px;
  background: var(--papel);
  color: var(--tinta);
  z-index: 100;
}

/* ---------- Tipos de letra com papel definido ----------
   .mao: só para as palavras de quem cria o presente (legendas, frases, carta).
   .maquina: marcações técnicas pequenas, como a borda de um filme. */

.mao { font-family: var(--fonte-mao); font-weight: 500; }
.maquina { font-family: var(--fonte-maquina); font-weight: 700; letter-spacing: 0.04em; font-size: 13px; }

/* ---------- Peças da sala escura ---------- */

/* Cartão de papel claro (Pix, recibo, cartão do presente). */
.papel {
  position: relative;
  background: var(--papel);
  color: var(--tinta);
  border-radius: 2px;
  box-shadow: var(--sombra-foto);
}

/* Painel escuro para formulários. */
.folha {
  position: relative;
  background: var(--chapa);
  border: 1px solid var(--linha);
  border-radius: 6px;
  padding: 18px;
}

/* Prendedor de varal que segura as fotos secando. */
.prendedor {
  position: absolute;
  left: 50%;
  top: -16px;
  width: 18px;
  height: 40px;
  margin-left: -9px;
  border-radius: 3px;
  background: #4A3B35;
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.12), 0 3px 6px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 2;
}
.prendedor::after {
  content: '';
  position: absolute;
  left: 3px; right: 3px; top: 13px;
  height: 6px;
  border-radius: 1px;
  background: linear-gradient(90deg, #8C6A2E, #E9CB85, #8C6A2E); /* mola dourada */
}

/* Cópia em papel de foto: borda branca e espaço embaixo para a legenda. */
.polaroid {
  position: relative;
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  padding: 8px 8px 38px;
  box-shadow: var(--sombra-foto);
}
.polaroid__foto {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #2E2320;
}
.polaroid__foto img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption {
  position: absolute;
  left: 8px; right: 8px; bottom: 5px;
  text-align: center;
  font-family: var(--fonte-mao);
  font-size: 23px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Foto que não carregou: fica só o tom escuro, sem ícone quebrado. */
.sem-foto img { visibility: hidden; }

/* ---------- Botões ---------- */

.botao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  padding: 14px 22px;
  border: 0;
  border-radius: 4px;
  background: var(--luz);
  color: var(--noite);
  font: 700 17px/1.2 var(--fonte-texto);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--curva-entrada), background-color 0.2s ease;
}
.botao:hover { color: var(--noite); background: var(--luz-forte); }
.botao:active { transform: scale(0.98); }
.botao[disabled], .botao[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Secundário no escuro. */
.botao--contorno,
.botao--contorno-claro {
  min-height: 50px;
  background: transparent;
  color: var(--papel);
  border: 1.5px solid #6E5A51;
}
.botao--contorno:hover,
.botao--contorno-claro:hover { background: var(--chapa-2); border-color: var(--suave); color: var(--papel); }
.botao svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Botão claro, para quando o vermelho já está em uso por perto. */
.botao--claro { background: var(--papel); color: var(--tinta); }
.botao--claro:hover { background: #FFFFFF; color: var(--tinta); }

.link-forte {
  display: inline-block;
  padding: 12px 6px;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
