/*
 * LIFT Theme — site chrome: header, navigation, footer, archives, single templates, motion.
 */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; overflow-x: clip; }
img { max-width: 100%; height: auto; }

.screen-reader-text {
	position: absolute !important; 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: fixed !important; top: .75rem; left: .75rem; z-index: 1000; width: auto; height: auto; clip: auto; margin: 0;
	padding: .75rem 1.125rem; background: #fff; color: var(--wp--preset--color--forest-dark); border-radius: 10px; font-weight: 600;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.site-main:focus { outline: none; }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would trap the fixed mobile menu inside it. */
.site-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: rgba(247, 246, 241, .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.nav-open .site-header::before { background: var(--wp--preset--color--ivory); }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.site-header.is-scrolled { border-color: var(--wp--preset--color--line); box-shadow: 0 4px 24px rgba(22, 33, 27, .05); }
.site-header__inner {
	max-width: var(--wp--style--global--wide-size); margin-inline: auto; height: 4.875rem;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding-inline: var(--wp--style--root--padding-left);
}

.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; color: inherit; min-width: 0; }
.brand__logo { width: auto; height: 3rem; object-fit: contain; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: 1.1875rem; color: var(--wp--preset--color--forest-dark); white-space: nowrap; }
.brand__short { font-size: .75rem; color: var(--wp--preset--color--muted); letter-spacing: .02em; }
/* Small phones: the full name "Living Forest Trust (LIFT)" may wrap on two lines rather than overflow. */
@media (max-width: 420px) { .brand__name { white-space: normal; font-size: 1rem; text-wrap: balance; } .brand__logo { height: 2.375rem; } }

.site-nav { display: flex; align-items: center; gap: .5rem; }
.site-nav__menu { display: flex; align-items: center; gap: .125rem; list-style: none; margin: 0; padding: 0; }
.site-nav__menu > li { position: relative; }
.site-nav__menu a {
	position: relative; display: block; padding: .5rem .8125rem; font-size: .9375rem; font-weight: 500;
	color: var(--wp--preset--color--ink); text-decoration: none; border-radius: 999px; transition: color .2s;
}
.site-nav__menu > li > a::after {
	content: ""; position: absolute; left: .8125rem; right: .8125rem; bottom: .25rem; height: 2px; border-radius: 2px;
	background: var(--wp--preset--color--leaf); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--lift-ease);
}
.site-nav__menu > li > a:hover::after,
.site-nav__menu > li > a:focus-visible::after,
.site-nav__menu > .current-menu-item > a::after,
.site-nav__menu > .current-menu-ancestor > a::after,
.site-nav__menu > .current_page_parent > a::after { transform: scaleX(1); }
.site-nav__menu > .current-menu-item > a, .site-nav__menu > .current-menu-ancestor > a { color: var(--wp--preset--color--forest); }
/* Dropdowns: arrow on parent items */
.site-nav__menu > .menu-item-has-children > a { padding-right: 1.75rem; }
.site-nav__menu > .menu-item-has-children > a::before {
	content: ""; position: absolute; right: .625rem; top: 50%; width: .625rem; height: .625rem; margin-top: -.3rem; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .2s var(--lift-ease);
}
.site-nav__menu > .menu-item-has-children:hover > a::before,
.site-nav__menu > .menu-item-has-children:focus-within > a::before { transform: rotate(180deg); }
/* Dropdowns */
.site-nav__menu .sub-menu {
	position: absolute; top: calc(100% + .25rem); left: 0; min-width: 15rem; list-style: none; margin: 0; padding: .5rem;
	background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(22, 33, 27, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s var(--lift-ease), visibility .2s;
}
.site-nav__menu li:hover > .sub-menu, .site-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav__menu .sub-menu a { border-radius: 8px; }
.site-nav__menu .sub-menu a:hover { background: var(--wp--preset--color--mint-light); }
.site-header__cta { margin-left: .5rem; padding: .625rem 1.125rem !important; font-size: .9375rem !important; }
/* Language switcher (EN | FR) */
.lang-switch { display: flex; align-items: center; gap: 0; margin: 0 0 0 .5rem; padding: .1875rem; list-style: none; border: 1px solid var(--wp--preset--color--line); border-radius: 999px; background: #fff; }
.lang-switch a {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; min-height: 2.25rem; padding: 0 .625rem;
	border-radius: 999px; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; color: var(--wp--preset--color--ink);
	transition: background-color .2s, color .2s;
}
.lang-switch a:hover { background: var(--wp--preset--color--mint-light); }
.lang-switch a[aria-current="true"] { background: var(--wp--preset--color--forest); color: #fff; }

.nav-toggle {
	display: none; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; padding: 0;
	border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: #fff; color: var(--wp--preset--color--ink); cursor: pointer;
}
.nav-toggle__close { display: none; }
.nav-open .nav-toggle__open { display: none; }
.nav-open .nav-toggle__close { display: inline-flex; }

@media (max-width: 1200px) {
	.nav-toggle { display: inline-flex; }
	.site-nav {
		position: fixed; inset: 4.875rem 0 0 0; z-index: 99; flex-direction: column; align-items: stretch; gap: 1.25rem;
		padding: 1.5rem var(--wp--style--root--padding-left) 2rem; background: var(--wp--preset--color--ivory); overflow-y: auto;
		opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--lift-ease), visibility .25s;
	}
	.admin-bar .site-nav { top: calc(4.875rem + var(--wp-admin--admin-bar--height, 46px)); }
	.nav-open .site-nav { opacity: 1; visibility: visible; transform: none; }
	.nav-open { overflow: hidden; }
	.site-nav__menu { flex-direction: column; align-items: stretch; gap: 0; }
	.site-nav__menu a { padding: 1rem .25rem; font-size: 1.1875rem; border-bottom: 1px solid var(--wp--preset--color--line); border-radius: 0; }
	.site-nav__menu > li > a::after, .site-nav__menu > .menu-item-has-children > a::before { display: none; }
	.site-nav__menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 1rem; background: transparent; }
	.site-header__cta { margin: 0; align-self: flex-start; }
	.lang-switch { margin: 0; align-self: flex-start; }
}
@media (max-width: 420px) {
	.brand__name { font-size: 1.0625rem; }
	.brand__logo { height: 2.625rem; }
}

/* ---------- Page layout ---------- */
.entry-content { padding-bottom: 0; }
.entry-content > .alignfull { margin-top: 0 !important; margin-bottom: 0 !important; }
.entry-content > .alignfull + .alignfull { margin-top: 0 !important; }
.entry-content.has-header-block > :first-child { margin-top: 0 !important; }
.entry-content.is-simple { padding-top: var(--wp--preset--spacing--50); padding-bottom: var(--wp--preset--spacing--60); }
/* A plain page header is followed by content: no double spacing. */
.entry-content > .lift-page-header.is-plain + .wp-block-group[class*="is-style-section"] { padding-top: var(--wp--preset--spacing--40); }
/* Page header rendered by the theme (plain) */
header.lift-page-header .lift-page-header__inner { padding-bottom: 2.75rem; }
.lift-page-header .lift-breadcrumbs .lift-icon { width: .875rem; height: .875rem; }

/* ---------- Footer (light) ---------- */
.site-footer {
	margin-top: var(--wp--preset--spacing--70); color: var(--wp--preset--color--muted); font-size: .9375rem;
	background: linear-gradient(180deg, var(--wp--preset--color--mint-light) 0%, #E8F2EB 100%);
	border-top: 1px solid var(--wp--preset--color--line);
}
.entry-content > .lift-cta:last-child, .entry-content > .is-style-section-block:last-child { margin-bottom: var(--wp--preset--spacing--70) !important; }
.has-header-block + .site-footer, .site-main:has(> .entry-content > .alignfull:last-child) + .site-footer { margin-top: 0; }
.site-footer__inner { max-width: var(--wp--style--global--wide-size); margin-inline: auto; padding: 4.5rem var(--wp--style--root--padding-left) 1.75rem; }
.site-footer__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem; }
.site-footer a { color: var(--wp--preset--color--forest-dark); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--wp--preset--color--forest); text-decoration: underline; text-underline-offset: 3px; }
.brand--footer .brand__name { color: var(--wp--preset--color--forest-dark); }
.site-footer__motto { font-family: var(--wp--preset--font-family--heading); font-style: italic; font-size: 1.125rem; color: var(--wp--preset--color--leaf-deep); margin: 1rem 0 0; }
.site-footer__title { font-family: var(--wp--preset--font-family--body); font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--forest); margin: 0 0 1rem; }
.site-footer__menu, .site-footer__contact { list-style: none; margin: 0; padding: 0; }
.site-footer__menu li, .site-footer__contact li { margin: .5625rem 0; }
.site-footer__contact li { display: flex; gap: .625rem; align-items: flex-start; color: var(--wp--preset--color--ink); }
.site-footer__contact .lift-icon { width: 1.0625rem; height: 1.0625rem; margin-top: .1875rem; color: var(--wp--preset--color--forest); }
.site-footer__bottom {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 3rem; padding-top: 1.375rem;
	border-top: 1px solid rgba(11, 90, 46, .12); font-size: .8125rem; color: var(--wp--preset--color--muted);
}
.site-footer__bottom p { margin: 0; }
.social-links { display: flex; gap: .5rem; list-style: none; margin: 1.25rem 0 0; padding: 0; }
.social-links a { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: #fff; border: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--forest); transition: background .2s, color .2s, transform .2s var(--lift-ease); }
.social-links a:hover { background: var(--wp--preset--color--forest); color: #fff; transform: translateY(-2px); }
.social-links .lift-icon { width: 1.125rem; height: 1.125rem; }

@media (max-width: 960px) { .site-footer__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .site-footer__cols { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Archives ---------- */
.archive-body { max-width: var(--wp--style--global--wide-size); margin-inline: auto; padding: 2.5rem var(--wp--style--root--padding-left) 0; }
.archive-body > h2, .area-section > h2 { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 1.25rem; }
.area-section + .area-section { margin-top: 3.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.filters__item {
	padding: .5rem .9375rem; border-radius: 999px; border: 1px solid var(--wp--preset--color--line); background: #fff;
	font-size: .875rem; font-weight: 500; color: var(--wp--preset--color--ink); text-decoration: none; transition: border-color .2s, background .2s, color .2s;
}
.filters__item:hover { border-color: var(--wp--preset--color--forest); }
.filters__item.is-active { background: var(--wp--preset--color--forest); border-color: var(--wp--preset--color--forest); color: #fff; }
.empty-state {
	display: flex; flex-direction: column; align-items: center; gap: .75rem; text-align: center; padding: 3.5rem 1.5rem;
	border: 1px dashed #B9C7BE; border-radius: 18px; background: #fff; color: var(--wp--preset--color--muted);
}
.empty-state .lift-icon { width: 2.25rem; height: 2.25rem; color: var(--wp--preset--color--forest); }
.empty-state p { margin: 0; max-width: 32rem; }
.empty-state__lottie { width: 7.5rem; }
.not-found__lottie { width: 10rem; margin-bottom: 1rem; }
.area-hero-icon { display: inline-grid; place-items: center; width: 3.5rem; height: 3.5rem; margin-top: 1.25rem; border-radius: 1rem; background: var(--wp--preset--color--mint); color: var(--wp--preset--color--forest); }

.navigation.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .375rem; }
.pagination .page-numbers {
	display: inline-grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .75rem; border-radius: 999px;
	border: 1px solid var(--wp--preset--color--line); background: #fff; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 500;
}
.pagination .page-numbers.current { background: var(--wp--preset--color--forest); border-color: var(--wp--preset--color--forest); color: #fff; }
.pagination .lift-icon { width: 1.125rem; height: 1.125rem; }

/* ---------- Single ---------- */
.entry-chips { display: flex; flex-wrap: wrap; gap: .375rem; margin: 1rem 0 0; }
a.lift-chip { text-decoration: none; }
.lift-chip--status-ongoing { background: #E3F6EA; color: #0B5A2E; }
.lift-chip--status-completed { background: var(--wp--preset--color--sand); color: #6A431E; }
.lift-chip--status-planned { background: #EEF1F8; color: #2B3F6B; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1rem 0 0; color: var(--wp--preset--color--muted); font-size: .9375rem; }
.entry-meta .lift-icon { width: 1rem; height: 1rem; }
.entry-cover { position: relative; max-width: var(--wp--style--global--wide-size); margin: 0 auto; padding-inline: var(--wp--style--root--padding-left); }
.entry-cover img { width: 100%; max-height: 38rem; object-fit: cover; border-radius: 24px; display: block; }
.entry-cover .lift-credit { right: calc(var(--wp--style--root--padding-left) + .625rem); }
.entry-cover--inline { padding: 0; margin-bottom: 2rem; border-radius: 24px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--wp--preset--color--forest); }
.entry-cover--inline img { height: 100%; max-height: none; border-radius: 0; }
.entry-tags { display: flex; gap: .5rem; align-items: center; color: var(--wp--preset--color--muted); }
.entry-tags .lift-icon { width: 1rem; height: 1rem; }
.post-nav { max-width: var(--wp--style--global--content-size); margin: 0 auto; padding: 0 var(--wp--style--root--padding-left); }
.post-nav .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-nav a {
	display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem 1.5rem; border-radius: 18px; background: #fff;
	border: 1px solid var(--wp--preset--color--line); text-decoration: none; color: var(--wp--preset--color--ink); transition: border-color .2s, box-shadow .2s;
}
.post-nav a:hover { border-color: var(--wp--preset--color--forest); box-shadow: 0 10px 30px rgba(22, 33, 27, .07); }
.post-nav small { color: var(--wp--preset--color--muted); }
.post-nav strong { font-family: var(--wp--preset--font-family--heading); font-size: 1.125rem; color: var(--wp--preset--color--forest-dark); }
.post-nav .nav-next { text-align: right; grid-column: 2; }

.work-layout {
	display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 2.5rem; align-items: start;
	max-width: var(--wp--style--global--wide-size); margin: 2rem auto 0; padding-inline: var(--wp--style--root--padding-left);
}
.work-content { padding: 0 !important; }
.work-content > * { max-width: none !important; }
.work-aside { position: sticky; top: 6.5rem; padding: 1.5rem; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 18px; }
.work-facts { display: grid; gap: 1rem; margin: 0; }
.work-facts dt { display: flex; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.work-facts dt .lift-icon { width: 1rem; height: 1rem; color: var(--wp--preset--color--forest); }
.work-facts dd { margin: .25rem 0 0; font-weight: 500; }
.work-facts--inline { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 18px; }
.work-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .75rem; }
.work-gallery figure { margin: 0; }
.work-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.work-gallery figcaption { font-size: .75rem; color: var(--wp--preset--color--muted); margin-top: .25rem; }
@media (max-width: 960px) {
	.work-layout { grid-template-columns: 1fr; }
	.work-aside { position: static; order: -1; }
}

/* ---------- Share bar ---------- */
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem 1rem; margin-top: 1.5rem; }
.share-bar__label { font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.share-bar__list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; margin: 0; padding: 0; }
.share-bar__list li { margin: 0; }
.share-bar__btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-width: 2.75rem; height: 2.75rem; padding: 0 .75rem;
	border-radius: 999px; border: 1px solid var(--wp--preset--color--line); background: #fff; color: var(--wp--preset--color--forest);
	font: inherit; font-size: .875rem; font-weight: 600; text-decoration: none; cursor: pointer;
	transition: background .2s, color .2s, border-color .2s, transform .2s var(--lift-ease);
}
.share-bar__btn .lift-icon { width: 1.125rem; height: 1.125rem; }
.share-bar__btn:hover, .share-bar__btn:focus-visible { transform: translateY(-2px); color: #fff; border-color: transparent; }
.share-bar__btn--facebook:hover, .share-bar__btn--facebook:focus-visible { background: #1877F2; }
.share-bar__btn--twitter:hover, .share-bar__btn--twitter:focus-visible { background: #111; }
.share-bar__btn--linkedin:hover, .share-bar__btn--linkedin:focus-visible { background: #0A66C2; }
.share-bar__btn--whatsapp:hover, .share-bar__btn--whatsapp:focus-visible { background: #128C4B; }
.share-bar__btn--mail:hover, .share-bar__btn--mail:focus-visible,
.share-bar__btn--copy:hover, .share-bar__btn--copy:focus-visible,
.share-bar__btn--native:hover, .share-bar__btn--native:focus-visible { background: var(--wp--preset--color--forest); }
.share-bar__btn--native { background: var(--wp--preset--color--forest); color: #fff; border-color: transparent; }
.share-bar__btn--copy.is-copied { background: var(--wp--preset--color--leaf); color: #032B14; }
.share-bar__status { font-size: .875rem; color: var(--wp--preset--color--forest); font-weight: 600; }
.entry-share-end { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--wp--preset--color--line); }
.lift-page-header.has-media .share-bar__label { color: rgba(255, 255, 255, .85); }

/* ---------- Search ---------- */
.search-form { display: flex; gap: .5rem; max-width: 36rem; margin-bottom: 2rem; }
.search-form input[type=search] {
	flex: 1; min-width: 0; font: inherit; padding: .75rem 1rem; border: 1.5px solid #B7C1BA; border-radius: 999px; background: #fff;
}
.search-form input[type=search]:focus { outline: none; border-color: var(--wp--preset--color--forest); box-shadow: 0 0 0 4px rgba(0, 176, 80, .2); }
.search-form .lift-icon { width: 1.125rem; height: 1.125rem; }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.search-results li { padding: 1.25rem 1.5rem; background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 18px; }
.search-results h2 { font-size: 1.375rem; margin: .5rem 0; }
.search-results h2 a { text-decoration: none; color: var(--wp--preset--color--forest-dark); }
.search-results p { margin: 0; color: var(--wp--preset--color--muted); }
.not-found .search-form { margin-top: 1.5rem; }

/* ---------- Motion (GSAP) ----------
 * The hero is hidden only when JavaScript + motion are available (html.lift-motion, set in <head>),
 * and always revealed after 2.5 s (html.lift-motion-done) in case GSAP cannot load.
 */
.lift-motion:not(.lift-motion-done) [data-lift-hero] .lift-hero__inner > *,
.lift-motion:not(.lift-motion-done) [data-lift-page-header] .lift-page-header__inner > * { opacity: 0; }
.lift-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.lift-word__inner { display: inline-block; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
	.site-header, .site-footer, .nav-toggle, .lift-contact-wrap, .post-nav { display: none !important; }
	.lift-hero, .lift-page-header.has-media { color: #000; min-height: 0; background: none; }
	.lift-hero__media, .lift-page-header__media { display: none; }
}
