/*
  Noel 2026 cho trang giới thiệu: "Phố Noel WeDo".
  Mọi thứ chỉ có hiệu lực khi <html> có lớp .noel (do noel.js gắn trong mùa
  11/11 đến hết 26/12/2026 giờ Việt Nam, khi khách chọn "Chế độ Noel").
  Không có lớp thì trang y như cũ. Xoá tệp này, noel.js và assets/noel-* sau mùa lễ.
  Không đụng tới hai logo trên thanh điều hướng: FPT đứng trước, WeDo đứng sau, giữ nguyên màu.
*/

/* Bộ màu Noel: đêm xanh thông, vàng đèn cho nút chính, đỏ Noel làm điểm nhấn hiếm. */
html.noel {
  --canvas: #07141a;
  --panel: #0f2529;
  --accent: #ffd27a;
  --accent-hover: #ffe3a8;
  --accent-muted: #24443c;
  --text-secondary: #b9c9c4;
  --text-primary: #f4f7f2;
  --border-strong: rgba(255, 226, 170, 0.28);
  --border-soft: rgba(255, 255, 255, 0.08);
  --grad-chu: linear-gradient(94deg, #ffffff 0%, #fff3d6 38%, #ffd27a 70%, #ff8f7a 100%);
  --grad-hero: linear-gradient(94deg, #ffffff 0%, #fff6e2 50%, #ffd98f 100%);
  --grad-band: linear-gradient(90deg, #ffffff 0%, #fff3d6 18%, #ffd98f 36%, #ffb84d 50%, #ffd98f 64%, #fff3d6 82%, #ffffff 100%);
  --noel-do: #e5484d;
}
html.noel .btn-chinh:hover { box-shadow: 0 10px 40px rgba(255, 200, 110, 0.3); }
html.noel .nav .lang button[aria-pressed="true"] { background: rgba(255, 210, 122, 0.16); }
/* Hạt băng xanh và gợn nước của hero gốc không hợp cảnh phố: nhường chỗ cho bông tuyết. */
html.noel #moi-truong { opacity: 0.22; filter: hue-rotate(-150deg) saturate(0.6); }
html.noel .stage .gon,
html.noel .stage .hat { display: none; }

/* Phim phố Noel rất sáng: đậm lớp tối sau chữ để chữ trắng luôn đọc rõ. */
html.noel .band.trai { --scrim: 0.94; }
html.noel .band.settle { --scrim: 0.86; }
html.noel .band.settle::before {
  background: radial-gradient(ellipse 70% 70% at 50% 45%, rgba(5, 10, 18, 0.82) 0%, rgba(5, 10, 18, 0.6) 46%, rgba(5, 10, 18, 0) 78%);
}
html.noel .hero .scrim {
  background:
    linear-gradient(90deg, rgba(5, 10, 18, 0.8) 0%, rgba(5, 10, 18, 0.52) 30%, rgba(5, 10, 18, 0) 58%),
    linear-gradient(to bottom, rgba(5, 10, 18, 0.5) 0%, rgba(5, 10, 18, 0) 22%),
    linear-gradient(rgba(5, 10, 18, 0.14), rgba(5, 10, 18, 0.14));
}
html.noel .static-hero {
  background-image:
    linear-gradient(to bottom, rgba(5, 10, 18, 0.55), rgba(5, 10, 18, 0.3) 34%, rgba(5, 10, 18, 0.92) 100%),
    var(--ending);
}

/* Bông tuyết bay khắp trang. Không bắt chuột, nằm dưới thanh điều hướng. */
.noel-tuyet { display: none; }
html.noel .noel-tuyet {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 30;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { html.noel .noel-tuyet { display: none; } }

/* Nút chọn chế độ trên thanh điều hướng. */
.noel-chon {
  display: none;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  flex: none;
}
html.noel-mua .noel-chon { display: inline-flex; }
.noel-chon button {
  appearance: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font: 600 13px/1.3 var(--body);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.noel-chon button:hover { color: var(--text-primary); }
.noel-chon button[aria-pressed="true"] { background: var(--accent); color: var(--canvas); }
.noel-chon svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 1060px) { .noel-chon button { padding: 5px 9px; font-size: 12px; } }
/* Màn hẹp: thanh điều hướng hết chỗ, nút chọn chế độ nổi ở góc dưới trái (rồng ở góc dưới phải). */
@media (max-width: 860px) {
  html.noel-mua .noel-chon {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    bottom: max(18px, env(safe-area-inset-bottom));
    z-index: 44;
    background: rgba(7, 20, 26, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  }
  .noel-chon button { min-height: 36px; }
}

/* Phần "Phố Noel WeDo" ngay sau phim cuộn. Ẩn hẳn ngoài chế độ Noel. */
.noel-hoi { display: none; }
html.noel .noel-hoi {
  display: block;
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) clamp(20px, 6vw, 72px);
}
.noel-man {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(380px, 44vw, 540px);
  border-radius: 28px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
}
.noel-man-nen { position: absolute; inset: 0; }
.noel-man-nen img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.noel-man-nen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 10, 18, 0.9) 0%, rgba(5, 10, 18, 0.62) 42%, rgba(5, 10, 18, 0.08) 76%),
    linear-gradient(to top, rgba(5, 10, 18, 0.6), rgba(5, 10, 18, 0) 50%);
}
.noel-man-chu { position: relative; max-width: 560px; padding: clamp(24px, 4vw, 52px); }
.noel-man-chu .kicker { margin-bottom: 14px; }
.noel-tieu {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5.2vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  background-image: var(--grad-chu);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 3px rgba(5, 5, 10, 0.8));
}
.noel-man-chu .lede { margin-top: 16px; font-size: clamp(16px, 1.5vw, 19px); color: var(--text-primary); text-shadow: var(--tshadow); }
.noel-man-chu .hang { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.noel-man-chu .ghi { font-size: 14px; color: var(--text-secondary); text-shadow: var(--tshadow); }
.noel-hoi .hien { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); }
.noel-hoi.in .hien { opacity: 1; transform: none; }
.noel-hoi.in .lede.hien { transition-delay: 0.15s; }
.noel-hoi.in .hang.hien { transition-delay: 0.3s; }

.noel-the-luoi {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.noel-the {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  background: var(--panel);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out), border-color 0.3s;
  transition-delay: calc(0.35s + var(--i, 0) * 0.09s), calc(0.35s + var(--i, 0) * 0.09s), 0s;
}
.noel-hoi.in .noel-the { opacity: 1; transform: none; }
.noel-the:hover { border-color: var(--border-strong); }
.noel-the svg { width: 44px; height: 44px; margin-bottom: 14px; }
.noel-hoi.in .noel-the svg { animation: noel-lac 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.2s); transform-origin: 50% 10%; }
@keyframes noel-lac { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
.noel-the .ai { display: block; margin-bottom: 6px; font-family: var(--mono); font-size: 12px; color: var(--accent); }
.noel-the h3 { font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.35; letter-spacing: -0.01em; }
.noel-the p { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--text-secondary); }
@media (max-width: 960px) { .noel-the-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .noel-the-luoi { grid-template-columns: 1fr; }
  .noel-man { min-height: 420px; }
  .noel-man-nen img { object-position: 62% 60%; }
  .noel-man-nen::after { background: linear-gradient(to top, rgba(5, 10, 18, 0.94) 0%, rgba(5, 10, 18, 0.7) 52%, rgba(5, 10, 18, 0.2) 100%); }
}
@media (prefers-reduced-motion: reduce) {
  .noel-hoi .hien, .noel-the { opacity: 1; transform: none; transition: none; }
  .noel-hoi.in .noel-the svg { animation: none; }
}

/*
  Đồ trang trí cho các phần bên dưới (noel.js gắn vào): dây đèn trên khung ảnh,
  tất Noel treo dưới ảnh Ba bước, hộp quà ở góc ảnh tính năng, nơ trên thẻ,
  gạch chân kẹo gậy, cành nhựa ruồi trước số mục, hàng tất ở phần kết.
  Tất cả chỉ là hình: không bắt chuột, tắt chuyển động khi giảm chuyển động.
*/
.noel-day-den,
.noel-tat-treo,
.noel-qua-goc,
.noel-no,
.noel-hang-tat { display: none; }
html.noel .noel-day-den,
html.noel .noel-tat-treo,
html.noel .noel-qua-goc,
html.noel .noel-no,
html.noel .noel-hang-tat { display: block; pointer-events: none; }

/* Dây đèn võng trên mép trên khung ảnh. */
html.noel .noel-day-den {
  position: absolute;
  left: 3%;
  right: 3%;
  top: -9px;
  height: 26px;
  z-index: 3;
}
.noel-day-den svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.noel-day-den i {
  position: absolute;
  width: 8px;
  height: 11px;
  margin-left: -4px;
  border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%;
  background: var(--mau);
  box-shadow: 0 0 8px 2px var(--mau);
  animation: noel-nhay 2.4s ease-in-out infinite;
  animation-delay: calc(var(--tre) * -1);
}
.noel-day-den i::before {
  content: "";
  position: absolute;
  left: 2px;
  top: -3px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: #3a4d3f;
}
@keyframes noel-nhay {
  0%, 100% { opacity: 1; box-shadow: 0 0 9px 2px var(--mau); }
  50% { opacity: 0.45; box-shadow: 0 0 2px 0 var(--mau); }
}

/* Tất Noel treo dưới góc trái ảnh Ba bước, đung đưa nhẹ. */
html.noel .noel-tat-treo {
  position: absolute;
  left: 22px;
  bottom: -54px;
  width: 38px;
  z-index: 3;
  transform-origin: 50% 0;
  animation: noel-dua 4.6s ease-in-out infinite;
}
.buoc li:nth-child(even) .noel-tat-treo { left: auto; right: 22px; animation-delay: -1.7s; }
.noel-tat-treo svg,
.noel-tat svg,
.noel-qua-goc svg,
.noel-no svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
@keyframes noel-dua { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* Hộp quà đặt trên góc dưới phải ảnh tính năng. */
html.noel .noel-qua-goc {
  position: absolute;
  right: -14px;
  bottom: -18px;
  width: 54px;
  z-index: 3;
  animation: noel-nhun 3.8s ease-in-out infinite;
}
@keyframes noel-nhun { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-5px) rotate(3deg); } }

/* Nơ đỏ trên góc phải thẻ "Quen không?" như một gói quà. */
html.noel .noel-no {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 42px;
  z-index: 2;
}
html.noel .quen .the { padding-right: 58px; }

/* Gạch chân tiêu đề bước và tính năng thành sọc kẹo gậy. */
html.noel .tinh h3::after,
html.noel .buoc h3::after {
  height: 4px;
  background: repeating-linear-gradient(135deg, #e5484d 0 6px, #f4f1ea 6px 12px);
}

/* Cành nhựa ruồi trước số mục (01, 02, 03...). */
html.noel .sec .kicker::before,
html.noel .buoc .so::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 20'%3E%3Cpath d='M12 11C8 4 2 4 1 7c2 0 3 2 2 4 2-1 4 0 4 2 1-2 3-2 5-2Z' fill='%232f9e6b'/%3E%3Cpath d='M14 11c4-7 10-7 11-4-2 0-3 2-2 4-2-1-4 0-4 2-1-2-3-2-5-2Z' fill='%233fb37f'/%3E%3Ccircle cx='10' cy='14' r='3' fill='%23e5484d'/%3E%3Ccircle cx='16' cy='14' r='3' fill='%23e5484d'/%3E%3Ccircle cx='13' cy='10' r='3' fill='%23ff5a5f'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Hàng tất ở phần kết: dây đèn dài, năm chiếc tất treo bên dưới. */
html.noel .noel-hang-tat {
  position: relative;
  display: flex;
  justify-content: center;
  gap: clamp(18px, 5vw, 54px);
  max-width: 560px;
  margin: -34px auto 44px;
  padding-top: 18px;
}
html.noel .noel-day-den-dai { left: 0; right: 0; top: 0; }
.noel-tat {
  width: 42px;
  transform-origin: 50% 0;
  animation: noel-dua 4.2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -0.8s);
}
.noel-tat:nth-child(odd) { margin-top: 10px; }

@media (max-width: 720px) {
  html.noel .noel-tat-treo { width: 30px; bottom: -44px; }
  html.noel .noel-qua-goc { width: 44px; right: -8px; }
  .noel-tat { width: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .noel-day-den i,
  html.noel .noel-tat-treo,
  html.noel .noel-qua-goc,
  .noel-tat { animation: none; }
}

/* Nút loa bật tắt nhạc Giáng sinh, nằm cuối cụm nút chọn giao diện. */
.noel-chon .noel-loa {
  width: 30px;
  height: 30px;
  padding: 0;
  justify-content: center;
  color: var(--text-primary);
}
.noel-chon .noel-loa svg { width: 17px; height: 17px; }
.noel-chon .noel-loa .tat,
.noel-chon .noel-loa[aria-pressed="false"] .bat { display: none; }
.noel-chon .noel-loa[aria-pressed="false"] .tat { display: block; }
.noel-chon .noel-loa[aria-pressed="false"] { color: var(--text-secondary); }
.noel-chon .noel-loa:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 860px) { .noel-chon .noel-loa { width: 36px; height: 36px; } }
/* Nhạc đang chờ khách bấm (trình duyệt chặn tự phát): loa nhấp nháy nhẹ mời bấm. */
.noel-chon .noel-loa.cho { color: var(--accent); animation: noel-moi-bam 1.6s ease-in-out infinite; }
@keyframes noel-moi-bam {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 122, 0.55); }
  50% { box-shadow: 0 0 0 6px rgba(255, 210, 122, 0); }
}
@media (prefers-reduced-motion: reduce) { .noel-chon .noel-loa.cho { animation: none; } }
