/* =========================================================================
   GSEC · base.css — reset leve + tipografia base + utilidades de layout.
   Mobile-first. Cores/medidas via tokens.css.
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-root);
  line-height: 1.5;
  color: var(--c-text);
  background: var(--c-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;             /* trava scroll horizontal 360→1920 */
}

img, picture, svg, video { max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-accent); }

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; font-weight: 700; line-height: var(--lh-tight); color: var(--c-ink); }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

button { font-family: inherit; }

/* Foco visível e acessível em toda a interface */
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 2px; }

/* Skip link */
.skip-link {
  position: fixed; left: -999px; top: 8px; z-index: 100002;
  background: #fff; color: var(--c-ink); padding: 9px 15px;
  border-radius: 6px; box-shadow: var(--shadow-md); font-size: 13px;
}
.skip-link:focus { left: 8px; }

/* Container do tema (max 1170 / pad 15) */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--container-pad); }

main { display: block; }

/* Espaçamento vertical entre seções de página */
.section { padding: var(--sp-8) 0; }
.section--tight { padding: var(--sp-6) 0; }

/* Tipografia fluida para títulos grandes */
.t-display { font-size: clamp(26px, 5vw, var(--fs-h1)); line-height: 1.1; letter-spacing: -.5px; }

/* Utilidades */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.is-hidden { display: none !important; }

/* Mídia responsiva sem CLS — proporção declarada */
.ratio { position: relative; display: block; overflow: hidden; background: var(--grad-placeholder); }
.ratio > img, .ratio > .placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ratio--16x9 { aspect-ratio: 16 / 9; }
.ratio--4x3  { aspect-ratio: 4 / 3; }
.ratio--3x2  { aspect-ratio: 3 / 2; }

/* Placeholder de imagem (quando não há hero) */
.placeholder { display: flex; align-items: center; justify-content: center; color: #b0bec5; background: var(--grad-placeholder); }
.placeholder--brand { background: var(--grad-placeholder-brand); color: rgba(255,255,255,.5); }
.placeholder svg { width: 30px; height: 30px; }

/* line-clamp utilitário */
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
