/* ============================================================================
   Chrome — header + footer (parts/header.html, parts/footer.html)
   ========================================================================== */

/* ── Header shell ─────────────────────────────────────────────────────────*/
.hmd-header { position: sticky; top: 0; z-index: 50; }
.hmd-header .hmd-utility,
.hmd-header .hmd-mainbar { width: 100%; }
/* The header's two bands (utility + main) must abut. Without this the flow
   block-gap adds a 24px top margin to the main bar, reading as extra space
   above the logo/nav — the bar's own symmetric padding already centers content. */
.hmd-header > * { margin-block: 0 !important; }

/* Both bars run full-bleed edge-to-edge; only a small gutter (matching the site
   root padding) keeps the logo/nav/pill off the very edge. No 1440 cap. */
.hmd-utility > .alignwide,
.hmd-mainbar > .alignwide {
	max-width: 100%;
	margin-inline: 0;
	padding-inline: clamp(1.25rem, 5vw, 3rem);
	width: 100%;
}

/* ── Utility bar (ink) ────────────────────────────────────────────────────*/
.hmd-utility { padding-block: 0.625rem; }
.hmd-utility > .alignwide { gap: 1.75rem; }
.hmd-utility-nav {
	gap: 1.75rem;
	font-family: var(--font-body);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.hmd-utility-nav .wp-block-navigation-item__content { opacity: 0.85; }
.hmd-utility-nav .wp-block-navigation-item__content:hover { opacity: 1; color: var(--yellow); }
.hmd-utility-nav .wp-block-navigation__submenu-icon { margin-left: 0.25rem; }

/* Service Request pill (utility bar) */
.hmd-pill-wrap { margin: 0; }
.hmd-pill .wp-block-button__link {
	padding: 0.5rem 1rem;
	font-size: 0.6875rem;
	letter-spacing: 0.1em;
	background-color: var(--magenta);
	color: var(--paper);
}
.hmd-pill .wp-block-button__link:hover { background-color: var(--pink); color: var(--ink); }

/* ── Main bar (cream) ─────────────────────────────────────────────────────*/
.hmd-mainbar {
	padding-block: 1.125rem;
	border-bottom: 1px solid var(--line);
}
.hmd-mainbar > .alignwide { gap: 2rem; }
.hmd-mainbar__right { gap: 2rem; margin-left: auto; }

/* South Hollywood wordmark (SVG lockup). Full stacked lockup on desktop,
   wordmark-only on mobile (see responsive block below). */
.hmd-logo { display: inline-flex; align-items: center; text-decoration: none; }
.hmd-logo__img { display: block; height: 50px; width: auto; }
.hmd-logo__img--compact { display: none; }

/* Primary nav */
.hmd-nav { gap: 2rem; }
.hmd-nav .wp-block-navigation-item { align-items: center; }
.hmd-nav .wp-block-navigation-item__content {
	position: relative;
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 0.9375rem;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	line-height: 1;
	padding: 0.375rem 0;
	color: var(--ink);
	border: 0;
}
/* Hover / active underline via ::after — never changes box height, so the label
   stays vertically centered with the caret. */
.hmd-nav .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	border-radius: 2px;
	background: transparent;
}
.hmd-nav .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.hmd-nav .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content::after {
	background: var(--yellow);
}
/* Caret: small and nudged to the uppercase cap-height optical center. */
.hmd-nav .wp-block-navigation__submenu-icon,
.hmd-utility-nav .wp-block-navigation__submenu-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	margin: 0 0 0 0.25rem;
	padding: 0;
	line-height: 1;
}
.hmd-nav .wp-block-navigation__submenu-icon svg,
.hmd-utility-nav .wp-block-navigation__submenu-icon svg {
	width: 12px;
	height: 12px;
	display: block;
	transform: translateY(-1px);
}

/* Dropdown submenu card (both navs) */
.hmd-nav .wp-block-navigation__submenu-container,
.hmd-utility-nav .wp-block-navigation__submenu-container {
	background: var(--paper);
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(26, 26, 46, 0.12);
	border-top: 4px solid var(--magenta);
	min-width: 260px;
	padding: 0.5rem;
	margin-top: 0.75rem;
}
/* Invisible hover bridge: fills the gap between the trigger and the dropdown so
   the submenu doesn't close while the pointer travels down into it. */
.hmd-nav .wp-block-navigation__submenu-container::before,
.hmd-utility-nav .wp-block-navigation__submenu-container::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -0.85rem;
	height: 0.85rem;
}
.hmd-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
.hmd-utility-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-family: var(--font-body);
	font-weight: 700;
	font-size: 0.875rem;
	text-transform: none;
	letter-spacing: 0;
	color: var(--ink);
	border-bottom: 0;
	border-radius: 10px;
	padding: 0.625rem 0.75rem;
	opacity: 1;
}
.hmd-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.hmd-utility-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
	background: var(--cream);
	color: var(--magenta);
}
/* The top-level nav's yellow hover underline must NOT bleed onto dropdown rows. */
.hmd-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content::after {
	content: none;
}

/* Search button */
.hmd-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: var(--paper);
	border: 1px solid var(--line);
	cursor: pointer;
	color: var(--ink);
	flex: 0 0 auto;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.hmd-search-btn:hover { background: var(--cream-2); border-color: var(--ink); }

/* ── Footer ───────────────────────────────────────────────────────────────*/
.hmd-footer { margin-top: 0; }
.hmd-footer__grid,
.hmd-footer__credit { padding-inline: clamp(1.25rem, 5vw, 3rem); }
.hmd-footer__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
	gap: 3rem;
}
.hmd-footer__brand { max-width: 340px; }
.hmd-logo--footer { display: block; margin-bottom: 1.25rem; }
/* Constrain by width so the lockup can't overflow the brand column into the
   nav grid (aspect ratio is preserved — never set width AND height on the img). */
.hmd-logo--footer .hmd-logo__img { width: 320px; max-width: 100%; height: auto; }
/* Contact block — Main Office + Security Office, cleanly structured. */
.hmd-footer__contact { display: flex; flex-direction: column; gap: 1.5rem; }
.hmd-footer__office-h {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 0.6875rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--yellow);
	margin: 0 0 0.5rem;
}
.hmd-footer__addr { color: rgba(255, 255, 255, 0.7); line-height: 1.7; font-size: 0.8125rem; font-style: normal; margin: 0 0 0.4rem; }
.hmd-footer__line { color: rgba(255, 255, 255, 0.7); font-size: 0.8125rem; line-height: 1.6; margin: 0.1rem 0; }
.hmd-footer__line a { color: #fff; text-decoration: none; }
.hmd-footer__line a:hover { color: var(--pink); }
.hmd-footer__h {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 0.6875rem !important;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--yellow);
	margin: 0 0 1rem;
}
.hmd-footer__links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.625rem; }
.hmd-footer__links li { margin: 0; }
.hmd-footer__links a { font-size: 0.8125rem; opacity: 0.78; text-decoration: none; color: #fff; }
.hmd-footer__links a:hover { opacity: 1; color: var(--pink); }
.hmd-footer__credit {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 3.5rem;
	padding-top: 1.5rem;
	font-size: 0.6875rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}
.hmd-footer__credit p { color: rgba(255, 255, 255, 0.5); margin: 0; }

/* ── Responsive chrome ────────────────────────────────────────────────────*/
@media (max-width: 900px) {
	.hmd-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
	.hmd-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 782px) {
	.hmd-utility { display: none; }
	/* Swap the stacked lockup for the wordmark-only mark; width-constrained so
	   the wide "South Hollywood" never crowds the menu toggle on small phones. */
	.hmd-header .hmd-logo__img--full { display: none; }
	.hmd-header .hmd-logo__img--compact { display: block; height: auto; width: min(300px, 66vw); }
}
@media (max-width: 600px) {
	.hmd-footer__grid { grid-template-columns: 1fr; }
}

/* ── Animated search overlay ──────────────────────────────────────────────*/
html.hmd-search-open { overflow: hidden; }
.hmd-search-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: start center; }
.hmd-search-overlay[hidden] { display: none; }
.hmd-search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 26, 46, 0.72);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	opacity: 0;
	transition: opacity 0.3s ease;
}
.hmd-search-overlay.is-open .hmd-search-overlay__backdrop { opacity: 1; }
.hmd-search-overlay__panel {
	position: relative;
	width: min(760px, 92vw);
	margin-top: clamp(4rem, 16vh, 10rem);
	background: var(--cream);
	border-radius: 20px;
	border-top: 6px solid var(--magenta);
	box-shadow: 0 40px 90px rgba(26, 26, 46, 0.4);
	padding: clamp(2rem, 5vw, 3.5rem);
	transform: translateY(-24px) scale(0.97);
	opacity: 0;
	transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.3, 1), opacity 0.34s ease;
}
.hmd-search-overlay.is-open .hmd-search-overlay__panel { transform: translateY(0) scale(1); opacity: 1; }
.hmd-search-overlay__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--line);
	color: var(--ink);
	cursor: pointer;
	display: grid;
	place-items: center;
}
.hmd-search-overlay__close:hover { background: var(--ink); color: #fff; }
.hmd-search-overlay__eyebrow {
	display: block;
	font-family: var(--font-display);
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--magenta);
	margin-bottom: 1rem;
}
.hmd-search-overlay__field {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	background: #fff;
	border-radius: 999px;
	border: 1px solid var(--line);
	padding: 0.5rem 0.5rem 0.5rem 1.25rem;
}
.hmd-search-overlay__field:focus-within { border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(200, 23, 122, 0.12); }
.hmd-search-overlay__ic { width: 22px; height: 22px; color: var(--ink-soft); flex: 0 0 auto; }
.hmd-search-overlay__field input {
	flex: 1;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: var(--font-body);
	font-size: 1.125rem;
	color: var(--ink);
	min-width: 0;
}
.hmd-search-overlay__submit {
	flex: 0 0 auto;
	background: var(--magenta);
	color: #fff;
	border: 0;
	border-radius: 999px;
	font-family: var(--font-display);
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.8125rem;
	padding: 0.75rem 1.5rem;
	cursor: pointer;
}
.hmd-search-overlay__submit:hover { background: var(--magenta-deep); }
.hmd-search-overlay__quick { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.hmd-search-overlay__quick span {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 0.625rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin-right: 0.25rem;
}
.hmd-search-overlay__quick a {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 999px;
	padding: 0.375rem 0.875rem;
	color: var(--ink);
	text-decoration: none;
	font-weight: 700;
	font-size: 0.8125rem;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hmd-search-overlay__quick a:hover { background: var(--magenta); color: #fff; border-color: var(--magenta); }
@media (prefers-reduced-motion: reduce) {
	.hmd-search-overlay__backdrop,
	.hmd-search-overlay__panel { transition: none; }
}
