/* =========================================================
   Portland Advisers — header / nav.
   Fixed at top. On the front page (body.home), transparent over
   the dark hero until the user scrolls; everywhere else, light glass.
   ========================================================= */

/* Hide Hello Elementor's auto-rendered page title across every template. */
.pa-site .page-header,
.pa-site .entry-header,
.pa-site .page__title-area,
.pa-site h1.entry-title,
.pa-site h1.page-title { display: none !important; }

.pa-site .pa-skip-link {
	position: absolute; left: -9999px; top: 0;
	background: var(--pa-blue); color: #fff;
	padding: 12px 18px;
	font-size: 13px;
	z-index: 9999;
}
.pa-site .pa-skip-link:focus { left: 16px; top: 16px; }

.pa-site .pa-nav {
	position: fixed;
	top: 0; left: 0; right: 0;
	z-index: 50;
	background: rgba(255,255,255,0.9);
	backdrop-filter: saturate(160%) blur(14px);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	border-bottom: 1px solid var(--pa-rule-soft);
	transition: background-color 240ms var(--pa-ease), border-color 240ms var(--pa-ease);
}

/* On the front page hero, the nav goes transparent until scrolled. */
.pa-site.home .pa-nav:not(.pa-nav--scrolled) {
	background: transparent;
	border-color: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
}
.pa-site .pa-nav--scrolled { background: rgba(255,255,255,0.9); }

.pa-site .pa-main { padding-top: var(--pa-nav-height, 76px); }

.pa-site .pa-nav__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 40px;
	height: var(--pa-nav-height, 76px);
}

/* ----- brand / logo swap ----- */
.pa-site .pa-nav__brand { display: inline-flex; align-items: center; text-decoration: none; }
.pa-site .pa-nav__logo  { display: block; height: 40px; width: auto; }
.pa-site .pa-nav__logo--light { display: none; }
.pa-site .pa-nav__logo--dark  { display: block; }
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__logo--light { display: block; }
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__logo--dark  { display: none; }

/* ----- menu ----- */
.pa-site .pa-nav__links { display: flex; justify-content: center; }
.pa-site .pa-nav__menu {
	display: flex; gap: 40px;
	list-style: none; margin: 0; padding: 0;
	font-family: var(--pa-font-sans); font-size: 16px; font-weight: 500;
}
.pa-site .pa-nav__menu a {
	position: relative;
	padding: 6px 0;
	color: rgba(26,14,58,0.78);
	text-decoration: none;
	transition: color 180ms var(--pa-ease);
}
.pa-site .pa-nav__menu a:hover,
.pa-site .pa-nav__menu .current-menu-item > a,
.pa-site .pa-nav__menu .current-page-ancestor > a { color: var(--pa-ink); }
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__menu a { color: rgba(255,255,255,0.82); }
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__menu a:hover { color: #fff; }

.pa-site .pa-nav__menu .current-menu-item > a::after,
.pa-site .pa-nav__menu .current-page-ancestor > a::after {
	content: "";
	position: absolute; left: 0; right: 0; bottom: -2px;
	height: 1px;
	background: var(--pa-ink);
}
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__menu .current-menu-item > a::after,
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__menu .current-page-ancestor > a::after { background: #fff; }

/* ----- actions ----- */
.pa-site .pa-nav__actions { display: flex; align-items: center; gap: 16px; }
.pa-site .pa-nav__cta { background: var(--pa-blue); color: #fff; }
.pa-site .pa-nav__cta:hover { background: var(--pa-blue-deep); color: #fff; }
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__cta {
	background: transparent;
	border: 1px solid rgba(255,255,255,0.32);
	color: #fff;
}
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__cta:hover {
	background: #fff; color: var(--pa-blue-950); border-color: #fff;
}

/* ----- hamburger ----- */
.pa-site .pa-nav__hamburger {
	display: none;
	flex-direction: column;
	gap: 5px;
	padding: 4px;
	background: transparent;
	border: 0;
	cursor: pointer;
}
.pa-site .pa-nav__hamburger span {
	display: block;
	width: 26px; height: 2px;
	background: var(--pa-ink);
	transition: background-color 180ms var(--pa-ease), transform 220ms var(--pa-ease), opacity 180ms var(--pa-ease);
}
.pa-site.home .pa-nav:not(.pa-nav--scrolled) .pa-nav__hamburger span { background: #fff; }

.pa-site .pa-nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.pa-site .pa-nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pa-site .pa-nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ----- mobile overlay -----
   Default: display:none AND the [hidden] attribute, so the overlay can never
   accidentally render. It becomes visible only when aria-hidden="false" is set
   by the toggle. Belt-and-braces against page-builder CSS overrides. */
.pa-site .pa-nav__mobile {
	display: none;
	position: fixed;
	inset: var(--pa-nav-height, 76px) 0 0 0;
	background: var(--pa-bone);
	padding: 40px clamp(20px, 5vw, 48px);
	z-index: 49;
	overflow-y: auto;
}
.pa-site .pa-nav__mobile[aria-hidden="false"] { display: block; }
.pa-site .pa-nav__mobile[hidden] { display: none !important; }
.pa-site .pa-nav__mobile[aria-hidden="false"][hidden] { display: block !important; }

.pa-site .pa-nav__mobile-menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-direction: column; gap: 22px;
}
.pa-site .pa-nav__mobile-menu a {
	font-family: var(--pa-font-serif);
	font-weight: 300;
	font-size: clamp(32px, 6vw, 44px);
	letter-spacing: -0.02em;
	color: var(--pa-ink);
	text-decoration: none;
	transition: color 180ms var(--pa-ease);
}
.pa-site .pa-nav__mobile-menu a:hover { color: var(--pa-blue); }

/* ----- responsive ----- */
@media (max-width: 980px) {
	.pa-site .pa-nav__links     { display: none; }
	.pa-site .pa-nav__cta       { display: none; }
	.pa-site .pa-nav__hamburger { display: inline-flex; }
}
