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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

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

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

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
}

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

button {
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

address {
  font-style: normal;
}

strong, b {
  font-weight: var(--fw-semibold);
}

::selection {
  background-color: var(--color-accent);
  color: white;
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}


/* ==============================================
   CURSOR PERSONALIZADO - VERSIÓN ASEGURADA
   ============================================== */

/* Ocultar cursor nativo SOLO si el cursor personalizado existe */
body.custom-cursor-active {
  cursor: none;
}

/* El cursor personalizado */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 32px;
  height: 32px;
  border: 2px solid #3B82F6;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  pointer-events: none;
  z-index: 999999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s, border-color 0.2s;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.8);
  backdrop-filter: blur(2px);
}

/* Punto central */
.custom-cursor::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s;
}

/* Cuando pasa sobre elementos clickeables */
.custom-cursor.hover-link {
  width: 48px;
  height: 48px;
  background: rgba(59, 130, 246, 0.3);
  border-color: #60A5FA;
  box-shadow: 0 0 18px #3B82F6;
}

.custom-cursor.hover-link::after {
  width: 6px;
  height: 6px;
  background: #93C5FD;
}

/* Al hacer clic */
.custom-cursor.clicking {
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(59, 130, 246, 0.5);
}

/* En móviles o pantallas táctiles: desactivamos */
@media (max-width: 768px), (pointer: coarse) {
  .custom-cursor {
    display: none;
  }
  body.custom-cursor-active {
    cursor: auto;
  }
}