/*
 * ============================================================
 * LUMTUX 2.0 — BASE STYLES (Light Edition)
 * Archivo: css/base.css
 * Propósito: Reset moderno, fuentes, estilos base del body,
 *            tipografía semántica y contenedor global.
 * ============================================================
 */

/* Google Fonts: Syne (display) + Inter (body) + JetBrains Mono */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Reset moderno ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

/* Respeta la preferencia de movimiento reducido del usuario */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Body ───────────────────────────────────────────────────── */
body {
  background-color: var(--color-bg-base);   /* Blanco */
  color: var(--color-text-primary);          /* Casi negro */
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: var(--weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100dvh;
}

/* ── Tipografía semántica ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(var(--text-4xl), 5.5vw, var(--text-6xl)); }
h2 { font-size: clamp(var(--text-3xl), 3.5vw, var(--text-5xl)); }
h3 { font-size: clamp(var(--text-xl),  2vw,   var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  max-width: 68ch;
}

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

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

img, video, svg { max-width: 100%; display: block; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
code, pre, kbd { font-family: var(--font-mono); font-size: 0.9em; }

/* ── Contenedor ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
@media (min-width: 768px)  { .container { padding-inline: var(--space-10); } }
@media (min-width: 1200px) { .container { padding-inline: var(--space-12); } }

/* ── Selección de texto ─────────────────────────────────────── */
::selection {
  background-color: rgba(185,82,35,0.15);
  color: var(--color-accent-hover);
}

/* ── Scrollbar sutil ────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--color-gray-100); }
::-webkit-scrollbar-thumb { background: var(--color-gray-300); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-gray-400); }

/* ── Visually hidden (accesibilidad) ───────────────────────── */
.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;
}

/* ── Reveal animation ───────────────────────────────────────── */
/* Los elementos con .reveal entran al viewport con fade+slide */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ── Divider decorativo ─────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin-block: var(--space-6);
}
