/* =========================================================
   WUDPAC — Global Design System (loads on every page)
   Home-page section styles live in home.css (front page only).
   Brand: navy #603304 + rust #677B2E · Lora + Montserrat · Bootstrap 5
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
	--wud-navy:        #603304;   /* primary structural anchor */
	--wud-navy-dark:   #3d2004;
	--wud-navy-tint:   #7a4a1e;   /* card surfaces / hover on dark */
	--wud-rust:        #677B2E;   /* surgical accent (white text on fill) */
	--wud-rust-dark:   #52631f;
	--wud-rust-light:  #82973a;
	--wud-accent-on-dark: #bcd07f;   /* AA-safe rust for normal-size text/links on dark */
	--wud-paper:       #F6F4EF;   /* warm off-white section surface */
	--wud-paper-2:     #EFE7DC;   /* kraft tint */
	--wud-line:        #EAE6DE;   /* hairline on light */
	--wud-line-navy:   rgba(96, 51, 4, .12);
	--wud-ink:         #1A1A1A;   /* heading ink on light */
	--wud-slate:       #5A6072;   /* body copy on light */
	--wud-warm-white:  #F4F2EE;   /* text on navy */
	--wud-tan:         #C9A67A;   /* wood tone — ISPM section only */

	--wud-font-head: "Lora", Georgia, serif;
	--wud-font-body: "Montserrat", system-ui, -apple-system, sans-serif;
	--wud-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

	--wud-radius: 6px;
	--wud-shadow-sm: 0 4px 14px rgba(96, 51, 4, .08);
	--wud-shadow:    0 12px 34px rgba(96, 51, 4, .12);
	--wud-shadow-lg: 0 20px 50px rgba(96, 51, 4, .16);

	--wud-section-y: clamp(4.5rem, 8vw, 8rem);
	--wud-container: 1240px;
}

/* ---------- Base ---------- */
html { overflow-x: clip; }
body {
	font-family: var(--wud-font-body);
	color: var(--wud-slate);
	line-height: 1.7;
	background: #fff;
	overflow-x: clip;
	max-width: 100%;
}
h1, h2, h3, h4, h5, h6 {
	font-family: var(--wud-font-head);
	font-weight: 600;
	color: var(--wud-ink);
	line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 4.5vw, 4rem); line-height: 1.08; }
h2 { font-size: clamp(2rem, 3.2vw, 2.9rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }
a { color: var(--wud-rust); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--wud-rust-dark); }
img { max-width: 100%; height: auto; }
.site-main { min-height: 40vh; overflow-x: clip; }

/* Wider container to match the design grid */
@media (min-width: 1200px) {
	.container { max-width: var(--wud-container); }
}

/* ---------- Buttons ---------- */
.btn-wud-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	background: var(--wud-rust);
	border: 2px solid var(--wud-rust);
	color: #fff;
	font-family: var(--wud-font-body);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: .85rem;
	padding: .7rem 1.7rem;
	border-radius: var(--wud-radius);
	transition: all .25s ease;
}
.btn-wud-primary:hover,
.btn-wud-primary:focus-visible {
	background: var(--wud-rust-dark);
	border-color: var(--wud-rust-dark);
	color: #fff;
	transform: translateY(-2px);
	box-shadow: var(--wud-shadow);
}
.btn-wud-ghost {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	background: transparent;
	border: 1.5px solid var(--wud-navy);
	color: var(--wud-navy);
	font-family: var(--wud-font-body);
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-size: .85rem;
	padding: .7rem 1.7rem;
	border-radius: var(--wud-radius);
	transition: all .25s ease;
}
.btn-wud-ghost:hover { background: var(--wud-navy); color: #fff; }
.btn-wud-ghost--onDark { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn-wud-ghost--onDark:hover { background: #fff; color: var(--wud-navy); border-color: #fff; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--wud-rust);
	outline-offset: 2px;
}

/* ---------- Utility top bar ---------- */
.wud-utilitybar {
	background: var(--wud-navy-dark);
	color: var(--wud-warm-white);
	font-size: .82rem;
	padding: .5rem 0;
}
.wud-utilitybar a { color: var(--wud-warm-white); }
.wud-utilitybar a:hover { color: var(--wud-accent-on-dark); }
.wud-utilitybar .wud-util-left span { margin-right: 1.25rem; }
.wud-badge-rust {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	background: var(--wud-rust);
	color: #fff;
	font-weight: 600;
	font-size: .72rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .2rem .65rem;
	border-radius: 50px;
}

/* ---------- Primary navigation (white) ---------- */
.wud-nav {
	background: #fff;
	padding: .5rem 0;
	position: sticky;
	top: 0;
	z-index: 1030;
	box-shadow: 0 2px 14px rgba(96, 51, 4, .07);
	border-bottom: 1px solid var(--wud-line);
	transition: padding .25s ease, box-shadow .25s ease;
}
.wud-nav.is-stuck {
	padding: .3rem 0;
	box-shadow: 0 8px 24px rgba(96, 51, 4, .13);
}
.wud-nav .navbar-brand { display: flex; align-items: center; padding: 0; margin: 0; }
.wud-nav .wud-logo,
.wud-nav .custom-logo { max-height: 48px; width: auto; }
.wud-nav .navbar-nav { align-items: center; }
.wud-nav .navbar-nav .nav-link {
	color: var(--wud-navy);
	font-family: var(--wud-font-body);
	font-weight: 600;
	font-size: .74rem;
	letter-spacing: .01em;
	text-transform: uppercase;
	white-space: nowrap;
	padding: .45rem .95rem !important;
	position: relative;
}
.wud-nav .navbar-nav .nav-link:hover,
.wud-nav .navbar-nav .nav-link.active { color: var(--wud-rust); }
.wud-nav .navbar-nav .nav-link::after {
	content: "";
	position: absolute;
	left: .55rem; right: .55rem; bottom: .2rem;
	height: 2px;
	background: var(--wud-rust);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .25s ease;
}
.wud-nav .navbar-nav .nav-link:hover::after,
.wud-nav .navbar-nav .nav-link.active::after { transform: scaleX(1); }
.wud-nav .btn-wud-primary { white-space: nowrap; padding: .55rem 1.1rem; font-size: .76rem; }
.wud-nav .navbar-toggler { border: 1px solid rgba(96, 51, 4, .2); padding: .3rem .55rem; }
.wud-nav .navbar-toggler-icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(96,51,4,0.85)' stroke-width='2.2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
/* Dropdown / mega menu */
.wud-nav .dropdown-menu {
	border: none;
	border-top: 3px solid var(--wud-rust);
	box-shadow: var(--wud-shadow);
	border-radius: 0 0 var(--wud-radius) var(--wud-radius);
	padding: .5rem;
	margin-top: .4rem;
	background: #fff;
}
.wud-nav .dropdown-item {
	border-radius: 4px;
	font-size: .84rem;
	font-weight: 500;
	color: var(--wud-navy);
	padding: .5rem .8rem;
}
.wud-nav .dropdown-item:hover,
.wud-nav .dropdown-item:focus { background: var(--wud-paper); color: var(--wud-rust); }
/* Offcanvas (mobile drawer, white) */
.wud-nav .offcanvas { background: #fff; color: var(--wud-navy); max-width: 320px; }
.wud-nav .offcanvas-header { border-bottom: 1px solid var(--wud-line); }
@media (max-width: 991.98px) {
	.wud-nav .navbar-nav .nav-link { padding: .7rem 0 !important; border-bottom: 1px solid var(--wud-line); white-space: normal; }
	.wud-nav .navbar-nav .nav-link::after { display: none; }
	.wud-nav .dropdown-menu { border-top: 0; box-shadow: none; padding-left: 1rem; margin-top: 0; }
	.wud-nav .dropdown-item { color: var(--wud-slate); }
}

/* ---------- Inner-page hero ---------- */
.page-hero {
	background: linear-gradient(135deg, var(--wud-navy) 0%, var(--wud-navy-dark) 100%);
	color: #fff;
	padding: clamp(3rem, 6vw, 5rem) 0;
	text-align: center;
	position: relative;
}
.page-hero-title { color: #fff; margin: 0; }
.breadcrumb-nav { margin-top: .75rem; font-size: .9rem; color: rgba(255, 255, 255, .8); }
.breadcrumb-nav a { color: var(--wud-accent-on-dark); }

/* ---------- Blog / cards (inner) ---------- */
.post-card { border-radius: var(--wud-radius); overflow: hidden; border: 1px solid var(--wud-line); }
.post-card .card-title a { color: var(--wud-ink); }
.post-card .card-title a:hover { color: var(--wud-rust); }
.read-more { font-weight: 600; color: var(--wud-rust); }
.page-content :is(h2, h3) { margin-top: 1.75rem; }

.wudpac-pagination .page-numbers {
	display: inline-block;
	padding: .45rem .85rem;
	margin: 0 .15rem;
	border: 1px solid var(--wud-line);
	border-radius: var(--wud-radius);
	color: var(--wud-ink);
}
.wudpac-pagination .page-numbers.current,
.wudpac-pagination .page-numbers:hover {
	background: var(--wud-navy);
	border-color: var(--wud-navy);
	color: #fff;
}

/* ---------- 404 ---------- */
.error-404 .error-code {
	font-size: clamp(5rem, 15vw, 9rem);
	font-weight: 700;
	color: var(--wud-navy);
	line-height: 1;
}

/* ---------- Footer ---------- */
.wud-footer { background: var(--wud-navy); color: rgba(244, 242, 238, .78); }
.wud-footer__top { padding: clamp(3rem, 5vw, 4.5rem) 0 2.5rem; border-top: 3px solid var(--wud-rust); }
.wud-footer__logo { max-height: 50px; width: auto; margin-bottom: 1.1rem; background: #fff; padding: .55rem .8rem; border-radius: 8px; }
.wud-footer__h {
	color: #fff;
	font-family: var(--wud-font-head);
	font-size: 1.1rem;
	margin-bottom: 1.1rem;
}
.wud-footer a { color: rgba(244, 242, 238, .78); }
.wud-footer a:hover { color: var(--wud-accent-on-dark); }
.wud-footer ul { list-style: none; padding: 0; margin: 0; }
.wud-footer li { margin-bottom: .55rem; }
.wud-footer__links a { display: inline-block; transition: transform .2s ease, color .2s ease; }
.wud-footer__links a:hover { transform: translateX(4px); }
.wud-footer__marks { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0; }
.wud-footer__mark {
	display: inline-flex; align-items: center; gap: .3rem;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .14);
	color: #fff; font-size: .72rem; font-weight: 600;
	padding: .25rem .6rem; border-radius: 4px;
}
.wud-social { display: flex; gap: .5rem; margin-top: 1rem; }
.wud-social a {
	width: 38px; height: 38px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(255, 255, 255, .08); color: #fff;
	transition: background .2s ease, transform .2s ease;
}
.wud-social a:hover { background: var(--wud-rust); transform: translateY(-2px); color: #fff; }
.wud-footer__map { border-radius: var(--wud-radius); overflow: hidden; position: relative; }
.wud-footer__map iframe { display: block; width: 100%; border: 0; }
.wud-footer__bar {
	background: rgba(0, 0, 0, .2);
	padding: 1rem 0;
	font-size: .82rem;
}
.wud-footer__bar a { color: rgba(244, 242, 238, .78); }
.wud-backtotop:hover { color: var(--wud-accent-on-dark); }

/* ---------- Sticky enquiry rail + mobile action bar ---------- */
.wud-rail {
	position: fixed; right: 18px; bottom: 22px; z-index: 1035;
	flex-direction: column; gap: .5rem;
	opacity: 0; visibility: hidden; transform: translateY(12px);
	transition: all .3s ease;
}
.wud-rail.show { opacity: 1; visibility: visible; transform: translateY(0); }
.wud-rail__btn {
	display: inline-flex; align-items: center; gap: .45rem;
	padding: .6rem 1rem; border-radius: 50px; font-weight: 600; font-size: .82rem;
	background: var(--wud-navy); color: #fff; box-shadow: var(--wud-shadow);
}
.wud-rail__btn--quote { background: var(--wud-rust); }
.wud-rail__btn--wa { background: var(--wud-navy-tint); }
.wud-rail__btn:hover { color: #fff; transform: translateX(-3px); }
.wud-mobilebar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035;
	display: flex; background: var(--wud-navy);
	box-shadow: 0 -6px 20px rgba(61, 32, 4, .3);
	padding-bottom: env(safe-area-inset-bottom);
}
.wud-mobilebar a {
	flex: 1; text-align: center; padding: .8rem .5rem;
	color: #fff; font-size: .78rem; font-weight: 600;
	display: flex; flex-direction: column; align-items: center; gap: .15rem;
}
.wud-mobilebar a.is-primary { background: var(--wud-rust); }
.wud-mobilebar a i { font-size: 1.1rem; }

/* ---------- Floating back-to-top ---------- */
.back-to-top {
	position: fixed; right: 18px; bottom: 22px;
	width: 46px; height: 46px; border: none; border-radius: 50%;
	background: var(--wud-navy); color: #fff; font-size: 1.2rem;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: all .3s ease; z-index: 1032; box-shadow: var(--wud-shadow);
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--wud-rust); color: #fff; }
/* When the sticky rail is visible, tuck the back-to-top button out of its way */
@media (min-width: 992px) {
	.wud-rail.show ~ .back-to-top { bottom: auto; top: 50%; }
}

/* ---------- Scroll-reveal utility (implemented in home.js) ---------- */
.wud-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.wud-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
	.wud-reveal { opacity: 1 !important; transform: none !important; }
}

/* Skip-link / anchor target is programmatically focused — hide its focus ring */
#main:focus { outline: none; }

/* Keep fixed UI clear of the mobile action bar (≤991px) */
@media (max-width: 991.98px) {
	body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
	.back-to-top { bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* Footer content font-size (menu links + paragraphs) */
.wud-footer__top { font-size: 15px; }
/* Products dropdown caret */
.wud-nav__caret { font-size: .68rem; margin-left: .3rem; opacity: .8; vertical-align: middle; }

/* Hide the mobile action bar while the nav drawer (offcanvas) is open */
.wud-mobilebar { transition: transform .3s ease, opacity .3s ease; }
body.wud-nav-open .wud-mobilebar { transform: translateY(100%); opacity: 0; pointer-events: none; }
