/* ============================================
   HEADER + NAVEGACIÓN — patrón Cofounder
   (dos cápsulas + logo serif)
   ============================================ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) clamp(1rem, 3vw, 2.5rem);
  position: relative;
  z-index: 20;
}

/* Logo wordmark — solo texto en serif itálica */
.brand {
  display: inline-flex;
  align-items: center;
}
.brand__name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  color: var(--on-dark);
  line-height: 1;
}

/* Cápsulas de navegación (desktop) */
.nav-capsules {
  display: none;
  align-items: center;
  gap: var(--space-3);
}

@media (min-width: 980px) {
  .nav-capsules { display: flex; }
}

.nav-capsule {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 25, 18, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(245, 235, 205, 0.10);
  border-radius: var(--radius-pill);
  padding: 5px;
  box-shadow: 0 6px 18px rgba(15, 25, 18, 0.30);
}

.nav-capsule a {
  color: var(--on-dark-2);
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  transition: background 0.18s var(--ease-out), color 0.18s;
  white-space: nowrap;
  line-height: 1;
}
.nav-capsule a:hover {
  color: var(--on-dark);
  background: rgba(245, 235, 205, 0.10);
}

.nav-divider {
  width: 1px;
  height: 14px;
  background: rgba(245, 235, 205, 0.18);
  margin: 0 2px;
}

.nav-capsule .nav-cta {
  background: var(--paper);
  color: var(--ink) !important;
  font-weight: 600;
}
.nav-capsule .nav-cta:hover {
  background: var(--paper-3);
  color: var(--ink) !important;
}

/* Item de la cápsula con solo ícono (sin texto) */
.nav-capsule .nav-capsule__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 1.2rem;
  line-height: 1;
}
.nav-capsule .nav-capsule__icon svg {
  display: block;
  width: 1em;
  height: 1em;
}

/* ============================================
   HAMBURGUESA (mobile)
   ============================================ */
.hamburger {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(15, 25, 18, 0.55);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(245, 235, 205, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--on-dark);
  transition: background 0.2s var(--ease-out);
}
.hamburger:hover { background: rgba(15, 25, 18, 0.75); }

@media (min-width: 980px) {
  .hamburger { display: none; }
}

.hamburger__bars {
  width: 18px; height: 12px;
  position: relative;
}
.hamburger__bars span {
  display: block;
  position: absolute;
  width: 100%;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), top 0.3s var(--ease-out), opacity 0.2s;
}
.hamburger__bars span:nth-child(1) { top: 0; }
.hamburger__bars span:nth-child(2) { top: 5px; width: 70%; }
.hamburger__bars span:nth-child(3) { top: 10px; }
.hamburger.is-open .hamburger__bars span:nth-child(1) { top: 5px; transform: rotate(45deg); width: 100%; }
.hamburger.is-open .hamburger__bars span:nth-child(2) { opacity: 0; }
.hamburger.is-open .hamburger__bars span:nth-child(3) { top: 5px; transform: rotate(-45deg); width: 100%; }

/* ============================================
   MENÚ LATERAL (mobile)
   ============================================ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 37, 64, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
  z-index: 50;
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

.menu-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100dvh;
  background: #fff;
  border-left: 1px solid rgba(10, 37, 64, 0.08);
  box-shadow: -16px 0 48px rgba(10, 37, 64, 0.22);
  transform: translateX(100%);
  transition: transform 0.36s var(--ease-out);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-5);
  gap: var(--space-3);
}
.menu-panel.is-open { transform: translateX(0); }

.menu-panel__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(10, 39, 66, 0.08);
}

.menu-panel a {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, color 0.2s;
}
.menu-panel a:hover {
  background: rgba(10, 37, 64, 0.06);
  color: var(--navy);
}
