/* ============================================================
   NAV.CSS — Site nav bar + split-panel menu overlay
   ============================================================ */

:root {
  --nav-height: 82px;
  --nav-bg: #47494f;
  --nav-bg-white: #ffffff;
  --menu-bg: #111;
  --red: #ed1c24;
  --red-dk: #c01820;
}

/* ============================================================
   SITE NAV BAR
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 300;
  height: var(--nav-height);
  background: var(--nav-bg);
  width: 100%;
}

/* About, inner pages — white nav */
.page-template-template-about .site-nav,
.page-template-template-our-model .site-nav,
.page-template-template-industry .site-nav,
.page-template-template-faces .site-nav,
.single .site-nav,
.blog .site-nav,
.archive .site-nav,
.error404 .site-nav,
.search .site-nav,
.page .site-nav:not(.home .site-nav) {
  background: var(--nav-bg-white);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* On white nav, make text/lines dark */
.page-template-template-about .nav-logo__text,
.page-template-template-our-model .nav-logo__text,
.page-template-template-industry .nav-logo__text,
.single .nav-logo__text,
.blog .nav-logo__text,
.archive .nav-logo__text,
.error404 .nav-logo__text,
.search .nav-logo__text,
.page .nav-logo__text {
  color: var(--nav-bg, #47494f);
}
.page-template-template-about .nav-cta,
.page-template-template-our-model .nav-cta,
.page-template-template-industry .nav-cta,
.single .nav-cta,
.blog .nav-cta,
.archive .nav-cta,
.error404 .nav-cta,
.search .nav-cta,
.page .nav-cta {
  color: #47494f;
  border-color: rgba(71, 73, 79, 0.35);
}
.error404 .nav-search-btn,
.search .nav-search-btn,
.page-template-template-about .nav-search-btn,
.page-template-template-our-model .nav-search-btn,
.page-template-template-industry .nav-search-btn,
.single .nav-search-btn,
.blog .nav-search-btn,
.archive .nav-search-btn,
.page .nav-search-btn {
  color: #47494f;
  border-color: rgba(71, 73, 79, 0.35);
}
.page-template-template-about .nav-cta:hover,
.page-template-template-our-model .nav-cta:hover,
.page-template-template-industry .nav-cta:hover,
.single .nav-cta:hover,
.blog .nav-cta:hover,
.archive .nav-cta:hover,
.error404 .nav-cta:hover,
.search .nav-cta:hover,
.page .nav-cta:hover {
  background: rgba(71, 73, 79, 0.08);
  border-color: rgba(71, 73, 79, 0.6);
}
.page-template-template-about .hamburger__line,
.page-template-template-our-model .hamburger__line,
.page-template-template-industry .hamburger__line,
.single .hamburger__line,
.blog .hamburger__line,
.archive .hamburger__line,
.error404 .hamburger__line,
.search .hamburger__line,
.page .hamburger__line {
  background: #47494f;
}

.nav-inner {
  height: var(--nav-height);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav-logo__img {
  height: 36px;
  width: auto;
  display: block;
}
.nav-logo__text {
  font-family: var(--font-display, "Barlow Condensed", sans-serif);
  font-size: 22px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: -0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-search-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.nav-search-btn:hover {
  background: var(--color-red, #ed1c24);
  border-color: var(--color-red, #ed1c24);
  color: #fff;
}

.nav-cta {
  font-family: var(--font-body, "Noto Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  padding: 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 25px 25px 0 25px;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.nav-cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.7);
}

.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
}
.hamburger__line {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition:
    width 0.25s ease,
    transform 0.25s ease,
    opacity 0.25s ease;
}
.hamburger__line:nth-child(1) {
  width: 24px;
}
.hamburger__line:nth-child(2) {
  width: 16px;
}
.hamburger__line:nth-child(3) {
  width: 20px;
}
.hamburger:hover .hamburger__line {
  width: 24px;
}
.hamburger.is-active .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 24px;
}
.hamburger.is-active .hamburger__line:nth-child(2) {
  opacity: 0;
  width: 0;
}
.hamburger.is-active .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 24px;
}

/* ============================================================
   MENU OVERLAY — Split Panel
   ============================================================ */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  background: var(--menu-bg, #171614);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.55s cubic-bezier(0.77, 0, 0.18, 1),
    visibility 0s linear 0.55s;
}
.menu-overlay.is-open {
  transform: translateX(0);
  visibility: visible;
  transition:
    transform 0.55s cubic-bezier(0.77, 0, 0.18, 1),
    visibility 0s linear 0s;
}

/* ── Topbar — logo + close ───────────────────────────────── */
.menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 56px;
  flex-shrink: 0;
}
.menu-logo img {
  height: 34px;
  width: auto;
  display: block;
}
.menu-logo span {
  font-family: var(--font-display, "Barlow Condensed", sans-serif);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
}
.menu-close {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition:
    border-color 0.2s,
    background 0.2s;
  flex-shrink: 0;
}
.menu-close:hover {
  border-color: var(--red, #ed1c24);
  background: rgba(237, 28, 36, 0.08);
}
.menu-close span {
  position: absolute;
  display: block;
  width: 16px;
  height: 1.5px;
  background: #fff;
  border-radius: 1px;
}
.menu-close span:first-child {
  transform: rotate(45deg);
}
.menu-close span:last-child {
  transform: rotate(-45deg);
}

/* ── Stage — grid view + detail (drill-down) view ────────── */
.menu-stage {
  position: relative;
  flex: 1;
  padding: 8px 56px 48px;
}
.menu-grid,
.menu-detail {
  position: absolute;
  inset: 8px 56px 48px;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* ── Grid view — tile size encodes how deep each section is ── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  grid-template-areas:
    "work work humanity capabilities"
    "work work about capabilities"
    "insights insights contact capabilities";
}
/* Dedicated layout for exactly 5 top-level items (e.g. while
   Capabilities is temporarily removed from the menu) — Work
   stays large, the remaining four fill a clean 2x2 grid rather
   than falling back to plain even columns. */
.menu-grid.menu-grid--five {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  grid-template-areas:
    "work work humanity about"
    "work work insights contact";
}

/* Fallback when the Primary Navigation menu doesn't have exactly
   6 top-level items — plain even grid instead of the fixed bento
   layout, so the menu still works rather than breaking. */
.menu-grid.menu-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  grid-template-rows: none;
  grid-template-areas: none;
}
.menu-grid.menu-grid--auto .menu-tile {
  grid-area: auto;
}
.menu-grid.is-hidden {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

.menu-tile {
  position: relative;
  border-radius: 6px;
  background: var(--menu-tile-bg, #201f1c);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  transition: background 0.25s;
  border: none;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.menu-tile:hover {
  background: var(--menu-tile-bg-hover, #262521);
}
.menu-tile::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red, #ed1c24);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.3s ease;
}
.menu-tile:hover::after {
  transform: scaleY(1);
}

.menu-tile[data-section="work"] {
  grid-area: work;
}
.menu-tile[data-section="humanity"] {
  grid-area: humanity;
}
.menu-tile[data-section="capabilities"] {
  grid-area: capabilities;
}
.menu-tile[data-section="about"] {
  grid-area: about;
}
.menu-tile[data-section="insights"] {
  grid-area: insights;
}
.menu-tile[data-section="contact"] {
  grid-area: contact;
}

.menu-tile--direct {
  background: var(--red, #ed1c24);
}
.menu-tile--direct:hover {
  background: var(--red-dark, #c01820);
}
.menu-tile--direct::after {
  display: none;
}

.menu-tile__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.menu-tile__count {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}
.menu-tile--direct .menu-tile__count {
  color: rgba(255, 255, 255, 0.75);
}
.menu-tile__arrow {
  display: inline-flex;
  color: rgba(255, 255, 255, 0.25);
  transition: all 0.25s;
}
.menu-tile__arrow svg {
  display: block;
}
.menu-tile:hover .menu-tile__arrow {
  color: var(--red, #ed1c24);
  transform: translate(3px, -3px);
}
.menu-tile--direct .menu-tile__arrow {
  color: rgba(255, 255, 255, 0.6);
}
.menu-tile--direct:hover .menu-tile__arrow {
  color: #fff;
}

.menu-tile__title {
  font-family: var(--font-display, "Barlow Condensed", sans-serif);
  font-weight: 500;
  font-size: 48px;
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: normal;
  color: #fff;
}
.menu-tile[data-section="work"] .menu-tile__title {
  font-size: 82px;
}
.menu-tile[data-section="capabilities"] .menu-tile__title,
.menu-tile[data-section="humanity"] .menu-tile__title,
.menu-tile[data-section="about"] .menu-tile__title,
.menu-tile[data-section="insights"] .menu-tile__title,
.menu-tile[data-section="contact"] .menu-tile__title {
  font-size: 42px;
}

/* ── Detail view — drill-down for a category tile ────────── */
.menu-detail {
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.menu-detail.is-shown {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.menu-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  background: none;
  border: none;
  cursor: pointer;
  margin-bottom: 24px;
  transition: color 0.2s;
  align-self: flex-start;
}
.menu-back:hover {
  color: var(--red, #ed1c24);
}
.menu-detail__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red, #ed1c24);
  margin-bottom: 14px;
}
.menu-detail__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
}
.menu-detail__title {
  font-family: var(--font-display, "Barlow Condensed", sans-serif);
  font-weight: 900;
  font-size: clamp(32px, 4vw, 56px);
  text-transform: uppercase;
  line-height: 0.95;
  letter-spacing: -1px;
  color: #fff;
}
.menu-detail__overview {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px 25px 0 25px;
  padding: 11px 22px;
  text-decoration: none;
  transition: all 0.2s;
}
.menu-detail__overview:hover {
  border-color: var(--red, #ed1c24);
  color: var(--red, #ed1c24);
}
.menu-detail__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 24px;
}
.menu-detail__links.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 600px;
}
.menu-detail__links.cols-1 {
  grid-template-columns: 1fr;
  max-width: 340px;
}
.menu-detail__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.menu-detail__link span.t {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}
.menu-detail__link span.a {
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
}
.menu-detail__link:hover {
  background: rgba(237, 28, 36, 0.12);
  border-color: rgba(237, 28, 36, 0.4);
}
.menu-detail__link:hover span.t {
  color: #fff;
}
.menu-detail__link:hover span.a {
  color: var(--red, #ed1c24);
  transform: translateX(3px);
}

/* ============================================================
   PAGE HERO (shared across templates)
   ============================================================ */
.page-hero {
  padding: clamp(80px, 10vw, 120px) 0 clamp(56px, 7vw, 80px);
  position: relative;
  overflow: hidden;
  background: var(--color-dark, #2c2e35);
}
.page-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.page-hero .container {
  position: relative;
  z-index: 2;
}
.page-hero__eyebrow {
  font-family: var(--font-body, "Noto Sans", sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--red, #ed1c24);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-hero__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--red, #ed1c24);
}
.page-hero__headline {
  font-family: var(--font-display, "Barlow Condensed", sans-serif);
  font-size: clamp(44px, 6vw, 80px);
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  line-height: 0.92;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
}
.page-hero__headline em {
  color: var(--red, #ed1c24);
  font-style: normal;
}
.page-hero__sub {
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.75;
  max-width: 640px;
}
.page-section {
  padding: var(--pad-sec, clamp(56px, 7vw, 96px)) 0;
  background: #fff;
}
.page-section.off {
  background: var(--color-off, #f8f7f5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root {
    --nav-height: 68px;
  }

  .menu-topbar {
    padding: 20px 24px;
  }
  .menu-logo img {
    height: 26px;
  }
  .menu-stage {
    padding: 8px 24px 32px;
  }
  .menu-grid,
  .menu-detail {
    inset: 8px 24px 32px;
  }
  .menu-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(5, minmax(90px, auto));
    gap: 8px;
    overflow-y: auto;
    grid-template-areas:
      "work work"
      "capabilities capabilities"
      "humanity about"
      "insights contact";
  }
  .menu-grid.menu-grid--five {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, minmax(90px, auto));
    grid-template-areas:
      "work work"
      "humanity about"
      "insights contact";
  }
  .menu-tile {
    padding: 18px 20px;
  }
  .menu-tile[data-section="work"] .menu-tile__title {
    font-size: clamp(30px, 9vw, 44px);
  }
  .menu-tile[data-section="capabilities"] .menu-tile__title {
    font-size: clamp(20px, 6vw, 26px);
  }
  .menu-detail__title {
    font-size: clamp(28px, 8vw, 40px);
  }
  .menu-detail__links,
  .menu-detail__links.cols-2,
  .menu-detail__links.cols-3 {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}
@media (max-width: 600px) {
  .nav-inner {
    padding: 0 20px;
  }
  .nav-cta {
    display: none;
  }
  .menu-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, minmax(76px, auto));
    grid-template-areas:
      "work"
      "capabilities"
      "humanity"
      "about"
      "insights"
      "contact";
  }
  .menu-grid.menu-grid--five {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, minmax(76px, auto));
    grid-template-areas:
      "work"
      "humanity"
      "about"
      "insights"
      "contact";
  }
  .menu-tile__title {
    font-size: clamp(26px, 9vw, 34px) !important;
  }
  .menu-detail__head {
    gap: 14px;
  }
  .menu-detail__overview {
    padding: 9px 18px;
    font-size: 11px;
  }
}

/* ============================================================
   SEARCH MODAL — triggered by the header search icon
   ============================================================ */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 600; /* above the mosaic menu overlay (500) */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0s linear 0.25s;
}
.search-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.25s ease,
    visibility 0s linear 0s;
}
.search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.75);
}
.search-modal__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  margin-top: clamp(80px, 14vh, 160px);
  padding: 0 24px;
}
.search-modal__close {
  position: absolute;
  top: -48px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  display: flex;
  transition: opacity 0.18s;
}
.search-modal__close:hover {
  opacity: 0.7;
}
.search-modal__form {
  display: flex;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.search-modal__input {
  flex: 1;
  padding: 20px 24px;
  border: none;
  border-radius: 4px 0 0 4px;
  background: #fff;
  color: var(--color-black, #141414);
  font-family: var(--font-body, "Noto Sans", sans-serif);
  font-size: 18px;
}
.search-modal__input::placeholder {
  color: var(--color-mid, #888);
}
.search-modal__input:focus {
  outline: none;
}
.search-modal__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  border: none;
  border-radius: 0 4px 4px 0;
  background: var(--color-red, #ed1c24);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.search-modal__submit:hover {
  background: var(--color-red-dark, #c01820);
}

@media (max-width: 600px) {
  .search-modal__panel {
    margin-top: 100px;
    padding: 0 20px;
  }
  .search-modal__input {
    padding: 16px 18px;
    font-size: 15px;
  }
  .search-modal__submit {
    width: 52px;
  }
}

/* ============================================================
   MOBILE MENU SEARCH — bottom of the mosaic menu, mobile only
   ============================================================ */
.menu-search {
  display: none; /* desktop: hidden */
}
@media (max-width: 900px) {
  .menu-search {
    display: flex;
    padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
  }
  .menu-search__input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: none;
    border-radius: 25px 0 0 25px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-family: var(--font-body, "Noto Sans", sans-serif);
    font-size: 14px;
  }
  .menu-search__input::placeholder {
    color: rgba(255, 255, 255, 0.45);
  }
  .menu-search__input:focus {
    outline: none;
    border-color: var(--color-red, #ed1c24);
  }
  .menu-search__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    border: 1px solid var(--color-red, #ed1c24);
    border-radius: 0 25px 25px 0;
    background: var(--color-red, #ed1c24);
    color: #fff;
    cursor: pointer;
  }
}
