/* =========================================================
   QUILLIFY — CANONICAL GLOBAL HEADER
   Same header across every page.
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid rgba(232,229,235,.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header .nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
}

.site-header .brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #17151d;
  text-decoration: none;
}

.site-header .brand img {
  width: 108px;
  height: auto;
  display: block;
}

.site-header .brand span {
  color: #17151d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  line-height: 1;
  white-space: nowrap;
}

.site-header .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-left: auto;
  position: relative;
}

.site-header .nav-links > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0;
  color: #5f5b66;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease;
}

.site-header .nav-links > a:hover,
.site-header .nav-links > a.active {
  color: #17151d;
}

.site-header .nav-links > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: #f000c8;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}

.site-header .nav-links > a:hover::after,
.site-header .nav-links > a.active::after {
  transform: scaleX(1);
}

/* ---------- Policies ---------- */

.site-header .policy-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  flex-shrink: 0;
}

.site-header .policy-trigger {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5f5b66;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.site-header .policy-trigger:hover {
  color: #17151d;
}

.site-header .policy-arrow {
  display: inline-flex;
  width: 12px;
  height: 12px;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  transition: transform .2s ease;
}

.site-header .policy-dropdown.open .policy-arrow {
  transform: rotate(180deg);
}

.site-header .policy-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  width: 305px;
  padding: 9px;
  background: rgba(255,255,255,.99);
  border: 1px solid rgba(23,21,29,.09);
  border-radius: 14px;
  box-shadow:
    0 24px 65px rgba(23,21,29,.13),
    0 5px 18px rgba(23,21,29,.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition:
    opacity .2s ease,
    transform .2s ease,
    visibility .2s ease;
  z-index: 9999;
}

.site-header .policy-menu::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  background: #fff;
  border-left: 1px solid rgba(23,21,29,.09);
  border-top: 1px solid rgba(23,21,29,.09);
  transform: translateX(-50%) rotate(45deg);
}

.site-header .policy-dropdown.open .policy-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.site-header .policy-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 10px 13px;
  border-radius: 9px;
  color: #4f4a56;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: normal;
  transition:
    color .18s ease,
    background .18s ease,
    padding-left .18s ease;
}

.site-header .policy-menu a::after {
  content: "↗";
  color: #f000c8;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.site-header .policy-menu a:hover {
  color: #f000c8;
  background: #faf3fa;
  padding-left: 16px;
}

.site-header .policy-menu a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- CTA ---------- */

.site-header .nav-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 21px;
  border-radius: 999px;
  background: #17151d;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.site-header .nav-cta:hover {
  background: #25222c;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(23,21,29,.16);
}

/* ---------- Mobile ---------- */

@media (max-width: 1020px) {
  .site-header .nav {
    gap: 18px;
  }

  .site-header .nav-links {
    gap: 20px;
  }

  .site-header .nav-links > a,
  .site-header .policy-trigger {
    font-size: 14px;
  }
}

@media (max-width: 860px) {
  .site-header .nav {
    min-height: 70px;
  }

  .site-header .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 12px 18px 16px;
    background: rgba(255,255,255,.99);
    border: 1px solid rgba(23,21,29,.09);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 22px 45px rgba(23,21,29,.10);
    z-index: 9998;
  }

  .site-header .nav-links.mobile-open,
  .site-header .nav-links.open {
    display: flex;
  }

  .site-header .nav-links > a {
    width: 100%;
    min-height: 46px;
    height: auto;
    padding: 12px 4px;
    border-radius: 9px;
  }

  .site-header .nav-links > a::after {
    display: none;
  }

  .site-header .policy-dropdown {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .site-header .policy-trigger {
    width: 100%;
    min-height: 46px;
    height: auto;
    justify-content: space-between;
    padding: 12px 4px;
    border-radius: 9px;
  }

  .site-header .policy-menu {
    position: static;
    width: 100%;
    margin: 0;
    padding: 4px 0 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none !important;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-header .policy-dropdown.open .policy-menu {
    display: block;
  }

  .site-header .policy-menu::before {
    display: none;
  }

  .site-header .policy-menu a {
    min-height: 40px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .site-header .nav-cta {
    display: none;
  }

  .site-header .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #17151d;
    font-size: 20px;
    cursor: pointer;
  }
}

@media (min-width: 861px) {
  .site-header .menu-toggle {
    display: none !important;
  }
}
