/* Shared SAA header only. Keep all styling contained inside the shared nav. */
nav.nav.nav {
  --header-wine: #350817;
  --header-wine-deep: #260510;
  --header-gold: #c5a05f;
  --header-ivory: #f7efe3;
  position: sticky;
  top: 0;
  z-index: 50;
  overflow: visible;
  color: var(--header-ivory);
  background: linear-gradient(105deg, var(--header-wine-deep), var(--header-wine) 64%, #3b0a1b);
  border-bottom: 2px solid var(--header-gold);
  box-shadow: 0 5px 18px rgba(38, 5, 16, .12);
}

nav.nav .nav-inner {
  width: min(1440px, 94%);
  min-height: 150px;
  margin-inline: auto;
  padding-block: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 2.3vw, 34px);
}

nav.nav .brand {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  gap: clamp(15px, 1.7vw, 25px);
  width: max-content;
  min-width: 0;
  max-width: 54%;
  padding: 0;
  color: var(--header-ivory);
  text-decoration: none;
}

nav.nav .brand::before { display: none; }

nav.nav .header-seal {
  display: block;
  flex: 0 0 auto;
  width: clamp(100px, 10vw, 132px);
  height: clamp(100px, 10vw, 132px);
  object-fit: contain;
}

nav.nav .header-lockup {
  display: grid;
  justify-items: center;
  min-width: 0;
  text-align: center;
}

nav.nav .header-lockup > :is(.brand-main, .brand-lawline, .brand-firm) {
  grid-area: auto;
  align-self: auto;
  justify-self: center;
}

nav.nav .brand-main {
  display: block;
  color: var(--header-ivory);
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.72vw, 1.55rem);
  font-weight: 500;
  letter-spacing: .055em;
  line-height: 1.2;
  white-space: nowrap;
}

nav.nav .brand-lawline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  color: var(--header-ivory);
  font-family: var(--serif);
  font-size: clamp(1rem, 1.55vw, 1.38rem);
  letter-spacing: .32em;
  line-height: 1.25;
  white-space: nowrap;
}

nav.nav .brand-lawline::before,
nav.nav .brand-lawline::after {
  content: "";
  flex: 1 1 28px;
  max-width: 68px;
  height: 1px;
  background: var(--header-gold);
}

nav.nav .brand-firm {
  display: block;
  margin-top: 5px;
  color: var(--header-gold);
  font-family: var(--sans);
  font-size: clamp(.68rem, .9vw, .82rem);
  font-weight: 600;
  letter-spacing: .38em;
  line-height: 1.35;
  text-transform: uppercase;
  white-space: nowrap;
}

nav.nav .links {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  grid-template-rows: repeat(2, auto);
  align-items: center;
  justify-content: end;
  column-gap: clamp(14px, 2vw, 29px);
  row-gap: 9px;
  min-width: 0;
  color: var(--header-ivory);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.35;
}

nav.nav .links > a:not(.btn) {
  position: relative;
  justify-self: start;
  padding: 7px 0;
  color: inherit;
  white-space: nowrap;
  text-decoration: none;
}

nav.nav .links > a:not(.btn)::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--header-gold);
  transition: width .22s ease;
}

nav.nav .links > a:not(.btn):hover::after,
nav.nav .links > a:not(.btn)[aria-current="page"]::after {
  width: 100%;
}

nav.nav .links > a[aria-current="page"] { color: var(--header-gold); }
nav.nav .links > a:nth-child(1) { grid-area: 1 / 1; }
nav.nav .links > a:nth-child(2) { grid-area: 1 / 2; }
nav.nav .links > a:nth-child(3) { grid-area: 1 / 3; }
nav.nav .links > a:nth-child(4) { grid-area: 2 / 1; }
nav.nav .links > a:nth-child(5) { grid-area: 2 / 2; }
nav.nav .links > a:nth-child(6) { grid-area: 2 / 3; }
nav.nav .links > a:nth-child(7) { grid-area: 2 / 4; }

nav.nav .links > .btn,
nav.nav .links > a.btn-primary {
  grid-area: 1 / 4;
  justify-self: stretch;
  min-height: 39px;
  padding: 9px 17px;
  border: 1px solid #d4b474;
  border-radius: 2px;
  background: linear-gradient(145deg, #e0c17d, #bd914d);
  box-shadow: inset 0 1px rgba(255,255,255,.35);
  color: #32100f;
  font-family: var(--serif);
  font-size: .79rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease;
}

nav.nav .links > .btn:hover,
nav.nav .links > a.btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #ead39c, #d1a75e);
}

nav.nav .menu {
  display: none;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(197,160,95,.65);
  border-radius: 2px;
  background: transparent;
  color: var(--header-ivory);
  font: 600 1.4rem/1 var(--sans);
  cursor: pointer;
}

nav.nav :is(a, button):focus-visible {
  outline: 3px solid #e5c77f;
  outline-offset: 4px;
}

/* Show desktop links only when the entire single row fits comfortably. */
@media (min-width: 1360px) {
  nav.nav .nav-inner {
    width: min(1760px, calc(100% - 48px));
    min-height: 0;
    height: auto;
    padding-block: 6px;
    justify-content: space-between;
    column-gap: clamp(24px, 2vw, 40px);
  }

  nav.nav .brand {
    flex: 0 0 auto;
    max-width: none;
    gap: 16px;
  }

  nav.nav .header-seal {
    width: clamp(104px, 7.5vw, 112px);
    height: clamp(104px, 7.5vw, 112px);
  }
  nav.nav .brand-main { font-size: clamp(1.22rem, 1.5vw, 1.55rem); }
  nav.nav .links {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: clamp(18px, 1.4vw, 24px);
  }
  nav.nav .links > a { flex-shrink: 0; }
  nav.nav .links > .btn { flex-shrink: 0; }
}

@media (max-width: 1359px) {
  nav.nav .nav-inner {
    position: relative;
    min-height: 132px;
    gap: 18px;
  }

  nav.nav .brand { max-width: calc(100% - 66px); }
  nav.nav .header-seal { width: 104px; height: 104px; }
  nav.nav .brand-main { font-size: clamp(1rem, 2.2vw, 1.25rem); }
  nav.nav .brand-lawline { font-size: 1.05rem; }
  nav.nav .brand-firm { font-size: .66rem; }
  nav.nav .nav-inner > .links { display: none; }
  nav.nav .nav-inner > .menu {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  nav.nav .nav-inner > .links.menu-open {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    justify-content: stretch;
    gap: 2px 22px;
    padding: 16px max(3%, calc((100% - 1440px) / 2));
    border: 1px solid rgba(197,160,95,.5);
    border-top: 0;
    background: #2b0612;
    box-shadow: 0 14px 25px rgba(30,4,13,.28);
  }

  nav.nav .links.menu-open > a:not(.btn) {
    grid-area: auto;
    display: block;
    width: 100%;
    padding: 12px 8px;
    white-space: normal;
  }

  nav.nav .links.menu-open > .btn,
  nav.nav .links.menu-open > a.btn-primary {
    grid-area: auto;
    justify-self: stretch;
    align-self: center;
    min-height: 43px;
  }
}

@media (max-width: 600px) {
  nav.nav .nav-inner {
    width: 92%;
    min-height: 94px;
    padding-block: 8px;
    gap: 8px;
  }

  nav.nav .brand {
    gap: 10px;
    max-width: calc(100% - 52px);
  }

  nav.nav .header-seal { width: 68px; height: 68px; }
  nav.nav .brand-main {
    font-size: clamp(.73rem, 3.65vw, .94rem);
    letter-spacing: .025em;
    white-space: normal;
    max-width: 100%;
    text-wrap: balance;
  }
  nav.nav .brand-lawline {
    gap: 7px;
    font-size: clamp(.75rem, 3.7vw, .92rem);
    letter-spacing: .23em;
  }
  nav.nav .brand-lawline::before,
  nav.nav .brand-lawline::after { max-width: 34px; }
  nav.nav .brand-firm {
    margin-top: 4px;
    font-size: clamp(.52rem, 2.55vw, .64rem);
    letter-spacing: .27em;
  }
  nav.nav .menu { width: 42px; height: 42px; }
}

@media (max-width: 360px) {
  nav.nav .header-seal { width: 58px; height: 58px; }
  nav.nav .brand { gap: 8px; }
  nav.nav .brand-main { font-size: .7rem; }
  nav.nav .brand-lawline { font-size: .72rem; letter-spacing: .2em; }
  nav.nav .brand-firm { font-size: .49rem; letter-spacing: .22em; }
}

@media (prefers-reduced-motion: reduce) {
  nav.nav .links > a:not(.btn)::after,
  nav.nav .links > .btn { transition: none; }
}