/* Perimetrics redesign: header + footer, following the innerview.ai system
   (canvas boards "Nav bar · States" and the page footers). */

:root {
	--pm-navy: #00406E;
	--pm-navy-hover: #0A5A96;
	--pm-slate: #203247;
	--pm-accent: #25ADE3;
	--pm-text: #4D4D4D;
	--pm-line: #CEE6F8;
	--pm-line-2: #BDDEF5;
	--pm-tint: #EEF6FC;
	--pm-white: #FFFFFF;
	--pm-ease: cubic-bezier(.2, .8, .2, 1);
	--pm-font: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	--pm-float-top: 12px;
}

body.admin-bar { --pm-float-top: 44px; }
@media (max-width: 782px) { body.admin-bar { --pm-float-top: 58px; } }

.pm-top, .pm-sheet, .pm-foot-wrap { font-family: var(--pm-font); color: var(--pm-slate); }
.pm-top *, .pm-sheet *, .pm-foot-wrap * { box-sizing: border-box; }
.pm-top a, .pm-sheet a, .pm-foot-wrap a { text-decoration: none; }
:is(.pm-top, .pm-sheet, .pm-foot-wrap) :is(a, button, summary):focus-visible { outline: 3px solid var(--pm-accent); outline-offset: 3px; }

/* Hello resets every <button>; undo that inside the header. */
.pm-top button, .pm-sheet button {
	font: inherit; margin: 0; border: 0; background: none; color: inherit; cursor: pointer; text-transform: none; letter-spacing: normal;
}

/* ---------- Frame + notched tab ---------- */

.pm-top { padding: 16px 16px 0; background: var(--pm-white); }
.pm-frame { position: relative; border-radius: 32px 32px 0 0; background-color: var(--pm-tint); }
.pm-frame--band { min-height: 112px; border-radius: 32px; margin-bottom: 16px; }

.pm-tab {
	position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 60;
	width: min(1320px, calc(100% - 96px));
	background: var(--pm-white); border-radius: 0 0 28px 28px;
}
.pm-tab::before, .pm-tab::after { content: ""; position: absolute; top: 0; width: 28px; height: 28px; pointer-events: none; }
.pm-tab::before { left: -28px; background: radial-gradient(circle at 0 100%, transparent 27.5px, var(--pm-white) 28px); }
.pm-tab::after { right: -28px; background: radial-gradient(circle at 100% 100%, transparent 27.5px, var(--pm-white) 28px); }

.pm-nav {
	display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 40px;
	min-height: 104px; padding: 20px 40px;
}
.pm-links { display: flex; align-items: center; gap: 24px; }
.pm-logo-link { display: flex; align-items: center; justify-self: center; }
.pm-logo { display: block; width: 176px; height: auto; transition: width .26s var(--pm-ease); }
/* Shiny sweep across the logo (same as innerview.ai; .pm-shine for other logos): a soft white band slides over the
   wordmark every 5s, masked to the logo's own shape so it only lights the letters. */
.pm-logo-link { position: relative; }
:is(.pm-logo-link, .pm-shine)::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(120deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, 0) 60%) 100% 0 / 200% 100% no-repeat;
	-webkit-mask: var(--pm-logo) center / contain no-repeat; mask: var(--pm-logo) center / contain no-repeat;
	animation: pm-logo-shine 5s linear infinite;
}
@keyframes pm-logo-shine { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
/* The wave: the five blue arcs light up from the innermost outward, like a signal going out. */
.pm-logo .pm-arc { animation: pm-arc 2.4s ease-in-out infinite; animation-delay: calc(var(--a) * .16s); }
@keyframes pm-arc { 0%, 55%, 100% { opacity: .55; } 18% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
	:is(.pm-logo-link, .pm-shine)::after { animation: none; display: none; }
	.pm-logo .pm-arc { animation: none; }
}
.pm-actions { justify-self: end; display: flex; align-items: center; gap: 24px; }

/* Nav links and dropdown triggers */
.pm-nl {
	position: relative; z-index: 0; display: inline-flex; align-items: center; gap: 8px;
	padding: 8px 0; color: var(--pm-slate); font-size: 15px; font-weight: 500; line-height: 1.2; white-space: nowrap;
	transition: color .18s ease;
}
.pm-nl::before {
	content: ""; position: absolute; inset: 0 -10px; z-index: -1; border-radius: 10px; background: var(--pm-tint);
	opacity: 0; transform: scale(.92); transition: opacity .18s ease, transform .22s var(--pm-ease);
}
.pm-top .pm-nl:hover, .pm-nl[aria-expanded="true"], .pm-ni:focus-within > .pm-nl, .pm-nl[aria-current], .pm-nl.is-section { color: var(--pm-navy); }
.pm-nl:hover::before, .pm-nl[aria-expanded="true"]::before, .pm-ni:hover > .pm-nl::before, .pm-nl[aria-current]::before { opacity: 1; transform: none; }
.pm-chev { flex-shrink: 0; transition: transform .2s ease; }
.pm-ni { position: relative; }
.pm-ni:hover .pm-chev, .pm-nl[aria-expanded="true"] .pm-chev { transform: rotate(180deg); }

/* Dropdowns: open on hover or focus, fade + rise 6px */
.pm-dd {
	position: absolute; top: 100%; left: -10px; padding-top: 22px; z-index: 20;
	opacity: 0; visibility: hidden; transform: translateY(-6px);
	transition: opacity .18s ease, transform .22s var(--pm-ease), visibility .18s;
}
.pm-ni:hover .pm-dd, .pm-ni:focus-within .pm-dd, .pm-ni.is-open .pm-dd { opacity: 1; visibility: visible; transform: none; }
.pm-ni.is-closed .pm-dd { opacity: 0; visibility: hidden; transform: translateY(-6px); }
.pm-dd-panel {
	width: 260px; padding: 8px; display: flex; flex-direction: column;
	background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--pm-line); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(32, 50, 71, .28);
}
.pm-ddi { display: flex; padding: 12px; border-radius: 10px; color: var(--pm-slate); font-size: 15px; font-weight: 500; transition: background .15s ease, color .15s ease; }
.pm-top .pm-ddi:hover, .pm-ddi[aria-current] { background: var(--pm-tint); color: var(--pm-navy); }

/* Contact Us: 56px, radius 16, arrow tile */
.pm-cta {
	display: inline-flex; align-items: center; gap: 16px; height: 56px; padding: 0 12px 0 24px; border-radius: 16px;
	background: var(--pm-navy); color: var(--pm-white); font-family: var(--pm-font); font-size: 15px; font-weight: 600; white-space: nowrap;
	transition: background .2s ease, transform .2s var(--pm-ease), box-shadow .2s ease;
}
.pm-cta-arr {
	width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .16);
	display: inline-flex; align-items: center; justify-content: center;
	transition: transform .22s var(--pm-ease), background .2s ease;
}
.pm-top .pm-cta:hover, .pm-top .pm-cta:focus-visible { background: var(--pm-navy-hover); color: var(--pm-white); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(0, 64, 110, .55); }
.pm-cta:hover .pm-cta-arr { background: rgba(255, 255, 255, .28); transform: translateX(3px); }
.pm-cta:active { transform: scale(.98); }

.pm-top .pm-burger {
	display: none; width: 44px; height: 44px; border-radius: 12px; background: var(--pm-tint); color: var(--pm-slate);
	align-items: center; justify-content: center; padding: 0;
}

/* ---------- Floating state (scrolled past the frame) ---------- */

.pm-tab.is-floating {
	position: fixed; top: var(--pm-float-top);
	width: min(1320px, calc(100% - 32px)); border-radius: 22px;
	background: rgba(255, 255, 255, .72); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
	border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 16px 40px -18px rgba(0, 64, 110, .35);
	animation: pm-float-in .26s var(--pm-ease);
}
.pm-tab.is-floating::before, .pm-tab.is-floating::after { display: none; }
.pm-tab.is-floating .pm-nav { min-height: 80px; padding: 12px 32px; }
.pm-tab.is-floating .pm-logo { width: 150px; }
.pm-tab.is-floating .pm-cta { height: 52px; }
@keyframes pm-float-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translateX(-50%); } }

/* ---------- Mobile sheet ---------- */

.pm-sheet {
	position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column;
	background: var(--pm-white); animation: pm-sheet-in .2s var(--pm-ease);
}
.pm-sheet[hidden] { display: none; }
@keyframes pm-sheet-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.pm-sheet-head { display: flex; align-items: center; justify-content: space-between; height: 72px; padding: 0 16px 0 20px; border-bottom: 1px solid var(--pm-line); }
.pm-sheet-head img { display: block; height: 30px; width: auto; }
.pm-sheet .pm-burger { display: inline-flex; width: 44px; height: 44px; border-radius: 12px; background: var(--pm-tint); color: var(--pm-slate); align-items: center; justify-content: center; }
/* The Elementor kit colours every <button>; keep header controls on the theme palette. */
body .pm-top button, body .pm-sheet button { color: var(--pm-slate); background-color: transparent; }
body .pm-top .pm-burger, body .pm-sheet .pm-burger { background-color: var(--pm-tint); }
body .pm-top button.pm-nl:hover, body .pm-top button.pm-nl[aria-expanded="true"], body .pm-top button.pm-nl.is-section { color: var(--pm-navy); background-color: transparent; }
.pm-sheet-body { flex: 1; overflow-y: auto; padding: 8px 20px 20px; display: flex; flex-direction: column; }
.pm-sheet-link, .pm-sheet-group > summary {
	display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--pm-line);
	font-size: 17px; font-weight: 600; color: var(--pm-slate); cursor: pointer; list-style: none;
}
.pm-sheet-group > summary::-webkit-details-marker { display: none; }
.pm-sheet-group > summary::after { content: "+"; font-weight: 500; }
.pm-sheet-group[open] > summary { color: var(--pm-navy); }
.pm-sheet-group[open] > summary::after { content: "−"; }
.pm-sheet-sub { display: flex; flex-direction: column; padding: 4px 0 12px; border-bottom: 1px solid var(--pm-line); }
.pm-sheet-sub a { padding: 10px 0; font-size: 16px; color: var(--pm-text); }
.pm-sheet-actions { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.pm-sheet-btn {
	display: flex; align-items: center; justify-content: center; gap: 10px; height: 52px; border-radius: 16px;
	border: 1px solid var(--pm-line-2); font-weight: 600; color: var(--pm-slate);
}
.pm-sheet-btn--primary { background: var(--pm-navy); border-color: var(--pm-navy); color: var(--pm-white); }
body.pm-locked { overflow: hidden; }

/* Video overlay (inc/video.php) */
body .pmv { position: fixed; inset: 0; z-index: 100002; background: rgba(15, 25, 40, .82); display: flex; align-items: center; justify-content: center; padding: 64px 24px 24px; font-family: var(--pm-font); }
body .pmv[hidden] { display: none; }
body .pmv .pmv-player { width: min(1100px, 100%); max-height: 100%; border-radius: 20px; background: #000; }
body .pmv .pmv-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border-radius: 12px; border: 0; background: rgba(255,255,255,.9); color: var(--pm-slate); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
body .pmv .pmv-close svg { width: 18px; height: 18px; }
body .pmv .pmv-close:focus-visible { outline: 3px solid var(--pm-accent); outline-offset: 3px; }

/* ---------- Breakpoints ---------- */

@media (max-width: 1320px) {
	.pm-links, .pm-inv { display: none; }
	.pm-top .pm-burger { display: inline-flex; }
	.pm-nav { grid-template-columns: auto 1fr; column-gap: 16px; }
	.pm-logo-link { justify-self: start; }
	.pm-actions { gap: 12px; }
}
@media (max-width: 640px) {
	.pm-top { padding: 12px 12px 0; }
	.pm-frame { border-radius: 26px 26px 0 0; }
	.pm-frame--band { min-height: 84px; border-radius: 26px; }
	.pm-tab { width: calc(100% - 48px); border-radius: 0 0 24px 24px; }
	.pm-nav { min-height: 68px; padding: 10px 10px 10px 16px; }
	.pm-logo { width: 132px; }
	.pm-actions .pm-cta { display: none; }
	.pm-tab.is-floating .pm-nav { min-height: 64px; padding: 8px 10px 8px 16px; }
	.pm-tab.is-floating .pm-logo { width: 124px; }
}

/* ---------- Footer ---------- */

.pm-foot-wrap { padding: 16px; background: var(--pm-white); }
.pm-foot { border-radius: 32px; background: var(--pm-tint); border: 1px solid var(--pm-line); }
.pm-foot-inner { max-width: 1240px; margin: 0 auto; padding: 64px 40px 32px; }
.pm-foot-top { display: flex; flex-wrap: wrap; gap: 40px 56px; }
.pm-foot-brand { flex: 1.2 1 220px; min-width: 0; }
.pm-foot-brand img { display: block; width: 168px; height: auto; }
.pm-foot-contact { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; line-height: 1.7; color: var(--pm-text); }
.pm-foot-contact address { font-style: normal; display: flex; flex-direction: column; margin-bottom: 10px; }
.pm-foot-contact strong { color: var(--pm-slate); font-weight: 600; }
.pm-foot-links { flex: 2 1 340px; min-width: 0; display: flex; flex-wrap: wrap; gap: 14px 56px; }
.pm-foot-col { flex: 1 1 140px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.pm-foot-wrap a { color: var(--pm-slate); transition: color .15s ease; }
.pm-foot-wrap a:hover { color: var(--pm-navy); }
.pm-foot-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--pm-line); font-size: 13px; line-height: 1.6; color: var(--pm-text); }
@media (max-width: 640px) {
	.pm-foot-wrap { padding: 12px; }
	.pm-foot { border-radius: 26px; }
	.pm-foot-inner { padding: 40px 22px 24px; }
}

/* ---------- Guard against the Elementor kit's global styles ---------- */

.pm-top img, .pm-sheet img, .pm-foot-wrap img { border-radius: 0; box-shadow: none; max-width: none; }

@media (prefers-reduced-motion: reduce) {
	.pm-top *, .pm-sheet, .pm-sheet * { animation: none !important; transition: none !important; }
}

/* The previous child theme's stylesheet sizes every svg; give header icons their own sizes. */
:is(.pm-top, .pm-sheet) svg { flex-shrink: 0; }
:is(.pm-top, .pm-sheet) .pm-burger svg { width: 18px; height: 18px; }
:is(.pm-top, .pm-sheet) .pm-cta-arr svg, .pm-sheet-btn svg { width: 14px; height: 14px; }
.pm-top .pm-chev { width: 12px; height: 12px; }

/* Elementor's kit styles every <button>; dropdown triggers must match the link labels. */
body .pm-top button.pm-nl { font-family: var(--pm-font); font-size: 15px; font-weight: 500; line-height: 1.2; padding: 8px 0; border: 0; border-radius: 0; }
/* Pages rebuilt in this theme sit on white, like the canvas. */
body.pm-rebuilt { background: var(--pm-white); }
