/* =========================================================================
   Nomad — WP chrome (nav mega-menu, footer, breadcrumbs).
   Brand tokens (--ink, --accent, --surface…) come from premium-site-override.css.
   ========================================================================= */

/* ---------------------------------------------------------------- NAV BAR */
.nm-nav {
	position: sticky; top: 0; left: 0; right: 0; z-index: 100;
	background: rgb(29, 29, 27);
	padding: 22px 64px;
	display: grid; grid-template-columns: auto 1fr auto; gap: 48px; align-items: center;
}
.nm-logo { display: flex; align-items: center; text-decoration: none; }
.nm-logo img { height: 61px; width: auto; display: block; }

.nm-menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; align-items: center; gap: 30px; justify-content: flex-start;
}
.nm-menu .nm-item { position: relative; }
/* Mega items stay static so the wide panel centers on the nav (viewport),
   not on the narrow trigger <li>. */
.nm-menu .nm-has-mega { position: static; }
.nm-menu a {
	display: flex; align-items: center; gap: 6px;
	color: #fff; text-decoration: none;
	font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 400;
	letter-spacing: 0.16em; text-transform: uppercase; line-height: 1;
	padding: 6px 0; transition: color 0.25s ease;
}
.nm-menu .nm-item > a:hover { color: rgba(230, 220, 203, 0.7); }
.nm-caret { font-size: 9px; opacity: 0.7; }

/* ----- Mega menu (Residential / Commercial) ----- */
.nm-mega {
	position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
	padding-top: 16px; /* invisible hover bridge */
	z-index: 200; display: none;
}
.nm-has-mega:hover .nm-mega { display: block; }
.nm-mega-inner {
	background: rgba(38, 36, 31, 0.96);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(230, 220, 203, 0.2);
	border-radius: 8px;
	box-shadow: rgba(0, 0, 0, 0.45) 0 16px 40px;
	padding: 28px; width: 980px; max-width: calc(100vw - 48px);
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.nm-mega-head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
	padding: 0 0 10px; margin-bottom: 10px;
	border-bottom: 2px solid rgba(230, 220, 203, 0.4);
}
.nm-mega-head .wf-serif {
	font-size: 17px; font-weight: 700; letter-spacing: -0.015em;
	color: rgb(230, 220, 203); text-transform: none;
}
.nm-mega-count {
	font-family: 'Montserrat', sans-serif; font-size: 10px; letter-spacing: 0.12em;
	text-transform: uppercase; color: rgba(230, 220, 203, 0.55); white-space: nowrap;
}
.nm-mega-links { list-style: none; margin: 0; padding: 0; }
.nm-mega-links a {
	display: block; padding: 7px 0;
	color: rgba(230, 220, 203, 0.85);
	font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 500;
	letter-spacing: 0.02em; text-transform: none;
}
.nm-mega-links a:hover { color: #fff; }

/* ----- Simple dropdown (About) ----- */
.nm-has-dd .nm-dd {
	position: absolute; top: 100%; left: 0; margin-top: 16px;
	min-width: 210px; display: none; z-index: 200;
	background: rgba(38, 36, 31, 0.96); backdrop-filter: blur(10px);
	border: 1px solid rgba(230, 220, 203, 0.2); border-radius: 8px;
	box-shadow: rgba(0, 0, 0, 0.45) 0 16px 40px; padding: 10px;
	list-style: none;
}
/* hover bridge for the gap above the panel */
.nm-has-dd::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 20px; }
.nm-has-dd:hover .nm-dd { display: block; }
.nm-dd a {
	display: block; padding: 9px 12px;
	color: rgba(230, 220, 203, 0.85); font-size: 12px;
	letter-spacing: 0.08em; text-transform: uppercase;
}
.nm-dd a:hover { color: #fff; }

/* ----- Right-side actions ----- */
.nm-nav-actions { display: flex; align-items: center; gap: 24px; justify-self: end; }
.nm-nav-phone {
	color: #fff; text-decoration: none; font-size: 12px; letter-spacing: 0.04em;
	display: inline-flex; align-items: center; white-space: nowrap;
}
.nm-nav-phone:hover { color: rgba(230, 220, 203, 0.7); }

/* Hide the desktop phone on tighter widths before the mobile drawer kicks in */
@media (max-width: 1180px) { .nm-nav-phone { display: none; } }

/* Mobile: hide desktop nav internals; mobile-nav.js shows the hamburger bar */
@media (max-width: 899px) {
	body.nm-mobile .nm-nav { grid-template-columns: 1fr; padding: 16px 20px; }
	body.nm-mobile .nm-nav > .nm-logo,
	body.nm-mobile .nm-nav > .nm-menu,
	body.nm-mobile .nm-nav > .nm-nav-actions { display: none !important; }
}

/* ------------------------------------------------------------- FOOTER */
.nm-footer { background: var(--ink); color: rgba(230, 220, 203, 0.9); padding: 56px 64px 28px; }
.nm-footer a { color: inherit; text-decoration: none; }
.nm-footer a:hover { color: #fff; }
.nm-footer-top {
	display: grid; grid-template-columns: 1.4fr 1.4fr auto; gap: 40px;
	align-items: start; padding-bottom: 36px; border-bottom: 1px solid rgb(42, 40, 37);
}
.nm-footer-brand img { height: 57px; width: auto; display: block; margin-bottom: 12px; }
.nm-footer-tag { font-size: 14px; color: rgba(230, 220, 203, 0.7); max-width: 260px; }
.nm-footer-contact { font-size: 14px; line-height: 2; }
.nm-footer-social { display: flex; gap: 10px; }
.nm-footer-social a {
	width: 32px; height: 32px; border-radius: 50%; background: rgb(42, 40, 37);
	display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.nm-footer-social a:hover { background: var(--accent); }

.nm-footer-cols {
	display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px;
	padding: 36px 0;
}
.nm-footer-col h4 {
	font-family: 'Montserrat', sans-serif; font-size: 11px; font-weight: 600;
	letter-spacing: 0.14em; text-transform: uppercase; color: rgba(230, 220, 203, 0.5);
	margin: 0 0 16px;
}
.nm-footer-col ul { list-style: none; margin: 0; padding: 0; }
.nm-footer-col li { margin-bottom: 10px; }
.nm-footer-col a { font-size: 13px; color: rgba(230, 220, 203, 0.8); }

.nm-footer-bottom {
	display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
	padding-top: 20px; border-top: 1px solid rgb(42, 40, 37);
	font-size: 12px; color: rgb(128, 125, 115);
}
.nm-footer-legal-links { display: flex; flex-wrap: wrap; gap: 16px; }

@media (max-width: 899px) {
	.nm-footer { padding: 40px 20px 24px; }
	.nm-footer-top { grid-template-columns: 1fr; gap: 24px; }
	.nm-footer-cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ------------------------------------------------------- BREADCRUMBS */
.nm-crumbs {
	font-family: 'Montserrat', sans-serif; font-size: 12px; letter-spacing: 0.04em;
	color: var(--ink-3);
}
.nm-crumbs a { color: var(--ink-3); text-decoration: none; }
.nm-crumbs a:hover { color: var(--accent); }
.nm-crumbs .breadcrumb_last { color: var(--ink); }

/* ----------------------------------------------------- BLOCK SUPPORT */
/* Centered content column (mirrors the 1380 grid rule; explicit + safe) */
.nm-wrap { max-width: 1380px; margin: 0 auto; width: 100%; }

/* Ken Burns drift on the hero background (keyframes in premium-site-override.css) */
.nm-kenburns { animation: nmKenBurns 26s ease-in-out infinite alternate; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .nm-kenburns { animation: none; } }

/* SEO block — light beige (bg set in premium-site-override.css) + paper texture */
.nm-seo { position: relative; }
.nm-seo::before {
	content: ''; position: absolute; inset: 0; pointer-events: none;
	background-image: url("../img/texture-paper.webp"); background-size: cover;
	mix-blend-mode: multiply; opacity: 0.5;
}
.nm-seo > .nm-wrap { position: relative; z-index: 1; }

/* FAQ accordion marker */
.nm-faq summary::-webkit-details-marker { display: none; }
.nm-faq summary::marker { content: ''; }
.nm-faq-item[open] .nm-faq-mark { transform: rotate(45deg); }
.nm-faq-mark { display: inline-block; transition: transform 0.25s ease; font-size: 22px; line-height: 1; }

/* ----------------------------------------------------- PAGINATION */
.nm-pagination .nav-links { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.nm-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px;
	font-family: 'Montserrat', sans-serif; font-size: 13px; color: var(--ink-2);
	border: 1px solid var(--line); text-decoration: none; background: var(--surface);
	transition: all 0.2s ease;
}
.nm-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.nm-pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.nm-pagination .page-numbers.dots { border: none; background: none; }

/* ----------------------------------------------------------- FORMS (CF7) */
.nm-field { margin: 0 0 18px; display: block; }
.nm-field label { display: block; font-family: 'Montserrat', sans-serif; font-size: 10px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.nm-form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nm-form-card .wpcf7-form-control,
.nm-form-card input[type="text"], .nm-form-card input[type="email"], .nm-form-card input[type="tel"],
.nm-form-card input[type="date"], .nm-form-card select, .nm-form-card textarea,
.nm-form-card input.wpcf7-form-control:not([type="submit"]) {
	width: 100%; box-sizing: border-box; padding: 13px 14px;
	font-family: 'Montserrat', sans-serif; font-size: 14px; color: var(--ink);
	background: var(--surface); border: 1px solid var(--line-2); border-radius: 2px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nm-form-card textarea { min-height: 120px; resize: vertical; }
.nm-form-card input:focus, .nm-form-card select:focus, .nm-form-card textarea:focus {
	outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(106,28,40,0.12);
}
.nm-form-card .nm-field-error,
.nm-form-card .wpcf7-not-valid { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(106,28,40,0.10); }
.nm-form-card .wpcf7-not-valid-tip { color: var(--accent); font-size: 12px; margin-top: 5px; display: block; }
.nm-form-card .wpcf7-response-output { margin: 16px 0 0; padding: 12px 14px; font-size: 13px; border: 1px solid var(--line-2); border-radius: 2px; }
.nm-form-card .wpcf7-spinner { margin: 0 0 0 10px; }

/* Quote stepper */
.nm-step-nav { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.nm-step-prev { background: none; border: none; color: var(--ink-3); font-family: 'Montserrat', sans-serif; font-size: 13px; cursor: pointer; padding: 10px 4px; }
.nm-step-prev:hover { color: var(--accent); }
.nm-quote-dots { display: flex; gap: 8px; }
.nm-quote-dot { width: 28px; height: 4px; border-radius: 2px; background: var(--line); transition: background 0.25s ease; }
.nm-quote-dot.is-active, .nm-quote-dot.is-current { background: var(--accent); }

@media (max-width: 899px) {
	.nm-form-grid2 { grid-template-columns: 1fr; }
	.nm-quote .nm-wrap { grid-template-columns: 1fr !important; }
	.page-contact .nm-wrap, section.nm-block .nm-wrap[style*="0.9fr"] { grid-template-columns: 1fr !important; }
}

/* --------------------------------------------------- ON-DARK POLISH */
/* Ghost / secondary buttons need a visible treatment on dark sections */
.nm-on-dark .wf-btn-ghost,
.nm-on-dark .wf-btn-secondary {
	color: rgba(230, 220, 203, 0.95) !important;
	border: 1px solid rgba(230, 220, 203, 0.45) !important;
	background: transparent !important;
}
.nm-on-dark .wf-btn-ghost:hover,
.nm-on-dark .wf-btn-secondary:hover {
	color: var(--ink) !important; background: rgba(230, 220, 203, 0.95) !important;
	border-color: rgba(230, 220, 203, 0.95) !important;
}
/* Eyebrow on dark stays legible */
.nm-on-dark .nm-eyebrow { color: rgba(230, 220, 203, 0.65) !important; }
