/* =========================================================
   Header / Navbar  (Figma node 2132:109)
   Sits on top of the hero, shared across the whole page.
   ========================================================= */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-block: 26px;               /* Figma: py 26 */
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ---------- Logo ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand__icon {
  width: 64px;
  height: 52px;
}

.brand__wordmark {
  width: 131px;
  height: 32px;
}

/* ---------- Desktop nav ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__link {
  position: relative;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 24px;
  color: var(--color-white);
  transition: color 0.2s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--color-amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

/* Contact & Features: highlight on hover only (real mouse/trackpad).
   Nothing stays highlighted after clicking or tapping. */
@media (hover: hover) {
  .nav__link:hover { color: var(--color-amber); }
  .nav__link:hover::after { transform: scaleX(1); }
}

/* ---------- Mobile menu toggle (hidden on desktop) ---------- */
.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background:
    radial-gradient(50% 100% at 50% 0%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 100%),
    var(--color-ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* three bars, perfectly centred by flexbox */
.menu-toggle__bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-white);
  transition: transform 0.3s var(--ease-out), opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 767px) {
  .site-header {
    padding-block: 17px;
  }

  .brand {
    gap: 8px;
  }

  .brand__icon {
    width: 48px;
    height: 39px;
  }

  .brand__wordmark {
    width: 104px;
    height: 25.4px;
  }

  .menu-toggle {
    display: flex;
    z-index: 2;
  }

  /* Nav becomes a slide-down panel */
  .nav {
    position: absolute;
    top: calc(100% - 4px);
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(10, 18, 28, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s linear 0.3s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.25s ease, transform 0.3s var(--ease-out), visibility 0s;
  }

  .nav__link {
    padding: 12px 14px;
    border-radius: 10px;
  }

  .nav__link::after {
    display: none;
  }

  .nav__link:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav .btn-glass {
    margin-top: 6px;
    justify-content: space-between;
  }
}
