/* Header unificado ENSO_Dev 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(4, 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, padding-left 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). */
.eh-menu__col a::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 14px; height: 6px; border-radius: 6px; background: var(--accent, #b9ff66);
  transform: translate(-24px, -50%) scaleX(0.35); transform-origin: left center;
  opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease;
}
.eh-menu__col a:hover { color: var(--text, #f2f0ea); padding-left: 26px; transition-delay: 0s; }
.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, padding-left 0.2s ease; opacity: 1; transform: none; }
}
