/* Simpl Fulfillment site header. Self-contained — no Webflow dependencies. */

:root {
  --sf-header-height: 4.5rem;
}

.sf-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  font-family: Poppins, "Poppins-fallback", Arial, sans-serif;
}

.sf-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: var(--sf-header-height);
  padding: 0 1.25rem;
  max-width: 80rem;
  margin: 0 auto;
}

.sf-header__logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.sf-header__logo img {
  display: block;
  height: 3rem;
  width: auto;
}

.sf-header__nav {
  flex: 1;
  display: flex;
  align-self: stretch;
}

.sf-header__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: .25rem;
  width: 100%;
}

.sf-header__item {
  position: relative;
  display: flex;
  align-items: center;
}

.sf-header__link {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  padding: .625rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #081f4d;
  text-decoration: none;
  background: none;
  border: 0;
  border-radius: .375rem;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: background-color 120ms ease, color 120ms ease;
}

.sf-header__link:hover,
.sf-header__link:focus-visible {
  background: #f1f4f9;
  color: #0070d6;
}

.sf-header__link:focus-visible {
  outline: 2px solid #0070d6;
  outline-offset: 2px;
}

.sf-header__chevron {
  width: .75rem;
  height: .75rem;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.sf-header__link[aria-expanded="true"] .sf-header__chevron {
  transform: rotate(180deg);
}

.sf-header__submenu {
  list-style: none;
  margin: 0;
  padding: .5rem 0;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 16rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .5rem;
  box-shadow: 0 12px 32px rgba(8, 31, 77, .12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-.25rem);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms;
}

.sf-header__submenu a {
  display: block;
  padding: .75rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: #081f4d;
  text-decoration: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.sf-header__submenu a:hover,
.sf-header__submenu a:focus-visible {
  background: #f1f4f9;
  color: #0070d6;
}

.sf-header__item:hover .sf-header__submenu,
.sf-header__item:focus-within .sf-header__submenu,
.sf-header__link[aria-expanded="true"] + .sf-header__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sf-header__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .875rem 1.5rem;
  background: #0070d6;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: .375rem;
  transition: background-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

.sf-header__cta:hover,
.sf-header__cta:focus-visible {
  background: #0066c8;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 112, 214, .3);
}

.sf-header__cta:focus-visible {
  outline: 2px solid #0070d6;
  outline-offset: 2px;
}

.sf-header__hamburger {
  display: none;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: .375rem;
  cursor: pointer;
  position: relative;
}

.sf-header__hamburger:focus-visible {
  outline: 2px solid #0070d6;
  outline-offset: 2px;
}

.sf-header__hamburger-line {
  position: absolute;
  left: 50%;
  width: 1.375rem;
  height: 2px;
  background: #081f4d;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 200ms ease, opacity 150ms ease, top 200ms ease;
}

.sf-header__hamburger-line:nth-child(1) { top: calc(50% - .4rem); transform: translate(-50%, -50%); }
.sf-header__hamburger-line:nth-child(2) { top: 50%; transform: translate(-50%, -50%); }
.sf-header__hamburger-line:nth-child(3) { top: calc(50% + .4rem); transform: translate(-50%, -50%); }

@media (max-width: 991px) {
  .sf-header__bar {
    padding: 0 1rem;
    gap: .5rem;
  }

  .sf-header__nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 12px 24px rgba(8, 31, 77, .08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease;
  }

  .sf-header[data-menu-open="true"] .sf-header__nav {
    max-height: calc(100dvh - var(--sf-header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .sf-header__list {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: .25rem 1rem 1.5rem;
  }

  .sf-header__item {
    border-bottom: 1px solid #f1f1f1;
  }

  .sf-header__item:last-child {
    border-bottom: none;
  }

  .sf-header__link {
    width: 100%;
    justify-content: space-between;
    padding: 1.125rem .25rem;
    font-size: 1.0625rem;
    color: #081f4d;
    border-radius: 0;
  }

  .sf-header__link:hover,
  .sf-header__link:focus,
  .sf-header__link:focus-visible {
    background: transparent;
    color: #081f4d;
  }

  .sf-header__link:focus-visible {
    outline: 2px solid #0070d6;
    outline-offset: -2px;
  }

  .sf-header__submenu-toggle:active {
    background: rgba(0, 112, 214, .06);
  }

  .sf-header__submenu-toggle[aria-expanded="true"] {
    color: #0070d6;
  }

  .sf-header__chevron {
    width: .9rem;
    height: .9rem;
    color: #6b7280;
    stroke: currentColor;
    stroke-width: .5;
  }

  .sf-header__submenu-toggle[aria-expanded="true"] .sf-header__chevron {
    color: #0070d6;
  }

  .sf-header__submenu {
    position: static;
    box-shadow: none;
    border: none;
    background: transparent;
    border-radius: .5rem;
    padding: 0;
    margin: 0;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
    display: none;
  }

  /* Override desktop hover-show on touch — only the explicit toggle opens it. */
  .sf-header__item:hover .sf-header__submenu,
  .sf-header__item:focus-within .sf-header__submenu {
    display: none;
  }

  .sf-header__link[aria-expanded="true"] + .sf-header__submenu {
    display: block;
    background: #f8fafc;
    padding: .25rem 0;
    margin: 0 0 .5rem;
  }

  .sf-header__submenu a {
    padding: .75rem 1rem;
    font-size: .9375rem;
  }

  .sf-header__cta {
    padding: .75rem 1.125rem;
    font-size: .95rem;
    margin-left: auto;
  }

  .sf-header__hamburger {
    display: inline-block;
  }

  .sf-header[data-menu-open="true"] .sf-header__hamburger-line:nth-child(1) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .sf-header[data-menu-open="true"] .sf-header__hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .sf-header[data-menu-open="true"] .sf-header__hamburger-line:nth-child(3) {
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-header *,
  .sf-header *::before,
  .sf-header *::after {
    transition: none !important;
  }
}
