/* Fook Choon motion layer: page load, scroll reveal, hover.
   Hidden states only apply when html.fc-motion is set by JS, so content never stays hidden. */

:root {
	--fc-ease: cubic-bezier(.2, .7, .2, 1);
	--fc-ease-soft: cubic-bezier(.25, .8, .25, 1);
}

/* ---------- Page load ---------- */
@keyframes fcFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fcHeaderIn { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes fcNavIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: no-preference) {
	body { animation: fcFadeIn .7s var(--fc-ease-soft) both; }
	.fc-header { animation: fcHeaderIn .8s var(--fc-ease) both; }
	.fc-nav li { animation: fcNavIn .6s var(--fc-ease) both; }
	.fc-nav li:nth-child(1) { animation-delay: .25s; }
	.fc-nav li:nth-child(2) { animation-delay: .31s; }
	.fc-nav li:nth-child(3) { animation-delay: .37s; }
	.fc-nav li:nth-child(4) { animation-delay: .43s; }
	.fc-nav li:nth-child(5) { animation-delay: .49s; }
	.fc-nav li:nth-child(6) { animation-delay: .55s; }
	.fc-nav li:nth-child(7) { animation-delay: .61s; }
	.fc-tools { animation: fcNavIn .6s var(--fc-ease) .6s both; }

	/* Leaving the page: quick fade before the next page loads */
	html.fc-leaving body { opacity: 0; transition: opacity .28s ease; }
}

/* ---------- Scroll progress ---------- */
.fc-progress {
	position: fixed; left: 0; top: 0; height: 3px; width: 100%;
	background: linear-gradient(90deg, #6eb23a, #a8d05a);
	transform-origin: 0 50%; transform: scaleX(0);
	z-index: 100; pointer-events: none;
}
.admin-bar .fc-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .fc-progress { top: 46px; } }

/* ---------- Header on scroll ---------- */
.fc-header { transition: box-shadow .4s var(--fc-ease), background-color .4s var(--fc-ease); }
.fc-header .fc-wrap { transition: min-height .4s var(--fc-ease); }
.fc-logo img { transition: max-height .4s var(--fc-ease), transform .4s var(--fc-ease); }
.fc-header.is-scrolled { box-shadow: 0 6px 24px rgba(20, 50, 10, .10); background: rgba(255, 255, 255, .97); }
.fc-header.is-scrolled .fc-wrap { min-height: 66px; }
.fc-header.is-scrolled .fc-logo img { max-height: 54px; }
.fc-logo a:hover img { transform: scale(1.04); }

/* ---------- Menu hover ---------- */
.fc-nav a { position: relative; transition: background-color .3s ease, color .3s ease; }
.fc-nav a::after {
	content: ""; position: absolute; left: 13px; right: 13px; bottom: 8px; height: 2px;
	background: #6eb23a; transform: scaleX(0); transform-origin: 50% 50%;
	transition: transform .35s var(--fc-ease);
}
.fc-nav a:hover { background: transparent; }
.fc-nav a:hover::after { transform: scaleX(1); }
.fc-nav .current-menu-item > a::after, .fc-nav .current_page_item > a::after { display: none; }
.fc-lang { transition: background-color .3s ease, transform .3s var(--fc-ease), box-shadow .3s ease; }
.fc-lang:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(31, 90, 18, .28); }

/* ---------- Scroll reveal ---------- */
html.fc-motion .fc-r {
	opacity: 0; transform: translate3d(0, 34px, 0);
	transition: opacity 1s var(--fc-ease), transform 1s var(--fc-ease);
	transition-delay: var(--fc-d, 0s);
	will-change: opacity, transform;
}
html.fc-motion .fc-r.fc-r-left { transform: translate3d(-48px, 0, 0); }
html.fc-motion .fc-r.fc-r-right { transform: translate3d(48px, 0, 0); }
html.fc-motion .fc-r.fc-r-zoom { transform: scale(.6) rotate(-12deg); }
html.fc-motion .fc-r.is-in { opacity: 1; transform: none; }

/* Images unveil from the centre while settling from a slight zoom */
html.fc-motion .fc-r-img { opacity: 1; transform: none; }
html.fc-motion .fc-r-img img {
	clip-path: inset(10% 10% 10% 10%); transform: scale(1.12); opacity: 0;
	transition: clip-path 1.3s var(--fc-ease), transform 1.6s var(--fc-ease), opacity .8s ease;
	transition-delay: var(--fc-d, 0s);
}
html.fc-motion .fc-r-img.is-in img { clip-path: inset(0 0 0 0); transform: scale(1); opacity: 1; }

/* Background sections drift slowly while scrolling (set by JS) */
.fc-parallax { background-attachment: scroll !important; will-change: background-position; }

/* ---------- Hero slideshow: slow zoom on each slide ---------- */
@media (prefers-reduced-motion: no-preference) {
	.elementor-widget-image-carousel:not(.fc-exp-carousel) .swiper-slide { overflow: hidden; }
	.elementor-widget-image-carousel:not(.fc-exp-carousel) .swiper-slide img { transform: scale(1.1); transition: transform 7s cubic-bezier(.15, .6, .3, 1); }
	.elementor-widget-image-carousel:not(.fc-exp-carousel) .swiper-slide-active img { transform: scale(1); }
}
.elementor-widget-image-carousel .swiper-pagination-bullet { transition: width .4s var(--fc-ease), opacity .3s ease; }
.elementor-widget-image-carousel .swiper-pagination-bullet-active { width: 26px; border-radius: 6px; }

/* ---------- Image hover ---------- */
.fc-el-grid .gallery-item, .elementor-widget-image .elementor-widget-container { overflow: hidden; }
.fc-el-grid .gallery-item img, .elementor-widget-image img {
	transition: transform .9s var(--fc-ease), filter .6s ease, clip-path 1.3s var(--fc-ease), opacity .8s ease;
}
.fc-el-grid .gallery-item { position: relative; }
.fc-el-grid .gallery-item::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(180deg, rgba(31, 90, 18, 0) 55%, rgba(31, 90, 18, .45) 100%);
	opacity: 0; transition: opacity .5s ease;
}
.fc-el-gallery .gallery-item::before {
	content: ""; position: absolute; z-index: 2; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px;
	border-radius: 50%; background: rgba(255, 255, 255, .92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f5a12' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4.5 4.5M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 22px no-repeat;
	transform: scale(.4); opacity: 0; pointer-events: none;
	transition: transform .45s var(--fc-ease), opacity .3s ease;
}
@media (hover: hover) {
	.fc-el-grid .gallery-item:hover img, .elementor-widget-image:hover img { transform: scale(1.07); filter: saturate(1.12); }
	.fc-el-grid .gallery-item:hover::after { opacity: 1; }
	.fc-el-gallery .gallery-item:hover::before { transform: scale(1); opacity: 1; }
}

/* ---------- Buttons ---------- */
.elementor-button {
	transition: transform .35s var(--fc-ease), box-shadow .35s var(--fc-ease), background-color .3s ease !important;
	box-shadow: 0 6px 14px rgba(0, 0, 0, .16);
}
.elementor-button:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(31, 90, 18, .30); }
.elementor-button:active { transform: translateY(0); }

/* ---------- Boxes and icons ---------- */
.e-con.e-child:has(> .elementor-widget-icon) {
	transition: transform .5s var(--fc-ease), box-shadow .5s var(--fc-ease);
}
@media (hover: hover) {
	.e-con.e-child:has(> .elementor-widget-icon):hover { transform: translateY(-6px); box-shadow: 0 18px 36px rgba(40, 60, 20, .12); }
	.e-con.e-child:has(> .elementor-widget-icon):hover .elementor-icon { transform: translateY(-3px) scale(1.08); }
}
.elementor-icon { transition: transform .5s var(--fc-ease); }

/* Expertise list */
.elementor-icon-list-item { transition: transform .35s var(--fc-ease); }
.elementor-icon-list-icon i, .elementor-icon-list-icon svg { transition: transform .45s var(--fc-ease); }
@media (hover: hover) {
	.elementor-icon-list-item:hover { transform: translateX(6px); }
	.elementor-icon-list-item:hover .elementor-icon-list-icon i,
	.elementor-icon-list-item:hover .elementor-icon-list-icon svg { transform: rotate(-20deg) scale(1.15); }
}

/* Links in text */
.elementor-widget-text-editor a { text-decoration: none; background: linear-gradient(#6eb23a, #6eb23a) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--fc-ease), color .3s ease; }
.elementor-widget-text-editor a:hover { background-size: 100% 100%; color: #fff; }

/* Contact form */
.fc-form input, .fc-form textarea { transition: border-color .3s ease, box-shadow .3s ease; }
.fc-form input:focus, .fc-form textarea:focus { outline: none; border-color: #6eb23a; box-shadow: 0 0 0 4px rgba(110, 178, 58, .18); }
.fc-form button { transition: transform .35s var(--fc-ease), box-shadow .35s var(--fc-ease), background-color .3s ease; box-shadow: 0 6px 14px rgba(0, 0, 0, .16); }
.fc-form button:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(31, 90, 18, .30); }

/* Map tile softens in */
.elementor-widget-google_maps iframe { filter: saturate(.85); transition: filter .6s ease; }
.elementor-widget-google_maps:hover iframe { filter: none; }

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
	html.fc-motion .fc-r, html.fc-motion .fc-r-img img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
}

/* No placeholder tint while tiles unveil */
html.fc-motion .fc-el-grid .gallery-item { background: transparent; }

/* Expertise carousel hover */
.fc-exp-carousel .swiper-slide { overflow: hidden; }
.fc-exp-carousel .swiper-slide img { transition: transform .9s var(--fc-ease), filter .6s ease; }
@media (hover: hover) { .fc-exp-carousel .swiper-slide:hover img { transform: scale(1.06); filter: saturate(1.12); } }
.fc-exp-list .elementor-icon-list-item:hover .elementor-icon-list-icon i, .fc-exp-list .elementor-icon-list-item:hover .elementor-icon-list-icon svg { transform: scale(1.6); color: #6eb23a; fill: #6eb23a; }
