/* =========================================================================
   BASE: reset, tipografia e utilitários
   ========================================================================= */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.travado { overflow: hidden; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-synthesis: none; /* a serifa de títulos tem um só peso: nada de negrito falso */
  font-feature-settings: "ss01";
}
::selection { background: var(--texto); color: var(--fundo); }

/* Todas as fotos recebem o mesmo tratamento (P&B quente). Fotos reais da
   barbearia entram com a mesma direção visual. */
img { display: block; max-width: 100%; height: auto; filter: var(--foto-filtro); }
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
table { border-collapse: collapse; width: 100%; }

:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 1px; }

/* Texto só para leitores de tela. left/top fixos: nunca empurra a página para os lados */
.sr { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.texto-suave { color: var(--texto-2); }
.pular {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  padding: 10px 16px; border-radius: var(--r-pilula); background: var(--marca); color: var(--sobre-marca); font-weight: 600;
}
.pular:focus { top: 12px; }

/* Tipografia */
.cabeca-tela { display: grid; gap: var(--e2); margin-bottom: var(--e6); }
.cabeca-tela__titulo { font-family: var(--f-display); font-size: clamp(2.2rem, 4.4vw, 3.2rem); font-weight: 400; letter-spacing: -0.01em; line-height: 1; }
.cabeca-tela__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--texto-2); }

.secao { margin-top: var(--e8); }
.secao__topo { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); margin-bottom: var(--e3); }
.secao__titulo { font-family: var(--f-display); font-size: 1.75rem; font-weight: 400; line-height: 1.05; }
.subtitulo { margin: var(--e6) 0 var(--e3); padding-bottom: 8px; border-bottom: 1px solid var(--texto); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--texto-2); }
.link-mais { display: inline-flex; align-items: center; gap: 2px; font-size: 0.85rem; font-weight: 600; color: var(--marca-texto); }
.link-mais:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-voltar { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--e3); font-weight: 600; color: var(--texto-2); }
.link-voltar:hover { color: var(--texto); }

/* Rolagem horizontal com encaixe (listas de cartões no celular) */
.rolagem-x {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: var(--e3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  scrollbar-width: none;
  margin-inline: -20px;
  padding: 2px 20px 8px;
}
.rolagem-x::-webkit-scrollbar { display: none; }
.rolagem-x > * { position: relative; scroll-snap-align: start; } /* prende textos ocultos (.sr) dentro do cartão */

/* Link com sublinhado que cresce no hover */
.sublinhado {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0% 1px no-repeat;
  transition: background-size 0.35s var(--ease);
  padding-bottom: 1px;
}
.sublinhado:hover,
.sublinhado:focus-visible { background-size: 100% 1px; }

/* Revelação ao rolar (imagens e blocos marcados com .revela). Sem JS ou
   com movimento reduzido, tudo aparece normalmente. */
@media (prefers-reduced-motion: no-preference) {
  .js-revela .revela { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
  .js-revela .revela.visivel { opacity: 1; transform: none; }
  .js-revela .revela .moldura img { transform: scale(1.06); transition: transform 1.4s var(--ease); }
  .js-revela .revela.visivel .moldura img { transform: none; }
}

/* Animação de entrada das telas */
@keyframes tela-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes brilho { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes gira { to { transform: rotate(360deg); } }
@keyframes surge { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
  /* backwards: depois de terminar, não sobra transform (que prenderia os elementos fixos da tela) */
  .tela--entra > * { animation: tela-entra 0.35s var(--ease) backwards; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
