/* V2.9 masthead shared by both markets, scoped to the preview. */
header.pm-masthead {
  --pm-navy: #062a44;
  --pm-cyan: #18a7d8;
  position: absolute;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.25vw, 25px);
  min-height: 100px;
  padding: max(15px, env(safe-area-inset-top)) clamp(22px, 2.6vw, 52px) 15px;
  background: linear-gradient(#071e2cc7, #071e2c48 78%, transparent);
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  transition: background-color .25s, color .25s;
}
header.pm-masthead.scrolled {
  position: fixed;
  background: #fffdf9;
  color: var(--pm-navy);
  box-shadow: 0 1px 0 #062a4415;
}
header.pm-masthead[data-interior] { position: sticky; top: 0; min-height: 82px; padding-block: 10px; }

.pm-masthead .brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
}
.pm-masthead .brand-icon { width: 56px; height: 56px; }
.pm-masthead .brand-name { width: clamp(182px, 15vw, 255px); height: auto; }
.pm-masthead .brand-name-light { filter: brightness(0) invert(1); }
.pm-masthead .brand-name-dark,
.pm-masthead.scrolled .brand-name-light { display: none; }
.pm-masthead.scrolled .brand-name-dark { display: block; }

header.pm-masthead #menu {
  position: static;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.3vw, 26px);
  margin: 0 0 0 auto;
  padding: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
}
.pm-primary-links { display: flex; align-items: center; gap: clamp(11px, 1.15vw, 24px); }
header.pm-masthead #menu a {
  display: block;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
header.pm-masthead #menu a:is(:hover, [aria-current]) { border-color: var(--pm-cyan); }
.pm-market {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid currentColor;
  white-space: nowrap;
  font-size: 13px;
}
header.pm-masthead #menu .pm-market a { font-size: inherit; font-weight: 500; }
.pm-market [aria-current] { font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

header.pm-masthead .header-contact {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 15px;
  min-height: 44px;
  border: 1px solid #ffffff80;
  border-radius: 32px;
  background: #ffffff12;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
header.pm-masthead.scrolled .header-contact { background: var(--pm-navy); border-color: var(--pm-navy); }
header.pm-masthead .conversation-label { font-size: 13px; font-weight: 700; }
.pm-masthead .contact-mark { width: 22px; height: 22px; animation: pm-invite 5s ease-in-out 3; }
@keyframes pm-invite {
  0%, 15%, 35%, 100% { transform: translateY(0); }
  22% { transform: translateY(-3px); }
  28% { transform: translateY(1px); }
}
header.pm-masthead .menu-toggle {
  margin: 0 0 0 auto;
  padding: 9px 13px;
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: 25px;
  background: transparent;
  color: inherit;
  font: 700 13px Arial, Helvetica, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
header.pm-masthead .menu-toggle span { margin-inline-start: 5px; }
header.pm-masthead [hidden] { display: none !important; }
header.pm-masthead :focus-visible { outline: 3px solid var(--pm-cyan); outline-offset: 3px; }

@media (min-width: 1440px) and (max-width: 1599px) {
  header.pm-masthead { padding-inline: 24px; gap: 14px; }
  header.pm-masthead #menu { gap: 14px; }
  .pm-primary-links { gap: 12px; }
}

@media (max-width: 1439px) {
  header.pm-masthead #menu {
    position: absolute;
    inset: 100% 0 auto;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    max-height: 72svh;
    overflow: auto;
    overscroll-behavior: contain;
    padding: 12px clamp(18px, 4.2vw, 55px) 17px;
    background: #fffdf9;
    color: var(--pm-navy);
    box-shadow: 0 15px 20px #062a4415;
  }
  .pm-primary-links { display: grid; gap: 0; }
  header.pm-masthead #menu a { min-height: 44px; padding: 11px 0; font-size: 16px; }
  .pm-market { padding: 0; border-inline-start: 0; gap: 9px; }
  header.pm-masthead #menu .pm-market a { padding-inline: 5px; }
  header.pm-masthead:not([data-ready]) { position: relative; flex-wrap: wrap; background: var(--pm-navy); }
  header.pm-masthead:not([data-ready]) #menu { position: static; flex-basis: 100%; order: 4; }
}

@media (max-width: 700px) {
  header.pm-masthead { min-height: 80px; padding: 10px clamp(12px, 4vw, 20px); gap: 9px; }
  header.pm-masthead[data-interior] { min-height: 65px; }
  .pm-masthead .brand { gap: 6px; }
  .pm-masthead .brand-icon { width: 42px; height: 42px; }
  .pm-masthead .brand-name { width: clamp(117px, 35vw, 163px); }
}
@media (max-width: 430px) {
  header.pm-masthead .header-contact { width: 44px; padding: 8px; }
  header.pm-masthead .conversation-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  header.pm-masthead .menu-toggle { padding-inline: 9px; }
  header.pm-masthead .menu-toggle span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  header.pm-masthead { transition: none; }
  .pm-masthead .contact-mark { animation: none; }
}
