/* Header wrapper is fixed and centers the nav container */
.site-header{
  position: fixed;
  inset: 16px 0 auto 0;
  z-index: 999;
  display: flex;
  justify-content: center;
  pointer-events: none; /* allow clicks only inside .nav */
}

/* Pill container */
.nav{
  position: relative;
  pointer-events: auto;
  width: min(var(--max, 1200px), 94%);
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr auto; /* brand | center menu | cta/hamburger */
  align-items: center;
  row-gap: 0; column-gap: 0;
  padding-block: 10px;
  /* IMPORTANT: No right padding so CTA hugs the right edge */
  /* symmetric inner paddings (logo margin mirrored on the right) */
  --nav-pad: 14px;
  --edge-gap: 16px;
  /* Respect notches/safe areas on mobile */
  padding-inline-start: max(env(safe-area-inset-left, 0px), calc(var(--nav-pad) + var(--edge-gap)));
  padding-inline-end: max(env(safe-area-inset-right, 0px), calc(var(--nav-pad) + var(--edge-gap)));
  border-radius: var(--radius, 14px);
  border: 1px solid var(--border, rgba(255,255,255,.12));
  background: linear-gradient(to bottom, rgba(255,255,255,.02), rgba(255,255,255,.01));
  backdrop-filter: saturate(180%) blur(6px);
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease, transform .3s ease;
}

/* Brand (left) */
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
}

/* Icono + texto animado */
.brand-icon{
  display: inline-block;
  height: 18px; /* header mobile */
  width: auto;
  filter: drop-shadow(0 4px 10px rgba(91,124,255,.18));
}

@media (min-width: 761px){ .brand-icon{ height: 20px; } } /* header desktop */

.brand-text{
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1;
  letter-spacing: .2px;
  color: #dfe6ff;
  opacity: .9;
  display: inline-flex;
  align-items: center;
}

@media (min-width: 761px){ .brand-text{ font-size: 15px; } }

.brand-typed{
  position: relative;
  white-space: nowrap;
  display: inline-block;
  min-height: 1em; /* asegura altura para centrar la barra incluso sin texto */
}

.brand-typed::after{
  content: '';
  position: absolute;
  left: 100%;
  margin-left: 4px; /* espacio respecto al icono o texto */
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 1em;
  background: currentColor;
  border-radius: 1px;
  opacity: .9;
  animation: blink 1s step-start infinite;
}

@keyframes blink{ 50%{ opacity: 0; } }

/* Center menu */
.nav-center{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  /* guard so the menu no pise brand/CTA on sides */
  --menu-guard: 520px;
  max-width: calc(100% - var(--menu-guard));
}

.menu{
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 18px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu a{
  display: inline-block;
  padding: 6px 4px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted-foreground, #eef0f6);
  opacity: .88;
  transition: opacity .2s ease, transform .2s ease;
}
.menu a:hover{ opacity: 1; transform: translateY(-1px); }

/* Right side: CTA + Hamburger */
.nav-right{
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: end;
}

/* Space to the LEFT of the CTA (not the right) */
.nav-right .btn-cta{
  /* no extra left margin; spacing is controlled by .nav-right gap */
  margin-inline: 0;
  /* slightly smaller than previous tweak */
  padding: 8px 12px;
  font-size: 0.92rem;
}

/* Hamburger button */
.hamburger{
  display: none;
  background: transparent;
  border: 0;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
}

/* Mobile menu (overlay) */
.mobile-menu{
  position: fixed;
  inset: 0;
  background: rgba(7,9,20,.66);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 998;
}
.mobile-menu.open{ display: flex; }

.mobile-card{
  width: min(90vw, 520px);
  background: var(--card, rgba(255,255,255,.06));
  border: 1px solid var(--border, rgba(255,255,255,.12));
  border-radius: calc(var(--radius, 14px) + 6px);
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.mobile-card h3{ margin: 0 0 10px 0; }
.mobile-card ul{
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
  display: grid;
  gap: 10px;
}
.mobile-card a{
  display: block;
  padding: 12px 10px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
}

/* ----------------------------
   Responsive
   ---------------------------- */
@media (max-width: 760px){
  /* hide center menu on mobile */
  .menu{ display: none; }

  /* provide right padding for the hamburger on small screens */
  .nav{ 
    width: min(var(--max, 1200px), 92%); /* alinear con .wrap en mobile */
    padding-inline-end: 10px; 
  }

  /* show hamburger, hide CTA (CTA already has .desktop-only but make header self-contained) */
  .hamburger{ display: inline-flex; }
  .desktop-only{ display: none; }
}

/* Center items inside the absolute-centered menu */
.nav-center .menu{ justify-content: center; }

/* === Brands slider (restored from fixed zip) === */
.brands-marquee {
  position: relative;
    padding: 18px 0;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    border-top: 1px solid rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.06);
    margin: 8px auto 0 auto;
    width: 100%;
}

.brands-inner {
  display: block;
    white-space: nowrap;
}
/* === /Brands slider === */

/* Footer brand (icon + typing) */
.footer-brand{ display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .brand-icon{ height: 24px; }
.footer-brand .brand-text{ font-size: 16px; }
