/* ── NAV ──
 * Fixed dark-purple bar across every page. Layout: logo (left) — links
 * (center) — sign-in + start-free + lang switcher (right). On Home the
 * gradient hero sits flush under the nav so the bar uses a translucent
 * solid + blur to avoid a hard seam. */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 18px 32px;
  /* 3-column grid with equal side tracks (minmax(0, 1fr) | auto |
     minmax(0, 1fr)) pins .nav-links to the true center regardless of how
     wide the logo or the right-side actions get. minmax(0, …) lets the
     side tracks shrink below their content size so EN/ES label-length
     differences can never make them unequal. Mobile reverts to flex below. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  background: oklch(26.46% 0.1070 317.43 / 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid oklch(100% 0 0 / 0.08);
}

/* ── LOGO ── */
.nav-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 201;
  justify-self: start;
}
.nav-logo-img {
  display: block;
  height: 28px;
  width: auto;
}

/* ── CENTER LINKS ── */
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  justify-self: center;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ays-text-inverse-secondary);
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 400;
}
.nav-links a:hover {
  color: var(--white);
}

/* ── RIGHT ACTIONS ── */
.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 201;
  justify-self: end;
}

.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  background: transparent;
  color: oklch(100% 0 0 / 0.72);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-lang:hover {
  color: var(--white);
}
.nav-lang-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  opacity: 0.8;
}
.nav-lang:hover .nav-lang-icon {
  opacity: 1;
}
.nav-lang-label {
  line-height: 1;
}

.nav-signin {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  text-decoration: none;
  border: 1px solid oklch(100% 0 0 / 0.32);
  transition: background 0.2s, border-color 0.2s;
}
.nav-signin:hover {
  background: oklch(100% 0 0 / 0.08);
  border-color: oklch(100% 0 0 / 0.5);
}

.nav-cta {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ays-button-bg-primary), var(--ays-button-bg-primary-bottom));
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px oklch(54.18% 0.2112 314.87 / 0.32);
}
.nav-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px oklch(54.18% 0.2112 314.87 / 0.42);
}

/* ── HAMBURGER BUTTON ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 201;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── MOBILE MENU OVERLAY ── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: oklch(26.46% 0.1070 317.43 / 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
  transform: none;
}
.mobile-menu a {
  font-family: var(--serif);
  font-size: clamp(28px, 7vw, 40px);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.mobile-menu a:hover {
  color: var(--white);
}
.mobile-menu .mobile-menu-signin {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 12px 28px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid oklch(100% 0 0 / 0.32);
  color: var(--white);
  letter-spacing: 0;
  margin-top: 12px;
}
.mobile-menu .mobile-menu-cta {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--ays-button-bg-primary), var(--ays-button-bg-primary-bottom));
  color: #fff;
  letter-spacing: 0;
}

/* ── RESPONSIVE: NAV ── */
@media (max-width: 1024px) {
  nav {
    padding: 16px 20px;
    /* Only the logo + hamburger show here, so revert to flex and hug
       the two edges. */
    display: flex;
    justify-content: space-between;
  }
  .nav-links {
    display: none;
  }
  .nav-end {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}
