/* ============================================
   FGS · base.css
   Reset, tipografía global, utilidades
   ============================================ */

/* ----- RESET ----- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--gs-font-corpo);
  font-size: var(--gs-texto-base);
  line-height: 1.7;
  color: var(--gs-gris-80);
  background: var(--gs-gris-05);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  font-style: italic;       /* alt text en cursiva se non carga */
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 1rem;
}

a {
  color: var(--gs-verde-nato);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color var(--gs-transicion-rapida);
}

a:hover {
  color: var(--gs-verde-claro);
  text-decoration-thickness: 2px;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ----- TIPOGRAFÍA GLOBAL ----- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--gs-font-titulos);
  font-weight: var(--gs-peso-bold);
  line-height: 1.2;
  color: var(--gs-negro);
}

h1 { font-size: var(--gs-texto-3xl); }
h2 { font-size: var(--gs-texto-2xl); }
h3 { font-size: var(--gs-texto-xl); }
h4 { font-size: var(--gs-texto-lg); }

p { margin: 0; }

/* ----- UTILIDADES DE LAYOUT ----- */

.gs-container {
  max-width: var(--gs-max-width);
  margin: 0 auto;
  padding: 0 var(--gs-padding-x);
}

.gs-container--medio {
  max-width: var(--gs-max-width-medio);
}

.gs-container--texto {
  max-width: var(--gs-max-width-texto);
}

.gs-seccion {
  padding: var(--gs-gap-xl) 0;
}

.gs-seccion--xl {
  padding: var(--gs-gap-2xl) 0;
}

.gs-seccion--escuro {
  background: var(--gs-verde-nato);
  color: var(--gs-branco);
}

.gs-seccion--escuro h1,
.gs-seccion--escuro h2,
.gs-seccion--escuro h3 {
  color: var(--gs-branco);
}

.gs-seccion--gris {
  background: var(--gs-gris-10);
}

.gs-seccion--verde-claro {
  background: var(--gs-verde-moi-claro);
}

/* ----- DISPLAY EDITORIAL (Playfair Display) ----- */

.gs-display {
  font-family: var(--gs-font-display);
  font-weight: var(--gs-peso-regular);
  font-style: normal;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--gs-negro);
}

.gs-display--bold {
  font-weight: var(--gs-peso-bold);
}

.gs-display--italic {
  font-style: italic;
}

/* ----- LEAD / INTRODUCIÓN ----- */

.gs-lead {
  font-size: var(--gs-texto-lg);
  line-height: 1.55;
  font-weight: var(--gs-peso-light);
  color: var(--gs-gris-80);
  max-width: var(--gs-max-width-texto);
}

.gs-seccion--escuro .gs-lead {
  color: rgba(255, 255, 255, 0.92);
}

/* ----- ETIQUETAS DE SECCIÓN ----- */

.gs-eyebrow {
  display: inline-block;
  font-family: var(--gs-font-corpo);
  font-size: var(--gs-texto-xs);
  font-weight: var(--gs-peso-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gs-verde-claro);
  margin-bottom: var(--gs-gap-sm);
}

.gs-seccion--escuro .gs-eyebrow {
  color: var(--gs-verde-moi-claro);
}

/* ----- DIVISORES ----- */

.gs-divisor {
  width: 60px;
  height: 2px;
  background: var(--gs-verde-claro);
  border: none;
  margin: var(--gs-gap-md) 0;
}

.gs-divisor--centro {
  margin-left: auto;
  margin-right: auto;
}

/* ----- ACCESIBILIDADE ----- */

.gs-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--gs-verde-claro);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ----- SELECCIÓN ----- */

::selection {
  background: var(--gs-verde-nato);
  color: var(--gs-branco);
}

/* ----- MOTION REDUCIDO ----- */

@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;
  }
}
