/* ==========================================================================
   PERFUMES — ESTILOS BASE Y ARQUITECTURA GLOBAL
   Reset, Tipografía, Fondo Dinámico, Preloader y Scrollbar Profesional
   ========================================================================== */

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

html {
  /* scrollbar-gutter: stable previene el "golpe" o salto de layout al abrir modales */
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  background-color: var(--bg-primary);
  background-image: var(--radial-ambient);
  background-attachment: fixed;
  background-size: 100% 100%;
  color: var(--text-main);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Selección de texto refinada */
::selection {
  background: var(--text-main);
  color: #FFFFFF;
}

/* Scrollbar Profesional Fina — Sin saltos ni cortes secos */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.18);
  border-radius: var(--radius-full);
  transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.4);
}

/* Imágenes y multimedia */
img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select {
  font: inherit;
  border: none;
  background: none;
  outline: none;
}

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

/* ==========================================================================
   PRELOADER SENIOR: TIPOGRAFÍA STAGGER + BARRA CINÉTICA
   ========================================================================== */
#preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.6s ease;
  pointer-events: all;
}

#preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-brand {
  display: flex;
  gap: 6px;
  font-family: var(--font-display);
  font-size: clamp(26px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 24px;
}

.preloader-brand span {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px) scale(0.92);
  filter: blur(8px);
  transition: all 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.preloader-brand span.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.preloader-progress-track {
  width: 220px;
  height: 2px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.preloader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #6366F1, #0EA5E9, #C5A059);
  border-radius: var(--radius-full);
  transition: width 0.15s ease-out;
}

.preloader-tagline {
  margin-top: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* Línea de progreso de scroll en el tope */
#scroll-progress-line {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #6366F1, #0EA5E9);
  z-index: var(--z-nav);
  pointer-events: none;
  transition: width 0.05s linear;
}

/* Accesibilidad para reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
