/* ═══════════════════════════════════════════════════════
   ODYLIUM — BASE v2.0
   ═══════════════════════════════════════════════════════ */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text-primary);
  background-color: var(--color-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ─── Grain overlay global ─────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  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)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ─── Scrollbar ────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-black); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-gold); }

/* ─── Selection ────────────────────────────────────── */
::selection {
  background-color: var(--color-gold-dim);
  color: var(--color-gold-bright);
}

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

/* ─── Links base ───────────────────────────────────── */
a {
  color: inherit;
  text-decoration: none;
}

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

/* ─── Container ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ─── Sección base ─────────────────────────────────── */
.section {
  padding: var(--space-24) 0 var(--space-32);
  position: relative;
}

/* ─── Animaciones de reveal ────────────────────────── */
@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes revealFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes lineExpand {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.reveal {
  opacity: 0;
}
.reveal.is-visible {
  animation: revealUp var(--transition-reveal) both;
}

.reveal-stagger .reveal:nth-child(1) { animation-delay: 0ms; }
.reveal-stagger .reveal:nth-child(2) { animation-delay: 80ms; }
.reveal-stagger .reveal:nth-child(3) { animation-delay: 160ms; }
.reveal-stagger .reveal:nth-child(4) { animation-delay: 240ms; }
.reveal-stagger .reveal:nth-child(5) { animation-delay: 320ms; }
.reveal-stagger .reveal:nth-child(6) { animation-delay: 400ms; }
.reveal-stagger .reveal:nth-child(7) { animation-delay: 480ms; }
.reveal-stagger .reveal:nth-child(8) { animation-delay: 560ms; }
.reveal-stagger .reveal:nth-child(9) { animation-delay: 640ms; }
.reveal-stagger .reveal:nth-child(10) { animation-delay: 720ms; }
.reveal-stagger .reveal:nth-child(11) { animation-delay: 800ms; }

/* ─── Reduced motion ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
  }
}
