/* =========================================================================
   Eventos & Matrimonios · Design tokens v1.0
   Cargar ANTES de em-components.css.
   Tema claro por defecto. Tema oscuro:
     - manual:  <html data-em-theme="dark">  (o en cualquier contenedor)
     - automático según el sistema:  <html class="em-auto-dark">
   ========================================================================= */

/* ---------- Fuentes ---------------------------------------------------- */
/* The Seasons: usar SOLO el archivo Bold completo. El Regular del manual es
   una versión DEMO ("FSP DEMO", 95 glifos): sin tildes, sin ñ y con marcas
   "DEMO" en números. El sitio ya usa la Bold en sus títulos.
   Ruta relativa a este CSS: /em/fonts/the-seasons-bold.woff2 (26 KB). */
@font-face {
  font-family: "The Seasons";
  src: url("fonts/the-seasons-bold.woff2") format("woff2");
  font-weight: 400 700;           /* un solo archivo para todos los pesos */
  font-style: normal;
  font-display: swap;
}
/* Gilroy ya está alojada en el sitio (uploads/2025/11). Solo se usan 400, 500 y 600/700. */

:root,
[data-em-theme="light"] {
  /* ---- Paleta de marca (no cambian con el tema) ---- */
  --em-olive-900: #2A2F1F;   /* noche oliva */
  --em-olive-800: #3F4A30;   /* oliva oscuro: texto secundario sobre beige */
  --em-olive-700: #566242;   /* oliva profundo: primario */
  --em-olive-500: #738061;   /* salvia: íconos y superficies, nunca texto < 18px */
  --em-olive-300: #B9C4A3;   /* salvia clara: enlaces sobre noche */
  --em-beige:     #E6DDD5;
  --em-sand:      #D8C9A7;   /* exclusivo plan Élite */
  --em-rose:      #E7C4C4;   /* favoritos, fechas */
  --em-smoke:     #F4F3F0;
  --em-white:     #FFFFFF;
  --em-gray-600:  #6B6F63;   /* texto secundario (4,6:1 sobre humo) */
  --em-gray-300:  #C9C6BD;
  --em-gray-200:  #E4DFD6;   /* bordes */

  /* ---- Tokens semánticos (sí cambian con el tema) ---- */
  --em-bg:            var(--em-smoke);
  --em-surface:       var(--em-white);
  --em-surface-alt:   var(--em-beige);
  --em-text:          var(--em-olive-900);   /* 12,4:1 */
  --em-text-2:        var(--em-gray-600);    /* 4,6:1 */
  --em-border:        var(--em-gray-200);
  --em-primary:       var(--em-olive-700);   /* 5,9:1 sobre bg */
  --em-on-primary:    var(--em-white);       /* 6,5:1 */
  --em-primary-hover: var(--em-olive-800);
  --em-link:          var(--em-olive-700);
  --em-focus:         var(--em-olive-700);
  --em-elite-bg:      var(--em-sand);
  --em-elite-text:    var(--em-olive-900);
  --em-love:          var(--em-rose);
  --em-star:          #8C6414;               /* 4,8:1 */
  --em-success:       #3F6B2E;               /* 5,6:1 */
  --em-error:         #B4442F;               /* 5,0:1 */
  --em-whatsapp:      #1F7A4D;               /* 5,3:1 sobre blanco */
  --em-overlay:       rgba(42, 47, 31, .55);
  --em-skeleton-a:    #E9E5DD;
  --em-skeleton-b:    #F3F0EA;
  --em-shadow-sm:     0 1px 3px rgba(42, 47, 31, .10);
  --em-shadow-md:     0 8px 24px rgba(42, 47, 31, .10);
  --em-shadow-lg:     0 16px 40px rgba(42, 47, 31, .16);

  /* ---- Tipografía ---- */
  --em-font-serif: "The Seasons", "Cormorant Garamond", Georgia, serif;
  --em-font-sans:  "Gilroy", "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --em-fw-regular: 400;
  --em-fw-medium:  500;
  --em-fw-semi:    600;

  /*                       mobile → desktop (fluido 375 → 1440 px) */
  --em-fs-display: clamp(2.25rem, 1.46rem + 3.38vw, 4rem);     /* 36 → 64 */
  --em-fs-h1:      clamp(2rem, 1.65rem + 1.5vw, 3rem);          /* 32 → 48 */
  --em-fs-h2:      clamp(1.625rem, 1.36rem + 1.13vw, 2.375rem); /* 26 → 38 */
  --em-fs-h3:      clamp(1.375rem, 1.24rem + .56vw, 1.75rem);   /* 22 → 28 */
  --em-fs-h4:      clamp(1.125rem, 1.08rem + .19vw, 1.25rem);   /* 18 → 20 */
  --em-fs-h5:      clamp(1rem, .96rem + .19vw, 1.125rem);       /* 16 → 18 */
  --em-fs-h6:      .75rem;                                      /* 12 fijo */
  --em-fs-lead:    clamp(1.0625rem, .99rem + .28vw, 1.25rem);   /* 17 → 20 */
  --em-fs-body:    clamp(.9375rem, .92rem + .09vw, 1rem);       /* 15 → 16 */
  --em-fs-quote:   clamp(1.25rem, 1.16rem + .38vw, 1.5rem);     /* 20 → 24 */
  --em-fs-review:  clamp(.875rem, .85rem + .09vw, .9375rem);    /* 14 → 15 */
  --em-fs-price:   clamp(1rem, .96rem + .19vw, 1.125rem);       /* 16 → 18 */
  --em-fs-stat:    clamp(2rem, 1.82rem + .75vw, 2.5rem);        /* 32 → 40 */
  --em-fs-label:   .8125rem;                                    /* 13 */
  --em-fs-date:    .8125rem;                                    /* 13 */
  --em-fs-small:   .75rem;                                      /* 12, mínimo */
  --em-fs-button:  .9375rem;                                    /* 15 */

  --em-lh-tight: 1.1;
  --em-lh-title: 1.2;
  --em-lh-body:  1.6;
  --em-ls-overline: .12em;
  --em-measure: 65ch;

  /* ---- Espaciado (base 4) ---- */
  --em-space-1: 4px;  --em-space-2: 8px;  --em-space-3: 12px; --em-space-4: 16px;
  --em-space-5: 20px; --em-space-6: 24px; --em-space-8: 32px; --em-space-10: 40px;
  --em-space-12: 48px; --em-space-16: 64px; --em-space-20: 80px;
  --em-gutter: 16px;                      /* 24 en tablet, 40 en desktop */
  --em-container: 1200px;
  --em-section-y: clamp(48px, 36px + 3vw, 96px);

  /* ---- Radios: solo 3 ---- */
  --em-radius-sm: 8px;      /* inputs, miniaturas */
  --em-radius-md: 12px;     /* botones */
  --em-radius-lg: 16px;     /* cards, sheets, imágenes */
  --em-radius-pill: 999px;  /* buscador, chips, badges */

  /* ---- Tamaños de control ---- */
  --em-tap: 44px;           /* mínimo táctil */
  --em-btn-h: 46px;
  --em-btn-h-sm: 38px;
  --em-input-h: 44px;
  --em-chip-h: 32px;
  --em-header-h: 56px;      /* 64 tablet, 72 desktop */
  --em-tabbar-h: 62px;

  /* ---- Movimiento ---- */
  --em-ease: cubic-bezier(.2, .7, .2, 1);
  --em-dur-fast: 150ms;
  --em-dur: 200ms;
  --em-dur-slow: 320ms;

  /* ---- Capas ---- */
  --em-z-header: 50; --em-z-tabbar: 60; --em-z-sheet: 80; --em-z-toast: 90;

  color-scheme: light;
}

@media (min-width: 768px)  { :root { --em-gutter: 24px; --em-header-h: 64px; } }
@media (min-width: 1024px) { :root { --em-gutter: 40px; --em-header-h: 72px; } }

/* ---------- Tema oscuro ------------------------------------------------ */
[data-em-theme="dark"] {
  --em-bg:            #15180F;
  --em-surface:       #1E2218;
  --em-surface-alt:   #2A2F22;
  --em-text:          #EEECE5;   /* 15,2:1 */
  --em-text-2:        #B3B6A8;   /* 8,7:1 */
  --em-border:        #363C2D;
  --em-primary:       #A9B78F;   /* 8,4:1 */
  --em-on-primary:    #15180F;   /* 8,4:1 */
  --em-primary-hover: #C3CFAA;
  --em-link:          #C3CFAA;   /* 11,0:1 */
  --em-focus:         #C3CFAA;
  --em-elite-bg:      #D8C9A7;
  --em-elite-text:    #2A2F1F;
  --em-star:          #D9A441;   /* 8,0:1 */
  --em-success:       #9FCB86;
  --em-error:         #F0A08E;   /* 8,7:1 */
  --em-whatsapp:      #5CC48A;   /* 7,5:1 */
  --em-overlay:       rgba(0, 0, 0, .6);
  --em-skeleton-a:    #262B1F;
  --em-skeleton-b:    #313729;
  --em-shadow-sm:     0 1px 3px rgba(0, 0, 0, .4);
  --em-shadow-md:     0 8px 24px rgba(0, 0, 0, .4);
  --em-shadow-lg:     0 16px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  .em-auto-dark:not([data-em-theme="light"]) {
    --em-bg: #15180F; --em-surface: #1E2218; --em-surface-alt: #2A2F22;
    --em-text: #EEECE5; --em-text-2: #B3B6A8; --em-border: #363C2D;
    --em-primary: #A9B78F; --em-on-primary: #15180F; --em-primary-hover: #C3CFAA;
    --em-link: #C3CFAA; --em-focus: #C3CFAA; --em-star: #D9A441;
    --em-success: #9FCB86; --em-error: #F0A08E; --em-whatsapp: #5CC48A;
    --em-overlay: rgba(0,0,0,.6); --em-skeleton-a: #262B1F; --em-skeleton-b: #313729;
    --em-shadow-sm: 0 1px 3px rgba(0,0,0,.4); --em-shadow-md: 0 8px 24px rgba(0,0,0,.4);
    --em-shadow-lg: 0 16px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}

/* ---------- Puente con Elementor (Site Settings → Global Colors/Fonts) ----
   Elementor declara sus globales en body.elementor-kit-N. Este selector
   (body + atributo) tiene más especificidad y los reemplaza por los tokens,
   así todo widget que use colores/fuentes globales hereda el sistema.
   Aun así, escribir los mismos hex en Site Settings para que el editor
   muestre los colores correctos. */
body[class*="elementor-kit-"] {
  --e-global-color-primary:   var(--em-primary);
  /* --e-global-color-secondary no se puentea: el cliente quiere el Secundario del kit (#E6DDD5,
     beige) en los bloques que lo usan, no el verde oliva (17-nov-2026). */
  --e-global-color-text:      var(--em-text);
  --e-global-color-accent:    var(--em-sand);
  --e-global-typography-primary-font-family: "The Seasons";
  --e-global-typography-text-font-family: "Gilroy";
}
