/* ==========================================================================
   SALSAS CHILANGAS · BASE STYLES
   --------------------------------------------------------------------------
   Estilos globales SEGUROS para WordPress + Elementor.
   NO es un reset agresivo: se evita resetear márgenes/paddings globales que
   romperían el espaciado interno de los widgets de Elementor. Solo se tocan
   elementos de documento (body, links, img, focus, selección, iconos).
   ========================================================================== */

/* Box model coherente (Elementor ya lo asume, lo reforzamos sin riesgo) */
*, *::before, *::after { box-sizing: border-box; }

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

/* Body: tipografía y fondo de marca.
   Hello Elementor deja el body casi limpio, así que es seguro definirlo. */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;

  /* Textura de grano artesanal muy sutil. Comentar si se prefiere fondo plano. */
  background-image: radial-gradient(rgba(120,110,95,.025) 1px, transparent 1px);
  background-size: 3px 3px;
}

/* Selección de texto con verde de marca */
::selection { background: var(--green-500); color: #fff; }

/* Media responsivo por defecto. Acotado para no pelear con Elementor,
   que añade sus propios display a imágenes dentro de widgets. */
img, picture, svg, video {
  max-width: 100%;
  height: auto;
}

/* Enlaces: heredan color salvo que un componente diga lo contrario */
a { color: inherit; text-decoration: none; }

/* Negrita semántica */
strong, b { font-weight: var(--fw-bold); }

/* Regla horizontal de marca */
hr {
  border: 0;
  border-top: var(--border-width) solid var(--border-subtle);
  margin: var(--space-12) 0;
}

/* ----------------------------------------------------------------------
   FOCUS VISIBLE (accesibilidad)
   Anillo de foco solo para navegación por teclado.
   ---------------------------------------------------------------------- */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-xs);
}

/* ----------------------------------------------------------------------
   ICONOS SVG
   Uso: <svg class="sc-icon"><use href="#i-flame"></use></svg>
   ---------------------------------------------------------------------- */
.sc-icon {
  width: var(--icon-md);
  height: var(--icon-md);
  stroke: currentColor;
  fill: none;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.sc-icon--sm { width: var(--icon-sm); height: var(--icon-sm); }
.sc-icon--lg { width: var(--icon-lg); height: var(--icon-lg); }
/* El icono de estrella se rellena (fill currentColor) — se marca aparte */
.sc-icon--fill { fill: currentColor; stroke: none; }

/* ----------------------------------------------------------------------
   REDUCCIÓN DE MOTION
   Respeta prefers-reduced-motion sin usar !important global agresivo
   sobre todo el árbol (se acota a animaciones/transiciones de transform).
   ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
