/* ==========================================================================
   base.css — fontes, reset, tipografia, container e utilitários
   ========================================================================== */

/* ---- Fontes auto-hospedadas (subset latin, cobre português) ---- */
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lora-latin-500-normal.woff2") format("woff2");
}


/* Itálico só para as frases na voz do visitante e a frase de respeito */
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/lora-latin-500-italic.woff2") format("woff2");
}

/* Garet (Type Forward / Spacetype) — versão gratuita. Usamos só o Book (400), por escolha de leveza.
   Licença: assets/fonts/EULA-Garet-Spacetype.pdf (uso comercial e web permitidos). */
@font-face {
  font-family: "Garet";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/garet-book.woff2") format("woff2");
}


/* Substituta com métricas ajustadas ao Garet (evita mudança de layout no swap) */
@font-face {
  font-family: "Garet Fallback";
  font-weight: 400;
  src: local("Arial"), local("ArialMT");
  size-adjust: 115.9%;
  ascent-override: 92.3%;
  descent-override: 32.8%;
  line-gap-override: 0%;
}


/* TODO-CLIENTE: Typhone (Typia Nesia) é fonte paga. Depois de comprar a licença
   de uso web, salve o arquivo em assets/fonts/typhone-regular.woff2 e descomente
   o bloco abaixo. Até lá os títulos usam Lora (próxima da fila em --fonte-titulo).
@font-face {
  font-family: "Typhone";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/typhone-regular.woff2") format("woff2");
}
*/

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--esp-sm));
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--branco);
  color: var(--azul);
  font-family: var(--fonte-texto);
  font-size: var(--fs-base);
  font-weight: var(--peso-normal);
  line-height: var(--lh-texto);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

:where(ul, ol)[role="list"] {
  list-style: none;
  padding: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
dd {
  overflow-wrap: break-word;
}

[hidden] {
  display: none !important;
}

/* ---- Tipografia ---- */
h1,
h2,
h3,
h4 {
  font-family: var(--fonte-titulo);
  font-weight: var(--peso-titulo);
  line-height: var(--lh-titulo);
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--peso-titulo-leve);
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--peso-titulo-leve);
}

p {
  max-width: var(--largura-texto);
  margin-inline: auto;
  text-align: center;
  text-wrap: pretty;
}

p + p {
  margin-top: var(--esp-sm);
}

strong,
b {
  font-weight: var(--peso-forte);
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transicao);
}

a:hover {
  color: inherit;
}

/* Seleção em ouro sólido com texto azul profundo (5,4:1) nos dois fundos */
::selection {
  background-color: var(--ouro-fallback);
  color: var(--azul-profundo);
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: calc(var(--largura-max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Utilitários ---- */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Texto visível só a partir do tablet; no celular continua lido por leitores
   de tela (mantém o nome acessível completo, ex.: "Agendar sessão presencial") */
@media (max-width: 47.999em) {
  .so-desktop {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

/* Texto visível só no celular (ex.: nome no hero, onde o subtítulo some) */
@media (min-width: 48em) {
  .so-mobile {
    display: none;
  }
}

.skip-link {
  position: fixed;
  top: var(--esp-sm);
  left: var(--esp-sm);
  z-index: var(--z-skip);
  padding: var(--esp-xs) var(--esp-md);
  background-color: var(--azul);
  color: var(--branco);
  font-weight: var(--peso-forte);
  text-decoration: none;
  border-radius: var(--raio-sm);
  box-shadow: var(--sombra-md);
  transform: translateY(-200%);
  transition: transform var(--dur-rapida) var(--ease);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--branco);
}

/* ---- Foco visível ---- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--cor-foco);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---- Movimento reduzido ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
