/* Trang chủ — nền tối/đỏ liền mạch từ khối Plugin xuống hết trang (người dùng duyệt 23/10/2026).
   Một lớp nền DUY NHẤT (.home-dark) bọc từ #plugin tới #contact, nên không còn mép cắt giữa các khối.
   Ánh đỏ là đúng ảnh nền cố định của trang /filmlook-grade-engine (ảnh thật, không phải gradient CSS → không sọc).
   Mép trên nối vào khối Giới thiệu bằng dải mờ dần theo đường cong mượt + lớp hạt nhiễu chống sọc (dither). */

.home-dark {
  position: relative; isolation: isolate;
  clip-path: inset(0);            /* giữ lớp nền position:fixed bên trong chỉ hiện trong vùng này */
  background: #020202; color: #eeece5;
  --hd-muted: #aaa7a0; --hd-dim: #8d8a85; --hd-line: rgba(255, 255, 255, .1); --hd-line-strong: rgba(255, 255, 255, .28);
}
.home-dark-ambient { position: fixed; inset: 0; z-index: -3; overflow: hidden; pointer-events: none; }
.home-dark-ambient::before {
  content: ""; position: absolute; left: 50%; bottom: -6vh; width: 108vw; height: 112vh; transform: translateX(-50%);
  background: url("/assets/grade-engine/ambient/filmlook-red-light-band-v1.webp?v=1") center / cover no-repeat;
  background-image: image-set(url("/assets/grade-engine/ambient/filmlook-red-light-band-v1.webp?v=1") type("image/webp") 1x, url("/assets/grade-engine/ambient/filmlook-red-light-band-v1.png?v=1") type("image/png") 1x);
  opacity: .85;
}
.home-dark-ambient::after { content: ""; position: absolute; inset: -8%; background: rgba(0, 0, 0, .51); }

/* Mép trên: #080808 của khối Giới thiệu tan dần vào ánh đỏ — nhiều điểm dừng theo đường ease-out để mắt không thấy vạch. */
.home-dark::before {
  content: ""; position: absolute; z-index: -2; top: 0; left: 0; right: 0; height: clamp(360px, 42vw, 620px); pointer-events: none;
  background: linear-gradient(180deg,
    #080808 0%, rgba(8, 8, 8, .987) 8%, rgba(8, 8, 8, .951) 15%, rgba(8, 8, 8, .896) 22%, rgba(8, 8, 8, .825) 29%,
    rgba(8, 8, 8, .741) 36%, rgba(8, 8, 8, .648) 43%, rgba(8, 8, 8, .55) 50%, rgba(8, 8, 8, .45) 57%,
    rgba(8, 8, 8, .352) 64%, rgba(8, 8, 8, .259) 71%, rgba(8, 8, 8, .175) 78%, rgba(8, 8, 8, .104) 85%,
    rgba(8, 8, 8, .049) 92%, rgba(8, 8, 8, .013) 97%, rgba(8, 8, 8, 0) 100%);
}
/* Hạt nhiễu rất mịn phủ toàn vùng: phá các bậc màu 8-bit (nguyên nhân sọc), mắt thường không thấy hạt. */
.home-dark::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: overlay;
  /* overlay: nền đen giữ nguyên đen (không bị ám xám), chỉ vùng có màu mới được rắc hạt */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 240px);
  mask-image: linear-gradient(180deg, transparent 0, #000 240px);
}

/* ---------- Các khối dưới: phủ đen .4 giống trang Plugin; khối LUT tăng dần từ 0 để không có mép ---------- */
.home-dark .products-section,
.home-dark .course-section,
.home-dark .home-faq,
.home-dark .contact-section { background: rgba(0, 0, 0, .4); color: #eeece5; }
.home-dark .products-section { background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .4) 420px); }
.home-dark .course-section,
.home-dark .home-faq,
.home-dark .contact-section { border-top: 1px solid var(--hd-line); }

/* Chữ phụ */
.home-dark .eyebrow.dark,
.home-dark .section-heading > p,
.home-dark .project-description,
.home-dark .course-copy,
.home-dark .home-faq-intro,
.home-dark .home-faq-item p,
.home-dark .load-error { color: var(--hd-muted); }
.home-dark .project-number { color: var(--hd-dim); }
.home-dark .home-faq-item h3 { color: #eeece5; }

/* Thẻ LUT */
.home-dark .project-image { background: #141414; }
.home-dark .card-actions a { border-color: var(--hd-line-strong); }

/* Bộ lọc LUT — trước đây màu ghi cứng trong style="" và JS, nay chuyển sang class .active */
.home-dark .lut-filter-btn { min-height: 40px; padding: 0 20px; border: 1px solid var(--hd-line-strong); border-radius: 999px; background: transparent; color: #eeece5; font-weight: 700; font-size: 12px; cursor: pointer; transition: .2s; }
.home-dark .lut-filter-btn:hover { border-color: #eeece5; }
.home-dark .lut-filter-btn.active { border-color: var(--red); background: var(--red); color: #fff; }

/* Nút phụ: viền mảnh như trang Plugin, rê chuột thành đỏ */
.home-dark .load-more-button { border: 1px solid var(--hd-line-strong); background: rgba(14, 14, 14, .6); }
.home-dark .load-more-button:hover { border-color: var(--red); background: var(--red); }
.home-dark .course-section .knowledge-link { border: 1px solid var(--hd-line-strong); background: transparent; color: #eeece5; }
.home-dark .course-section .knowledge-link:hover { border-color: var(--red); background: var(--red); color: #fff; }

/* FAQ */
.home-dark .home-faq-list { border-top-color: var(--hd-line-strong); }
.home-dark .home-faq-item { border-bottom-color: var(--hd-line); }

/* Liên hệ: bỏ khối đỏ đặc, chữ nhấn đỏ */
.home-dark .contact-section .eyebrow { color: var(--hd-muted); }
.home-dark .contact-actions a:hover { color: #ff5a62; border-bottom-color: #ff5a62; }

/* Khung chờ thẻ LUT trên nền tối */
.home-dark .skel-card { background-color: rgba(255, 255, 255, .06); background-image: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .1) 48%, transparent 72%); }
.home-dark .skel-line:empty::after,
.home-dark .skel-block:empty::after { background-color: rgba(255, 255, 255, .1); background-image: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .18) 48%, transparent 72%); }
