/* ============================================================
   MUNDO ABSTRAKTO · Sistema "Éter"
   v3 · Paleta oficial · Obsidian + Violetas + Plata + UV
   ============================================================ */

:root {
  /* ============================================================
     PALETA ÉTER · v2 carbono
     Negros más densos, violetas un punto más oscuros
     ============================================================ */
  --obsidian:       #06030A;   /* + carbono (era #0A0510) */
  --carbon:         #0E0A14;   /* nuevo gris carbón intermedio */
  --violet-deep:    #140621;   /* + oscuro (era #1A0829) */
  --violet-core:    #281045;   /* + denso (era #2E1450) */
  --violet-mid:     #4F2685;   /* + sutil (era #5B2B99) */
  --violet-glow:    #9268D0;   /* (era #9B6DD8) */
  --violet-light:   #C9AEF2;   /* legibilidad: eyebrows y micro-tipografía sobre negro */
  --uv:             #B47FFF;   /* mantengo — es el acento de marca */

  --silver-liquid:  #C9CAD3;
  --silver-warm:    #E8E4D9;
  --bone:           #F4EDE0;
  --chrome:         #A8ACB8;
  --soot:           #1C1820;   /* nuevo — gris hollín para layers */

  /* ============================================================
     ALIAS DE USO · REGLAS DE LA MARCA
     ──────────────────────────────────────────────────────────
     70% del sistema vive en obsidian + violeta deep.
     Hueso y plata líquida son PUNTOS DE RESPIRACIÓN (la luz).
     UV solo para CTAs / enlaces vivos / energía.
     Plateado SIEMPRE con gradiente o ruido — nunca plano.
     Nunca fondo violeta brillante.
     ============================================================ */

  /* Fondos — DEFAULT OSCURO */
  --bg:             var(--obsidian);      /* default — body */
  --bg-deeper:      #050208;              /* más profundo aún */
  --bg-violet:      var(--violet-deep);   /* sección de profundidad */
  --bg-violet-mid:  var(--violet-core);   /* fondos con más cuerpo violeta (raros) */

  /* Fondos claros — EXCEPCIÓN (puntos de respiración) */
  --bg-bone:        var(--bone);          /* respiración cálida */
  --bg-silver:      var(--silver-warm);   /* respiración fría */

  /* Textos */
  --ink:            var(--bone);          /* texto principal sobre oscuro */
  --ink-soft:       var(--silver-liquid); /* secundario */
  --ink-faded:      var(--chrome);        /* terciario */
  --ink-dark:       var(--obsidian);      /* texto sobre fondos claros (excepción) */
  --ink-dark-soft:  var(--violet-core);   /* secundario sobre claros */

  /* Acentos púrpura */
  --accent:         var(--violet-glow);   /* acento principal sobre oscuro */
  --accent-deep:    var(--violet-core);   /* énfasis sobre claro */
  --accent-mid:     var(--violet-mid);    /* puente */
  --accent-glow:    var(--violet-glow);   /* highlights, hover */
  --accent-uv:      var(--uv);            /* CTAs · enlaces vivos · puntos de energía — escaso */
  --accent-legible: var(--violet-light);  /* eyebrows y textos pequeños que deben leerse */

  /* Plateado/cromo — usar siempre con textura */
  --silver-grad:    linear-gradient(135deg, var(--silver-liquid) 0%, var(--chrome) 50%, var(--silver-liquid) 100%);
  --silver-noise:   linear-gradient(135deg, rgba(201,202,211,1) 0%, rgba(168,172,184,1) 100%);

  /* Líneas */
  --line:           rgba(155, 109, 216, 0.18);  /* hairlines sobre oscuro */
  --line-soft:      rgba(201, 202, 211, 0.12);  /* hairlines suaves */
  --line-dark:      rgba(46, 20, 80, 0.16);     /* sobre claros (excepción) */

  /* ============================================================
     TIPOGRAFÍA
     ============================================================ */
  --font-serif:    'Cormorant Garamond', 'Garamond', serif;
  --font-italic:   'Cormorant Garamond', 'Garamond', serif;
  --font-grotesk:  'Inter', system-ui, -apple-system, sans-serif;
  --font-sans:     'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;

  /* ============================================================
     ESPACIO
     ============================================================ */
  --space-xs:     0.5rem;
  --space-sm:     1rem;
  --space-md:     2rem;
  --space-lg:     4.5rem;
  --space-xl:     7rem;
  --space-xxl:    10rem;
  --space-breath: 14rem;

  /* ============================================================
     CONTENEDORES
     ============================================================ */
  --container-max:    1340px;
  --container-narrow: 760px;
  --container-wide:   1500px;
  --edge-d:           2rem;
  --edge-m:           1.5rem;

  /* ============================================================
     MOVIMIENTO
     ============================================================ */
  --ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.3s;
  --t-med:  0.45s;
  --t-slow: 0.9s;
}

@media (min-width: 1600px) { :root { --container-max: 1500px; } }
@media (min-width: 2200px) { :root { --container-max: 1700px; } }

/* ============================================================
   RESET + BASE
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Halo UV de fondo — más sutil sobre carbono */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 15% 10%, rgba(180, 127, 255, 0.10) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(79, 38, 133, 0.14) 0%, transparent 70%);
}

/* Grano éter */
body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='240' height='240' filter='url(%23n)' opacity='0.55'/></svg>");
  mix-blend-mode: multiply;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

/* ============================================================
   TIPOGRAFÍA
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-feature-settings: 'kern' 1, 'liga' 1, 'dlig' 1, 'onum' 1;
  color: var(--ink);
  letter-spacing: -0.018em;
}
h1 em, h2 em, h3 em {
  font-family: var(--font-italic);
  /* FIX contraste: --accent-deep (#281045) era casi invisible sobre el fondo
     obsidiana. Sobre oscuro va el morado de marca (--accent-uv, 7:1).
     Las secciones claras lo sobrescriben más abajo con --accent-deep. */
  color: var(--accent-uv);
  font-style: italic;
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-grotesk);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-legible);
  display: inline-block;
}
.eyebrow-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-legible);
}

.h-display {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 0.96;
  letter-spacing: -0.03em;
}
.h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.024em;
}
.h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.5vw, 2.8rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 400;
  line-height: 1.2;
}
.caption {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ============================================================
   COMPONENTES BASE
   ============================================================ */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--edge-d);
  position: relative;
  z-index: 1;
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--edge-d);
  position: relative;
  z-index: 1;
}
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--edge-d);
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  .container, .container-narrow, .container-wide { padding: 0 var(--edge-m); }
}

.section        { padding: var(--space-xl) 0; position: relative; }
.section-breath { padding: var(--space-breath) 0; position: relative; }

/* Sección clara — punto de respiración (excepción) */
.section-light {
  background: var(--bg-bone);
  color: var(--ink-dark);
}
.section-light h1, .section-light h2, .section-light h3 { color: var(--ink-dark); }
.section-light h1 em, .section-light h2 em, .section-light h3 em { color: var(--accent-deep); }
.section-light .eyebrow { color: var(--accent-deep); }
.section-light p { color: var(--ink-dark-soft); }

/* Sección violeta — más profundidad */
.section-violet {
  background: linear-gradient(180deg, var(--violet-deep) 0%, var(--obsidian) 100%);
}

/* Sección oscura con halo UV */
.section-uv {
  background: radial-gradient(ellipse at center, var(--violet-deep) 0%, var(--obsidian) 80%);
}

/* Botones — UV solo para CTA principal por regla de marca */
.btn {
  display: inline-block;
  font-family: var(--font-grotesk);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 1.1rem 2.4rem;
  border: 1px solid var(--accent-legible);
  color: var(--accent-legible);
  background: transparent;
  cursor: pointer;
  transition: all var(--t-med) var(--ease);
}
.btn:hover {
  background: var(--accent-legible);
  color: var(--obsidian);
}
.btn-uv {
  border-color: var(--accent-uv);
  color: var(--accent-uv);
  text-shadow: 0 0 12px rgba(180, 127, 255, 0.35);
}
.btn-uv:hover {
  background: var(--accent-uv);
  color: var(--obsidian);
  box-shadow: 0 0 32px rgba(180, 127, 255, 0.55);
  text-shadow: none;
}
.btn-uv-solid {
  background: var(--accent-uv);
  color: var(--obsidian);
  border-color: var(--accent-uv);
  box-shadow: 0 0 28px rgba(180, 127, 255, 0.35);
}
.btn-uv-solid:hover {
  background: transparent;
  color: var(--accent-uv);
  box-shadow: 0 0 40px rgba(180, 127, 255, 0.5);
}
/* Botón sobre fondo claro (sección de respiración) */
.btn-dark {
  border-color: var(--accent-deep);
  color: var(--accent-deep);
}
.btn-dark:hover {
  background: var(--accent-deep);
  color: var(--bone);
}
.btn-bone {
  background: var(--bone);
  border-color: var(--bone);
  color: var(--obsidian);
}
.btn-bone:hover {
  background: transparent;
  color: var(--bone);
}

/* Plateado texturizado — regla: nunca plano */
.silver-fill {
  background: var(--silver-grad);
  background-blend-mode: overlay;
  position: relative;
}
.silver-fill::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='2'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.65'/></svg>");
  mix-blend-mode: overlay;
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================================
   GEOMETRÍA SAGRADA — helpers
   ============================================================ */

.sacred { display: inline-block; color: var(--accent); }
.sacred svg { display: block; width: 100%; height: 100%; }
.sacred path, .sacred circle, .sacred line, .sacred polygon, .sacred polyline {
  stroke: currentColor;
  fill: none;
  stroke-width: 0.6;
  vector-effect: non-scaling-stroke;
}
.sacred-deep { color: var(--accent-deep); }
.sacred-glow { color: var(--accent-glow); }
.sacred-uv   { color: var(--accent-uv); }
.sacred-silver { color: var(--silver-liquid); }

@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.9;  transform: scale(1.025); }
}
@keyframes uvPulse {
  0%, 100% { opacity: 0.6; filter: drop-shadow(0 0 0 transparent); }
  50%      { opacity: 1;   filter: drop-shadow(0 0 12px rgba(180,127,255,0.5)); }
}
.spin-slow { animation: slowSpin 140s linear infinite; transform-origin: center; }
.breathe   { animation: breathe 7s ease-in-out infinite; transform-origin: center; }
.uv-pulse  { animation: uvPulse 4s ease-in-out infinite; transform-origin: center; }

/* ============================================================
   HEADER / FOOTER
   ============================================================ */

.top-bar {
  background: var(--obsidian);
  color: var(--bone);
  text-align: center;
  padding: 0.7rem 0;
  font-family: var(--font-grotesk);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  z-index: 10;
}
.top-bar .divider-glyph {
  display: inline-block;
  color: var(--accent-glow);
  margin: 0 0.8em;
  opacity: 0.8;
}
.top-bar .divider-glyph::before { content: '✦'; }

.editorial-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(10, 5, 16, 0.78);
}
.editorial-header .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 1.4rem;
  padding-bottom: 1.4rem;
  gap: 2rem;
}
.editorial-header nav ul {
  display: flex;
  gap: 2.4rem;
  list-style: none;
}
.editorial-header nav a {
  font-family: var(--font-grotesk);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silver-liquid);
  transition: color var(--t-fast) var(--ease);
}
.editorial-header nav a:hover,
.editorial-header nav a.is-active { color: var(--accent-uv); }

.brand-mark {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: var(--bone);
}
.brand-mark .mark-em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--accent-glow);
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  font-family: var(--font-grotesk);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--silver-liquid);
}
.header-actions a { transition: color var(--t-fast) var(--ease); }
.header-actions a:hover { color: var(--accent-uv); }
.header-actions .uv-cta {
  color: var(--accent-uv);
  border: 1px solid var(--accent-uv);
  padding: 0.6rem 1.2rem;
  transition: all 0.4s var(--ease);
  position: relative;
  background: rgba(180, 127, 255, 0.05);
  animation: ctaPulseHeader 3s ease-in-out infinite;
}
.header-actions .uv-cta:hover {
  background: var(--accent-uv);
  color: var(--obsidian);
  box-shadow: 0 0 20px rgba(180, 127, 255, 0.5);
  animation: none;
}
@keyframes ctaPulseHeader {
  0%, 100% { box-shadow: 0 0 0 0 rgba(180, 127, 255, 0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(180, 127, 255, 0); }
}

.editorial-footer {
  background: var(--obsidian);
  color: var(--bone);
  padding: var(--space-xl) 0 var(--space-md);
  position: relative;
  z-index: 1;
}
.editorial-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: var(--space-lg);
}
.editorial-footer h4 {
  font-family: var(--font-grotesk);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent-glow);
  margin-bottom: 1.4rem;
}
.editorial-footer ul { list-style: none; }
.editorial-footer ul li {
  margin-bottom: 0.6rem;
  opacity: 0.75;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  font-weight: 300;
}
.editorial-footer ul li a:hover { opacity: 1; color: var(--accent-uv); }
.editorial-footer .footer-mark {
  font-family: var(--font-italic);
  font-size: 2rem;
  font-style: italic;
  font-weight: 400;
  color: var(--bone);
  margin-bottom: 1rem;
}
.editorial-footer .footer-mark::after {
  content: ' ✦';
  color: var(--accent-glow);
}
.editorial-footer .footer-base {
  border-top: 1px solid var(--line-deep);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chrome);
  opacity: 0.8;
}

@media (max-width: 900px) {
  .editorial-header .container { grid-template-columns: auto 1fr auto; gap: 1rem; }
  .editorial-header nav { display: none; }
  .editorial-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Reveal scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: all 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }

/* Helpers */
.text-center { text-align: center; }
.uv-text { color: var(--accent-uv); }
.mono { font-family: var(--font-mono); letter-spacing: 0.05em; }
.glow-link {
  font-family: var(--font-grotesk);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-glow);
  border-bottom: 1px solid var(--accent-glow);
  padding-bottom: 3px;
  transition: all var(--t-fast) var(--ease);
}
.glow-link:hover { color: var(--accent-uv); border-bottom-color: var(--accent-uv); }
.glow-link-dark {
  font-family: var(--font-grotesk);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-deep);
  border-bottom: 1px solid var(--accent-deep);
  padding-bottom: 3px;
  transition: all var(--t-fast) var(--ease);
}
.glow-link-dark:hover { color: var(--violet-mid); border-bottom-color: var(--violet-mid); }
