/* ============================================
   Wapps · base.css
   Variables de diseño, reset suave, tipografía y utilidades
   globales. Se carga ANTES que los demás CSS en TODA página.
   ============================================ */

:root {
  /* ----- Paleta: petróleo cálido ----- */
  --color-primary: #1B4965;
  --color-primary-dark: #133547;
  --color-primary-light: #2B6585;
  --color-accent: #F4A261;
  --color-accent-dark: #DC8A47;
  --color-accent-text: #4A1B0C;

  --color-bg: #FBFBF8;
  --color-bg-elevated: #FFFFFF;
  --color-bg-muted: #F5F2EA;

  --color-text: #1A2332;
  --color-text-muted: #5C6975;
  --color-text-soft: #8A95A0;

  --color-border: #E8E5DD;
  --color-border-strong: #D6D2C7;

  /* ----- Tipografía ----- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

  /* ----- Espaciado ----- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;

  /* ----- Bordes y sombras ----- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(26, 35, 50, 0.04);
  --shadow-md: 0 4px 16px rgba(26, 35, 50, 0.06);
  --shadow-lg: 0 12px 32px rgba(26, 35, 50, 0.08);

  /* ----- Transiciones ----- */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--t-fast);
}
a:hover { color: var(--color-primary-dark); }

button { font: inherit; cursor: pointer; }

/* ---------- Tipografía ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--color-text);
  margin: 0;
}

h1 {
  font-size: clamp(2.25rem, 4vw + 1rem, 4rem);
  font-weight: 400;
}
h1 em {
  font-style: italic;
  color: var(--color-primary);
  font-weight: 500;
}

h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h3 {
  font-size: clamp(1.125rem, 0.8vw + 1rem, 1.375rem);
  font-weight: 500;
}
h4 {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-family: var(--font-body);
}

p { margin: 0 0 var(--space-4); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin: 0 0 var(--space-3);
}

/* ---------- Utilidades ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-5);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-primary);
  color: white;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top var(--t-base);
}
.skip-link:focus { top: var(--space-4); color: white; }

/* Foco visible */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Print */
@media print {
  .site-header, .site-footer, .search, .about-cta { display: none; }
  body { background: white; }
}
