/* HUD PEEK — barra superior oculta, visor on hover */

/* HUD bar oculta por defecto */
.hud-bar {
  transform: translateY(-100%) !important;
  transition: transform 0.45s cubic-bezier(0.16,1,0.3,1), opacity 0.3s !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* FALLBACK menu (cuando page no tenía .hud-bar nativa) */
.hud-bar.hud-fallback {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 8500 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 18px 32px !important;
  background: rgba(0,0,0,0.92) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(212,173,95,0.4) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
}
.hud-bar.hud-fallback .brand-link {
  font-family: 'Alata', sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0.45em !important;
  display: flex !important;
  gap: 6px !important;
  color: #fff !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}
.hud-bar.hud-fallback .brand-link .l1 { color: #fff !important; }
.hud-bar.hud-fallback .brand-link .l2 { color: #d4af37 !important; }
.hud-bar.hud-fallback .hud-fallback-links {
  display: flex !important;
  gap: 18px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  flex: 1 !important;
}
.hud-bar.hud-fallback .hud-fallback-links a {
  color: rgba(255,255,255,0.85) !important;
  font-size: 11px !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  text-decoration: none !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  transition: all 0.25s !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
}
.hud-bar.hud-fallback .hud-fallback-links a:hover {
  color: #d4af37 !important;
  background: rgba(212,173,95,0.1) !important;
}
.hud-bar.hud-fallback .back-guardian {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #d4af37 !important;
  font-size: 11px !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  padding: 8px 16px !important;
  border: 1px solid rgba(212,173,95,0.55) !important;
  border-radius: 100px !important;
  text-decoration: none !important;
  transition: all 0.3s !important;
  flex-shrink: 0 !important;
}
.hud-bar.hud-fallback .back-guardian:hover {
  background: #d4af37 !important;
  color: #000 !important;
}
@media (max-width: 800px) {
  .hud-bar.hud-fallback { padding: 14px 16px !important; gap: 12px !important; }
  .hud-bar.hud-fallback .hud-fallback-links { gap: 8px !important; font-size: 10px !important; }
  .hud-bar.hud-fallback .hud-fallback-links a { padding: 4px 6px !important; font-size: 10px !important; }
}
body.hud-open .hud-bar {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* TRIGGER — visible y obvio, gold solid pill que cuelga del top */
.hud-trigger {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 32px;
  background: linear-gradient(180deg, #f1d28a 0%, #d4af37 60%, #a8851e 100%);
  border: none;
  border-bottom-left-radius: 100px;
  border-bottom-right-radius: 100px;
  z-index: 9000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
  box-shadow: 0 6px 24px rgba(212,173,95,0.5),
              0 0 0 1px rgba(0,0,0,0.4),
              inset 0 -2px 8px rgba(168,133,30,0.4);
  animation: hudTriggerBounce 3s ease-in-out infinite;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.hud-trigger::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #0b0907;
  margin-top: 4px;
}
.hud-trigger::after {
  content: 'MENÚ';
  font-size: 10px;
  letter-spacing: 0.4em;
  color: #0b0907;
  font-weight: 800;
  text-transform: uppercase;
  padding-right: 1px;
}
@keyframes hudTriggerBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(3px); }
}
.hud-trigger:hover {
  width: 150px;
  height: 38px;
  transform: translateX(-50%) translateY(0) !important;
  animation: none;
  box-shadow: 0 10px 32px rgba(212,173,95,0.7),
              0 0 0 2px rgba(255,240,180,0.6),
              inset 0 -2px 8px rgba(168,133,30,0.4);
}
body.hud-open .hud-trigger {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-100%);
}

/* Edge zone invisible — top 32px del viewport también activa el HUD */
.hud-edge-zone {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 36px;
  z-index: 8999;
  pointer-events: auto;
  background: transparent;
}
body.hud-open .hud-edge-zone {
  pointer-events: none;
}
