
/* 1. Normalización de caja */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

* {
  margin: 0;
  padding: 0;
}

/* 2. Comportamiento del scroll suave */
html {
  hanging-punctuation: first last;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  font-family: var(--font-body, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  font-family: var(--font-heading, system-ui, sans-serif);
  line-height: 1.1;
}

p, li, figcaption {
  text-wrap: pretty;
  max-width: 70ch;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  -webkit-user-select: none; 
  -ms-user-select: none; 
  user-select: none;
  touch-action: manipulation;
}

button:focus,
a:focus,
input:focus {
  outline: none;
}

ul, ol {
  list-style: none;
}

/* 4. Barras de Scroll Globales */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  cursor: pointer;
  background: var(--scrollbar-thumb, #cccccc);
  border-radius: 10px;
  border: 4px solid var(--bg-main);
}
@media (hover: hover) {
  ::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover, #999999);
  }
}

/* Reduces motion if user prefers it */
@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;
  }
}
