/* Lenis Smooth Scroll Styles */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}
.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Header CSS - Prefix: .header- */

.header-nav {
  position: fixed;
  top: 24px; /* Float from the top */
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1200px;
  z-index: 1050;
  padding: 12px 28px;
  border-radius: 100px; /* High-end floating capsule design */
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  background-color: rgba(15, 23, 42, 0.3); /* Translucent dark glass for hero compatibility */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
  font-family: 'Inter', sans-serif;
}

/* Morph to light glass on scroll */
.header-nav-scrolled {
  top: 16px; /* Shift slightly on scroll */
  padding: 8px 24px;
  background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent light glass */
  border: 1px solid rgba(163, 29, 36, 0.08); /* Crimson glowing borders */
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08); /* Smooth shadow depth */
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.header-brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.1;
  transition: opacity 0.3s ease;
}

.header-brand:hover {
  opacity: 0.9;
}

.header-logo-main {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.5px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-nav-scrolled .header-logo-main {
  color: #0F172A;
}

/* Red accent marker on branding logo */
.header-logo-accent {
  color: #A31D24;
}

.header-logo-sub {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-top: 3px;
  transition: color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-nav-scrolled .header-logo-sub {
  color: #64748B;
}

.header-menu-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.header-menu-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px; /* Small gap between pill links */
}

.header-menu-item {
  margin: 0;
  padding: 0;
}

.header-link {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 30px; /* Pill layout for navigation links */
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.header-nav-scrolled .header-link {
  color: #475569;
}

.header-link:hover {
  color: #FFFFFF !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.header-nav-scrolled .header-link:hover {
  color: #A31D24 !important;
  background-color: rgba(163, 29, 36, 0.05); /* Subtle red pill hover highlight */
}

.header-link-active {
  color: #FFFFFF !important;
  background-color: rgba(255, 255, 255, 0.15);
}

.header-nav-scrolled .header-link-active {
  color: #A31D24 !important;
  background-color: rgba(163, 29, 36, 0.08); /* Translucent red active pill */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Call-to-action quote button styled as premium capsule */
.header-btn {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 26px;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.header-btn-primary {
  background: linear-gradient(135deg, #A31D24 0%, #8B181E 100%);
  color: #FFFFFF !important;
  border: none;
  box-shadow: 0 4px 15px rgba(163, 29, 36, 0.2);
}

.header-btn-primary:hover {
  background: linear-gradient(135deg, #B5222A 0%, #9C1B22 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(163, 29, 36, 0.35);
}

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

.header-toggler {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  z-index: 1100;
}

.header-toggler-bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background-color: #FFFFFF;
  transition: all 0.3s ease;
}

.header-nav-scrolled .header-toggler-bar {
  background-color: #111827;
}

/* Mobile responsive menu */
@media (max-width: 991.98px) {
  .header-nav {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px 24px;
    background-color: rgba(17, 24, 39, 0.95);
    box-shadow: none;
  }

  .header-nav-scrolled {
    top: 0;
    padding: 16px 24px;
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .header-logo-main {
    font-size: 20px;
  }

  .header-logo-sub {
    font-size: 7px;
    letter-spacing: 2px;
  }

  .header-link {
    color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 8px;
    padding: 10px 16px;
    width: 100%;
    display: block;
  }

  .header-nav-scrolled .header-link {
    color: #334155 !important;
  }

  .header-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
  }

  .header-nav-scrolled .header-link:hover {
    background-color: rgba(163, 29, 36, 0.05);
  }

  .header-link-active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #A31D24 !important;
  }

  .header-nav-scrolled .header-link-active {
    background-color: rgba(163, 29, 36, 0.08) !important;
    color: #A31D24 !important;
  }

  .header-toggler {
    display: block;
  }

  .header-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: #0F172A;
    padding: 100px 32px 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1080;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
  }

  .header-nav-scrolled .header-menu-container {
    background-color: #FFFFFF;
    border-left: 1px solid #E2E8F0;
  }

  .header-menu-container.header-menu-open {
    right: 0;
  }

  .header-menu-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 16px;
  }

  .header-btn {
    text-align: center;
    width: 100%;
  }

  /* Hamburger transform animation */
  .header-toggler-active .header-toggler-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .header-toggler-active .header-toggler-bar:nth-child(2) {
    opacity: 0;
  }
  .header-toggler-active .header-toggler-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
