/* ============================================================
   unify.css — pulls the header, right-side popout nav, and footer
   on every page to the our-story standard. Linked LAST so it wins.
   Header/nav classes are shared across subpage.css + styles.css; the
   #-id selectors cover what-we-build (subpage-v3.css). The footer
   classes are identical on every page.
   ============================================================ */

/* ---------- Masthead logo (3 subpages: contact / who-we-are / media) ---------- */
.subpage-masthead-logo {
  top: 16px !important;
  left: 18px !important;
  width: min(45vw, 180px) !important;
  z-index: 50 !important;
}
.subpage-masthead-logo img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  display: block !important;
}

/* ---------- Hamburger: corner placement, sits below the overlay ---------- */
.hamburger,
#hamburger {
  top: 8px !important;
  right: 8px !important;
  z-index: 51 !important;
}

/* Web: nudge the hamburger down so it centers against the larger logo. */
@media (min-width: 769px) {
  .hamburger,
  #hamburger { top: 16px !important; }
}

/* ---------- Popout overlay: right sidebar, above everything so it fully
   covers the logo + hamburger when open (single close X, never two) ---------- */
.menu-overlay,
#menu-overlay {
  min-width: 0 !important;
  z-index: 1000 !important;
}
@media (max-width: 768px) {
  .menu-overlay,
  #menu-overlay { width: 88vw !important; }
}
@media (min-width: 769px) {
  .menu-overlay,
  #menu-overlay { width: 33.333vw !important; min-width: 360px !important; }
}

/* Menu logo: width capped so it can't render at native size (this was the
   giant logo on what-we-build) and height auto so it never skews. */
.menu-logo {
  width: 64px !important;
  height: auto !important;
}

/* what-we-build runs its own popout (aside#menu-overlay with .menu-item links).
   Pull it to the other pages' look: 64px logo, 24px cream links, tight spacing. */
aside#menu-overlay { padding: 72px 8vw 32px !important; }
aside#menu-overlay .menu-inner { gap: 14px !important; }
aside#menu-overlay .menu-logo { margin-bottom: 8px !important; opacity: 1 !important; }
aside#menu-overlay .menu-item {
  font-size: 24px !important;
  font-weight: 400 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  color: #F2EDE8 !important;
  margin: 0 !important;
}

/* ---------- Unified close (X) button inside the open menu ---------- */
.menu-close {
  position: absolute;
  top: 16px;
  right: 14px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  z-index: 1001;
}
.menu-close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 1.6px;
  border-radius: 2px;
  background: #F2EDE8;
}
.menu-close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.menu-close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Footer partner logos: one line, height-based sizing.
   Height-only (auto width) preserves each logo's aspect ratio, which
   fixes the stretched SKYWASP mark caused by --capped pinning width. ---------- */
.footer-partners {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: clamp(4px, 1.5vw, 10px) !important;
}
.footer-partner-logo,
.footer-partner-logo--capped {
  height: clamp(12px, 3.2vw, 17px) !important;
  width: auto !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
}
/* SKYWASP is a long wordmark, so at equal height it dominates the row.
   Bring it down ~30% so the others read and the row balances. */
.footer-partners img[src*="skywasp"] {
  height: clamp(8px, 2.2vw, 12px) !important;
}

/* ---------- Desktop: group the partner logos to the right instead of
   spreading them edge-to-edge across the footer (matches the homepage
   treatment). Mobile keeps the full-width space-between row. ---------- */
@media (min-width: 769px) {
  .footer-partners {
    width: 100% !important;
    justify-content: flex-end !important;
    gap: clamp(22px, 2.4vw, 44px) !important;
  }
  /* Equal width across the partner marks so MASNA/REDSALT aren't dwarfed
     by the wordmarks. Height auto preserves each logo's aspect. */
  .footer-partner-logo,
  .footer-partner-logo--capped {
    width: clamp(86px, 8vw, 106px) !important;
    height: auto !important;
  }
  /* SKYWASP is a long wordmark, so hold it a touch under the common width. */
  .footer-partners img[src*="skywasp"] {
    width: clamp(72px, 6.6vw, 90px) !important;
    height: auto !important;
  }
}

/* ---------- Homepage logo: unify to the subpage size/placement on mobile.
   Both docking logos (dark + white scroll-swap) are matched; the desktop
   hero and the scroll opacity-swap are left untouched. z-index is kept high
   so the logo still sits above the scroll scenes. ---------- */
@media (max-width: 768px) {
  #docking-logo,
  #docking-logo-white-h2 {
    top: 16px !important;
    left: 18px !important;
  }
  #docking-logo img,
  #docking-logo-white-h2 img {
    width: min(45vw, 180px) !important;
    max-width: 180px !important;
    height: auto !important;
  }
}

/* ---------- Footer brand (mobile <=480): full-width row, square logo on the
   left, tagline filling to the right -- matches the mockup. The site stacks
   this into a centered column at this width; this restores the row. ---------- */
@media (max-width: 480px) {
  /* the tall vertical separator becomes a big empty gap when stacked -> hide */
  .footer-sep { display: none !important; }

  .footer-brand {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(10px, 3vw, 16px) !important;
    width: 100% !important;
    text-align: left !important;
  }
  .footer-brand-logo {
    width: clamp(77px, 24vw, 112px) !important;   /* ~20% smaller */
    height: auto !important;
  }
  .footer-brand-tagline {
    flex: 1 !important;
    text-align: left !important;
    max-width: none !important;
    font-size: clamp(12px, 3.4vw, 15px) !important;
  }
  .footer-brand-tagline-strong,
  .footer-brand-tagline-soft {
    text-align: left !important;
    white-space: nowrap !important;   /* keep each tagline line on one row */
  }

  /* Nav: two vertical columns, each link on one line (not a cramped row). */
  .footer-nav {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    width: 100% !important;
    gap: clamp(32px, 14vw, 72px) !important;
  }
  .footer-nav-col {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: clamp(11px, 3.4vw, 16px) !important;
  }
  .footer-link {
    white-space: nowrap !important;
    font-size: clamp(12px, 3.4vw, 14px) !important;
  }

  /* Partner logos: size each individually so they read balanced like the
     mockup. Equal height makes the wide SKYWASP wordmark dominate while the
     compact MASNA / REDSALT (icon + small text) marks look tiny. */
  .footer-partners { gap: clamp(10px, 3.5vw, 18px) !important; }
  .footer-partner-logo,
  .footer-partner-logo--capped { height: clamp(15px, 4.6vw, 21px) !important; }   /* SR2VECTOR + default */
  .footer-partners img[src*="skywasp"] { height: clamp(9px, 2.6vw, 12px) !important; }
  .footer-partners img[src*="masna"]   { height: clamp(20px, 6vw, 27px) !important; }
  .footer-partners img[src*="redsalt"] { height: clamp(20px, 6vw, 27px) !important; }
}
