/**
 * fanpage.site Agency — fp-motion (hiệu ứng cuộn kiểu trình chiếu) + section Tuyên ngôn, Quy trình.
 * Các lớp .fpm-* chỉ có tác dụng khi motion.js đã chạy (html.fpm-on).
 */

/* =====================================================================
   Section: Tuyên ngôn
   ===================================================================== */
.fp-statement { padding: 120px 0 110px; background: var(--fp-paper); }
.fp-statement .fp-kicker { margin-bottom: 26px; }
.fp-statement-text {
	max-width: 1080px; margin: 0; font-size: clamp(1.75rem, 3.6vw, 3.15rem); font-weight: 800;
	line-height: 1.22; letter-spacing: -0.03em; color: var(--fp-ink); text-wrap: pretty;
}
.fp-statement-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; max-width: 1080px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--fp-line-strong); }
.fp-statement-sign { font-size: 14.5px; font-weight: 600; color: var(--fp-muted); }
.fpm-sw { color: var(--fp-line-strong); transition: color .2s linear; }
.fpm-sw.is-lit { color: var(--fp-ink); }
html:not(.fpm-on) .fpm-sw { color: inherit; }

/* =====================================================================
   Section: Quy trình (thẻ lớn, nền tối) — lưới khi không ghim
   ===================================================================== */
.fp-process { background: var(--fp-dark); color: #c9d1e0; overflow: clip; }
.fp-process-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.fp-process-head .fp-head { margin-bottom: 0; }
.fp-process-head .fp-lead { color: #a8b1c4; }
.fp-process-meter { flex: 0 0 220px; height: 2px; background: var(--fp-dark-line); overflow: hidden; display: none; }
.fp-process-meter span { display: block; height: 100%; background: var(--fp-accent); transform: scaleX(0); transform-origin: left; }
.fp-process-track { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.fp-step { display: flex; flex-direction: column; gap: 12px; min-height: 260px; padding: 26px; border: 1px solid var(--fp-dark-line); border-radius: var(--fp-radius-lg); background: var(--fp-dark-card); }
.fp-step-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fp-step-num { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: #ffffff; font-variant-numeric: tabular-nums; }
.fp-step-when { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: rgba(255, 138, 107, .12); color: #ff8a6b; font-size: 12px; font-weight: 700; }
.fp-step h3 { margin: auto 0 0; font-size: 20px; line-height: 1.3; color: #ffffff; }
.fp-step p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #a8b1c4; }
.fp-step--cta { justify-content: space-between; background: var(--fp-accent); border-color: var(--fp-accent); }
.fp-step--cta .fp-step-when { align-self: flex-start; background: rgba(255, 255, 255, .18); color: #fff; }
.fp-step--cta h3 { margin: 0; font-size: 22px; }
.fp-step--cta .fp-btn { align-self: flex-start; background: #fff; color: var(--fp-ink); }

/* Ghim + cuộn ngang (máy tính, chế độ Trình chiếu) */
.fpm-pinx { padding: 0; }
.fpm-pinx .fp-process-inner { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: center; padding-top: 48px; padding-bottom: 56px; }
/* Section sau Quy trình cũng nền tối → kẻ một đường mảnh để thấy rõ đã sang phần mới. */
.fpm-pinx + *, .fpb-section:has(> .fpb-section-inner .fpm-pinx) + .fpb-section { border-top: 1px solid var(--fp-dark-line); }
.fpm-pinx .fp-process-meter { display: block; }
.fpm-pinx .fp-process-track { display: flex; gap: 22px; width: max-content; will-change: transform; }
.fpm-pinx .fp-step { flex: 0 0 min(420px, 34vw); min-height: min(400px, 46vh); padding: 34px; }
.fpm-pinx .fp-step-num { font-size: 72px; }
.fpm-pinx .fp-step h3 { font-size: 24px; }

/* =====================================================================
   Chữ hiện từng từ
   ===================================================================== */
.fpm-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .14em .02em .08em; margin: -.14em -.02em -.08em; }
.fpm-w > span { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform .6s cubic-bezier(.22, 1, .36, 1); transition-delay: calc(min(var(--i, 0), 12) * 22ms); }
.fpm-in .fpm-w > span, .fpb-anim--split.is-in .fpm-w > span { transform: none; }
.js-ready .fpm-head.fp-reveal { opacity: 1; transform: none; }
.fp-title em .fpm-w, .fp-hero-title em .fpm-w { overflow: visible; }
.fp-title em .fpm-w > span, .fp-hero-title em .fpm-w > span { transition-property: transform, opacity; }
.fpm-on [data-fpm-split]:not(.fpm-in) em .fpm-w > span { opacity: 0; }
.js-ready .fpb-anim--split { opacity: 1; transform: none; }

/* =====================================================================
   Ảnh hiện qua mặt nạ + parallax trong khung
   ===================================================================== */
.fpm-on [data-fpm-mask] { clip-path: inset(0 0 100% 0 round var(--fp-radius-md)); transition: clip-path .7s cubic-bezier(.65, 0, .35, 1); }
.fpm-on [data-fpm-mask].fpm-in { clip-path: inset(0 0 0 0 round var(--fp-radius-md)); }
.fpm-on [data-fpm-mask] img { transform: scale(1.12); translate: 0 var(--fpm-py, 0px); transition: transform .9s cubic-bezier(.22, 1, .36, 1); will-change: translate; }
.fpm-on [data-fpm-mask].fpm-in img { transform: scale(1.08); }
.fpm-on [data-fpm-mask] figcaption, .fpm-on [data-fpm-mask] span { transition: opacity .4s ease .35s; }
.fpm-on [data-fpm-mask]:not(.fpm-in) figcaption, .fpm-on [data-fpm-mask]:not(.fpm-in) span { opacity: 0; }

/* Builder: hiệu ứng thêm */
.js-ready .fpb-anim--mask { opacity: 1; clip-path: inset(0 0 100% 0); transition: clip-path .7s cubic-bezier(.65, 0, .35, 1); transition-delay: var(--d, 0ms); }
.js-ready .fpb-anim--mask.is-in { clip-path: inset(0); }
.js-ready .fpb-anim--blur { filter: blur(14px); transform: scale(1.03); transition: opacity .6s ease, filter .6s ease, transform .6s ease; transition-delay: var(--d, 0ms); }
.js-ready .fpb-anim--blur.is-in { filter: none; }
.js-ready .fpb-anim--up { transform: translate3d(0, 40px, 0); transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--d, 0ms); }
[data-fpm-parallax] { will-change: transform; }

/* Hiệu ứng xuất hiện của theme: mượt và sâu hơn khi bật motion */
.fpm-on.js-ready .fp-reveal { transform: translate3d(0, 24px, 0); transition: opacity .55s cubic-bezier(.22, 1, .36, 1), transform .65s cubic-bezier(.22, 1, .36, 1); transition-delay: var(--d, 0ms); }
.fpm-on.js-ready .fp-reveal.is-in { transform: none; }

/* =====================================================================
   Section trượt chồng như slide (máy tính)
   ===================================================================== */
html.fpm-on .fpm-stack { position: sticky; }

.fpm-stack--paint { background-color: var(--fp-paper); }
.fpm-stack::after { content: ""; position: absolute; inset: 0; z-index: 20; background: #0b0e14; opacity: calc(var(--fpm-p, 0) * .45); pointer-events: none; display: none; }
.fpm-stack.is-near::after { display: block; }
.fpm-stack + .fpm-stack, .fpm-stack + .fpm-pinx { border-top: 1px solid rgba(12, 15, 22, .06); }
.fpm-pinx { position: relative; z-index: 40; }
.fpm-on .fp-footer, .fpm-on .fpb-site-footer { position: relative; z-index: 60; }
.fpm-on .fp-hero { border-bottom: 0; }

/* Builder: phóng to khi vào / mờ dần khi rời */
.fpm-on [data-fpm-scene="zoom"] { transform: scale(calc(.9 + var(--fpm-z, 1) * .1)); }
.fpm-on [data-fpm-scene="fade"] > .fpb-section-inner { opacity: calc(1 - var(--fpm-f, 0) * .9); transform: translate3d(0, calc(var(--fpm-f, 0) * -60px), 0) scale(calc(1 - var(--fpm-f, 0) * .04)); }
html:not(.fpm-desk) [data-fpm-scene="stack"] { transform: none; }

/* =====================================================================
   Thanh tiến độ + chấm điều hướng
   ===================================================================== */
.fpm-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 99999; height: 3px; background: var(--fp-accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
body.admin-bar .fpm-progress { top: 32px; }
.fpm-dots { position: fixed; left: 22px; top: 50%; z-index: 870; transform: translateY(-50%); color: var(--fp-ink); transition: opacity .3s ease; }
.fpm-dots ol { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fpm-dots button { display: flex; align-items: center; gap: 10px; padding: 3px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.fpm-dot-n { position: relative; width: 22px; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; opacity: .35; transition: opacity .2s ease; }
.fpm-dot-n::after { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; background: currentColor; transform: translateX(-16px); opacity: 0; transition: opacity .2s ease, width .2s ease; }
.fpm-dot-t { padding: 4px 9px; border-radius: 6px; background: var(--fp-ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateX(-6px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.fpm-dots button:hover .fpm-dot-t { opacity: 1; transform: none; }
.fpm-dots li.is-active .fpm-dot-n { opacity: 1; color: var(--fp-accent); }
.fpm-dots li.is-active .fpm-dot-n::after { opacity: 1; width: 12px; background: var(--fp-accent); }
.fpm-dots-count { margin-top: 14px; font-size: 11px; font-weight: 700; letter-spacing: .06em; opacity: .55; font-variant-numeric: tabular-nums; }
.fpm-dots-count b { font-size: 15px; opacity: 1; }
.fpm-dots.is-light { color: #fff; }
.fpm-dots.is-light .fpm-dot-t { background: #fff; color: var(--fp-ink); }
@media (max-width: 1279px) { .fpm-dots { display: none; } }

/* =====================================================================
   Logo khách hàng chạy ngang
   ===================================================================== */
.fpm-marquee { flex: 1; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.fpm-marquee-track { display: flex; width: max-content; animation: fpm-marq 38s linear infinite; }
.fpm-marquee:hover .fpm-marquee-track { animation-play-state: paused; }
.fpm-marquee .fp-wordmarks { flex: none; flex-wrap: nowrap; justify-content: flex-start; gap: 46px; padding-right: 46px; }
@keyframes fpm-marq { to { transform: translate3d(-50%, 0, 0); } }

@media (max-width: 767px) {
	.fp-statement { padding: 72px 0 64px; }
	.fp-process-head { flex-direction: column; align-items: flex-start; }
	.fp-step { min-height: 0; }
	.fpm-marquee-track { animation-duration: 26s; }
}
@media (prefers-reduced-motion: reduce) {
	.fpm-marquee-track { animation: none; }
}
.fpm-dots.is-hidden { opacity: 0; pointer-events: none; }
