/* ============================================================
   MACR SAS — DESIGN TOKENS v3.0 DIAMANTE
   ============================================================
   Arquitecto:  Claude Web (Claude.ai)
   Aprobado:    Hernando · 2026-04-27
   Referente:   Banca privada suiza (Lombard Odier / Pictet)
   Estética:    Blanco cálido / Navy profundo / Gold sutil
   Tipografía:  Playfair Display (display) + DM Sans (body)

   REGLA ABSOLUTA:
   Si no está en estas variables, no se usa en ningún archivo CSS.
   Ningún hex hardcodeado. Ningún font-family hardcodeado.
   Todo pasa por estas variables.
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   1. PALETA DE COLORES
   ══════════════════════════════════════════════════════════ */

:root {

  /* ── BLANCOS Y NEUTROS ──────────────────────────────── */

  --macr-white: #FAFAF8;
  --macr-cream: #F5F3EE;
  --macr-gray-50: #F2F0EB;
  --macr-gray-100: #E8E5DE;
  --macr-gray-200: #D4D0C8;
  --macr-gray-400: #9B9691;
  --macr-gray-600: #5C5852;
  --macr-gray-700: #4A4640;
  --macr-gray-900: #1A1714;

  /* ── NAVY — EL ALMA OSCURA ──────────────────────────── */

  --macr-navy-950: #03080F;
  --macr-navy-900: #0A1628;
  --macr-navy-800: #112240;
  --macr-navy-700: #1B3254;
  --macr-black: #0D0D0D;

  /* ── GOLD — EL ACENTO QUE DEFINE TODO ──────────────── */

  --macr-gold: #C9A84C;
  --macr-gold-light: #E8C96B;
  --macr-gold-dark: #A8893D;
  --macr-gold-subtle: rgba(201, 168, 76, 0.12);
  --macr-gold-border: rgba(201, 168, 76, 0.25);
  --macr-gold-glow: rgba(201, 168, 76, 0.20);

  /* ── WHATSAPP ────────────────────────────────────────── */

  --macr-wa: #25D366;
  --macr-wa-dark: #1FAD54;
  --macr-wa-glow: rgba(37, 211, 102, 0.35);

  /* ── SEMÁNTICOS — Los que usan los componentes ───────── */

  --color-bg:          var(--macr-white);
  --color-bg-alt:      var(--macr-gray-50);
  --color-bg-dark:     var(--macr-navy-900);
  --color-bg-cream:    var(--macr-cream);
  --color-text:        var(--macr-gray-900);
  --color-text-body:   var(--macr-gray-700);
  --color-text-muted:  var(--macr-gray-400);
  --color-text-light:  rgba(255, 255, 255, 0.72);
  --color-text-ghost:  rgba(255, 255, 255, 0.35);
  --color-border:      var(--macr-gray-100);
  --color-border-dark: rgba(255, 255, 255, 0.08);
  --color-accent:      var(--macr-gold);


  /* ══════════════════════════════════════════════════════
     2. TIPOGRAFÍA
     ══════════════════════════════════════════════════════ */

  --font-display: 'Playfair Display', 'Didot', 'Times New Roman', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont,
               'Segoe UI', Helvetica, Arial, sans-serif;

  /* ── ESCALA TIPOGRÁFICA — Modular 1.25 ─────────────── */

  --text-2xs:    0.625rem;   /* 10px */
  --text-xs:     0.6875rem;  /* 11px */
  --text-sm:     0.8125rem;  /* 13px */
  --text-base:   1.0625rem;  /* 17px */
  --text-lg:     1.25rem;    /* 20px */
  --text-xl:     1.5rem;     /* 24px */
  --text-2xl:    1.875rem;   /* 30px */
  --text-3xl:    2.25rem;    /* 36px */
  --text-4xl:    3rem;       /* 48px */
  --text-5xl:    clamp(2.5rem, 4.5vw, 4.5rem);   /* H1 fluido */
  --text-giant:  clamp(4rem, 8vw, 8rem);         /* Números proceso */

  /* ── LINE-HEIGHT ───────────────────────────────────── */

  --lh-none:    1;
  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-normal:  1.5;
  --lh-relaxed: 1.7;
  --lh-loose:   1.9;

  /* ── LETTER-SPACING ────────────────────────────────── */

  --ls-tightest: -0.04em;
  --ls-tight:    -0.03em;
  --ls-snug:     -0.02em;
  --ls-normal:   -0.01em;
  --ls-open:      0em;
  --ls-wide:      0.05em;
  --ls-wider:     0.08em;
  --ls-widest:    0.15em;


  /* ══════════════════════════════════════════════════════
     3. ESPACIADO — Sistema múltiplos de 4px
     ══════════════════════════════════════════════════════ */

  --sp-1:    4px;
  --sp-2:    8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-5:   20px;
  --sp-6:   24px;
  --sp-8:   32px;
  --sp-10:  40px;
  --sp-12:  48px;
  --sp-16:  64px;
  --sp-20:  80px;
  --sp-24:  96px;
  --sp-32: 128px;

  /* ── SECCIONES ─────────────────────────────────────── */

  --section-py:        96px;
  --section-py-lg:    128px;
  --section-py-sm:     64px;
  --section-py-mob:    64px;
  --section-py-mob-sm: 48px;

  /* ── CONTENEDOR ────────────────────────────────────── */

  --container-max:   1200px;
  --container-px-lg:  48px;
  --container-px-md:  32px;
  --container-px-sm:  24px;

  /* ── CARDS ─────────────────────────────────────────── */

  --card-pad:      40px;
  --card-pad-mob:  24px;
  --card-gap:      32px;
  --card-gap-mob:  16px;
  --card-radius:   12px;


  /* ══════════════════════════════════════════════════════
     4. SOMBRAS
     ══════════════════════════════════════════════════════ */

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 32px 80px rgba(0,0,0,0.12), 0 8px 16px rgba(0,0,0,0.04);
  --shadow-gold: 0 8px 32px var(--macr-gold-glow);
  --shadow-wa: 0 4px 20px var(--macr-wa-glow);
  --shadow-navy: 0 8px 32px rgba(10,22,40,0.40);


  /* ══════════════════════════════════════════════════════
     5. MOTION
     ══════════════════════════════════════════════════════ */

  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);

  --dur-instant:     50ms;
  --dur-fast:       150ms;
  --dur-base:       250ms;
  --dur-slow:       450ms;
  --dur-reveal:     650ms;
  --dur-counter:   2000ms;


  /* ══════════════════════════════════════════════════════
     6. BORDES
     ══════════════════════════════════════════════════════ */

  --radius-xs:   4px;
  --radius-sm:   8px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --radius-full: 9999px;


  /* ══════════════════════════════════════════════════════
     7. Z-INDEX
     ══════════════════════════════════════════════════════ */

  --z-below:   -1;
  --z-base:     0;
  --z-raised:  10;
  --z-sticky: 100;
  --z-nav:   1000;
  --z-modal: 2000;
  --z-fab:   9999;

  /* ── ALIASES LEGADO — mapean nombres viejos a tokens v3 ── */
  --transition-fast:    var(--dur-fast);
  --transition-base:    var(--dur-base);
  --font-heading:       var(--font-display);
  --body-color:         var(--color-text-body);
  --section-py-mobile:  var(--section-py-mob);
  --space-6:            var(--sp-6);
  --navy-900:           var(--macr-navy-900);
  --navy-800:           var(--macr-navy-800);
  --navy-700:           var(--macr-navy-700);
  --gold-500:           var(--macr-gold);
  --gold-400:           var(--macr-gold-light);
  --gold-600:           var(--macr-gold-dark);
  --z-dropdown:         var(--z-nav);
  --z-overlay:          var(--z-modal);
  --z-popup:            var(--z-modal);

}
/* Fin de :root */


/* ══════════════════════════════════════════════════════════
   RESET PREMIUM
   ══════════════════════════════════════════════════════════ */

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  color: inherit;
}

h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: var(--lh-snug);
  color: inherit;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-3xl); line-height: var(--lh-snug); }
h3 { font-size: var(--text-2xl); line-height: var(--lh-snug); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--lh-relaxed);
  color: var(--color-text-body);
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: inherit;
  color: inherit;
  padding: 0;
}

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--macr-gold);
  outline-offset: 2px;
  border-color: var(--macr-gold);
}

/* El acento en cursiva gold — el elemento más reconocible */
em, .accent-italic {
  font-style: italic;
  color: var(--macr-gold);
  font-family: var(--font-display);
}

::selection {
  background: var(--macr-gold-subtle);
  color: var(--macr-navy-900);
}


/* ══════════════════════════════════════════════════════════
   COMPONENTES BASE GLOBALES
   ══════════════════════════════════════════════════════════ */

/* ── CONTENEDOR ─────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px-sm);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--container-px-md);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--container-px-lg);
  }
}

/* ── SECCIONES ──────────────────────────────────────────── */

.section {
  padding-block: var(--section-py);
}

.section-lg {
  padding-block: var(--section-py-lg);
}

.section-sm {
  padding-block: var(--section-py-sm);
}

@media (max-width: 767px) {
  .section {
    padding-block: var(--section-py-mob);
  }
  .section-sm {
    padding-block: var(--section-py-mob-sm);
  }
}

.section-dark {
  background-color: var(--macr-navy-900);
  color: var(--macr-white);
}

.section-black {
  background-color: var(--macr-black);
  color: var(--macr-white);
}

.section-cream {
  background-color: var(--macr-cream);
  color: var(--macr-gray-900);
}

.section-alt {
  background-color: var(--macr-gray-50);
  color: var(--macr-gray-900);
}

.section-gold {
  background-color: var(--macr-gold);
  color: var(--macr-navy-900);
}

/* ── EYEBROW ────────────────────────────────────────────── */

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--macr-gold);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-none);
}

.section-dark .eyebrow,
.section-black .eyebrow {
  color: var(--macr-gold);
}

/* ── BOTONES ────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background-color: var(--macr-gold);
  color: var(--macr-navy-900);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: var(--radius-xs);
  border: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-base) var(--ease-out-expo),
    transform        var(--dur-fast) var(--ease-out-expo),
    box-shadow       var(--dur-base) var(--ease-out-expo);
}

.btn-primary:hover {
  background-color: var(--macr-gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-primary:active {
  background-color: var(--macr-gold-dark);
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary:focus-visible {
  outline: 3px solid var(--macr-gold);
  outline-offset: 3px;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background-color: var(--macr-wa);
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition:
    background-color var(--dur-base),
    transform        var(--dur-fast),
    box-shadow       var(--dur-base);
}

.btn-whatsapp:hover {
  background-color: var(--macr-wa-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-wa);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

.btn-navy {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background-color: var(--macr-navy-900);
  color: var(--macr-gold);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 32px;
  border-radius: var(--radius-xs);
  white-space: nowrap;
  transition:
    background-color var(--dur-base),
    transform        var(--dur-fast);
}

.btn-navy:hover {
  background-color: var(--macr-navy-800);
  transform: translateY(-2px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background-color: transparent;
  color: var(--macr-gold);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 30px;
  border-radius: var(--radius-xs);
  border: 2px solid var(--macr-gold-border);
  white-space: nowrap;
  transition:
    border-color     var(--dur-base),
    color            var(--dur-base),
    background-color var(--dur-base),
    transform        var(--dur-fast);
}

.btn-outline:hover {
  border-color: var(--macr-gold);
  background-color: var(--macr-gold-subtle);
  transform: translateY(-1px);
}

/* ── LINKS DISCRETOS ────────────────────────────────────── */

.link-subtle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.link-subtle:hover {
  color: var(--color-text);
}

.link-gold {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--macr-gold);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.link-gold:hover {
  color: var(--macr-gold-light);
}

/* ── WHATSAPP FAB ───────────────────────────────────────── */

.wa-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: var(--z-fab);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background-color: var(--macr-wa);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition:
    opacity   0.4s var(--ease-out-expo),
    transform 0.4s var(--ease-out-expo),
    background-color var(--dur-base),
    box-shadow       var(--dur-base);
  box-shadow: 0 4px 20px var(--macr-wa-glow);
}

.wa-fab.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
  animation: wa-pulse 3s ease-in-out infinite;
}

.wa-fab:hover {
  background-color: var(--macr-wa-dark);
  transform: scale(1.12);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.5);
  animation-play-state: paused;
}

.wa-fab:active {
  transform: scale(1.05);
}

@keyframes wa-pulse {
  0%, 100% {
    box-shadow:
      0 4px 20px var(--macr-wa-glow),
      0 0 0 0 rgba(37, 211, 102, 0.3);
  }
  50% {
    box-shadow:
      0 4px 20px var(--macr-wa-glow),
      0 0 0 14px rgba(37, 211, 102, 0);
  }
}

@media (max-width: 767px) {
  .wa-fab {
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
  }
}

/* ── SCROLL REVEAL ──────────────────────────────────────── */
/*
   FIX critico (2026-04-28): los elementos data-reveal son siempre visibles
   por defecto. Si JS scroll-reveal funciona, anima el fade-in via .pre-reveal.
   Si el JS falla por cualquier motivo, el contenido NO queda invisible.
   Trade-off: no hay animacion de entrada hasta que JS agregue .pre-reveal.
   Resuelto en MS-09 con sistema completo.
*/

[data-reveal] {
  opacity: 1;
  transform: none;
  transition:
    opacity   var(--dur-reveal) var(--ease-out-expo),
    transform var(--dur-reveal) var(--ease-out-expo);
}

/* Solo si JS confirma que IntersectionObserver disponible, aplica pre-reveal */
[data-reveal].pre-reveal {
  opacity: 0;
  transform: translateY(28px);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── GRID UTILITIES ─────────────────────────────────────── */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--card-gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--card-gap);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--card-gap);
}

@media (max-width: 1023px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
    gap: var(--card-gap-mob);
  }
}

/* ── UTILIDADES ─────────────────────────────────────────── */

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.text-gold   { color: var(--macr-gold) !important; }
.text-white  { color: var(--macr-white) !important; }
.text-navy   { color: var(--macr-navy-900) !important; }
.text-muted  { color: var(--macr-gray-400) !important; }

.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semi   { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 800; }

.italic { font-style: italic; }

.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;
}

/* ══════════════════════════════════════════════════════════
   ACCESIBILIDAD
   ══════════════════════════════════════════════════════════ */

:focus-visible {
  outline: 3px solid var(--macr-gold);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  background: var(--macr-gold);
  color: var(--macr-navy-900);
  font-weight: 700;
  padding: var(--sp-3) var(--sp-6);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: calc(var(--z-nav) + 1);
  text-decoration: none;
  transition: top var(--dur-fast);
}

.skip-to-content:focus {
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .wa-fab {
    animation: none;
  }
}

/* ══════════════════════════════════════════════════════════
   FIN DEL ARCHIVO macr-tokens.css v3.0 DIAMANTE
   ══════════════════════════════════════════════════════════ */
