/* Trang chủ 9 chương.
   Mặc định (điện thoại, giảm chuyển động): cuộn tự nhiên, mỗi chương cao một màn, có bắt dính chương.
   html.che-do-chuong (máy tính): các chương chồng lên nhau, mỗi lần lăn chuột chuyển đúng một chương. */
.trang-chu { background: var(--dem); color: var(--nga); }
html:not(.che-do-chuong) { scroll-snap-type: y proximity; }
.chuong { position: relative; min-height: 100svh; overflow: hidden; padding: 96px var(--le) 112px; display: flex; flex-direction: column; scroll-snap-align: start; }
.tieu-lon { font-size: clamp(48px, 7.6vw, 124px); }
.tieu-vua { font-size: clamp(44px, 6.6vw, 104px); }
.dong { display: block; overflow: hidden; padding-bottom: .04em; }
.dong > span { display: block; }

/* nhãn chương và chấm điều hướng (chỉ khi chế độ chương) */
.nhan-chuong { display: none; }
.cham { display: none; }
.che-do-chuong .nhan-chuong { display: flex; position: fixed; z-index: 30; left: var(--le); right: var(--le); top: 84px; justify-content: space-between; font-size: 14px; font-weight: 500; pointer-events: none; transition: color .5s; }
.che-do-chuong .cham { display: flex; flex-direction: column; gap: 10px; position: fixed; z-index: 30; right: 18px; top: 50%; transform: translateY(-50%); }
.cham button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 1px solid currentColor; background: none; opacity: .5; cursor: pointer; color: inherit; }
.cham button[aria-current] { background: currentColor; opacity: 1; }
.cham button::after { content: ''; display: block; margin: -16px; width: 44px; height: 44px; } /* vùng bấm đủ lớn */
html.chuong-sang .nhan-chuong, html.chuong-sang .cham { color: var(--muc); }

.che-do-chuong body { overflow: hidden; height: 100vh; }
.che-do-chuong .chuong-wrap { position: fixed; inset: 0; }
.che-do-chuong .chuong { position: absolute; inset: 0; min-height: 0; height: 100%; padding-top: 128px; visibility: hidden; will-change: transform; }
.chuong[data-dau="toi"] .cho-tro { color: #F0B4A8; }
.che-do-chuong .chuong.dang { visibility: visible; }
.che-do-chuong .chan { display: none; }

/* hiện dần khi chương vào (cuộn tự nhiên) */
html:not(.che-do-chuong) [data-hien] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--nhanh), transform .8s var(--nhanh); }
html:not(.che-do-chuong) .vao [data-hien] { opacity: 1; transform: none; }
html:not(.che-do-chuong) .dong > span { transform: translateY(105%); transition: transform 1s var(--nhanh); }
html:not(.che-do-chuong) .vao .dong > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html:not(.che-do-chuong) [data-hien], html:not(.che-do-chuong) .dong > span { opacity: 1; transform: none; }
}

/* nút mua nổi */
.vien-mua { position: fixed; z-index: 35; left: 50%; bottom: 20px; transform: translate(-50%, 140%); display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 18px; border-radius: calc(var(--bo) + 3px); background: rgba(5, 9, 15, .78); border: 1px solid rgba(241, 232, 214, .25); backdrop-filter: blur(10px); color: var(--que); transition: transform .5s var(--nhanh); }
.vien-mua svg { width: 32px; }
.vien-mua span { background: var(--que); color: var(--muc); border-radius: var(--bo); padding: 11px 22px; font-weight: 600; }
.vien-mua.hien { transform: translate(-50%, 0); }

/* 1 mở màn */
.c-mo { background: var(--dem); justify-content: center; }
.c-mo .giua { position: relative; z-index: 2; text-align: center; margin-top: -30vh; }
.c-mo p { margin: 18px 0 0; color: var(--chu-phu-toi); font-size: 18px; }
.c-mo p.khau-hieu { margin-top: 22px; font-family: var(--serif); font-size: clamp(20px, 2.2vw, 28px); letter-spacing: .02em; color: var(--que); }
.c-mo p.khau-hieu + p { margin-top: 10px; font-size: 16px; }
.c-khac .dan { max-width: 46ch; margin: -16px auto 0; font-family: var(--serif); font-size: clamp(18px, 1.8vw, 24px); line-height: 1.5; color: var(--nga); }
.to-bay img { position: absolute; left: var(--x); top: var(--y); width: var(--w); translate: -50% -50%; rotate: var(--r); filter: blur(var(--m)); opacity: var(--o); mix-blend-mode: screen; pointer-events: none; }
.to-bay .chinh { min-width: 300px; }
.cuon { position: absolute; left: 50%; bottom: 28px; translate: -50% 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--chu-phu-toi); }
.che-do-chuong .cuon { display: none; }

/* 2 khác biệt */
.c-khac { background: var(--lam); gap: 40px; align-items: center; justify-content: center; text-align: center; }
.to-giay { list-style: none; margin: 0; padding: 12px 40px; width: min(1320px, 100%); background: var(--giay); color: var(--muc); border-radius: 14px; rotate: -1.2deg; box-shadow: 0 30px 60px rgba(0, 0, 0, .3); text-align: left; }
.to-giay li { display: grid; grid-template-columns: 40px 1fr 260px 1fr; gap: 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid #C9C0AE; }
.to-giay li:last-child { border: 0; }
.to-giay .so { font-size: 14px; color: var(--chu-phu); }
.to-giay li div span { display: block; font-size: 14px; }
.to-giay b { font-size: 21px; }
.to-giay img { width: 260px; height: 110px; object-fit: cover; border-radius: 4px; }
.to-giay p { margin: 0; font-size: 15px; }

/* 3 nguồn tổ */
.c-nguon { background: #2B4256; text-align: center; }
.c-nguon .nen { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.c-nguon h2 { position: relative; margin-top: 4vh; }
.day-duoi { position: relative; margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20vw; text-align: left; border-top: 1px solid rgba(241, 232, 214, .6); padding-top: 22px; }
.day-duoi b { font-size: 20px; font-weight: 600; line-height: 1.4; }
.day-duoi p { margin: 0; }

/* 4 cách dùng */
.c-dung { background: #01283D; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; }
.c-dung .nen { position: absolute; left: 50%; top: 50%; width: min(1440px, 160vh); translate: -50% -50%; }
.c-dung h2 { position: relative; font-size: clamp(40px, 5.8vw, 88px); }
.c-dung .phai { text-align: right; justify-self: end; }
.c-dung .doan { position: relative; grid-row: 3; max-width: 340px; margin: 0; color: var(--chu-phu-toi); }

/* 5 năm sắc */
.c-sac { background: radial-gradient(ellipse 55% 60% at 50% 40%, #1E3A4A, #0B141D 70%); align-items: center; }
.ten-sac { position: relative; z-index: 1; font-size: clamp(60px, min(11vw, 19vh), 170px); color: var(--mau); text-align: center; margin-top: 4vh; transition: color .6s; }
.anh-sac { position: relative; z-index: 2; width: min(420px, 70vw, 42vh); aspect-ratio: 1; object-fit: cover; margin-top: -7vh; border-radius: 50%; -webkit-mask-image: radial-gradient(circle, #000 52%, transparent 70%); mask-image: radial-gradient(circle, #000 52%, transparent 70%); }
.c-sac .duoi { width: 100%; margin-top: auto; display: flex; justify-content: space-between; align-items: end; gap: 32px; border-top: 1px solid rgba(241, 232, 214, .35); padding-top: 24px; }
.c-sac h3 { font-size: clamp(32px, 4.2vw, 60px); }
.c-sac .ben { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; }
.c-sac .ben p { margin: 0; color: var(--chu-phu-toi); min-height: 3.2em; }
.chip { display: flex; flex-wrap: wrap; gap: 8px; }
.chip button { min-height: 44px; padding: 0 16px; border-radius: var(--tron); border: 1px solid rgba(241, 232, 214, .5); background: none; color: var(--nga); cursor: pointer; }
.chip button[aria-selected="true"] { background: var(--que); color: var(--muc); border-color: var(--que); font-weight: 600; }
.c-sac .xem { display: flex; justify-content: space-between; align-items: center; min-height: 48px; border-top: 1px solid rgba(241, 232, 214, .3); }
.c-sac .xem b { color: var(--que); }

/* 6 hộp quà */
.c-qua { background: #EEE3CF; color: var(--muc); display: grid; grid-template-columns: 1.3fr 1.4fr 1fr; align-items: center; gap: 32px; }
.c-qua h2 { align-self: start; margin-top: 2vh; font-size: clamp(44px, 5.6vw, 92px); }
.c-qua .hop { width: 100%; max-width: 720px; justify-self: center; -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent); mask-image: radial-gradient(closest-side, #000 70%, transparent); }
.c-qua .ds { display: flex; flex-direction: column; gap: 18px; align-self: end; margin-bottom: 4vh; }
.c-qua .ds a:not(.nut) { border-top: 1px solid var(--muc); padding-top: 12px; display: flex; flex-direction: column; }
.c-qua .ds b { font-size: 18px; }

/* 7 câu chuyện */
.c-chuyen { background: var(--giay); color: var(--muc); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; column-gap: 48px; }
.c-chuyen .anh { grid-column: 2; grid-row: 1 / 3; width: 100%; height: 44vh; object-fit: cover; }
.c-chuyen .doan { grid-column: 1; grid-row: 2; font-size: 18px; max-width: 560px; }
.so-lieu { grid-column: 1 / -1; align-self: end; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.so-lieu div { border-left: 1px solid #B9AE99; padding: 0 20px 20px; min-height: 18vh; }
.so-lieu dt { font-size: 14px; color: var(--chu-phu); }
.so-lieu dd { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); }

/* 8 chuyện tổ yến */
.c-bai { background: var(--muc); gap: 6vh; }
.c-bai .the { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: auto; }
.c-bai .the img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s var(--nhanh); }
.c-bai .the a { overflow: hidden; }
.c-bai .the a:hover img { transform: scale(1.04); }
.c-bai .the span { display: block; margin-top: 14px; padding-top: 12px; border-top: 1px solid #4A5A66; font-family: var(--serif); font-size: 24px; line-height: 1.25; }

/* 9 cuối */
.c-cuoi { background: radial-gradient(ellipse 40% 35% at 50% 22%, #2A3B47, var(--dem) 70%); align-items: center; text-align: center; justify-content: space-between; }
.c-cuoi .giua { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 4vh; }
.logo-sang { width: 110px; color: var(--que); filter: drop-shadow(0 0 30px rgba(217, 174, 98, .45)); }
.c-cuoi b { font-size: 20px; }
.c-cuoi p { margin: 0; max-width: 440px; color: var(--chu-phu-toi); }
.tinh { width: 100%; }
.tinh label { display: block; font-family: var(--serif); font-size: clamp(44px, 6.4vw, 92px); color: #5E6B74; text-transform: uppercase; }
.tinh input { width: 100%; height: 56px; border: 0; border-bottom: 2px solid var(--chu-phu-toi); background: none; color: var(--nga); text-align: center; font-size: 22px; }
.tinh input::placeholder { color: transparent; }
.chan-nho { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; font-size: 13px; color: var(--chu-phu-toi); }
.chan-nho > :first-child { text-align: left; } .chan-nho > :last-child { text-align: right; }
.chan-nho .logo { color: var(--que); font-size: 16px; }

/* điện thoại */
@media (max-width: 900px) {
  .chuong { padding: 84px 16px 104px; }
  .c-mo .giua { margin-top: -30vh; }
  .to-bay img { width: calc(var(--w) * 2); }
  .to-giay { padding: 6px 18px; rotate: 0deg; }
  .to-giay li { grid-template-columns: 32px 1fr; gap: 8px 12px; padding: 16px 0; }
  .to-giay img, .to-giay p { grid-column: 2; }
  .to-giay img { width: 100%; height: 120px; }
  .day-duoi { grid-template-columns: 1fr; gap: 12px; }
  .c-dung { grid-template-columns: 1fr 1fr; }
  .c-dung .nen { width: 180vw; opacity: .8; }
  .c-dung .doan { font-size: 14px; }
  .anh-sac { margin-top: -6vw; }
  .c-sac .duoi { flex-direction: column; align-items: stretch; }
  .c-qua { grid-template-columns: 1fr; }
  .c-qua .ds { align-self: stretch; }
  .c-chuyen { grid-template-columns: 1fr; }
  .c-chuyen .anh { grid-column: 1; grid-row: auto; height: 34vh; margin: 20px 0; }
  .c-chuyen .doan { grid-row: auto; font-size: 16px; }
  .so-lieu { grid-template-columns: 1fr 1fr; }
  .so-lieu div { min-height: 0; padding-bottom: 12px; }
  .c-bai .the { grid-template-columns: 1fr; }
  .c-bai .the a:nth-child(n+2) img { display: none; }
  .chan-nho { grid-template-columns: 1fr; text-align: center; }
  .vien-mua { left: auto; right: 16px; transform: translateY(160%); padding: 0; background: none; border: 0; backdrop-filter: none; }
  .vien-mua.hien { transform: none; }
  .vien-mua svg { display: none; }
  .vien-mua span { display: block; padding: 14px 22px; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
  .chan-nho > * { text-align: center !important; }
}
