/* ======================================================
   POSH PROVOCATIVE — HEADER
   Desktop: Original three-column navigation
   Mobile: Editorial menu
   ====================================================== */


/* ======================================================
   BASE HEADER
   ====================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;

  background: #ffffff;
  color: #111111;

  font-family: 'AvantGarde', sans-serif;

  border-bottom: 1px solid #e0e0e0;

  z-index: 10000;

  box-sizing: border-box;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 28px 20px;

  max-width: 100%;
  margin: 0 auto;

  position: relative;

  box-sizing: border-box;
}


/* ======================================================
   DESKTOP NAVIGATION
   ====================================================== */

.nav-scroll-container {
  display: contents;
}

.nav {
  display: flex;
  align-items: center;

  gap: 24px;
  flex: 1;
}

.nav-left {
  justify-content: flex-start;
}

.nav-right {
  justify-content: flex-end;
}

.nav-link {
  font-size: 11px;
  font-weight: 900;

  color: #111111;
  text-decoration: none;
  text-transform: uppercase;

  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.5;
}


/* ======================================================
   CENTER LOGO
   ====================================================== */

.logo-wrapper {
  text-align: center;

  flex: 0 0 auto;

  position: absolute;
  left: 50%;

  transform: translateX(-50%);
}

.logo {
  font-family: var(--font-brand, "Jost"), sans-serif;

  font-size: 22px;
  font-weight: 600;

  color: #111111;

  letter-spacing: -0.02em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-logo-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

#post-header-title {
  font-size: 10px;
  letter-spacing: 0.1em;

  color: #666666;
  text-transform: uppercase;

  margin-top: 2px;
}


/* ======================================================
   MOBILE CONTROLS — HIDDEN ON DESKTOP
   ====================================================== */

.mobile-menu-toggle,
.mobile-utility,
.mobile-menu-footer {
  display: none;
}


/* ======================================================
   MOBILE HEADER
   ====================================================== */

@media (max-width: 900px) {

  .header {
    width: 100%;
    z-index: 10000;

    transition: transform 0.3s ease;
  }

  .header-container {
    display: flex;
    flex-direction: row;

    justify-content: space-between;
    align-items: center;

    width: 100%;
    min-height: 58px;

    padding: 10px 18px;

    gap: 0;
  }


  /* LEFT MENU BUTTON */

  .mobile-menu-toggle {
    display: flex;

    flex: 1;

    align-items: center;
    justify-content: flex-start;

    padding: 0;

    border: none;
    background: transparent;

    color: #111111;

    font-family: 'AvantGarde', sans-serif;
    font-size: 11px;
    font-weight: 900;

    letter-spacing: 0.02em;

    cursor: pointer;
  }


  /* CENTER LOGO */

  .logo-wrapper {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    width: max-content;
    max-width: 45%;

    text-align: center;
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-logo-img {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 34px;

    object-fit: contain;
  }

  #post-header-title {
    font-size: 9px;
    margin-top: 2px;
  }


  /* RIGHT UTILITY ICON */

  .mobile-utility {
    display: flex;

    flex: 1;

    align-items: center;
    justify-content: flex-end;

    padding: 0;

    border: none;
    background: transparent;

    color: #111111;

    cursor: pointer;
  }


  /* ==================================================
     MOBILE NAVIGATION PANEL
     ================================================== */

  .nav-scroll-container {
    display: flex;
    flex-direction: column;

    position: fixed;

    top: 58px;
    left: 0;
    right: 0;

    width: 100%;

    height: calc(100vh - 58px);
    height: calc(100dvh - 58px);

    max-height: none;

    padding: 0;
    margin: 0;

    background: #ffffff;
    color: #111111;

    overflow-x: hidden;
    overflow-y: auto;

    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    z-index: 10001;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transform: translateY(-8px);

    transition:
      opacity 0.25s ease,
      transform 0.3s ease,
      visibility 0.3s ease;
  }


  /* OPEN MENU */

  .header.menu-open .nav-scroll-container {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;

    transform: translateY(0);
  }


  /* NAVIGATION GROUPS */

  .nav {
    display: flex;
    flex-direction: column;

    align-items: stretch;

    flex: 0 0 auto;

    width: 100%;

    gap: 0;
    margin: 0;
    padding: 0;
  }

  .nav-left,
  .nav-right {
    justify-content: flex-start;
  }


  /* LARGE EDITORIAL LINKS */

  .nav-link {
    display: flex;
    align-items: center;

    width: 100%;
    min-height: 61px;

    padding: 0 20px;

    box-sizing: border-box;

    font-family: 'AvantGarde', sans-serif;

    font-size: 23px;
    font-weight: 900;

    line-height: 1.1;
    letter-spacing: -0.045em;

    color: #111111;

    text-decoration: none;
    text-transform: uppercase;

    border-bottom: 1px solid #e5e5e5;

    transition:
      background 0.2s ease,
      padding-left 0.2s ease;
  }

  .nav-link:hover {
    opacity: 1;

    background: #f7f7f7;
    padding-left: 26px;
  }


  /* ==================================================
     NEWSLETTER SECTION
     ================================================== */

  .mobile-menu-footer {
    display: block;

    width: 100%;

    background: #ffffff;

    margin-top: auto;
  }

  .mobile-newsletter {
    padding: 22px 20px;

    background: #111111;
    color: #ffffff;
  }

  .mobile-newsletter-title {
    margin: 0 0 18px;

    font-family: 'AvantGarde', sans-serif;

    font-size: 10px;
    font-weight: 900;

    line-height: 1.5;
    text-transform: uppercase;
  }

  .mobile-newsletter-link {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding-bottom: 8px;

    border-bottom: 1px solid rgba(255,255,255,0.7);

    color: #ffffff;

    font-size: 11px;
    font-weight: 900;

    text-decoration: none;
  }

  .mobile-newsletter-link span {
    font-size: 18px;
  }


  /* ==================================================
     MENU FOOTER
     ================================================== */

  .mobile-menu-legal,
  .mobile-menu-social,
  .mobile-menu-copyright {
    display: flex;
    flex-direction: column;

    gap: 8px;

    padding: 17px 20px;

    border-bottom: 1px solid #e5e5e5;
  }

  .mobile-menu-legal a,
  .mobile-menu-social a {
    color: #111111;

    font-family: 'AvantGarde', sans-serif;

    font-size: 10px;
    font-weight: 900;

    text-decoration: none;
    text-transform: uppercase;
  }

  .mobile-menu-copyright {
    font-size: 10px;
    font-weight: 900;
  }


  /* ==================================================
     SCROLL BEHAVIOR
     ================================================== */

  .header.nav-hidden:not(.menu-open) {
    transform: translateY(-100%);
  }

  .header.menu-open {
    transform: translateY(0);
  }


  /* PREVENT BACKGROUND SCROLL */

  body.mobile-menu-active {
    overflow: hidden;
  }


  /* ACCESSIBILITY */

  .mobile-menu-toggle:focus-visible,
  .mobile-utility:focus-visible {
    outline: 1px solid #111111;
    outline-offset: 4px;
  }

}


/* ======================================================
   DESKTOP RESTORATION
   ====================================================== */

@media (min-width: 901px) {

  .header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;

    transform: none;
  }

  .header-container {
    display: flex;
    flex-direction: row;

    justify-content: space-between;
    align-items: center;

    padding: 28px 20px;

    gap: 0;
  }

  .nav-scroll-container {
    display: contents;

    position: static;

    width: auto;
    height: auto;

    padding: 0;
    margin: 0;

    overflow: visible;

    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: none;

    background: transparent;
  }

  .nav {
    display: flex;
    flex-direction: row;

    align-items: center;

    flex: 1;
    width: auto;

    gap: 24px;
  }

  .nav-left {
    justify-content: flex-start;
  }

  .nav-right {
    justify-content: flex-end;
  }

  .nav-link {
    width: auto;
    min-height: 0;

    padding: 0;

    font-size: 11px;

    border: none;
    background: transparent;
  }

  .nav-link:hover {
    opacity: 0.5;
    padding-left: 0;
  }

  .logo-wrapper {
    position: absolute;

    left: 50%;
    top: auto;

    transform: translateX(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: auto;
    max-width: none;
  }

  /* DESKTOP LOGO SIZE — CONTAINED WITHIN HEADER */

  .site-logo-img {
    display: block;

    width: auto;
    height: auto;

    max-height: 42px;
    max-width: 240px;

    object-fit: contain;
  }

  .mobile-menu-toggle,
  .mobile-utility,
  .mobile-menu-footer {
    display: none;
  }

}