/* ==========================================================================
   Collabrum Advisory — Global layout: header, navigation, drawer,
   page banner, footer.
   Geometry measured from the reference:
     top bar row 55px · overlay header row 98px · sticky header 83px
     logo box 190×30 · nav link 18px/500 pad 7px 16px
     dropdown 260px min-width, shadow 1px 1px 35px rgba(0,0,0,.08)
     sticky shadow 0 0 25px rgba(0,0,0,.11)
     drawer 350px, .25s cubic-bezier(.645,.045,.355,1), scrim rgba(0,0,0,.6)
   ========================================================================== */

/* ==========================================================================
   Header shell
   ========================================================================== */

/* One header for both states. The reference ships two separate header blocks
   and swaps them on scroll; a single element reaches the same two appearances
   without duplicating the navigation for screen readers and search engines,
   and without leaving a second, off-screen nav in the tab order. */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-header);
  color: var(--color-white);
  background: transparent;
  transition: background var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}

.site-header--overlay { background: transparent; }

/* ---------- Top info bar --------------------------------------------------- */

.topbar {
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: 55px;
  padding-block: 8px;
}

.topbar__group {
  display: flex;
  align-items: center;
  gap: 36px;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-base);
  color: var(--color-white);
}

.topbar__item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .85;
}

.topbar__item a:hover { color: var(--color-primary); }

/* ---------- Header bar ------------------------------------------------------ */

.header-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--gap);
  min-height: 98px;
}

.site-header__logo {
  flex: 0 0 auto;
  display: block;
  line-height: 0;
}

.site-header__logo img {
  width: 280px;
  height: auto;
}

.site-header__logo .logo--light { display: block; }
.site-header__logo .logo--dark  { display: none; }

.header-bar__nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.header-bar__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

/* Phone block — sticky state shows the full icon box, overlay shows the link */
.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.header-phone__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--on-primary);
  flex: 0 0 auto;
}

.header-phone__icon svg { width: 18px; height: 18px; }
.header-phone__label { display: block; font-size: var(--text-xs); font-weight: var(--fw-semibold); }
.header-phone__value { display: block; font-size: var(--text-base); }
.header-phone:hover .header-phone__value { color: var(--color-primary); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: inherit;
  transition: color var(--dur-base) var(--ease);
}

.icon-btn:hover { color: var(--color-primary); }
.icon-btn svg { width: 22px; height: 22px; }

.nav-toggle { display: none; }

/* ---------- Stuck state -----------------------------------------------------
   Matches the reference's second header: white, 83px, shadow 0 0 25px .11.   */

.site-header.is-stuck {
  background: var(--color-white);
  color: var(--color-heading);
  box-shadow: 0 0 25px rgba(0, 0, 0, .11);
}

.site-header.is-stuck .topbar { display: none; }
.site-header.is-stuck .header-bar__inner { min-height: 83px; }
.site-header.is-stuck .logo--light { display: none; }
.site-header.is-stuck .logo--dark  { display: block; }
.site-header.is-stuck .site-header__logo img { width: 250px; }
.site-header.is-stuck .nav__link { color: var(--color-deep); }
.site-header.is-stuck .nav__link:hover,
.site-header.is-stuck .nav__item[aria-current] > .nav__link { color: var(--color-primary); }
.site-header.is-stuck .header-phone__label { color: var(--color-heading); }
.site-header.is-stuck .header-phone__value { color: var(--color-text); }
.site-header.is-stuck .header-phone__icon { background: var(--color-deep); color: var(--color-white); }
.site-header.is-stuck .icon-btn { color: var(--color-deep); }

/* The bar itself animates in rather than cutting over. */
.site-header .header-bar {
  transition: min-height var(--dur-base) var(--ease);
}

/* ==========================================================================
   Primary navigation
   ========================================================================== */

.nav { display: block; }

.nav__list {
  display: flex;
  align-items: center;
}

.nav__item { position: relative; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: var(--text-lg);
  font-weight: var(--fw-medium);
  color: var(--color-white);
  transition: color var(--dur-base) var(--ease);
}

.nav__link:hover,
.nav__item[data-open="true"] > .nav__link,
.nav__item[aria-current] > .nav__link { color: var(--color-primary); }

.nav__caret {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-base) var(--ease);
}

.nav__item[data-open="true"] > .nav__link .nav__caret { transform: rotate(180deg); }

/* Dropdown panel */
.nav__panel {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  padding: 0;
  background: var(--color-white);
  border-radius: 0;
  box-shadow: 1px 1px 35px rgba(0, 0, 0, .08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur-base) var(--ease),
              transform var(--dur-base) var(--ease),
              visibility var(--dur-base) var(--ease);
}

.nav__item[data-open="true"] > .nav__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__panel li + li { border-top: 1px solid #F5F5F5; }

.nav__panel a {
  display: block;
  padding: 12px 25px 12px 22px;
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  color: #333;
  transition: color var(--dur-base) var(--ease),
              padding-left var(--dur-base) var(--ease);
}

.nav__panel a:hover {
  color: var(--color-primary);
  padding-left: 28px;
}

/* ==========================================================================
   Mobile drawer
   ========================================================================== */

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: var(--z-drawer);
  width: 350px;
  max-width: calc(100vw - 24px);
  display: flex;
  flex-direction: column;
  padding: 0 12px 32px;
  background: var(--color-white);
  color: var(--color-heading);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer__head {
  display: flex;
  justify-content: flex-end;
  padding: 12px 0;
}

.drawer__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--color-gray);
  color: var(--color-heading);
  transition: background var(--dur-base) var(--ease);
}

.drawer__close:hover { background: var(--color-border); }
.drawer__close svg { width: 18px; height: 18px; }

.drawer__logo { padding: 12px 12px 28px; }
.drawer__logo img { width: 210px; height: auto; }


.drawer__nav { padding-inline: 12px; }
.drawer__nav > li { border-bottom: var(--hairline); }

.drawer__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drawer__link {
  flex: 1 1 auto;
  padding: 16px 0;
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-heading);
}

.drawer__link:hover { color: var(--color-primary); }

.drawer__expand {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  background: var(--color-deep);
  color: var(--color-white);
  transition: background var(--dur-base) var(--ease);
}

.drawer__expand svg {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease);
}

.drawer__expand[aria-expanded="true"] { background: var(--color-primary); color: var(--on-primary); }
.drawer__expand[aria-expanded="true"] svg { transform: rotate(90deg); }

.drawer__sub {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease);
}

.drawer__sub[data-open="true"] { grid-template-rows: 1fr; }
.drawer__sub > div { overflow: hidden; }

.drawer__sub a {
  display: block;
  padding: 10px 0 10px 16px;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.drawer__sub a:hover { color: var(--color-primary); }
.drawer__sub li:last-child a { padding-bottom: 18px; }

.drawer__foot {
  margin-top: auto;
  padding: 28px 12px 0;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
}

body.is-locked { overflow: hidden; }

/* ==========================================================================
   Page banner — inner pages
   ========================================================================== */

.page-banner {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 491px;
  padding-block: var(--banner-pad-top) var(--banner-pad-bottom);
  background: var(--color-deep);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}

.page-banner__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.page-banner__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
              rgba(var(--color-deep-rgb), .82) 0%,
              rgba(var(--color-deep-rgb), .74) 100%);
}

.page-banner__title {
  margin-bottom: 16px;
  font-size: var(--text-4xl);
  color: var(--color-white);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  position: relative;
  background: var(--color-deep);
  color: var(--on-deep-muted);
  overflow: hidden;
}

.site-footer__wave {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
}

.site-footer > .container { position: relative; z-index: 1; }

.site-footer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding-block: 50px;
}

.site-footer__logo img { width: 260px; height: auto; }

.social {
  display: flex;
  gap: 12px;
}

.social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: var(--color-white);
  transition: background var(--dur-base) var(--ease),
              color var(--dur-base) var(--ease);
}

.social a:hover { background: var(--color-primary); color: var(--on-primary); }
.social svg { width: 17px; height: 17px; }

.site-footer__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 260px) minmax(0, 280px);
  gap: 60px;
  padding-block: 60px;
  border-top: 1px solid var(--on-deep-border);
  border-bottom: 1px solid var(--on-deep-border);
}

.site-footer__about { padding-right: 60px; border-right: 1px solid var(--on-deep-border); }

.footer-heading {
  margin-bottom: 26px;
  font-size: var(--text-xl);
  color: var(--color-white);
}

.site-footer p { margin: 0 0 26px; }

.footer-links li + li { margin-top: 14px; }
.footer-links a:hover { color: var(--color-primary); }

.footer-contact li { margin-bottom: 18px; }
.footer-contact a:hover { color: var(--color-primary); }

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding-block: 34px;
  font-size: var(--text-sm);
}

.site-footer__legal {
  display: flex;
  gap: 28px;
}

.site-footer__legal a:hover { color: var(--color-primary); }

/* ==========================================================================
   Responsive — header swaps to the drawer at ≤1024, matching the reference
   ========================================================================== */

@media (max-width: 1024px) {
  .site-header {
    position: sticky;
    top: 0;
    background: var(--color-white);
    color: var(--color-heading);
    box-shadow: 0 0 25px rgba(0, 0, 0, .08);
  }

  .topbar { display: none; }

  .header-bar__inner { min-height: 62px; }

  .site-header__logo img { width: 230px; }
  .site-header__logo .logo--light { display: none; }
  .site-header__logo .logo--dark  { display: block; }

  .header-bar__nav,
  .header-phone { display: none; }

  .header-bar__actions { margin-left: auto; }

  .icon-btn { color: var(--color-deep); }

  .nav-toggle { display: grid; }

  .page-banner { min-height: 380px; }
}

@media (max-width: 991px) {
  .site-footer__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px;
  }

  .site-footer__about {
    grid-column: 1 / -1;
    padding-right: 0;
    border-right: 0;
    padding-bottom: 44px;
    border-bottom: 1px solid var(--on-deep-border);
  }
}

@media (max-width: 767px) {
  .site-footer__top { flex-direction: column; align-items: flex-start; gap: 28px; padding-block: 40px; }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    text-align: left;
  }

  .site-footer__legal { flex-wrap: wrap; gap: 18px; }
}

@media (max-width: 560px) {
  .site-footer__main { grid-template-columns: minmax(0, 1fr); }
  .site-header__logo img { width: 200px; }
  .page-banner { min-height: 320px; }
}
