/* Header unificado Pablo Abreu para páginas estáticas + hamburguesa lima con el
   mapa completo del sitio. La barra (.eh-head) replica el look de la landing;
   el menú (.eh-burger + .eh-menu) es compartido con la SPA. */

.eh-head {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(16, 16, 15, 0.86), rgba(16, 16, 15, 0.55));
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: env(safe-area-inset-top, 0px);
}
.eh-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(185, 255, 102, 0.28), transparent);
}
.eh-head__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1240px, calc(100vw - 44px));
  margin: 0 auto;
  padding: 10px 0;
}
.eh-brand { display: flex; align-items: center; gap: 12px; }
.eh-brand__img {
  height: 40px; width: auto; display: block;
  filter: drop-shadow(0 0 9px rgba(185, 255, 102, 0.38));
}
.eh-brand__word {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; color: var(--text, #f2f0ea);
}
.eh-nav { display: flex; gap: 22px; }
.eh-nav a {
  color: var(--muted, #9a9da5); font-size: 0.78rem; letter-spacing: 0.08em;
  text-transform: uppercase; transition: color 0.25s ease;
}
.eh-nav a:hover { color: var(--text, #f2f0ea); }
.eh-right { display: flex; align-items: center; gap: 12px; }
.eh-lang { display: inline-flex; gap: 6px; }
.eh-lang a {
  color: var(--muted, #9a9da5); font-size: 0.68rem; padding: 6px 8px;
  border: 1px solid var(--line, rgba(242, 240, 234, 0.12)); border-radius: 8px; transition: color 0.2s ease, border-color 0.2s ease;
}
.eh-lang a:hover { color: var(--text, #f2f0ea); border-color: rgba(185, 255, 102, 0.5); }

/* Hamburguesa lima (compartida SPA + estáticas) */
.eh-burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 42px; height: 42px; padding: 0 10px; flex: 0 0 auto;
  border: 1px solid rgba(185, 255, 102, 0.5); border-radius: 10px;
  background: rgba(185, 255, 102, 0.07); cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.eh-burger:hover { background: rgba(185, 255, 102, 0.14); border-color: rgba(185, 255, 102, 0.75); }
.eh-burger span {
  display: block; height: 2px; width: 100%; border-radius: 2px;
  background: var(--accent, #b9ff66); transition: transform 0.3s ease, opacity 0.2s ease;
}
.eh-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.eh-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.eh-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Overlay del menú: revelado circular (clip-path) desde la hamburguesa +
   entrada escalonada de los enlaces y barra lima al hover. Estilo técnico,
   colores ENSO. El origen del círculo (--eh-ox/--eh-oy) lo fija el JS al abrir. */
.eh-menu {
  position: fixed; inset: 0; z-index: 1800; visibility: hidden;
  --eh-ox: calc(100% - 42px); --eh-oy: 34px;
}
.eh-menu.is-open { visibility: visible; }

.eh-menu__surface {
  position: absolute; inset: 0; overflow-y: auto;
  background:
    radial-gradient(58% 58% at var(--eh-ox) var(--eh-oy), rgba(185, 255, 102, 0.13), rgba(185, 255, 102, 0) 60%),
    linear-gradient(160deg, #0c0e0a 0%, #08090a 60%, #060708 100%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  clip-path: circle(0px at var(--eh-ox) var(--eh-oy));
  transition: clip-path 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.eh-menu.is-open .eh-menu__surface { clip-path: circle(150% at var(--eh-ox) var(--eh-oy)); }
/* Rejilla técnica sutil que se desvanece hacia los bordes del círculo. */
.eh-menu__surface::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image:
    linear-gradient(rgba(185, 255, 102, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(185, 255, 102, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(78% 78% at var(--eh-ox) var(--eh-oy), #000 0%, transparent 74%);
  mask-image: radial-gradient(78% 78% at var(--eh-ox) var(--eh-oy), #000 0%, transparent 74%);
}

.eh-menu__inner {
  position: relative; min-height: 100%;
  width: min(1180px, calc(100vw - 88px)); margin: 0 auto;
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px 0 64px;
}
.eh-menu__bar {
  position: absolute; top: 24px; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
}
.eh-menu__brand { color: var(--accent, #b9ff66); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase; }
.eh-menu__close {
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(185, 255, 102, 0.4); background: rgba(185, 255, 102, 0.06);
  color: var(--accent, #b9ff66); font-size: 1.05rem; line-height: 1;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.eh-menu__close:hover { background: rgba(185, 255, 102, 0.14); border-color: rgba(185, 255, 102, 0.7); transform: rotate(90deg); }

.eh-menu__title {
  margin: 0 0 30px; color: var(--text, #f2f0ea); font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.04; letter-spacing: -0.01em;
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.5s ease, transform 0.5s ease; transition-delay: 0.14s;
}
.eh-menu__title b { color: var(--accent, #b9ff66); font-weight: 700; }
.eh-menu.is-open .eh-menu__title { opacity: 1; transform: none; }

.eh-menu__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px 26px; }
.eh-menu__col { display: grid; align-content: start; gap: 2px; }

/* Entrada escalonada: cada header/enlace lleva su --i. */
.eh-menu__h, .eh-menu__col a {
  opacity: 0; transform: translateX(-40px);
  transition: opacity 0.45s ease, transform 0.45s ease, color 0.2s ease;
  transition-delay: calc(var(--i, 0) * 0.022s + 0.16s);
}
.eh-menu.is-open .eh-menu__h,
.eh-menu.is-open .eh-menu__col a { opacity: 1; transform: none; }

.eh-menu__h {
  margin: 0 0 10px; color: var(--accent, #b9ff66);
  font-size: 0.58rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.eh-menu__col a + .eh-menu__h { margin-top: 18px; }
.eh-menu__col a {
  position: relative; display: block; padding: 6px 0;
  color: var(--muted, #9a9da5); font-size: 0.92rem; line-height: 1.3;
}
/* Barra lima que entra por la izquierda al hover (efecto de referencia).
   Vive en el canalón a la izquierda del texto (left negativo) para no solaparlo,
   sin necesidad de mover el texto con padding. */
.eh-menu__col a::before {
  content: ""; position: absolute; left: -20px; top: 50%;
  width: 14px; height: 6px; border-radius: 6px; background: var(--accent, #b9ff66);
  transform: translate(-16px, -50%) scaleX(0.35); transform-origin: left center;
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease;
}
/* El nudge al hover se hace con transform (sin reflow) en lugar de padding-left:
   cambiar padding reescalaba el ancho del texto, re-envolvía los títulos largos
   y el cambio de alto provocaba el parpadeo del puntero. */
.eh-menu__col a:hover { color: var(--text, #f2f0ea); transition-delay: 0s; }
.eh-menu.is-open .eh-menu__col a:hover { transform: translateX(8px); }
.eh-menu__col a:hover::before { opacity: 1; transform: translate(0, -50%) scaleX(1); }

@media (max-width: 900px) { .eh-menu__grid { grid-template-columns: repeat(2, 1fr); gap: 26px 22px; } }
@media (max-width: 820px) { .eh-nav { display: none; } }
@media (max-width: 560px) {
  .eh-menu__grid { grid-template-columns: 1fr; gap: 22px; }
  .eh-menu__inner { width: calc(100vw - 44px); padding-top: 86px; }
}

@media (prefers-reduced-motion: reduce) {
  .eh-menu__surface { transition: none; clip-path: none; }
  .eh-menu__title, .eh-menu__h, .eh-menu__col a { transition: color 0.2s ease; opacity: 1; transform: none; }
}

/* ============================================================
   HEADER UNIFICADO (.site-header) — fuente única compartida
   por el landing (React) y las páginas estáticas (generador).
   Movido desde src/components/layout/Header.css.
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: none;
  background: linear-gradient(180deg, rgba(31, 29, 34, 0.85), rgba(31, 29, 34, 0.35));
  border-bottom: none;
  overflow: visible;
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px clamp(14px, 3.4vw, 36px);
  position: relative;
  z-index: 2;
}

.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

.site-header::before {
  background: linear-gradient(120deg, rgba(211, 181, 135, 0.08), rgba(211, 181, 135, 0));
  clip-path: polygon(0 0, 70% 0, 60% 100%, 0 100%);
}

.site-header::after {
  background: linear-gradient(260deg, rgba(224, 159, 62, 0.12), rgba(224, 159, 62, 0));
  clip-path: polygon(68% 0, 100% 0, 100% 100%, 78% 100%);
}

.site-header .header-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 48px;
  z-index: 1;
  opacity: 0.55;
  mix-blend-mode: soft-light;
}

.site-header .header-wave path {
  fill: rgba(31, 29, 34, 0.35);
}

.site-header::before,
.site-header::after {
  mix-blend-mode: soft-light;
}

.site-header .header-wave {
  filter: none;
}

.site-header::after {
  opacity: 0.35;
}

.site-header::before {
  opacity: 0.28;
}

.site-header::after,
.site-header::before {
  transition: opacity 0.6s ease;
}

.header-shape {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.header-shape__piece {
  position: absolute;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(211, 181, 135, 0.6), rgba(211, 181, 135, 0));
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(-8px) scaleX(0.2);
}

.header-shape__piece--a {
  width: 160px;
  left: 16px;
  top: 14px;
}

.header-shape__piece--b {
  width: 220px;
  right: 22%;
  bottom: 10px;
  background: linear-gradient(90deg, rgba(224, 159, 62, 0.7), rgba(224, 159, 62, 0));
}

.header-shape__piece--c {
  width: 120px;
  right: 18px;
  top: 10px;
  background: linear-gradient(90deg, rgba(158, 42, 43, 0.7), rgba(158, 42, 43, 0));
}

.site-header.is-assembling .header-shape__piece--a {
  animation: header-piece-strong 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) forwards 0.05s;
}

.site-header.is-assembling .header-shape__piece--b {
  animation: header-piece-strong 0.95s cubic-bezier(0.2, 0.9, 0.2, 1) forwards 0.2s;
}

.site-header.is-assembling .header-shape__piece--c {
  animation: header-piece-strong 1s cubic-bezier(0.2, 0.9, 0.2, 1) forwards 0.35s;
}

.site-header.is-assembling .logo__img {
  animation: header-in-strong 0.95s cubic-bezier(0.2, 0.9, 0.2, 1) forwards 0.15s, logo-glow 5s ease-in-out infinite;
  opacity: 0;
  transform: translateY(-16px) scale(0.98);
}

.site-header.is-assembling .nav__list,
.site-header.is-assembling .nav__toggle,
.site-header.is-assembling .lang-switch {
  animation: header-in-strong 1s cubic-bezier(0.2, 0.9, 0.2, 1) forwards 0.3s;
  opacity: 0;
  transform: translateY(-16px);
}

@keyframes header-piece-strong {
  to {
    opacity: 1;
    transform: translateY(0) scaleX(1.15);
  }
}

@keyframes header-in-strong {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
}

.logo__img {
  width: 132px;
  height: auto;
  display: block;
  filter:
    drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35))
    drop-shadow(0 0 18px rgba(211, 181, 135, 0.45));
  transition: filter 0.4s ease;
}

@keyframes logo-glow {
  0%, 100% {
    filter:
      drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35))
      drop-shadow(0 0 14px rgba(211, 181, 135, 0.35));
  }
  50% {
    filter:
      drop-shadow(0 14px 24px rgba(0, 0, 0, 0.4))
      drop-shadow(0 0 24px rgba(211, 181, 135, 0.6));
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, border-color 0.25s ease, background 0.25s ease;
}

.lang-switch__btn:hover {
  transform: translateY(-1px);
  border-color: rgba(211, 181, 135, 0.65);
}

.lang-switch__btn.is-active {
  border-color: rgba(211, 181, 135, 0.85);
  background: rgba(211, 181, 135, 0.14);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  text-align: center;
  line-height: 1;
  cursor: pointer;
}

.nav__list {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__list a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.3s ease;
}

.nav__list a:hover {
  color: var(--text);
}

@media (max-width: 860px) {
  .site-header .container {
    padding: 9px clamp(14px, 4.2vw, 24px);
    gap: 10px;
  }

  .nav__toggle {
    display: inline-flex;
    min-height: 40px;
    padding: 8px 14px;
  }

  .nav {
    position: relative;
    gap: 12px;
  }

  .nav__list {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    flex-direction: column;
    background: var(--card);
    border: 1px solid var(--line);
    width: min(340px, calc(100vw - 24px));
    max-height: min(70vh, 420px);
    overflow-y: auto;
    padding: 12px;
    gap: 4px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    display: none;
  }

  .nav__list.is-open {
    display: grid;
  }

  .nav__list a {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .nav__list a:hover {
    background: rgba(255, 255, 255, 0.04);
  }
}

@media (max-width: 600px) {
  .site-header .container {
    padding: 8px clamp(16px, 5.2vw, 22px);
  }

  .logo__img {
    width: 106px;
  }

  .nav {
    gap: 8px;
  }

  .nav__list {
    width: calc(100vw - 32px);
  }

  .lang-switch {
    gap: 6px;
  }

  .lang-switch__btn {
    width: 34px;
    height: 34px;
  }
}

/* Doble toque en el logo abre la tarjeta (QR); evita el zoom por doble-tap en móvil. */
.logo { touch-action: manipulation; }

/* Variante para páginas estáticas: scroll normal del documento (sticky)
   en vez de fixed, y en móvil el nav inline se oculta (se usa el
   hamburguesa .eh-burger como en el landing). */
.site-header--doc { position: sticky; }
.site-header--doc .lang-switch__btn { text-decoration: none; }

/* Paridad visual con el landing: su header además toma estilos de
   design-refresh.css (no cargado en estáticas). Replicamos aquí lo esencial:
   sin onda/decoración, logo pequeño, nav en mayúsculas y fondo con blur. */
.site-header--doc .header-wave,
.site-header--doc .header-shape { display: none; }
.site-header--doc {
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), transparent 78%),
    rgba(16, 16, 15, 0.62);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.site-header--doc .container { min-height: 68px; padding: 8px clamp(22px, 4vw, 64px); }
.site-header--doc .logo__img {
  width: auto;
  height: 44px;
  animation: none;
  opacity: 1;
  transform: none;
}
.site-header--doc .nav__list a {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 240, 232, 0.68);
}
.site-header--doc .nav__list a:hover { color: var(--text, #f2f0ea); }

/* En móvil, ambos (landing y estáticas) usan solo el hamburguesa: se oculta el
   botón "Menú" inline redundante. */
@media (max-width: 860px) {
  .nav__toggle { display: none !important; }
  .site-header--doc .nav__list { display: none; }
  .site-header--doc .logo__img { height: 40px; }
}
