/**
 * WeMatrix global styles — header, footer, layout (all pages).
 */

:root {
	--wm-accent: #5bae4b;
	--wm-text: #111111;
	--wm-text-muted: rgba(17, 17, 17, 0.6);
	--wm-text-muted-70: rgba(17, 17, 17, 0.7);
	--wm-bg: #f7f7f7;
	--wm-dark: #111111;
	--wm-dark-footer: #0c0c0c;
	--wm-white: #ffffff;
	--wm-border: rgba(0, 0, 0, 0.05);
	--wm-border-10: rgba(0, 0, 0, 0.1);
	--wm-container: 80rem;
	--wm-radius: 0.75rem;
	--wm-radius-md: 0.5rem;
	--wm-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
	--wm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Site base */
body.wematrix-site {
	margin: 0;
	background: var(--wm-bg);
	color: var(--wm-text);
	font-family: var(--wm-font);
	-webkit-font-smoothing: antialiased;
}

body.wematrix-site #page {
	margin: 0;
	width: 100%;
}

body.wematrix-site #ast-desktop-header,
body.wematrix-site #ast-mobile-header,
body.wematrix-site .ast-footer-wrap,
body.wematrix-site .ast-breadcrumbs-wrapper,
body.wematrix-site .site-header:not(.wm-site-header) {
	display: none !important;
}

/* Skip link */
body.wematrix-site .skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

body.wematrix-site .skip-link:focus {
	position: fixed;
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--wm-dark);
	color: var(--wm-white);
	z-index: 100000;
	border-radius: var(--wm-radius-md);
}

/* Inner page content area */
.wm-site-content {
	background: var(--wm-bg);
}

.wm-site-content .ast-container {
	max-width: var(--wm-container);
	padding-left: 1rem;
	padding-right: 1rem;
}

@media (min-width: 640px) {
	.wm-site-content .ast-container {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (min-width: 1024px) {
	.wm-site-content .ast-container {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

body.wematrix-site:not(.wematrix-homepage):not(.wematrix-products):not(.wematrix-product-single):not(.wematrix-quote):not(.wematrix-projects):not(.wematrix-project-single) #primary {
	padding: 3rem 0 4rem;
}

body.wematrix-site:not(.wematrix-homepage) .entry-title {
	font-size: 2.25rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.025em;
	margin-bottom: 1.5rem;
}

body.wematrix-site:not(.wematrix-homepage) .entry-content {
	line-height: 1.625;
	color: var(--wm-text-muted-70);
}

body.wematrix-site:not(.wematrix-homepage) .entry-content a {
	color: var(--wm-accent);
}

/* Homepage / catalog / product detail: full-width sections inside content area */
body.wematrix-homepage .wm-site-content .ast-container,
body.wematrix-products .wm-site-content .ast-container,
body.wematrix-product-single .wm-site-content .ast-container,
body.wematrix-quote .wm-site-content .ast-container,
body.wematrix-projects .wm-site-content .ast-container,
body.wematrix-project-single .wm-site-content .ast-container {
	max-width: none;
	padding: 0;
	width: 100%;
}

body.wematrix-products #primary,
body.wematrix-product-single #primary,
body.wematrix-quote #primary,
body.wematrix-projects #primary,
body.wematrix-project-single #primary {
	padding: 0;
}

.wm-container {
	max-width: var(--wm-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

@media (min-width: 640px) {
	.wm-container {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (min-width: 1024px) {
	.wm-container {
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

/* Buttons */
.wm-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	border-radius: var(--wm-radius-md);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: filter 0.15s ease, background-color 0.15s ease;
	line-height: 1.25;
}

.wm-btn--primary {
	background: var(--wm-accent);
	color: var(--wm-white);
	padding: 0.75rem 1.5rem;
}

.wm-btn--primary:hover {
	filter: brightness(0.95);
	color: var(--wm-white);
}

.wm-btn--dark {
	background: var(--wm-dark);
	color: var(--wm-white);
	padding: 0.75rem 1.5rem;
}

.wm-btn--dark:hover {
	background: #000;
	color: var(--wm-white);
}

.wm-btn--outline-light {
	border: 1px solid rgba(255, 255, 255, 0.8);
	color: var(--wm-white);
	padding: 0.75rem 1.5rem;
	background: transparent;
}

.wm-btn--outline-light:hover {
	background: rgba(255, 255, 255, 0.1);
	color: var(--wm-white);
}

.wm-btn--sm {
	padding: 0.625rem 1.25rem;
}

/* Icons */
.wm-icon {
	flex-shrink: 0;
}

.wm-icon--sm {
	width: 1rem;
	height: 1rem;
}

.wm-icon--play {
	width: 1.25rem;
	height: 1.25rem;
	fill: currentColor;
}

/* Visibility helpers */
.wm-hide-md {
	display: none;
}

@media (min-width: 768px) {
	.wm-hide-md {
		display: inline;
	}
}

.wm-only-lg {
	display: none;
}

@media (min-width: 1024px) {
	.wm-only-lg {
		display: flex;
	}
}

/* Top bar */
.wm-top-bar {
	background: var(--wm-dark);
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.75rem;
}

.wm-top-bar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 2.25rem;
}

.wm-top-bar__tagline {
	margin: 0;
	display: none;
}

@media (min-width: 640px) {
	.wm-top-bar__tagline {
		display: block;
	}
}

.wm-top-bar__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-left: auto;
}

.wm-top-bar__link {
	color: inherit;
	text-decoration: none;
}

.wm-top-bar__link:hover {
	color: var(--wm-white);
}

/* Site header */
.wm-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--wm-border);
}

.wm-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 4rem;
	gap: 1rem;
}

.wm-logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 800;
	font-size: 1.125rem;
	text-decoration: none;
	color: var(--wm-text);
}

.wm-logo:hover {
	color: var(--wm-text);
}

.wm-logo--image {
	gap: 0;
}

.wm-logo__image {
	display: block;
	height: 2.25rem;
	width: auto;
	max-width: 12rem;
	object-fit: contain;
}

.wm-logo__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: var(--wm-radius-md);
	background: var(--wm-dark);
	color: var(--wm-accent);
	font-weight: 800;
}

.wm-logo__mark--footer {
	background: rgba(255, 255, 255, 0.1);
}

.wm-nav {
	display: none;
	align-items: center;
	gap: 1.75rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: rgba(17, 17, 17, 0.8);
}

@media (min-width: 1024px) {
	.wm-nav {
		display: flex;
	}
}

.wm-nav__link {
	text-decoration: none;
	color: inherit;
}

.wm-nav__link:hover {
	color: var(--wm-text);
}

.wm-nav__link.is-active {
	color: var(--wm-accent);
	font-weight: 600;
	border-bottom: 2px solid var(--wm-accent);
	padding-bottom: 0.25rem;
}

.wm-site-header__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

.wm-site-header__icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	color: rgba(17, 17, 17, 0.7);
	cursor: pointer;
}

.wm-site-header__icon-btn:hover {
	color: var(--wm-text);
}

.wm-icon--header {
	width: 1.25rem;
	height: 1.25rem;
}

.wm-site-header__cart {
	position: relative;
}

.wm-site-header__cart-count {
	position: absolute;
	right: -0.5rem;
	top: -0.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1rem;
	height: 1rem;
	border-radius: 9999px;
	background: var(--wm-accent);
	color: var(--wm-white);
	font-size: 0.625rem;
	font-weight: 700;
	line-height: 1;
}

/* Newsletter */
.wm-newsletter {
	background: var(--wm-dark);
	color: var(--wm-white);
}

.wm-newsletter__inner {
	padding: 2.5rem 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: space-between;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.wm-newsletter__inner {
		flex-direction: row;
		align-items: center;
	}
}

.wm-newsletter__title {
	font-size: 1.5rem;
	font-weight: 800;
	margin: 0;
}

.wm-newsletter__desc {
	margin: 0.25rem 0 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.7);
}

.wm-newsletter__form {
	display: flex;
	width: 100%;
	max-width: 28rem;
}

.wm-newsletter__input {
	flex: 1;
	border: none;
	border-radius: var(--wm-radius-md) 0 0 var(--wm-radius-md);
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	color: var(--wm-text);
	outline: none;
	min-width: 0;
}

.wm-newsletter__submit {
	border: none;
	border-radius: 0 var(--wm-radius-md) var(--wm-radius-md) 0;
	background: var(--wm-accent);
	color: var(--wm-white);
	padding: 0.75rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}

.wm-newsletter__submit:hover {
	filter: brightness(0.95);
}

/* Site footer */
.wm-site-footer {
	background: var(--wm-dark-footer);
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.875rem;
}

.wm-site-footer__grid {
	padding: 3.5rem 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2rem;
}

@media (min-width: 768px) {
	.wm-site-footer__grid {
		grid-template-columns: repeat(5, 1fr);
	}
}

.wm-site-footer__brand {
	grid-column: span 2;
}

@media (min-width: 768px) {
	.wm-site-footer__brand {
		grid-column: span 1;
	}
}

.wm-logo--footer {
	color: var(--wm-white);
}

.wm-logo--footer .wm-logo__image {
	height: 2.25rem;
	max-width: 12rem;
}

.wm-site-footer__tagline {
	margin: 1rem 0 0;
}

.wm-site-footer__social {
	margin-top: 1rem;
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.5);
}

.wm-site-footer__social-dot {
	margin: 0 0.35rem;
}

.wm-site-footer__heading {
	color: var(--wm-white);
	font-weight: 600;
	margin: 0 0 0.75rem;
}

.wm-site-footer__links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.wm-site-footer__links a {
	color: inherit;
	text-decoration: none;
}

.wm-site-footer__links a:hover {
	color: var(--wm-white);
}

.wm-site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wm-site-footer__bottom p {
	padding: 1.25rem 0;
	margin: 0;
	font-size: 0.75rem;
}

/* Video lightbox */
html.wm-video-modal-open {
	overflow: hidden;
}

.wm-video-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
}

.wm-video-modal[hidden] {
	display: none !important;
}

.wm-video-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.8);
	cursor: pointer;
}

.wm-video-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(56rem, 100%);
}

.wm-video-modal__close {
	position: absolute;
	top: -2.75rem;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: none;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.12);
	color: var(--wm-white);
	cursor: pointer;
}

.wm-video-modal__close:hover,
.wm-video-modal__close:focus-visible {
	background: rgba(255, 255, 255, 0.22);
	outline: none;
}

.wm-video-modal__frame {
	position: relative;
	overflow: hidden;
	width: 100%;
	aspect-ratio: 16 / 9;
	border-radius: var(--wm-radius);
	background: #000;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.wm-video-modal__frame iframe,
.wm-video-modal__frame video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}
