/* ==========================================================================
   VORA — Header (sticky, outside .page-clip per CLAUDE.md sticky/overflow rule)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 20px 30px;
  background: transparent;
  pointer-events: none; /* let clicks pass through padding area */
}

.site-header * {
  pointer-events: auto;
}

.site-header__bar {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-nav);
}

.site-header__brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-header__logo {
  display: block;
  height: 30px;
  width: auto;
  object-fit: contain;
}

/* ---------- Desktop nav ---------- */
.header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex: 1 1 auto;
}

.header__nav-link {
  position: relative;
  display: inline-flex;
  padding: 4px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--color-black);
  white-space: nowrap;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background-color: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.header__nav-link:hover::after,
.header__nav-link.is-active::after {
  transform: scaleX(1);
}

.site-header__cta {
  flex: 0 0 auto;
}

/* CTA that lives inside the nav is only for the mobile menu */
.site-header__cta--mobile {
  display: none;
}

/* ---------- Nav toggle (mobile) ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.nav-toggle__bar {
  width: 22px;
  height: 2px;
  background-color: var(--color-black);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Sticky scrolled state ---------- */
.site-header.is-scrolled .site-header__bar {
  box-shadow: rgba(0, 0, 0, 0.12) 0px 10px 40px 0px;
}

/* ==========================================================================
   Mobile nav — CLAUDE.md mandatory rule:
   Do NOT use translateX(100%) to hide the nav (it duplicates document
   width and causes horizontal overflow on mobile). Use an opacity/visibility
   fade instead.
   ========================================================================== */
@media (max-width: 809px) {
  .nav-toggle {
    display: flex;
  }

  .site-header__bar {
    flex-wrap: wrap;
    padding: 12px;
  }

  .header__nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    padding: 12px;
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-nav);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0s linear 0.35s;
  }

  .header__nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s, visibility 0s linear 0s;
  }

  .header__nav-link {
    width: 100%;
    padding: 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  }

  .header__nav-link:last-child {
    border-bottom: none;
  }

  .header__nav-link::after {
    display: none;
  }

  .site-header__cta {
    display: none;
  }

  .header__nav .site-header__cta--mobile {
    display: inline-flex;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }
}
