/* Style v2: lớp làm đẹp đặt trên style.css. Giữ nguyên bố cục, nội dung và bảng màu (nền đen, Anton, dải hoàng hôn cam → san hô → xanh biển),
   chỉ tinh chỉnh chi tiết: khung ngắm LiDAR, đèn soi theo chuột, số màu hoàng hôn, nút ánh sáng lướt. Bỏ file này là về nguyên bản. */

::selection { background: var(--sun); color: #160b06; }
html { scrollbar-color: #ff7a45 var(--bg); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(#ffb05c, #ff5a4e, #2ec4b6); border: 3px solid var(--bg); border-radius: 10px; }

/* Lớp hạt phim rất nhẹ cho cảm giác điện ảnh */
body::after { content: ""; position: fixed; inset: -50%; z-index: 400; pointer-events: none; opacity: .05;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: v2Grain .8s steps(5) infinite; }
@keyframes v2Grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } 100% { transform: translate(0, 0); } }

/* Khung ngắm LiDAR: 4 góc màu xanh biển, hiện khi rê chuột (dùng chung cho thẻ, ảnh) */
.why-card::after, .hg-art::after, .lm::before, .repo::after, .step::after, .v2-frame {
  content: ""; position: absolute; inset: 18px; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .35s, inset .5s cubic-bezier(.2,.8,.2,1);
  --c: #9ff3ea; --l: 16px; --w: 2px;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / var(--l) var(--w), linear-gradient(var(--c), var(--c)) 0 0 / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) 100% 0 / var(--l) var(--w), linear-gradient(var(--c), var(--c)) 100% 0 / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) 0 100% / var(--l) var(--w), linear-gradient(var(--c), var(--c)) 0 100% / var(--w) var(--l),
    linear-gradient(var(--c), var(--c)) 100% 100% / var(--l) var(--w), linear-gradient(var(--c), var(--c)) 100% 100% / var(--w) var(--l);
  background-repeat: no-repeat; filter: drop-shadow(0 0 6px rgba(46,196,182,.8)); }
.why-card:hover::after, .hg-card:hover .hg-art::after, .lm:hover::before, .lm:focus-visible::before, .repo:hover::after, .step:hover::after,
.tile:hover > .v2-frame, .tile:focus-visible > .v2-frame, .char:hover .v2-frame, .place-art:hover > .v2-frame { opacity: 1; inset: 10px; }

/* Nút: vệt sáng lướt qua khi rê chuột, nút cam phát sáng */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; transform: translateX(-120%);
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.btn-ghost::after { background: linear-gradient(110deg, transparent 30%, rgba(255,176,92,.35) 50%, transparent 70%); }
.btn:hover::after { transform: translateX(120%); }
.btn-grad:hover { box-shadow: 0 16px 36px -12px rgba(255,122,69,.9), 0 0 0 1px rgba(255,210,138,.4); }

/* Menu trên: gạch chân màu hoàng hôn trượt ra */
.nav-links a { position: relative; }
.nav-links a.active { box-shadow: none; }
.nav-links a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.nav-links a:hover::after, .nav-links a.active::after { transform: none; }

/* Dải số liệu: số lớn màu hoàng hôn, chia cột bằng đường kẻ */
.stats-strip { position: relative; }
.stats-strip::before { content: ""; position: absolute; inset: -1px 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,176,92,.7), rgba(46,196,182,.7), transparent); }
.stats-strip .hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding-block: 34px; }
.stats-strip .hero-stats > div { padding: 4px 28px; border-left: 1px solid var(--line); }
.stats-strip .hero-stats > div:first-child { border-left: 0; padding-left: 0; }
.stats-strip .hero-stats b { font-size: clamp(56px, 6.4vw, 96px); line-height: 1; padding-top: .06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-strip .hero-stats span { display: block; margin-top: 10px; line-height: 1.5; }

/* Bốn cam kết: đèn soi theo chuột, viền trên chạy màu, icon trong ô, số nét viền */
.why-card { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -30%), rgba(255,176,92,.13), transparent 60%), var(--bg); }
.why-card:hover { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -30%), rgba(255,176,92,.16), transparent 60%), var(--bg-2); }
.why-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.why-card:hover::before { transform: none; }
.why-card svg { box-sizing: content-box; width: 26px; height: 26px; padding: 12px; border-radius: 4px; border: 1px solid rgba(255,176,92,.35); background: rgba(255,176,92,.07); transition: background .35s, color .35s, border-color .35s, transform .45s cubic-bezier(.2,.8,.2,1); }
.why-card:hover svg { background: var(--grad); border-color: transparent; color: #160b06; transform: translateY(-3px) rotate(-6deg); }
.why-n { font-size: 56px; top: 18px; color: transparent; -webkit-text-stroke: 1px rgba(246,244,239,.2); background: var(--grad); -webkit-background-clip: text; background-clip: text; background-size: 0 100%; background-repeat: no-repeat; transition: background-size .7s cubic-bezier(.2,.8,.2,1), -webkit-text-stroke-color .4s; padding-top: .06em; }
.why-card:hover .why-n { background-size: 100% 100%; -webkit-text-stroke-color: transparent; }
.why-card h3 { margin-top: 22px; }

/* Dự án nổi bật: khung ngắm LiDAR trên ảnh, số dự án nét viền, số liệu màu hoàng hôn, bóng phát sáng */
.hg-card { position: relative; transition: border-color .3s, transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s; }
.hg-card:not(.hg-more):hover { box-shadow: 0 34px 70px -34px rgba(255,122,69,.6), 0 0 0 1px rgba(255,176,92,.25); }
.hg-n { color: transparent; -webkit-text-stroke: 1.5px rgba(246,244,239,.85); text-shadow: none; filter: drop-shadow(0 4px 14px rgba(0,0,0,.7)); transition: color .4s, -webkit-text-stroke-color .4s; }
.hg-card:hover .hg-n { color: var(--text); -webkit-text-stroke-color: transparent; }
.hg-stats b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-top: .06em; width: fit-content; }
.hg-more { background-size: 160% 160%; background-position: 0 0; transition: background-position 1s cubic-bezier(.2,.8,.2,1), transform .4s cubic-bezier(.2,.8,.2,1); }
.hg-more:hover { background-position: 100% 100%; }

/* Việt Nam trong 3D: thanh màu chạy dưới ô ảnh đang mở */
.lm::after { background: linear-gradient(transparent 45%, rgba(10,10,11,.92)), linear-gradient(90deg, #ffb05c, #ff5a4e, #2ec4b6) 0 100% / 0 3px no-repeat; transition: background-size .8s cubic-bezier(.2,.8,.2,1); }
.lm:hover::after, .lm:focus-visible::after { background-size: auto, 100% 3px; }

/* Lời mời cuối: giữ nền gốc, thêm lưới quét bên phải và đường quét LiDAR lướt ngang */
.cta { position: relative; overflow: hidden; isolation: isolate; }
.cta::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px);
  -webkit-mask-image: radial-gradient(70% 120% at 100% 50%, #000, transparent); mask-image: radial-gradient(70% 120% at 100% 50%, #000, transparent); }
.cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; z-index: -1; pointer-events: none; background: #9ff3ea; box-shadow: 0 0 14px 3px rgba(46,196,182,.85), 0 0 50px 12px rgba(46,196,182,.3); animation: v2Beam 7s cubic-bezier(.45,.05,.3,1) infinite; }
@keyframes v2Beam { 0% { left: -2%; opacity: 0; } 8% { opacity: 1; } 42% { opacity: 1; } 50%, 100% { left: 102%; opacity: 0; } }
.cta h2 { text-shadow: 0 4px 30px rgba(0,0,0,.35); }

/* Chân trang: gạch chân màu hoàng hôn cho liên kết */
.foot-grid a { background: var(--grad) 0 100% / 0 1px no-repeat; padding-bottom: 2px; transition: background-size .35s cubic-bezier(.2,.8,.2,1), color .2s; }
.foot-grid a:hover { background-size: 100% 1px; }

/* Nút lên đầu trang: vòng tiến độ cuộn */
.to-top { background: radial-gradient(closest-side, var(--bg) calc(100% - 3px), transparent calc(100% - 2px)), conic-gradient(#ffb05c, #ff5a4e calc(var(--sp, 0) * 50%), #2ec4b6 calc(var(--sp, 0) * 100%), rgba(255,255,255,.12) 0); border-color: transparent; }
.to-top:hover { background: var(--grad); color: #160b06; }

/* ===== Các trang khác ===== */

/* Số liệu ở mọi nơi: màu hoàng hôn */
.hero-stats b, .place-stats b, .case-results b, .t-stats b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-top: .06em; }

/* Giải pháp: đèn soi theo chuột, viền trên chạy màu khi rê hoặc khi mở từ link #ct-… */
.sol-detail { position: relative; background: radial-gradient(560px circle at var(--mx, 20%) var(--my, -40%), rgba(255,176,92,.08), transparent 60%), var(--bg); }
.sol-detail::before, .repo::before, .contrib .card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.sol-detail:hover::before, .sol-detail:target::before, .repo:hover::before, .contrib .card:hover::before { transform: none; }

/* Thẻ mã nguồn, thẻ "Bắt đầu từ đâu", các bước triển khai: đèn soi theo chuột */
.repo, .contrib .card { position: relative; }
.repo { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, -40%), rgba(255,176,92,.1), transparent 60%), var(--bg); }
.repo:hover { background: radial-gradient(360px circle at var(--mx, 50%) var(--my, -40%), rgba(255,176,92,.13), transparent 60%), var(--bg-3); }
.contrib .card { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, -40%), rgba(255,176,92,.1), transparent 60%), var(--bg-2); transition: background .3s; }
.step { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -40%), rgba(255,176,92,.1), transparent 60%), var(--bg-2); }
.step.lit { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, -40%), rgba(255,176,92,.12), transparent 60%), var(--bg-3); }

/* Giá trị, diễn đàn: thanh màu bên trái khi rê chuột */
.value, .thread { position: relative; transition: background .3s, padding .3s; }
.value::before, .thread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--sun), #2ec4b6); transform: scaleY(0); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.value:hover, .thread:hover { background: var(--bg-2); } .value:hover::before, .thread:hover::before { transform: none; }

/* Hỏi đáp, tuyển dụng: mục đang mở phát sáng, tiêu đề màu hoàng hôn */
.job { transition: border-color .3s, box-shadow .4s; }
.job:hover { border-color: rgba(255,176,92,.45); }
.job[open] { box-shadow: inset 3px 0 0 var(--sun), 0 24px 50px -32px rgba(255,122,69,.55); }
.job[open] summary h3 { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Nhãn chip: góc vuông giống nhãn đen của trang */
.chip { border-radius: 3px; }
.chips .chip { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* Ảnh dự án: nút chuyển ảnh màu hoàng hôn; hộp chi tiết dự án có quầng sáng */
.ps-nav:hover { background: var(--grad); color: #160b06; }
.case-dialog { box-shadow: 0 0 0 1px rgba(255,176,92,.25), 0 40px 120px -20px rgba(255,90,78,.35); }

/* Form liên hệ: viền trên màu hoàng hôn, ô đang nhập có viền hoàng hôn */
.form { background: linear-gradient(90deg, #ffb05c, #ff5a4e, #2ec4b6) top / 100% 3px no-repeat, var(--bg-2); }
.form label { transition: color .25s; } .form label:focus-within { color: var(--sun); }
.form input:not([aria-invalid="true"]):focus, .form textarea:not([aria-invalid="true"]):focus { border-color: transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--grad) border-box; box-shadow: 0 0 0 3px rgba(255,122,69,.16); }
.contact-list svg { transition: background .3s, color .3s; }
.contact-list a:hover svg { background: var(--grad); color: #160b06; }

/* Link "Tiếp theo" cuối trang: gạch dưới màu hoàng hôn chạy ra */
.next-link { position: relative; }
.next-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: calc(clamp(48px, 8vw, 96px) - 20px); height: 2px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.next-link:hover::after { transform: none; }

@media (max-width: 760px) {
  .stats-strip .hero-stats { grid-template-columns: 1fr 1fr; padding-block: 8px; }
  .stats-strip .hero-stats > div, .stats-strip .hero-stats > div:first-child { padding: 18px 14px; border-left: 1px solid var(--line); }
  .stats-strip .hero-stats > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stats-strip .hero-stats > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (hover: none) {
  .why-card::after, .hg-art::after, .repo::after, .step::after, .v2-frame { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .cta::after { display: none; }
}
