/* ==========================================================================
   DESIGN TOKENS — Motion / Easing & Duration Scale
   ==========================================================================

   EASING CURVES
   --motion-ease-standard : General-purpose ease-out for most transitions (hover, fade)
   --motion-ease-emphasis : Slightly stiffer curve for transforms that need weight (scale, slide)
   --motion-ease-carousel : Smooth deceleration for carousel/slide animations
   --motion-ease-enter    : Entry animations — elements appearing on screen (same as standard)

   DURATION SCALE
   --motion-duration-fast        : 180ms — micro-interactions: hover, focus, color changes
   --motion-duration-md          : 420ms — medium transitions: mobile nav open/close, overlays
   --motion-duration-slow        : 680ms — large layout shifts, page-level transitions
   --motion-duration-reveal-fast : 200ms — quick reveal for staggered list items
   --motion-duration-reveal      : 380ms — standard scroll-triggered reveal animations
   --motion-duration-reveal-slow : 460ms — slower reveal for hero or large elements
   --motion-duration-carousel    : 620ms — carousel slide transitions
   --motion-duration-panel       : 360ms — panel expand/collapse (mobile submenu, accordion)

   OTHER
   --motion-delay       : Base delay offset for staggered animations (default 0ms)
   --motion-shadow-lift : Elevated shadow for hover/lift effects on cards
   --nav-shell          : Max width of the navigation bar container (980px)

   ========================================================================== */

:root {
  --nav-shell: 980px;
  --motion-ease-standard: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-ease-emphasis: cubic-bezier(0.2, 0.85, 0.25, 1);
  --motion-ease-carousel: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-duration-fast: 180ms;
  --motion-duration-md: 420ms;
  --motion-duration-slow: 680ms;
  --motion-duration-reveal-fast: 200ms;
  --motion-duration-reveal: 380ms;
  --motion-duration-reveal-slow: 460ms;
  --motion-duration-carousel: 620ms;
  --motion-duration-panel: 360ms;
  --motion-delay: 0ms;
  --motion-shadow-lift: 0 16px 30px rgba(8, 31, 24, 0.12);
}

.site-header {
  position: sticky;
  top: calc(-1 * var(--hero-top, 0px));
  z-index: 20;
  padding: 16px 0;
  background: transparent; /* nav pill sits directly on the hero gradient; no solid mint band behind it */
}

.nav {
  max-width: var(--nav-shell);
  margin: 0 auto;
  padding: 12px 18px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  background: #0b3d2e;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 12px 24px rgba(4, 32, 23, 0.3);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand img {
  width: auto;
  max-height: 28px;
  height: auto;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.nav-mobile-head {
  display: none;
}

.nav-links a {
  transition:
    opacity var(--motion-duration-fast) ease,
    color var(--motion-duration-fast) ease,
    transform var(--motion-duration-fast) var(--motion-ease-standard);
}

.nav-item-has-children {
  position: relative;
  padding-bottom: 14px;
  margin-bottom: -14px;
}

.nav-dropdown-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.nav-dropdown-toggle span {
  display: none;
}

.nav-dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath opacity='0.88' d='M4 6.80078L8 10.8008L12 6.80078' stroke='white' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nav-submenu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 258px;
  padding: 10px;
  display: grid;
  gap: 4px;
  border-radius: 14px;
  background: rgba(8, 36, 27, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 30px rgba(3, 17, 12, 0.24);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--motion-duration-fast) ease,
    transform var(--motion-duration-fast) var(--motion-ease-standard);
  z-index: 25;
}

.nav-submenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 14px;
}

.nav-submenu a {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
}

.nav-submenu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-submenu .nav-submenu-parent {
  display: none;
}

.nav-submenu a::after {
  content: '→';
  flex: 0 0 auto;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 8px;
  opacity: 0;
  transition: opacity var(--motion-duration-fast) ease;
}

.nav-submenu a:hover::after {
  opacity: 1;
}

.nav-submenu a:hover,
.nav-submenu a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-item-has-children:hover .nav-submenu,
.nav-item-has-children:focus-within .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  opacity: 1;
}

.nav-links a:hover {
  transform: translateY(-1px);
}

.nav-links a.btn-light:hover {
  color: #0b3d2e;
}

.nav .btn-light {
  background: #ffffff;
  color: #0f1113;
  border: 1px solid rgba(16, 28, 24, 0.08);
  padding: 10px 18px;
  font-family: 'InterVariable', 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
  opacity: 1;
  transition:
    transform var(--motion-duration-fast) var(--motion-ease-standard),
    box-shadow var(--motion-duration-fast) ease,
    background-color var(--motion-duration-fast) ease;
}

.nav .btn-light:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  display: block;
}

@media (max-width: 1200px) {
  .site-header {
    padding: 14px 24px 0;
  }

  .nav {
    max-width: 100%;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding: 10px 12px 0;
    top: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .nav {
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    gap: 12px;
  }

  .brand img {
    max-height: 22px;
    width: auto;
  }

  .nav-links {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100%;
    min-height: 100dvh;
    background: rgba(73, 73, 73, 0.985);
    padding: 26px 18px 32px;
    border-radius: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    box-shadow: none;
    z-index: 40;
    overflow-y: auto;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -10px, 0);
    transition:
      opacity var(--motion-duration-md) ease,
      transform var(--motion-duration-panel) var(--motion-ease-enter),
      visibility 0s linear var(--motion-duration-md);
  }

  .nav-mobile-head {
    display: flex;
    width: 100%;
    max-width: none;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 22px;
    padding: 0 4px;
    flex-wrap: nowrap;
    align-self: stretch;
    flex: 0 0 auto;
  }

  .nav-mobile-brand {
    display: inline-flex;
    align-self: center;
    flex: 0 1 auto;
  }

  .nav-mobile-brand img {
    max-height: 18px;
    width: auto;
  }

  .nav-mobile-close {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 4px;
    background: #fff;
    color: #323232;
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    align-self: center;
    flex: 0 0 auto;
    margin-left: auto;
    transition:
      transform var(--motion-duration-fast) var(--motion-ease-standard),
      box-shadow var(--motion-duration-fast) ease;
  }

  .nav-mobile-close:hover {
    transform: scale(1.04);
  }

  .nav-links > li:not(.nav-mobile-head) {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 4px;
    opacity: 0;
    transform: translateY(14px);
    transition:
      opacity var(--motion-duration-md) ease,
      transform var(--motion-duration-md) var(--motion-ease-standard);
  }

  .nav-links > li:last-child:not(.nav-mobile-head) {
    display: flex;
    justify-content: flex-start;
    width: 100%;
  }

  .nav-item-has-children {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0;
    margin-bottom: 0;
    width: 100%;
    max-width: none;
  }

  .nav-dropdown-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 44px;
  }

  .nav-dropdown-toggle {
    display: inline-flex;
    position: static;
    transform: none;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 600;
  }

  .nav-dropdown-toggle span {
    width: 0;
    height: 0;
    border: 0;
    transform: none;
    display: none;
  }

  .nav-dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath opacity='0.88' d='M4 6.80078L8 10.8008L12 6.80078' stroke='white' stroke-width='1.33333' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
  }

  .nav-item-has-children.open .nav-dropdown-toggle::after {
    transform: rotate(180deg);
  }

  .nav-links a {
    color: rgba(255, 255, 255, 0.92);
    opacity: 1;
    display: inline-flex;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    max-width: 100%;
    flex: 0 1 auto;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    padding: 12px 0;
    text-align: left;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: #fff;
  }

  .nav-submenu {
    position: static;
    min-width: 0;
    margin-top: 0;
    width: 100%;
    max-width: 320px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    transform: translate3d(0, -6px, 0);
    transition:
      max-height var(--motion-duration-panel) var(--motion-ease-emphasis),
      opacity var(--motion-duration-fast) ease,
      transform var(--motion-duration-fast) var(--motion-ease-standard),
      margin-top var(--motion-duration-fast) ease;
  }

  .nav-item-has-children.open .nav-submenu {
    margin-top: 8px;
    opacity: 1;
    pointer-events: auto;
    max-height: 320px;
    transform: translateY(0);
  }

  .nav-submenu a {
    justify-content: flex-start;
    width: 100%;
    max-width: 320px;
    padding: 8px 0 8px 16px;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    line-height: 1.35;
    white-space: normal;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
  }

  .nav-submenu a::after {
    display: none;
  }

  .nav-submenu .nav-submenu-parent {
    display: flex;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
  }

  .nav-links.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
  }

  .nav-links.open > li:not(.nav-mobile-head) {
    opacity: 1;
    transform: translateY(0);
  }

  .nav-links.open > li:nth-child(2) {
    transition-delay: 40ms;
  }

  .nav-links.open > li:nth-child(3) {
    transition-delay: 80ms;
  }

  .nav-links.open > li:nth-child(4) {
    transition-delay: 120ms;
  }

  .nav-links.open > li:nth-child(5) {
    transition-delay: 160ms;
  }

  .nav .btn-light {
    width: auto;
    min-width: 96px;
    padding: 9px 14px;
    margin-top: 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    align-self: flex-start;
    box-shadow: none;
    color: #0b3d2e;
    background: #ffffff;
    border: none;
    display: inline-flex;
    justify-content: center;
    white-space: nowrap;
  }

  .nav-toggle {
    display: flex;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 8px 10px 0;
  }

  .nav {
    padding: 8px 10px;
    border-radius: 10px;
  }

  .nav-links {
    padding: 24px 16px 28px;
  }
}
