/* =============================================================
   INTEGER · BASE
   Reset moderno + tipografía base + utilidades.
   No define skin de marca: eso vive en cada LP.
   ============================================================= */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
  padding: 0;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
}

h1 { font-size: clamp(2.25rem, 5vw, var(--text-6xl)); }
h2 { font-size: clamp(1.875rem, 4vw, var(--text-4xl)); }
h3 { font-size: clamp(1.5rem, 3vw, var(--text-2xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-md); }

p { line-height: var(--leading-relaxed); }

/* ---------- ACCESSIBILITY ---------- */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) { outline: none; }

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

/* Skip link (accesibilidad) */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  padding: var(--space-3) var(--space-5);
  background: var(--color-primary);
  color: var(--white);
  border-radius: var(--radius);
  font-weight: 600;
  z-index: var(--z-toast);
  transition: top var(--duration) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- LAYOUT UTILITIES ---------- */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.container-wide { max-width: var(--container-2xl); }
.container-narrow { max-width: var(--container-md); }

.section {
  padding-block: var(--section-py);
}
.section-large {
  padding-block: var(--section-py-large);
}

/* ---------- TEXT UTILITIES ---------- */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }

.eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-primary);
}

/* ---------- SR-ONLY ---------- */
.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;
}

/* ---------- IMAGE PLACEHOLDER ---------- */
/* Usado en lugar de <img> mientras no hay imagen real.
   La proporción y dimensión se setean via CSS en cada LP. */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: linear-gradient(135deg, var(--orange-100) 0%, var(--orange-200) 100%);
  color: var(--orange-700);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.img-placeholder::before {
  content: '';
  position: absolute;
  inset: var(--space-2);
  border: 2px dashed var(--orange-400);
  border-radius: var(--radius-sm);
  pointer-events: none;
}
.img-placeholder--dark {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-800) 100%);
  color: var(--navy-100);
}
.img-placeholder--dark::before {
  border-color: var(--navy-500);
}
