/**
 * PrecisionMart foundation styles.
 * Colors are applied through semantic custom properties only.
 */

:root {
	--pm-gold: #d4af37;
	--pm-gold-light: #e8c96a;
	--pm-cream: #faf7ef;
	--pm-white: #ffffff;
	--pm-text: #252525;
	--pm-muted: #666666;

	--pm-color-primary: var(--pm-gold);
	--pm-color-primary-hover: var(--pm-gold-light);
	--pm-color-surface: var(--pm-white);
	--pm-color-surface-subtle: var(--pm-cream);
	--pm-color-text: var(--pm-text);
	--pm-color-text-muted: var(--pm-muted);
	--pm-color-border: color-mix(in srgb, var(--pm-gold) 32%, var(--pm-cream));
	--pm-color-footer: #1a1a1a;
	--pm-color-footer-text: var(--pm-cream);
	--pm-color-footer-muted: #c8c4bb;
	--pm-color-footer-rule: color-mix(in srgb, var(--pm-gold) 28%, transparent);
	--pm-color-whatsapp: #25d366;
	--pm-color-focus: var(--pm-gold);
	--pm-gold-soft: color-mix(in srgb, var(--pm-gold) 18%, var(--pm-cream));

	--pm-font-heading: "Archivo", "Segoe UI", system-ui, sans-serif;
	--pm-font-body: "Manrope", "Segoe UI", system-ui, sans-serif;

	--pm-fs-h1: clamp(2rem, 2vw + 1.4rem, 3rem);
	--pm-fs-h2: clamp(1.5rem, 1.2vw + 1.15rem, 2.125rem);
	--pm-fs-h3: clamp(1.2rem, 0.6vw + 1.05rem, 1.5rem);
	--pm-fs-body: 1rem;
	--pm-fs-small: 0.875rem;
	--pm-fs-eyebrow: 0.75rem;
	--pm-fs-nav: 0.9375rem;
	--pm-fs-button: 0.875rem;
	--pm-lh-heading: 1.2;
	--pm-lh-body: 1.6;

	--pm-space-1: 0.25rem;
	--pm-space-2: 0.5rem;
	--pm-space-3: 0.75rem;
	--pm-space-4: 1rem;
	--pm-space-5: 1.5rem;
	--pm-space-6: 2rem;
	--pm-space-7: 3rem;
	--pm-space-8: 4rem;

	--pm-container: 80rem;
	--pm-gutter: 1.25rem;

	--pm-radius-sm: 6px;
	--pm-radius-md: 8px;
	--pm-radius-pill: 999px;

	--pm-shadow-sm: 0 1px 2px rgba(37, 37, 37, 0.06);
	--pm-shadow-md: 0 10px 28px rgba(37, 37, 37, 0.08);
	--pm-shadow-lg: 0 18px 40px rgba(37, 37, 37, 0.1);

	--pm-header-height: 4rem;
	--pm-transition: 0.28s ease;
	--pm-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--pm-nav-bp: 1280px;
}

@media (min-width: 768px) {
	:root {
		--pm-gutter: 2rem;
		--pm-header-height: 4.75rem;
	}
}

@media (min-width: 1280px) {
	:root {
		--pm-gutter: 3rem;
		--pm-fs-nav: 0.875rem;
	}
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--pm-header-height) + 0.75rem);
}

body {
	margin: 0;
	background-color: var(--pm-color-surface);
	color: var(--pm-color-text);
	font-family: var(--pm-font-body);
	font-size: var(--pm-fs-body);
	line-height: var(--pm-lh-body);
}

body.pm-nav-open {
	overflow: hidden;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

a {
	color: var(--pm-color-text);
	text-decoration: none;
	transition: color var(--pm-transition), background-color var(--pm-transition), border-color var(--pm-transition);
}

a:hover {
	color: var(--pm-color-primary);
}

:focus-visible {
	outline: 2px solid var(--pm-color-focus);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: absolute;
	z-index: 300;
	top: var(--pm-space-2);
	left: var(--pm-space-2);
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--pm-space-2) var(--pm-space-4);
	clip: auto;
	overflow: visible;
	background: var(--pm-color-surface);
	color: var(--pm-color-text);
}

.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.site-main {
	flex: 1 0 auto;
	padding-block: var(--pm-space-6);
}

.pm-container {
	width: 100%;
	max-width: var(--pm-container);
	margin-inline: auto;
	padding-inline: var(--pm-gutter);
}

h1,
.page-title,
.entry-title {
	font-family: var(--pm-font-heading);
	font-size: var(--pm-fs-h1);
	font-weight: 600;
	line-height: var(--pm-lh-heading);
	letter-spacing: -0.02em;
	color: var(--pm-color-text);
}

h2 {
	font-family: var(--pm-font-heading);
	font-size: var(--pm-fs-h2);
	font-weight: 600;
	line-height: var(--pm-lh-heading);
}

h3 {
	font-family: var(--pm-font-heading);
	font-size: var(--pm-fs-h3);
	font-weight: 600;
	line-height: var(--pm-lh-heading);
}

.pm-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	margin: 0;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--pm-color-primary);
}

.pm-eyebrow--line::before {
	content: "";
	width: 1.5rem;
	height: 1px;
	background: var(--pm-color-primary);
}

.pm-text-small,
small {
	font-size: var(--pm-fs-small);
	color: var(--pm-color-text-muted);
}

.pm-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	min-height: 2.75rem;
	padding: 0.7rem 1.25rem;
	border: 1px solid transparent;
	border-radius: var(--pm-radius-sm);
	background: var(--pm-color-primary);
	color: var(--pm-color-text);
	font-family: var(--pm-font-body);
	gap: 0.5rem;
	font-size: var(--pm-fs-button);
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--pm-transition), color var(--pm-transition), border-color var(--pm-transition), box-shadow var(--pm-transition), transform var(--pm-transition);
}

.pm-button:hover,
.pm-button:focus-visible {
	background: var(--pm-color-primary-hover);
	color: var(--pm-color-text);
	transform: translateY(-1px);
}

.pm-button--primary::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(120deg, transparent 35%, rgb(255 255 255 / 0.28) 50%, transparent 65%);
	transform: translateX(-130%);
	transition: transform 0.65s var(--pm-ease);
	pointer-events: none;
}

.pm-button--primary:hover::after,
.pm-button--primary:focus-visible::after {
	transform: translateX(130%);
}

.pm-button--primary {
	background: var(--pm-color-primary);
	color: var(--pm-color-text);
}

.pm-button--secondary {
	background: transparent;
	border-color: color-mix(in srgb, var(--pm-gold) 55%, var(--pm-text));
	color: var(--pm-color-text);
}

.pm-button--secondary:hover,
.pm-button--secondary:focus-visible {
	background: var(--pm-color-surface);
	border-color: var(--pm-color-primary);
	color: var(--pm-color-text);
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 200;
	height: var(--pm-header-height);
	background: color-mix(in srgb, var(--pm-color-surface) 92%, transparent);
	backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: height 0.35s var(--pm-ease), background-color 0.35s var(--pm-ease), box-shadow 0.35s var(--pm-ease), border-color 0.35s var(--pm-ease);
}

.site-header.is-scrolled {
	background: var(--pm-color-surface);
	border-bottom-color: var(--pm-color-border);
	box-shadow: var(--pm-shadow-sm);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--pm-space-3);
	height: var(--pm-header-height);
}

.site-branding {
	min-width: 0;
}

.site-title {
	margin: 0;
	font-size: 1.05rem;
	font-family: var(--pm-font-heading);
	font-weight: 600;
	line-height: 1;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.65rem;
	color: var(--pm-color-text);
	min-height: 44px;
}

.brand:hover {
	color: var(--pm-color-text);
}

.brand__mark {
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0.35rem;
	background: var(--pm-color-text);
	border-radius: var(--pm-radius-sm);
	flex-shrink: 0;
}

.brand__logo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.brand__text {
	min-width: 0;
	line-height: 1.15;
}

.brand__name {
	display: block;
	font-family: var(--pm-font-heading);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.brand__tld {
	color: var(--pm-color-primary);
}

.brand__tag {
	display: none;
	font-family: var(--pm-font-body);
	font-size: 0.625rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--pm-color-text-muted);
}

.custom-logo-link {
	display: flex;
	align-items: center;
	min-height: 44px;
}

.custom-logo {
	display: block;
	max-height: 40px;
	width: auto;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

.header-cta--header .header-cta__full {
	display: none;
}

.primary-menu__cta {
	display: block;
	margin-top: var(--pm-space-5);
}

@media (min-width: 640px) {
	.header-cta--header .header-cta__short {
		display: none;
	}

	.header-cta--header .header-cta__full {
		display: inline;
	}

	.brand__tag {
		display: block;
	}

	.brand__mark {
		width: 3rem;
		height: 3rem;
	}

	.brand__name {
		font-size: 1.125rem;
	}
}

.primary-navigation {
	display: flex;
	align-items: center;
}

.menu-toggle {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--pm-color-border);
	border-radius: var(--pm-radius-sm);
	background: transparent;
	cursor: pointer;
}

.menu-toggle:hover {
	border-color: var(--pm-color-primary);
}

.menu-toggle__bars {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 20px;
}

.menu-toggle__bars span {
	display: block;
	height: 2px;
	background: var(--pm-color-text);
	border-radius: 1px;
	transition: transform var(--pm-transition), opacity var(--pm-transition);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) {
	opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.nav-overlay {
	position: fixed;
	inset: var(--pm-header-height) 0 0 0;
	background: rgba(37, 37, 37, 0.28);
	z-index: 180;
}

.nav-overlay[hidden] {
	display: none;
}

.primary-menu {
	display: none;
	position: fixed;
	z-index: 190;
	top: var(--pm-header-height);
	right: 0;
	left: 0;
	max-height: calc(100vh - var(--pm-header-height));
	overflow: auto;
	padding: var(--pm-space-4) var(--pm-gutter) var(--pm-space-6);
	background: var(--pm-color-surface);
	border-bottom: 1px solid var(--pm-color-border);
	box-shadow: var(--pm-shadow-md);
}

.primary-menu.is-open {
	display: block;
}

.primary-menu__list,
.sub-menu,
.footer-nav__list,
.footer-contact__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.primary-menu__list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.menu-item__row {
	display: flex;
	align-items: center;
	min-height: 48px;
	border-bottom: 1px solid var(--pm-color-surface-subtle);
}

.menu-item__row > a {
	flex: 1;
	padding: var(--pm-space-3) 0;
	font-size: var(--pm-fs-nav);
	font-weight: 600;
}

.menu-item__chevron {
	display: none;
}

.submenu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin-left: auto;
	border: 0;
	background: transparent;
	color: var(--pm-color-text-muted);
	cursor: pointer;
}

.submenu-toggle:hover {
	color: var(--pm-color-primary);
}

.submenu-toggle__icon {
	display: block;
	width: 16px;
	height: 16px;
	transition: transform var(--pm-transition);
}

.submenu-toggle[aria-expanded="true"] .submenu-toggle__icon {
	transform: rotate(180deg);
}

.sub-menu {
	display: none;
	padding: 0 0 var(--pm-space-3) var(--pm-space-4);
}

.menu-item-has-children.is-open > .sub-menu {
	display: block;
}

.sub-menu a {
	display: block;
	padding: 0.7rem 0;
	color: var(--pm-color-text-muted);
	font-size: var(--pm-fs-small);
	min-height: 44px;
}

.sub-menu a:hover {
	color: var(--pm-color-primary);
}

.primary-menu__cta .pm-button {
	width: 100%;
}

@media (min-width: 1280px) {
	.primary-menu__cta,
	.menu-toggle,
	.nav-overlay,
	.submenu-toggle {
		display: none;
	}

	.site-header__inner {
		gap: var(--pm-space-6);
	}

	.primary-navigation {
		flex: 1 1 auto;
		justify-content: center;
		min-width: 0;
	}

	.primary-menu {
		display: block;
		position: static;
		max-height: none;
		overflow: visible;
		padding: 0;
		border: 0;
		box-shadow: none;
		background: transparent;
	}

	.primary-menu__list {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		flex-wrap: nowrap;
		gap: 1.5rem;
	}

	.menu-item {
		position: relative;
	}

	.menu-item__row {
		min-height: var(--pm-header-height);
		border: 0;
	}

	.menu-item__row > a {
		position: relative;
		display: inline-flex;
		align-items: center;
		gap: 0.25rem;
		padding: 0.5rem 0;
		white-space: nowrap;
		font-weight: 500;
		font-size: 0.875rem;
		color: color-mix(in srgb, var(--pm-color-text) 85%, transparent);
	}

	.menu-item__chevron {
		display: inline-flex;
		color: var(--pm-color-text-muted);
	}

	.menu-item__chevron .submenu-toggle__icon {
		width: 14px;
		height: 14px;
		transition: transform 0.2s ease, color 0.2s ease;
	}

	.menu-item__row > a::before {
		content: "";
		position: absolute;
		right: 0;
		bottom: 0;
		left: 0;
		height: 1px;
		background: var(--pm-color-primary);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 0.2s ease;
	}

	.menu-item-has-children:hover .menu-item__chevron .submenu-toggle__icon,
	.menu-item-has-children:focus-within .menu-item__chevron .submenu-toggle__icon {
		transform: rotate(180deg);
		color: var(--pm-color-primary);
	}

	.menu-item__row > a:hover::before,
	.menu-item-has-children:hover > .menu-item__row > a::before,
	.menu-item-has-children:focus-within > .menu-item__row > a::before {
		transform: scaleX(1);
	}

	.menu-item__row > a:hover,
	.menu-item-has-children:hover > .menu-item__row > a,
	.menu-item-has-children:focus-within > .menu-item__row > a {
		color: var(--pm-color-primary);
	}

	.sub-menu {
		display: block;
		position: absolute;
		top: calc(100% - 0.5rem);
		left: 50%;
		z-index: 50;
		width: 18rem;
		max-height: 70vh;
		overflow: auto;
		margin: 0;
		padding: 0.85rem 0.5rem 0.5rem;
		background: var(--pm-color-surface);
		border: 1px solid var(--pm-color-border);
		border-radius: 0.75rem;
		box-shadow: 0 18px 44px -16px color-mix(in srgb, var(--pm-gold) 35%, transparent), 0 8px 24px -12px rgba(0, 0, 0, 0.12);
		opacity: 0;
		visibility: hidden;
		transform: translate(-50%, 0.35rem);
		transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	}

	.menu-item-has-children:hover > .sub-menu,
	.menu-item-has-children:focus-within > .sub-menu {
		opacity: 1;
		visibility: visible;
		transform: translate(-50%, 0);
	}

	.sub-menu a {
		padding: 0.65rem 1rem;
		min-height: 2.5rem;
		border-radius: 0.5rem;
		color: color-mix(in srgb, var(--pm-color-text) 80%, transparent);
	}

	.sub-menu a:hover,
	.sub-menu a:focus-visible {
		background: var(--pm-color-surface-subtle);
		color: var(--pm-color-primary);
		box-shadow: none;
	}
}

.site-footer {
	background: var(--pm-color-footer);
	color: var(--pm-color-footer-text);
	padding: var(--pm-space-7) 0 calc(var(--pm-space-5) + 4.25rem);
}

.site-footer a {
	color: var(--pm-color-footer-muted);
}

.site-footer a:hover {
	color: var(--pm-color-primary);
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--pm-space-6);
}

.footer-brand {
	margin: 0 0 var(--pm-space-3);
}

.brand--footer {
	color: var(--pm-color-footer-text);
}

.brand--footer:hover {
	color: var(--pm-color-footer-text);
}

.brand--footer .brand__name {
	color: var(--pm-color-footer-text);
}

.brand--footer .brand__tag {
	color: color-mix(in srgb, var(--pm-color-footer-text) 60%, transparent);
}

.footer-description {
	margin: 0 0 var(--pm-space-5);
	max-width: 22rem;
	color: var(--pm-color-footer-muted);
	font-size: var(--pm-fs-small);
}

.footer-nav__title {
	margin: 0 0 var(--pm-space-3);
	font-family: var(--pm-font-heading);
	font-size: 1rem;
	color: var(--pm-color-primary);
}

.footer-nav__list a,
.footer-contact__list {
	font-size: var(--pm-fs-small);
}

.footer-nav__list li + li,
.footer-contact__list li + li {
	margin-top: 0.55rem;
}

.footer-contact__list {
	color: var(--pm-color-footer-muted);
}

.footer-contact__label {
	display: block;
	color: var(--pm-color-footer-text);
	font-weight: 600;
}

.footer-stack {
	display: grid;
	gap: 2.5rem;
}

.footer-contact {
	margin: 0;
}

.site-footer__regions {
	margin-top: var(--pm-space-6);
	padding-top: var(--pm-space-5);
	border-top: 1px solid var(--pm-color-footer-rule);
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.site-footer__region-block .footer-nav__title a {
	color: inherit;
	text-decoration: none;
}

.site-footer__region-block .footer-nav__title a:hover {
	text-decoration: underline;
}

.site-footer__region-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__region-list a {
	font-size: var(--pm-fs-small);
	color: var(--pm-color-footer-muted);
	text-decoration: none;
	transition: color 0.15s ease;
}

.site-footer__region-list a:hover {
	color: var(--pm-color-primary);
	text-decoration: underline;
}

.site-footer__bar {
	margin-top: var(--pm-space-7);
	padding-top: var(--pm-space-5);
	border-top: 1px solid var(--pm-color-footer-rule);
}

.site-footer__bar-inner {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

@media (min-width: 768px) {
	.site-footer__bar-inner {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}

.site-info {
	margin: 0;
	color: var(--pm-color-footer-muted);
	font-size: var(--pm-fs-small);
}

.site-footer__legal-list {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-footer__legal-list a {
	color: var(--pm-color-footer-muted);
	font-size: var(--pm-fs-small);
	text-decoration: none;
	transition: color 0.2s ease;
}

.site-footer__legal-list a:hover {
	color: var(--pm-color-gold);
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 1024px) {
	.site-footer {
		padding-bottom: calc(var(--pm-space-6) + 1.5rem);
	}

	.site-footer__grid {
		grid-template-columns: 1.4fr 1fr 1fr 1fr;
		gap: var(--pm-space-5);
	}
}

.whatsapp-float {
	position: fixed;
	right: 1.25rem;
	bottom: max(1.25rem, env(safe-area-inset-bottom));
	z-index: 150;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: var(--pm-radius-pill);
	background: var(--pm-color-text);
	color: var(--pm-color-surface-subtle);
	box-shadow: var(--pm-shadow-lg);
	transition: transform var(--pm-transition), box-shadow var(--pm-transition);
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
	color: var(--pm-color-surface);
	transform: scale(1.05);
}

.whatsapp-float__icon {
	display: block;
}

@media (min-width: 768px) {
	.whatsapp-float {
		right: 1.5rem;
		bottom: 1.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pm-button,
	.pm-button--primary::after,
	.brand__mark,
	.whatsapp-float,
	.menu-item__row > a::before {
		transition: none;
		transform: none;
		animation: none;
	}
}
