/* ============================================================
   GLASS MORPHISM HEADER & NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid rgba(0, 61, 165, 0.1);
  box-shadow: 0 4px 30px rgba(0, 61, 165, 0.08);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: slideDown 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    backdrop-filter: blur(16px);
  }
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 40px rgba(0, 61, 165, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 76px;
  padding: 0;
  margin: 0;
}

/* Brand styling */
.brand {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.brand__name {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  color: var(--primary-blue);
  line-height: 1;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand__name:hover {
  letter-spacing: -0.01em;
}

.brand__name b {
  color: var(--accent-gray);
  -webkit-text-fill-color: var(--accent-gray);
  font-weight: 600;
  font-style: normal;
}

.brand__tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.56rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-gray);
  margin-top: 4px;
  opacity: 0.75;
  transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand__tag {
  opacity: 1;
}

/* Navigation links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__links a {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.93rem;
  letter-spacing: 0.3px;
  color: var(--ink-soft);
  padding: 0.65rem 1.2rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
  display: block;
}

.nav__links a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 61, 165, 0.08), rgba(0, 61, 165, 0.04));
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 8px;
  z-index: -1;
}

.nav__links a:hover {
  color: var(--primary-blue);
  border-color: rgba(0, 61, 165, 0.2);
  background: rgba(0, 61, 165, 0.05);
  transform: translateY(-3px);
}

.nav__links a:hover::before {
  opacity: 1;
}

.nav__links a.is-active {
  color: var(--primary-blue);
  font-weight: 600;
  background: rgba(0, 61, 165, 0.08);
  border-color: var(--primary-blue);
  box-shadow: 0 8px 24px rgba(0, 61, 165, 0.15);
}

.nav__links a.is-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), rgba(0, 61, 165, 0.3));
  animation: expandWidth 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 2px;
}

@keyframes expandWidth {
  from {
    width: 0;
    left: 50%;
  }
  to {
    width: 100%;
    left: 0;
  }
}

/* CTA button group */
.nav__cta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-left: auto;
}

.nav__cta .btn {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600;
}

.nav__cta .btn--amber {
  background: linear-gradient(135deg, #f5b333, #e8951c);
  box-shadow: 0 8px 24px rgba(232, 149, 28, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav__cta .btn--amber:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(232, 149, 28, 0.35);
  background: linear-gradient(135deg, #f8c855, #ed9f28);
}

/* Mobile toggle button */
.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-left: auto;
}

.nav__toggle:hover {
  border-color: var(--primary-blue);
  background: rgba(0, 61, 165, 0.05);
}

.nav__toggle span {
  width: 20px;
  height: 2px;
  background: var(--primary-blue);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
  border-radius: 1px;
}

.nav__toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.nav__toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu */
@media (max-width: 900px) {
  .nav__toggle {
    display: flex;
  }

  .nav__links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-soft);
    padding: 0.8rem var(--gutter) 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 40px rgba(0, 61, 165, 0.1);
    z-index: 99;
  }

  .nav__links.is-open {
    transform: translateY(0);
  }

  .nav__links a {
    padding: 1rem 0.8rem;
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
    text-align: left;
  }

  .nav__links a:hover {
    background: rgba(0, 61, 165, 0.08);
    border-color: var(--line-soft);
  }

  .nav__links a.is-active {
    background: rgba(0, 61, 165, 0.1);
    box-shadow: none;
  }

  .nav__links a.is-active::after {
    display: none;
  }

  .nav__cta .btn span.hide-sm {
    display: none;
  }

  .nav__cta {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 1rem;
  }

  .brand__name {
    font-size: 1.1rem;
  }

  .brand__tag {
    display: none;
  }

  .nav__links {
    inset: 70px 0 auto 0;
  }
}

/* Texture overlay */
.site-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      rgba(0, 61, 165, 0.02) 0px,
      transparent 1px,
      transparent 2px,
      rgba(0, 61, 165, 0.02) 3px
    );
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.site-header:hover::after {
  opacity: 1;
}

/* Smooth shadow on scroll */
@media (prefers-reduced-motion: no-preference) {
  .site-header {
    transition: box-shadow 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
}
