/*
 * Millennia Village — Components
 * Header, footer, newsletter, Mylo badge.
 */

/* ─────────────────────────────────────────────────────────────
   SKIP LINK
   ───────────────────────────────────────────────────────────── */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--surface-forest);
	color: var(--white);
	padding: 0.75rem 1rem;
	z-index: 1000;
}

.skip-link:focus {
	top: 0;
}

/* ─────────────────────────────────────────────────────────────
   SITE NAV — sticky, forest background, 80px desktop / 64px mobile
   ───────────────────────────────────────────────────────────── */
.mv-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--surface-forest);
	height: 80px;
	padding: 0 var(--section-pad-x);
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* Smooth transition between rest and scrolled states */
	transition: background-color 400ms cubic-bezier(0.32, 0.72, 0, 1),
	            box-shadow 400ms cubic-bezier(0.32, 0.72, 0, 1);
}

/* Nav scroll-state — applied via JS in header.php once scroll > 40px.
   Deepens the forest background, lifts a soft shadow underneath. The
   change is subtle on purpose; the nav should feel like it "wakes up"
   rather than transform. */
.mv-nav.is-scrolled {
	background: rgba(18, 39, 29, 0.96);
	box-shadow: 0 2px 24px rgba(11, 26, 19, 0.18);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
}

@media (prefers-reduced-motion: reduce) {
	.mv-nav {
		transition: none;
	}
}

.nav-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
}

.nav-logo-img {
	height: 56px;
	width: auto;
	display: block;
}

.nav-logo-text {
	font-family: var(--font-heading);
	font-size: 1.375rem;
	color: var(--on-dark-h);
	font-weight: 500;
}

.nav-links {
	display: flex;
	gap: 36px;
	align-items: center;
}

.nav-links a {
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 500;
	color: rgba(200, 216, 192, 0.7);
	transition: color 200ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
	color: var(--white);
	text-decoration: none;
}

.nav-links a.nav-active {
	color: var(--white);
}

.nav-cta {
	background: var(--surface-cream);
	color: var(--surface-forest);
	padding: 10px 24px;
	border-radius: 6px;
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 500;
	transition: opacity 200ms ease;
	min-height: var(--touch-min);
	display: inline-flex;
	align-items: center;
}

.nav-cta:hover,
.nav-cta:focus-visible {
	opacity: 0.85;
	text-decoration: none;
}

.nav-burger {
	display: none;
	width: 44px;
	height: 44px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	-webkit-appearance: none;
	appearance: none;
	flex-shrink: 0;
}

.nav-burger span {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--white);
	transition: transform 200ms ease, opacity 200ms ease;
}

/* Morph the three bars into an X when the menu is open (JS sets aria-expanded). */
.nav-burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}
.nav-burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.nav-mobile {
	display: none;
	position: fixed;
	top: 64px;
	left: 0;
	right: 0;
	background: var(--surface-forest);
	flex-direction: column;
	padding: 24px;
	gap: 8px;
	z-index: 99;
}

.nav-mobile.open {
	display: flex;
}

.nav-mobile a {
	color: var(--white);
	padding: 16px 0;
	border-bottom: 1px solid rgba(200, 216, 192, 0.15);
	font-size: 16px;
}

.nav-mobile a.nav-active {
	color: var(--on-dark-stay);
}

.nav-mobile a:hover,
.nav-mobile a:focus-visible {
	text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   NEWSLETTER — mint background (Serene Green)
   ───────────────────────────────────────────────────────────── */
.newsletter {
	background: #DAEEDF;
	padding: 88px var(--section-pad-x);
	border-top: 1px solid rgba(27, 58, 45, 0.08);
	position: relative;
	overflow: hidden;
}

.newsletter-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 64px;
	align-items: center;
}

.newsletter-h {
	font-family: var(--font-heading);
	font-size: clamp(1.75rem, 3.2vw, 2.25rem);
	font-weight: 500;
	color: var(--surface-forest);
	line-height: 1.15;
	margin-bottom: 0.75rem;
	text-wrap: balance;
}

.newsletter-sub {
	font-size: 1.0625rem;
	color: var(--on-light-body);
	line-height: 1.7;
	text-wrap: pretty;
}

.newsletter-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.newsletter-input {
	height: 52px;
	padding: 0 16px;
	font-family: inherit;
	font-size: 0.9375rem;
	color: var(--on-light-h);
	background: var(--white);
	border: 1px solid rgba(27, 58, 45, 0.15);
	border-radius: 6px;
	outline: none;
	transition: border-color 200ms ease;
}

.newsletter-input::placeholder {
	color: rgba(27, 58, 45, 0.35);
}

.newsletter-input:focus {
	border-color: var(--surface-forest);
}

.newsletter-select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B3A2D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	padding-right: 40px;
	cursor: pointer;
}

.newsletter-btn {
	height: 52px;
	padding: 0 32px;
	background: var(--surface-forest);
	color: var(--white);
	border: none;
	border-radius: 6px;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 200ms ease;
	min-height: var(--touch-min);
}

.newsletter-btn:hover,
.newsletter-btn:focus-visible {
	opacity: 0.85;
}

.newsletter-note {
	font-size: 0.8125rem;
	color: rgba(27, 58, 45, 0.55);
	margin-top: 2px;
	grid-column: 1 / -1;
}

/* ─────────────────────────────────────────────────────────────
   MYLO — fixed bottom-right, opens WhatsApp Business
   Wrapper handles positioning + scroll-triggered fade-in + the
   session-persistent dismiss state. The inner <a> is the link;
   the close <button> is its sibling, positioned absolutely.
   ───────────────────────────────────────────────────────────── */
.mylo-wrap {
	position: fixed;
	bottom: 28px;
	right: 28px;
	z-index: 300;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	/* Hidden by default; JS adds .is-visible once the user scrolls. */
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px);
	transition: opacity 320ms ease, transform 320ms ease;
}
.mylo-wrap.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}
.mylo-wrap.is-dismissed {
	/* Persisted across the session via sessionStorage. */
	display: none;
}

.mylo-float {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none;
}

.mylo-close {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 24px;
	height: 24px;
	padding: 0;
	background: #fff;
	border: 1px solid rgba(27, 58, 45, 0.15);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: var(--on-light-h, #1B3A2D);
	box-shadow: 0 2px 8px rgba(27, 58, 45, 0.14);
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: transform 200ms ease, box-shadow 200ms ease;
	z-index: 1;
}
.mylo-close svg {
	width: 12px;
	height: 12px;
	display: block;
}
.mylo-close:hover {
	transform: scale(1.1);
	box-shadow: 0 3px 12px rgba(27, 58, 45, 0.22);
}
.mylo-close:focus-visible {
	outline: 2px solid var(--surface-forest);
	outline-offset: 2px;
}

.mylo-circle {
	width: 58px;
	height: 58px;
	background: var(--surface-forest);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 20px rgba(27, 58, 45, 0.3);
	border: 2px solid rgba(200, 216, 192, 0.25);
	transition: transform 200ms ease, box-shadow 200ms ease;
	position: relative;
}

.mylo-float:hover .mylo-circle,
.mylo-float:focus-visible .mylo-circle {
	transform: scale(1.06);
	box-shadow: 0 6px 28px rgba(27, 58, 45, 0.4);
}

@media (prefers-reduced-motion: reduce) {
	.mylo-wrap,
	.mylo-wrap.is-visible {
		transition: none;
		transform: none;
	}
	.mylo-close { transition: none; }
}

.mylo-m {
	font-family: var(--font-heading);
	font-size: 24px;
	font-weight: 500;
	color: var(--on-dark-body);
	line-height: 1;
}

.mylo-dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 12px;
	height: 12px;
	background: #4CAF50;
	border-radius: 50%;
	border: 2.5px solid var(--white);
	animation: mylo-pulse 2.5s ease-in-out infinite;
}

@keyframes mylo-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.55; }
}

.mylo-label {
	font-family: var(--font-body);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: var(--on-light-h);
	background: var(--white);
	padding: 5px 16px;
	border-radius: 20px;
	box-shadow: 0 2px 12px rgba(27, 58, 45, 0.14);
	white-space: nowrap;
	border: 0.5px solid rgba(27, 58, 45, 0.1);
}

/* ─────────────────────────────────────────────────────────────
   SITE FOOTER — 3 columns, deepest brand green
   ───────────────────────────────────────────────────────────── */
.site-footer {
	background: var(--surface-deep);
	padding: 64px var(--section-pad-x);
}

.footer-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr;
	gap: 56px;
}

.footer-logo {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	margin-bottom: 18px;
}

.footer-logo-img {
	height: 64px;
	width: auto;
	display: block;
}

.footer-logo-text {
	font-family: var(--font-heading);
	font-size: 1.375rem;
	color: var(--on-dark-h);
}

.footer-label {
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--on-dark-body);
	margin-bottom: 10px;
}

.footer-text {
	font-size: 15px;
	color: var(--on-dark-body);
	line-height: 1.8;
}

.footer-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 14px;
}

.footer-list a {
	color: var(--on-dark-body);
	transition: color 200ms ease;
}

.footer-list a:hover,
.footer-list a:focus-visible {
	color: var(--white);
	text-decoration: none;
}

.footer-map {
	display: flex;
	gap: 10px;
	align-items: center;
	font-size: 13px;
	margin-top: 16px;
}

.footer-map a {
	color: var(--on-dark-body);
	border-bottom: 1px solid rgba(200, 216, 192, 0.3);
	padding-bottom: 1px;
	transition: color 200ms ease, border-color 200ms ease;
}

.footer-map a:hover,
.footer-map a:focus-visible {
	color: var(--white);
	border-bottom-color: rgba(200, 216, 192, 0.6);
	text-decoration: none;
}

.footer-map .sep {
	color: rgba(200, 216, 192, 0.25);
}

.footer-social {
	display: flex;
	gap: 12px;
	margin-top: 20px;
}

.social-btn {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(200, 216, 192, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 200ms ease, background 200ms ease;
	flex-shrink: 0;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.social-btn:hover,
.social-btn:focus-visible {
	border-color: rgba(200, 216, 192, 0.6);
	background: rgba(200, 216, 192, 0.08);
	text-decoration: none;
}

.social-btn svg {
	width: 18px;
	height: 18px;
	fill: rgba(200, 216, 192, 0.6);
	transition: fill 200ms ease;
}

.social-btn:hover svg,
.social-btn:focus-visible svg {
	fill: rgba(200, 216, 192, 1);
}

.footer-bottom {
	max-width: var(--max-width);
	margin: 32px auto 0;
	padding-top: 20px;
	border-top: 1px solid rgba(200, 216, 192, 0.1);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	color: var(--on-dark-body);
}

/* ─────────────────────────────────────────────────────────────
   MOBILE — tablet ≤860px, mobile ≤480px
   ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
	.mv-nav {
		height: 64px;
		padding: 0 20px;
	}

	.nav-logo-img {
		height: 44px;
	}

	.nav-links,
	.nav-cta {
		display: none;
	}

	.nav-burger {
		display: flex;
	}

	/* Mobile menu — kept in the layout on mobile so it can fade + slide
	   (display:none cannot be transitioned). Hidden and inert when closed,
	   revealed on .open. Same easing curve as the modals for consistency. */
	.nav-mobile {
		display: flex;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-10px);
		pointer-events: none;
		transition: opacity 240ms ease,
		            transform 320ms cubic-bezier(0.32, 0.72, 0, 1),
		            visibility 0s linear 320ms;
		will-change: opacity, transform;
	}

	.nav-mobile.open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
		transition: opacity 240ms ease,
		            transform 320ms cubic-bezier(0.32, 0.72, 0, 1),
		            visibility 0s;
	}

	.newsletter {
		padding: 56px var(--section-pad-x-tablet);
	}

	.newsletter-inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.newsletter-form {
		grid-template-columns: 1fr;
	}

	.newsletter-btn {
		width: 100%;
	}

	.footer-inner {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	.site-footer {
		padding: 48px var(--section-pad-x-tablet);
	}

	.mylo-float {
		bottom: 20px;
		right: 16px;
	}
}

@media (max-width: 480px) {
	.newsletter {
		padding: 48px var(--section-pad-x-mobile);
	}

	.site-footer {
		padding: 48px var(--section-pad-x-mobile);
	}
}