/* =============================================================
   BASE.CSS — Reset moderno, estilos globales y fuentes
   ============================================================= */

/* ── IMPORTAR FUENTES DE GOOGLE ── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400;1,600&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden; /* Prevenir scroll horizontal en iOS */
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Cursor personalizado — ocultamos el default */
  cursor: none;
}

/* Reactivar cursor en dispositivos táctiles */
@media (hover: none) {
  body {
    cursor: auto;
  }
}

/* ── CURSOR PERSONALIZADO DORADO ── */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease, opacity 0.3s ease;
  mix-blend-mode: screen;
  will-change: transform;
}

.cursor--aura {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(200, 169, 110, 0.35);
  border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.cursor--hover {
  transform: translate(-50%, -50%) scale(2.5);
  background: var(--color-gold-light);
}

.cursor--aura.cursor--hover {
  width: 48px;
  height: 48px;
  border-color: rgba(200, 169, 110, 0.5);
}

/* ── TIPOGRAFÍA BASE ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--color-cream);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* Cursor en links e interactivos */
a, button, [role="button"], input, label, select, textarea {
  cursor: none;
}

@media (hover: none) {
  a, button, [role="button"], input, label, select, textarea {
    cursor: auto;
  }
}

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

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: 16px; /* Evita zoom automático en iOS */
  color: var(--color-text);
  background: transparent;
  border: none;
  outline: none;
}

/* ── TEXTURA GRAIN GLOBAL ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: var(--z-raised);
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── SELECCIÓN DE TEXTO ── */
::selection {
  background: rgba(200, 169, 110, 0.3);
  color: var(--color-cream);
}

/* ── SCROLLBAR PERSONALIZADO ── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* ── CLASE CONTAINER GLOBAL ── */
.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: 1024px) {
  .container {
    padding-inline: var(--space-12);
  }
}

/* ── UTILIDADES BÁSICAS ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-gold {
  color: var(--color-gold);
}

.text-cream {
  color: var(--color-cream);
}

.text-muted {
  color: var(--color-text-muted);
}

/* Etiqueta de sección decorativa */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
}

.section-label::before,
.section-label::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.5;
}
