/* Hiệu ứng xuất hiện dùng chung (assets/page-fx.js): cuộn tới đâu chạy tới đó
   · vào màn hình: chữ nổi lên → tab / thẻ trượt ra, hiện dần
   · đã cuộn qua: chìm xuống, trượt về chỗ ban đầu và mờ đi (cuộn lại thì hiện lại)
   Dùng thuộc tính translate / scale riêng để giữ nguyên độ xoay, nghiêng sẵn có của thẻ / ảnh. */
/* trước khi page-fx.js chạy: ẩn tạm các mục chính (thẻ <head> tự bỏ sau 2,5 giây nếu có lỗi) */
html.pfx-pre :is(section, main, .hero) :is(h1, h2, .eyebrow, .sub, .lead, .fcard, .tour, .pmcard, .hero-brand, .tagline, .lede, .collage > figure){opacity:0;}
/* hệ hiệu ứng mới thay cho kiểu "hiện mờ dần" cũ */
html.pfx .reveal{opacity:1; transform:none; transition:none;}
/* thẻ bay vào từ hai bên không làm trang bị kéo ngang (clip: không ảnh hưởng thanh menu dính) */
html.pfx body{overflow-x:clip;}
/* báo trước cho trình duyệt: chỉ những thuộc tính này chuyển động → dựng hình riêng, mượt hơn */
html.pfx .pfx-enter, html.pfx .pfx-leave{will-change:translate, scale, opacity;}
html.pfx .pfx-t.pfx-enter, html.pfx .pfx-t.pfx-leave{will-change:translate, scale, opacity, filter;}
/* đang ẩn (chưa tới / đã cuộn qua) */
html.pfx .pfx-hid{opacity:0;}

/* 1) CHỮ: nổi lên (bật nhẹ, rõ dần) · chìm xuống (mờ dần, nhòe) */
html.pfx .pfx-t.pfx-enter{animation:pfxPop 1.15s cubic-bezier(.25,.8,.35,1) both;}
html.pfx .pfx-t.pfx-leave{animation:pfxSinkT 1s cubic-bezier(.5,0,.75,.4) both;}
@keyframes pfxPop{
  0%{opacity:0; translate:0 18px; filter:blur(3px);}
  100%{opacity:1; translate:none; filter:none;}
}
@keyframes pfxSinkT{
  0%{opacity:1; translate:none; filter:none;}
  100%{opacity:0; translate:0 14px; filter:blur(3px);}
}

/* 2) THẺ / Ô: trượt lên hiện dần · chìm xuống trượt về chỗ ban đầu */
html.pfx .pfx-i.pfx-enter{animation:pfxSlide 1.2s cubic-bezier(.16,.84,.3,1) both;}
html.pfx .pfx-i.pfx-leave{animation:pfxSink 1.05s cubic-bezier(.55,0,.8,.45) both;}
@keyframes pfxSlide{
  0%{opacity:0; translate:0 32px;}
  100%{opacity:1; translate:none;}
}
@keyframes pfxSink{
  0%{opacity:1; translate:none;}
  100%{opacity:0; translate:0 24px;}
}

/* 3) TAB ĐỀ MỤC: trượt ngang từ trái ra · trượt về trái khi cuộn qua */
html.pfx .pfx-i.pfx-x.pfx-enter{animation:pfxSlideX 1s cubic-bezier(.16,.84,.3,1) both;}
html.pfx .pfx-i.pfx-x.pfx-leave{animation:pfxSinkX .9s cubic-bezier(.55,0,.8,.45) both;}
@keyframes pfxSlideX{
  0%{opacity:0; translate:-24px 0;}
  100%{opacity:1; translate:none;}
}
@keyframes pfxSinkX{
  0%{opacity:1; translate:none;}
  100%{opacity:0; translate:-18px 0;}
}

@media (prefers-reduced-motion:reduce){
  html.pfx .pfx-t, html.pfx .pfx-i{opacity:1 !important; animation:none !important;}
}
@media print{ html.pfx .pfx-t, html.pfx .pfx-i, html.pfx-pre *{opacity:1 !important; animation:none !important;} }
.se-on .pfx-t, .se-on .pfx-i{opacity:1 !important; animation:none !important;}
