/* =====================================================================
   HỒN VIỆT — TRANG DỰ ÁN CHÍNH (project-heritage.css)
   ---------------------------------------------------------------------
   Xếp dọc, canh giữa: KHỐI CHỮ ở trên · VIDEO giới thiệu bo góc lớn nằm
   chính giữa · rồi tới nút dẫn xuống danh sách nhân vật. Không dùng "tấm
   thẻ" như project.html (bố cục cũ) để hai trang nhìn khác hẳn nhau.
   Chữ tít dùng Fraunces (--bloom-display) cho mềm.
   ===================================================================== */

body.heritage {
  background: var(--cream-2);
  color: var(--green);
}

/* Màn giới thiệu là MỘT PHẦN của trang dài (còn phần nhân vật, outro,
   footer ở dưới). Nội dung xếp dọc (chữ + video) nên để cao theo nội dung,
   chỉ chừa chỗ cho thanh nav cố định ở trên. */
.t-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vh, 30px);
  padding: clamp(84px, 10vh, 118px) clamp(20px, 4vw, 64px) clamp(40px, 6vh, 72px);
  background: var(--cream-2);
}

/* ---------- Ảnh nền --------------------------------------------------- */
.t-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.t-bg-img,
.t-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92);
}
/* Lớp kem phủ lên ảnh nền: giữ nguyên tông sáng của trang để chữ xanh,
   vạch mảnh và nút vẫn đủ tương phản. Đậm dần ở mép trên/dưới cho
   thanh nav và băng chữ chạy không bị "dính" vào phim. */
.t-bg-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(252, 247, 236, 0.96) 0%,
      rgba(252, 247, 236, 0.86) 34%,
      rgba(252, 247, 236, 0.86) 66%,
      rgba(252, 247, 236, 0.96) 100%);
}

/* ---------- Thanh trên ------------------------------------------------ */
.t-top {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.t-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
}
.t-brand .logo {
  width: 26px;
  height: 26px;
}
.t-brand .logo path {
  fill: currentColor;
}
.t-brand b {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.08em;
}
.t-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.t-back:hover {
  background: var(--green);
  color: var(--cream);
  transform: translateY(-2px);
}

/* ---------- Cột giữa: chữ → video → nút ------------------------------- */
.t-main {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(26px, 4.4vh, 52px);
}

.t-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.t-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: clamp(12px, 2vh, 20px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(18, 37, 30, 0.6);
}
.t-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex: none;
}
/* Dự án nào để trống ô "Số thứ tự" trong CMS (opt_index) thì giấu luôn cả
   hàng — nếu không, chấm cam vẫn nằm chơ vơ một mình trên đầu trang. */
.t-eyebrow:has([data-cms="opt_index"]:empty) {
  display: none;
}
.t-sep {
  color: var(--line);
}

.t-title {
  font-family: var(--bloom-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.3vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--green);
  margin: 0 0 clamp(12px, 2vh, 20px);
  max-width: 18ch;
}

.t-lead {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(14.5px, 1.25vw, 19px);
  line-height: 1.45;
  color: var(--green);
  max-width: 46ch;
  margin: 0 auto clamp(10px, 1.6vh, 16px);
}

.t-desc {
  max-width: 68ch;
  font-size: 14px;
  line-height: 1.78;
  color: rgba(18, 37, 30, 0.74);
  margin: 0 auto clamp(18px, 3vh, 30px);
}

/* hàng thông số, ngăn nhau bằng vạch mảnh */
.t-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 0;
  margin: 0;
}
.t-facts > div {
  padding: 0 clamp(12px, 1.4vw, 20px);
  border-left: 1px solid var(--line);
}
.t-facts > div:first-of-type {
  padding-left: 0;
  border-left: 0;
}
/* chỉ giữ 4 mục đầu cho gọn một hàng */
.t-facts > div:nth-of-type(n + 5) {
  display: none;
}
.t-facts dt {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 4px;
}
.t-facts dd {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(13px, 1.05vw, 15.5px);
  color: var(--green);
}

/* ---------- Video giới thiệu (giữa màn) ------------------------------- */
.t-video {
  margin: 0;
  width: 100%;
  max-width: 980px;
}
.t-video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: clamp(20px, 2.4vw, 32px);
  overflow: hidden;
  background: var(--green);
  box-shadow: 0 26px 60px rgba(18, 37, 30, 0.22);
}
/* Trình duyệt cũ chưa có aspect-ratio: giữ tỉ lệ 16:9 bằng padding */
@supports not (aspect-ratio: 16 / 9) {
  .t-video-frame { height: 0; padding-bottom: 56.25%; }
}
.t-video-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--green);
}
.t-video-cap {
  margin: clamp(10px, 1.6vh, 16px) auto 0;
  max-width: 56ch;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(18, 37, 30, 0.6);
}

/* ---------- Nút xuống phần nhân vật ----------------------------------- */
.t-tour {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(18, 37, 30, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.t-tour:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(18, 37, 30, 0.2);
}
.t-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: transform 0.25s ease;
}
.t-circle svg {
  width: 16px;
  height: 16px;
}
.t-tour:hover .t-circle {
  transform: rotate(45deg);
}
/* mũi tên chỉ xuống vì nút nằm trên danh sách nhân vật */
.t-tour .t-circle svg { transform: rotate(90deg); }

/* ---------- Hiện dần khi mở trang (CSS, không phụ thuộc GSAP) --------- */
[data-appear] {
  animation: tAppear 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.t-copy [data-appear]:nth-child(2) { animation-delay: 0.06s; }
.t-copy [data-appear]:nth-child(3) { animation-delay: 0.12s; }
.t-copy [data-appear]:nth-child(4) { animation-delay: 0.18s; }
.t-copy [data-appear]:nth-child(5) { animation-delay: 0.24s; }
.t-copy [data-appear]:nth-child(6) { animation-delay: 0.3s; }
.t-main > [data-appear]:nth-child(2) { animation-delay: 0.26s; }
.t-main > [data-appear]:nth-child(3) { animation-delay: 0.32s; }
.t-main > [data-appear]:nth-child(4) { animation-delay: 0.38s; }
@keyframes tAppear {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  [data-appear] { animation: none; }
  * { transition: none !important; }
  /* ẩn ảnh nền khi người dùng chọn hạn chế chuyển động */
  .t-bg { display: none; }
}

/* ---------- Màn hẹp / thấp -------------------------------------------- */
@media (max-height: 780px) {
  .t-title { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
  .t-desc { font-size: 13px; line-height: 1.68; }
}
@media (max-width: 900px) {
  .t-main { gap: clamp(22px, 3.4vh, 36px); }
  .t-facts > div { padding: 0 12px; }
}
@media (max-width: 560px) {
  .t-video-frame { border-radius: 18px; }
  .t-facts > div { border-left: 0; padding: 0 10px; }
  .t-facts { gap: 12px 4px; }
}
