/* ═══════════════════════════════════════════════════════════════════
   HEADER & NAVIGATION — LIGHT & CLEAN ARCHITECTURAL
   Aesthetic: Pristine, Modern, Premium Canvas
   Trust & Authority: Royal Deep Navy (#0F2B48), Architectural Gold (#B89047)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Animated Blueprint Lines in Header Background ── */
.header-blueprint-lines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 90px;
  z-index: 998;
  pointer-events: none;
  opacity: 0.35;
  transition: opacity 0.5s ease;
}

.site-header.scrolled ~ .header-blueprint-lines,
.site-header.scrolled .header-blueprint-lines {
  opacity: 0.85;
}

.bp-line {
  stroke: rgba(15, 43, 72, 0.06);
  stroke-width: 0.75;
  stroke-dasharray: 8 14;
  animation: blueprintDash 22s linear infinite;
}

.bp-line-1 { animation-delay: 0s; }
.bp-line-2 { animation-delay: -6s; stroke-dasharray: 4 18; stroke: rgba(184, 144, 71, 0.08); }
.bp-line-3 { animation-delay: -12s; stroke-dasharray: 12 10; }
.bp-line-v1 { animation: blueprintDashV 26s linear infinite; animation-delay: -4s; }
.bp-line-v2 { animation: blueprintDashV 26s linear infinite; animation-delay: -9s; stroke: rgba(15, 43, 72, 0.05); }
.bp-line-v3 { animation: blueprintDashV 26s linear infinite; animation-delay: -16s; }

@keyframes blueprintDash {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -200; }
}

@keyframes blueprintDashV {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -180; }
}

/* ── Top Announcement Banner (Luxury Status) ── */
.header-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 36px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  z-index: 1001;
  display: flex;
  align-items: center;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.site-header.scrolled ~ .header-topbar,
body.has-scrolled .header-topbar {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.header-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #475569;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #334155;
  font-weight: 500;
  transition: color 0.25s ease;
}

.topbar-item:hover {
  color: #0F2B48;
}

.topbar-item svg {
  width: 13px;
  height: 13px;
  stroke: #0F2B48;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(15, 43, 72, 0.08);
  border: 1px solid rgba(15, 43, 72, 0.18);
  color: #0F2B48;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #B89047;
  box-shadow: 0 0 8px #B89047;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* ── Site Header Shell ── */
.site-header {
  position: fixed;
  top: 36px;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: top 0.4s ease, background 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1), backdrop-filter 0.45s ease;
  background: transparent;
}

body.has-scrolled .site-header,
.site-header.scrolled {
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.08);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 2rem;
  transition: height 0.35s ease;
}

body.has-scrolled .header-inner,
.site-header.scrolled .header-inner {
  height: 74px;
}

/* ── Logo ── */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

.header-logo-img-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #FFFFFF;
  padding: 3px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  overflow: hidden;
}

.header-logo:hover .header-logo-img-wrapper {
  transform: scale(1.06) rotate(-2deg);
  border-color: #0F2B48;
  box-shadow: 0 6px 18px rgba(15, 43, 72, 0.15);
}

.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  display: block;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-main {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  color: #0F172A;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.logo-main span {
  color: #B89047;
}

.logo-sub {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64748B;
  margin-top: 2px;
}

/* ── Desktop Navigation ── */
.header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.55rem 1.1rem;
  text-decoration: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.015em;
  color: #334155;
  position: relative;
  transition: color 0.3s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  border-radius: 8px;
}

.nav-link:hover {
  color: #0F2B48;
}

.nav-link.active {
  color: #0F2B48;
  font-weight: 700;
}

/* Smooth gradient underline */
.nav-link-underline {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #0F2B48, #B89047);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover .nav-link-underline,
.nav-link.active .nav-link-underline {
  width: 65%;
}

/* Subtle background on hover */
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: rgba(15, 43, 72, 0);
  transition: background 0.3s ease;
}

.nav-link:hover::before {
  background: rgba(15, 43, 72, 0.05);
}

/* ── Header Actions & CTA Button ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 1.65rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #0F2B48 0%, #1A3E6D 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(15, 43, 72, 0.2);
  border-radius: 50px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 4px 18px rgba(15, 43, 72, 0.22);
  flex-shrink: 0;
  z-index: 10;
}

.header-cta:hover {
  background: linear-gradient(135deg, #1A3E6D 0%, #255799 100%);
  color: #FFFFFF !important;
  box-shadow: 0 6px 24px rgba(15, 43, 72, 0.32);
  transform: translateY(-2px);
}

.header-cta:active {
  transform: translateY(0) scale(0.98);
}

.cta-icon {
  display: flex;
  align-items: center;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.header-cta:hover .cta-icon {
  transform: translateX(4px);
}

/* Shimmer animation across CTA button */
.cta-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: ctaShimmer 3.2s ease-in-out infinite;
}

@keyframes ctaShimmer {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

/* ── Mobile Hamburger Toggle ── */
.mobile-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: background 0.3s ease, border-color 0.3s ease;
  z-index: 1010;
}

.mobile-toggle:hover {
  background: #F8FAFC;
  border-color: #0F2B48;
}

.toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #0F172A;
  border-radius: 2px;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}

.mobile-toggle.open .toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: #0F2B48;
}

.mobile-toggle.open .toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-toggle.open .toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: #0F2B48;
}

/* ── Mobile Fullscreen Drawer ── */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(35px) saturate(1.6);
  -webkit-backdrop-filter: blur(35px) saturate(1.6);
  z-index: 1005;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
}

.mobile-menu.open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
}

.mobile-nav-item {
  opacity: 0;
  transform: translateY(22px);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  width: 100%;
  text-align: center;
}

.mobile-menu.open .mobile-nav-item {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-link {
  font-family: 'Space Grotesk', 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  color: #0F172A;
  text-decoration: none;
  padding: 0.65rem 2rem;
  border-radius: 12px;
  display: block;
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #0F2B48;
  background: rgba(15, 43, 72, 0.06);
  transform: scale(1.03);
}

.mobile-menu-footer {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease 0.3s;
}

.mobile-menu.open .mobile-menu-footer {
  opacity: 1;
  transform: translateY(0);
}

.mobile-contact-quick {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: center;
  font-size: 0.85rem;
  color: #64748B;
}

.mobile-contact-quick a {
  color: #0F2B48;
  font-weight: 600;
  text-decoration: none;
}

/* ── Responsive Queries ── */
@media (max-width: 1024px) {
  .header-nav {
    display: none;
  }

  .header-cta:not(.mobile) {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .header-inner {
    height: 72px;
  }

  .header-logo-img-wrapper {
    width: 42px;
    height: 42px;
  }

  .logo-main {
    font-size: 1.25rem;
  }
}

@media (max-width: 640px) {
  .header-topbar {
    display: none;
  }

  .site-header {
    top: 0;
    padding: 0 1rem;
  }

  .header-inner {
    height: 64px;
  }

  .header-logo-img-wrapper {
    width: 38px;
    height: 38px;
  }

  .logo-sub {
    display: none;
  }

  .mobile-nav-link {
    font-size: 1.25rem;
  }
}
