:root {
  --dm-bg-main: #f7dece;
  --dm-surface-1: #eed7c5;
  --dm-surface-2: #ccccbb;
  --dm-accent: #9ec4bb;
  --dm-primary: #2d2e2c;
  --dm-font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --dm-font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
  --dm-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--dm-font-sans);
  background-color: var(--dm-bg-main);
  color: var(--dm-primary);
  line-height: 1.8;
  font-size: 1.05rem;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

body.page-loaded {
  opacity: 1;
}

/* Preloader Exclusivo Index */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--dm-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--dm-surface-2);
  border-top: 4px solid var(--dm-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Disclaimer Top Bar */
.top-disclaimer {
  background-color: var(--dm-primary);
  color: var(--dm-bg-main);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.75rem 1rem;
  font-weight: 500;
  border-bottom: 2px solid var(--dm-accent);
}

.top-disclaimer span {
  color: var(--dm-accent);
  font-weight: 700;
}

/* Navigation con Animaciones Escalonadas */
header {
  background-color: var(--dm-surface-1);
  border-bottom: 1px solid var(--dm-surface-2);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
}

.brand-logo {
  font-family: var(--dm-font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--dm-primary);
  text-decoration: none;
  letter-spacing: -0.025em;
  animation: slideInDown 0.8s ease forwards;
}

.brand-logo span {
  color: var(--dm-accent);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links li {
  animation: fadeInUpNav 0.6s ease forwards;
  opacity: 0;
}

.nav-links li:nth-child(1) { animation-delay: 0.1s; }
.nav-links li:nth-child(2) { animation-delay: 0.2s; }
.nav-links li:nth-child(3) { animation-delay: 0.3s; }
.nav-links li:nth-child(4) { animation-delay: 0.4s; }
.nav-links li:nth-child(5) { animation-delay: 0.5s; }

.nav-links a {
  text-decoration: none;
  color: var(--dm-primary);
  font-weight: 600;
  font-size: 1rem;
  display: inline-block;
  transition: var(--dm-transition);
}

.nav-links a:hover {
  transform: translateY(-4px) scale(1.05);
  color: #1a1b19;
}

/* Botones con Toggle Feedback */
.cta-button {
  background-color: var(--dm-primary);
  color: var(--dm-bg-main);
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--dm-transition);
  border: 2px solid transparent;
  cursor: pointer;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.cta-button.alt-toggle {
  background-color: var(--dm-accent);
  color: var(--dm-primary);
}

.cta-button:active {
  transform: scale(0.95);
  filter: brightness(0.9);
}

/* Hero Section con Texto Animado Degradado Full Width */
.hero-editorial {
  padding: 8rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--dm-surface-1), var(--dm-surface-2));
  position: relative;
}

.hero-gradient-title {
  font-family: var(--dm-font-heading);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 800;
  line-height: 1.15;
  width: 100%;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, var(--dm-primary), var(--dm-accent), #ffffff, var(--dm-primary));
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textGradientShift 6s ease infinite;
}

@keyframes textGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  max-width: 900px;
  margin: 0 auto 3rem auto;
  font-size: 1.25rem;
  color: var(--dm-primary);
  opacity: 0.9;
}

/* Diseño Asimétrico Moderno y Secciones */
.section-asymmetric {
  max-width: 1400px;
  margin: 6rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.section-asymmetric.reverse {
  direction: rtl;
}

.section-asymmetric.reverse > * {
  direction: ltr;
}

.asym-content h2 {
  font-family: var(--dm-font-heading);
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--dm-primary);
}

.asym-content p {
  margin-bottom: 1.5rem;
  color: var(--dm-primary);
  opacity: 0.85;
}

.asym-img-wrap img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(45, 46, 44, 0.25);
  transition: var(--dm-transition);
}

.asym-img-wrap img:hover {
  transform: scale(1.02);
}

/* Glassmorphism Cards con Brillo Dinámico (Hover Glow) */
.glass-grid {
  max-width: 1400px;
  margin: 6rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.glass-card {
  background: rgba(238, 215, 197, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: var(--dm-transition);
  box-shadow: 0 10px 30px 0 rgba(45, 46, 44, 0.05);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(158, 196, 187, 0.35) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  transform: translate(var(--mouse-x, 0), var(--mouse-y, 0));
}

.glass-card:hover::before {
  opacity: 1;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: var(--dm-accent);
  box-shadow: 0 20px 40px rgba(45, 46, 44, 0.12);
}

.glass-card h3 {
  font-family: var(--dm-font-heading);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--dm-primary);
}

.glass-card p {
  color: var(--dm-primary);
  opacity: 0.8;
  font-size: 1rem;
}

/* Footer Estilizado */
footer {
  background-color: var(--dm-primary);
  color: var(--dm-bg-main);
  padding: 5rem 3rem 2rem 3rem;
  margin-top: 8rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  font-family: var(--dm-font-heading);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--dm-accent);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.85rem;
}

.footer-col ul li a {
  color: var(--dm-bg-main);
  opacity: 0.8;
  text-decoration: none;
  transition: var(--dm-transition);
}

.footer-col ul li a:hover {
  opacity: 1;
  color: var(--dm-accent);
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

@keyframes fadeInUpNav {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .section-asymmetric, .glass-grid, .footer-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .section-asymmetric.reverse {
    direction: ltr;
  }
}