/* ============================================
   BASE STYLES - HENAT v2
   Reset y estilos base
   ============================================ */

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

/* ── HTML ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

/* ── Body ── */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Links ── */
a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--gold-light);
}

/* ── Imágenes ── */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Selección ── */
::selection {
  background: var(--gold);
  color: var(--bg);
}

/* ── Focus visible ── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── Listas ── */
ul, ol {
  list-style: none;
}

/* ── Botones reset ── */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Inputs reset ── */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  font-weight: 700;
}

/* ── Reduced motion ── */
@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;
  }
}

/* ── LOADER ── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.loader-logo {
  animation: loaderPulse 0.8s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.loader-bar {
  width: 160px;
  height: 2px;
  background: rgba(200, 164, 78, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--gold);
  border-radius: 2px;
  animation: loaderFill 0.8s ease-in-out forwards;
}

@keyframes loaderFill {
  0% { width: 0%; }
  60% { width: 70%; }
  100% { width: 100%; }
}
