/* Thao Property – hiệu ứng chuyển động (TK00430).
   1) Màn hình đầu hiện dần lúc tải trang: chỉ chạy khi <html> có .tp-anim-ready (script nhỏ trong <head> gắn,
      bỏ qua khi người xem bật "giảm chuyển động"). Tắt JS thì nội dung hiện bình thường.
      Chỉ đổi opacity/transform nên không làm xô lệch bố cục.
   2) Hover: nút nhấc nhẹ, thẻ nâng lên + đổ bóng (chỉ trên máy có chuột).
   Hiện dần khi cuộn nằm ở layout.css + main.js (data-tp-reveal). */

/* ===================== 1. Màn hình đầu ===================== */
@keyframes tp-intro-up { from { opacity: 0; transform: translateY(24px); } }
@keyframes tp-intro-fade { from { opacity: 0; } }
@keyframes tp-intro-zoom { from { transform: scale(1.08); } }

.tp-anim-ready :is(
	.tp-hero__content > *, .tp-hero__content ~ *,
	.tp-phero__in > *, .tp-ahero__in > *, .tp-jhero__t > *,
	.tp-intro__text > *,
	.tp-phead .tp-wrap > *, .tp-lhead .tp-wrap > *, .tp-parch-head .tp-wrap > *, .tp-bhead .tp-wrap > *,
	.tp-ahead .tp-wrap > *, .tp-ld__head > *
):not([data-tp-reveal]):not([data-tp-reveal] *) {
	animation: tp-intro-up .8s cubic-bezier(.22, 1, .36, 1) .05s backwards;
}
.tp-anim-ready :is(.tp-jhero__media, .tp-intro__media, .tp-ldside):not([data-tp-reveal]):not([data-tp-reveal] *) {
	animation: tp-intro-fade 1s ease .2s backwards;
}
/* Các phần tử sau lệch nhau một chút */
.tp-anim-ready :is(.tp-hero__content > *, .tp-phero__in > *, .tp-ahero__in > *, .tp-jhero__t > *, .tp-intro__text > *, .tp-phead .tp-wrap > *, .tp-lhead .tp-wrap > *, .tp-parch-head .tp-wrap > *, .tp-bhead .tp-wrap > *, .tp-ahead .tp-wrap > *, .tp-ld__head > *):nth-child(2) { animation-delay: .13s; }
.tp-anim-ready :is(.tp-hero__content > *, .tp-phero__in > *, .tp-ahero__in > *, .tp-jhero__t > *, .tp-intro__text > *, .tp-phead .tp-wrap > *, .tp-lhead .tp-wrap > *, .tp-parch-head .tp-wrap > *, .tp-bhead .tp-wrap > *, .tp-ahead .tp-wrap > *, .tp-ld__head > *):nth-child(3) { animation-delay: .21s; }
.tp-anim-ready :is(.tp-hero__content > *, .tp-phero__in > *, .tp-ahero__in > *, .tp-jhero__t > *, .tp-intro__text > *, .tp-phead .tp-wrap > *, .tp-lhead .tp-wrap > *, .tp-parch-head .tp-wrap > *, .tp-bhead .tp-wrap > *, .tp-ahead .tp-wrap > *, .tp-ld__head > *):nth-child(4) { animation-delay: .29s; }
.tp-anim-ready :is(.tp-hero__content > *, .tp-phero__in > *, .tp-ahero__in > *, .tp-jhero__t > *, .tp-intro__text > *, .tp-phead .tp-wrap > *, .tp-lhead .tp-wrap > *, .tp-parch-head .tp-wrap > *, .tp-bhead .tp-wrap > *, .tp-ahead .tp-wrap > *, .tp-ld__head > *):nth-child(n+5) { animation-delay: .37s; }
/* Ô tìm kiếm, từ khoá phổ biến, số liệu của hero trang chủ */
.tp-anim-ready .tp-hero__content ~ *:nth-child(2) { animation-delay: .4s; }
.tp-anim-ready .tp-hero__content ~ *:nth-child(3) { animation-delay: .5s; }
.tp-anim-ready .tp-hero__content ~ *:nth-child(n+4) { animation-delay: .6s; }
/* Ảnh nền hero dự án / khu vực thu nhỏ dần về khung (khung đã overflow: hidden) */
.tp-anim-ready :is(.tp-phero__bg, .tp-ahero__img) { animation: tp-intro-zoom 1.8s cubic-bezier(.22, 1, .36, 1) backwards; }

/* ===================== 2. Hover ===================== */
.tp-btn, .tp-pbtn, .tp-cbtn, .tp-search__btn, .tp-ldside__btn, .tp-psub__book, .tp-social a, .tp-cform .fluentform .ff-btn-submit {
	transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.tp-acard, .tp-bcard__media, .tp-vcard, .tp-cinfo, .tp-ld__proj { transition: transform .3s ease, box-shadow .3s ease, border-color .2s ease; }
.tp-nav > li > a::after { transform-origin: left center; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
.tp-bside__img img { transition: transform .6s ease; }

@media (hover: hover) and (pointer: fine) {
	.tp-btn:hover, .tp-pbtn:hover, .tp-cbtn:hover, .tp-search__btn:hover, .tp-ldside__btn:hover, .tp-psub__book:hover, .tp-cform .fluentform .ff-btn-submit:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(59, 42, 34, .16); }
	.tp-social a:hover { transform: translateY(-2px); }
	.tp-acard:hover, .tp-vcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(59, 42, 34, .18); }
	.tp-bcard:hover .tp-bcard__media { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(59, 42, 34, .14); }
	.tp-cinfo:hover, .tp-ld__proj:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(59, 42, 34, .08); }
	.tp-bside:hover .tp-bside__img img { transform: scale(1.06); }
	.tp-footer__links a:hover { opacity: 1; color: #fff; }
}

/* ===================== Giảm chuyển động ===================== */
@media (prefers-reduced-motion: reduce) {
	.tp-anim-ready *, .js [data-tp-reveal] { animation: none !important; }
	.js [data-tp-reveal]:not(.is-in) { opacity: 1; }
	.tp-btn:hover, .tp-pbtn:hover, .tp-cbtn:hover, .tp-search__btn:hover, .tp-ldside__btn:hover, .tp-psub__book:hover, .tp-social a:hover,
	.tp-acard:hover, .tp-vcard:hover, .tp-bcard:hover .tp-bcard__media, .tp-cinfo:hover, .tp-ld__proj:hover,
	.tp-cform .fluentform .ff-btn-submit:hover { transform: none; }
	.tp-acard:hover .tp-acard__img, .tp-lcard:hover, .tp-lcard:hover .tp-lcard__img, .tp-pcard:hover, .tp-pcard:hover .tp-pcard__img,
	.tp-vcard:hover .tp-vcard__img, .tp-bcard:hover .tp-bcard__img, .tp-bside:hover .tp-bside__img img { transform: none; }
}
