/* Nhận diện: cuongxai_brand_guideline.md + bộ não AI4FnB. Trang chỉ sáng (khách xem ban ngày trên điện thoại). */
:root {
  --navy: #14284B;
  --navy-sau: #0E1D38;
  --cam: #D96B27;
  --cam-dam: #BF581B;
  --cam-chu: #A84C15;      /* cam cho chữ nhỏ trên nền cát, đủ 4.5:1 */
  --cat: #F7F4EE;
  --giay: #FFFDF8;
  --muc: #0D1117;
  --muc-phu: #48546E;
  --ke: #DED7CA;
  --cat-tren-navy: #C9D2E3;
  --chu-tieu: "Plus Jakarta Sans", "Be Vietnam Pro", system-ui, sans-serif;
  --chu-than: "Be Vietnam Pro", system-ui, sans-serif;
  --le: clamp(16px, 5vw, 56px);
  --rong: 1180px;
  --ra: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cat); color: var(--muc);
  font: 400 17px/1.6 var(--chu-than);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--chu-tieu); line-height: 1.15; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(30px, 6.4vw, 52px); font-weight: 800; color: var(--navy); }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: 3px; }
::selection { background: var(--cam); color: #fff; }
:focus-visible { outline: 3px solid var(--cam); outline-offset: 3px; border-radius: 6px; }

.bo-qua { position: absolute; left: -9999px; }
.bo-qua:focus { left: 16px; top: 16px; z-index: 99; background: #fff; padding: 8px 14px; }

/* Nút: nền cam chữ trắng theo brand; chữ 19px đậm để đạt chuẩn chữ lớn 3:1 */
.nut {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 26px; border-radius: 10px; border: 2px solid transparent;
  background: var(--cam); color: #fff; font: 700 19px/1.2 var(--chu-tieu); text-decoration: none;
  box-shadow: 0 6px 18px -6px rgba(217,107,39,.55); cursor: pointer;
  transition: transform .18s var(--ra), box-shadow .18s var(--ra), background-color .18s;
  -webkit-tap-highlight-color: transparent; position: relative; overflow: hidden;
}
.nut:hover { background: var(--cam-dam); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(217,107,39,.6); }
.nut:active { transform: scale(.96); box-shadow: 0 2px 8px -4px rgba(217,107,39,.6); }
.nut .gon { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); animation: gon .55s var(--ra) forwards; pointer-events: none; }
@keyframes gon { to { transform: scale(1); opacity: 0; } }
.nut-nho { min-height: 44px; padding: 8px 16px; font-size: 19px; }
.nut-vien { background: transparent; border-color: rgba(247,244,238,.5); color: var(--cat); box-shadow: none; }
.nut-vien:hover { background: rgba(247,244,238,.1); border-color: var(--cat); }
.nut-vien-toi { background: transparent; border-color: var(--navy); color: var(--navy); box-shadow: none; }
.nut-vien-toi:hover { background: var(--navy); color: var(--cat); }
.nut-vien-toi .gon { background: rgba(20,40,75,.2); }

/* Đầu trang */
.dau {
  position: absolute; inset: 0 0 auto; z-index: 5; display: flex; align-items: center; gap: 20px;
  max-width: var(--rong); margin: 0 auto; padding: 18px var(--le); color: var(--cat);
}
.ten-hieu { font: 800 24px/1 var(--chu-tieu); text-decoration: none; letter-spacing: -0.02em; }
.ten-hieu span { color: var(--cam); }
.menu { display: none; gap: 26px; margin-left: auto; font-weight: 500; }
.menu a { text-decoration: none; opacity: .85; }
.menu a:hover { opacity: 1; text-decoration: underline; }
.dau .nut { margin-left: auto; }
@media (min-width: 860px) { .menu { display: flex; } .dau .nut { margin-left: 8px; } }

/* Hero */
.hero {
  background: radial-gradient(120% 80% at 85% 10%, #1D3866 0%, var(--navy) 55%, var(--navy-sau) 100%);
  color: var(--cat); display: grid; gap: 44px; align-items: center;
  padding: 104px var(--le) 72px; position: relative; overflow: hidden;
}
.hero > * { max-width: var(--rong); }
.hero-tieu { font-size: clamp(40px, 11.5vw, 84px); font-weight: 800; letter-spacing: -0.035em; color: #fff; }
.hero-tieu span { display: inline-block; }
.hero-mo { margin-top: 20px; max-width: 34em; color: var(--cat-tren-navy); font-size: clamp(17px, 2.2vw, 19px); }
.hero-nut { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-uu-dai {
  margin-top: 26px; padding: 14px 16px; border-radius: 12px; max-width: 34em;
  background: rgba(217,107,39,.14); border: 1px solid rgba(217,107,39,.45); color: var(--cat); font-size: 16px;
}
.hero-uu-dai strong { color: #FFB27F; }

@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); padding-top: 128px; justify-content: center;
    padding-left: max(var(--le), calc((100vw - var(--rong)) / 2)); padding-right: max(var(--le), calc((100vw - var(--rong)) / 2)); }
}

/* Điện thoại mô phỏng */
.dien-thoai { margin: 0 auto; position: relative; width: min(300px, 66vw); }
.dt-vo {
  padding: 11px; border-radius: 44px; background: linear-gradient(160deg, #2A3B5C, #0B1426);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), inset 0 0 0 1px rgba(255,255,255,.12);
}
.dt-man { position: relative; aspect-ratio: 9 / 19.5; border-radius: 34px; overflow: hidden; background: #F4F1EC; }
.dt-man img { position: absolute; inset: 0 0 auto; width: 100%; }
.dt-dat { opacity: 0; }
.dt-cham { position: absolute; width: 46px; height: 46px; border-radius: 50%; left: 50%; bottom: 7%; margin-left: -23px;
  background: rgba(217,107,39,.35); border: 2px solid rgba(217,107,39,.9); opacity: 0; }
.dt-nhan { list-style: none; margin: 0; padding: 0; }
.dt-nhan li {
  position: absolute; padding: 7px 12px; border-radius: 999px; background: var(--cat); color: var(--navy);
  font: 700 13px/1.2 var(--chu-tieu); box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); white-space: nowrap;
}
.dt-nhan li:nth-child(1) { top: 20%; left: -8%; }
.dt-nhan li:nth-child(2) { top: 46%; right: -10%; }
.dt-nhan li:nth-child(3) { bottom: 14%; left: -6%; background: var(--cam-chu); color: #fff; }
.dien-thoai figcaption { margin-top: 16px; text-align: center; font-size: 14px; color: var(--cat-tren-navy); }

/* Video */
.video { background: linear-gradient(var(--navy-sau) 0 50%, var(--cat) 50% 100%); padding: 0 var(--le); }
.video-khung {
  --ti-le-video: 16 / 9; /* video dọc 9:16 thì đổi thành 9 / 16 */
  position: relative; max-width: 960px; margin: 0 auto; aspect-ratio: var(--ti-le-video);
  border-radius: 18px; overflow: hidden; background: var(--navy);
  box-shadow: 0 30px 60px -30px rgba(13,17,23,.55);
}
.video-khung video { width: 100%; height: 100%; object-fit: cover; }
.bat-tieng {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px 8px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(13,17,23,.72); color: #fff; font: 600 15px/1 var(--chu-than); backdrop-filter: blur(6px);
  transition: transform .18s var(--ra);
}
.bat-tieng:active { transform: scale(.94); }
.bat-tieng svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bat-tieng svg path:first-child { fill: currentColor; }
.bat-tieng .song { display: none; }
.bat-tieng[aria-pressed="true"] .song { display: inline; }
.bat-tieng[aria-pressed="true"] .gach { display: none; }

/* Khung chung các mục */
.dau-kho, .mau, .goi, .so-sanh, .buoc, .hoi-dap { max-width: var(--rong); margin: 0 auto; padding: 88px var(--le) 0; }
@media (min-width: 960px) { .dau-kho, .mau, .goi, .so-sanh, .buoc, .hoi-dap { padding-top: 128px; } }

/* Nỗi đau: gạch đi, thay bằng cách giải */
.ds-dau { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 4px; }
.ds-dau li { padding: 22px 0; border-top: 1px solid var(--ke); display: grid; gap: 8px; }
.dau-cu { font: 700 clamp(21px, 3.6vw, 30px)/1.25 var(--chu-tieu); color: var(--muc); letter-spacing: -0.02em; }
.ds-dau s {
  text-decoration: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(var(--cam), var(--cam)) no-repeat 0 58% / 0% 3px;
  transition: background-size .9s var(--ra), color .9s;
}
.ds-dau span { color: var(--muc-phu); padding-left: 28px; position: relative; max-width: 40em; }
.ds-dau span::before { content: ""; position: absolute; left: 0; top: .5em; width: 16px; height: 9px; border-left: 3px solid var(--cam); border-bottom: 3px solid var(--cam); transform: rotate(-45deg); }
.ds-dau li.hien s { background-size: 100% 3px; color: #5F6675; transition-delay: .7s; }
@media (min-width: 860px) { .ds-dau li { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: baseline; } }

/* Mẫu thật */
.mau { display: grid; gap: 40px; align-items: center; }
.mau-anh img { width: min(320px, 80vw); margin: 0 auto; border-radius: 26px; box-shadow: 0 30px 60px -30px rgba(20,40,75,.5); border: 8px solid #fff; }
.mau-chu p { margin-top: 18px; color: var(--muc-phu); max-width: 36em; }
.ds-gach { margin: 22px 0 28px; padding: 0; list-style: none; display: grid; gap: 12px; }
.ds-gach li { padding-left: 22px; position: relative; }
.ds-gach li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border-radius: 3px; background: var(--cam); }
@media (min-width: 860px) { .mau { grid-template-columns: .8fr 1.2fr; } }

/* Bảng giá kiểu hóa đơn máy tính tiền */
.uu-dai-chung { margin-top: 18px; max-width: 44em; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--ke); }
.uu-dai-chung strong { color: var(--cam-chu); }
.hoa-don-day { display: grid; gap: 28px; margin-top: 40px; align-items: start; }
@media (min-width: 960px) { .hoa-don-day { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.hoa-don {
  --rang: 10px; position: relative; background: var(--giay); padding: 30px 24px 34px; display: flex; flex-direction: column;
  filter: drop-shadow(0 18px 24px rgba(20,40,75,.13));
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--rang) * 2) 100%,
                conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(var(--rang) * 2) 100%;
  -webkit-mask-composite: source-in; mask-composite: intersect;
  font-variant-numeric: tabular-nums;
}
.hoa-don h3 { font-size: 28px; font-weight: 800; color: var(--navy); }
.hd-cho { margin-top: 8px; color: var(--muc-phu); font-size: 16px; }
.hd-dong { list-style: none; margin: 22px 0; padding: 18px 0; border-block: 2px dashed var(--ke); display: grid; gap: 10px; font-size: 16px; }
.hd-dong li { display: flex; gap: 10px; }
.hd-dong li::before { content: ""; flex: none; width: 7px; height: 7px; margin-top: .62em; border-radius: 50%; background: var(--navy); }
.hd-qua { color: var(--cam-chu); font-weight: 600; }
.hd-qua::before { background: var(--cam) !important; }
.hd-tong, .hd-thang { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hd-tong span, .hd-thang span { color: var(--muc-phu); font-size: 15px; }
.hd-tong strong { font: 800 clamp(26px, 3vw, 30px)/1.1 var(--chu-tieu); color: var(--navy); letter-spacing: -0.02em; }
.hd-thang { margin-top: 8px; }
.hd-thang strong { font: 700 18px/1.2 var(--chu-tieu); color: var(--navy); }
.hd-uu { margin: 18px 0 22px; padding: 10px 12px; border-radius: 8px; background: rgba(217,107,39,.12); font-size: 15px; }
.hd-uu strong { color: var(--cam-chu); }
.hd-uu-cho { background: rgba(20,40,75,.07); }
.hoa-don .nut { margin-top: auto; width: 100%; }
.hd-ghim { align-self: flex-start; margin-bottom: 12px; padding: 5px 12px; border-radius: 999px; background: var(--cam-chu); color: #fff; font: 700 14px/1.3 var(--chu-tieu); }
.hd-ghim-nhat { background: var(--navy); }
.hoa-don-noi { background: #fff; }
@media (min-width: 960px) { .hoa-don-noi { margin-top: -14px; } }

/* So sánh năm đầu: thước triệu đồng */
.ss-mo { margin-top: 12px; color: var(--muc-phu); }
.thuoc { margin-top: 36px; display: grid; gap: 26px; }
.thuoc-ten { font: 700 18px/1.3 var(--chu-tieu); color: var(--navy); }
.thuoc-ray { position: relative; height: 18px; margin: 10px 0 8px; border-radius: 999px; background: #E9E3D8; }
.thuoc-thanh {
  position: absolute; top: 0; bottom: 0; border-radius: 999px; background: #8C97AD;
  left: calc(var(--tu) / 20 * 100%); width: calc((var(--den) - var(--tu)) / 20 * 100%);
  transform-origin: left; transition: transform 1.2s var(--ra);
}
.thuoc-minh .thuoc-thanh { background: var(--cam); }
.thuoc-minh .thuoc-ten { color: var(--cam-chu); }
.thuoc-so { font-variant-numeric: tabular-nums; }
.thuoc-so b { font: 800 22px/1 var(--chu-tieu); color: var(--muc); }
.thuoc-so small { display: block; color: var(--muc-phu); font-size: 14px; margin-top: 4px; }
.thuoc-truc { display: flex; justify-content: space-between; font-size: 13px; color: var(--muc-phu); border-top: 1px solid var(--ke); padding-top: 6px; margin: 0; }
.nguon { margin-top: 26px; font-size: 14px; color: var(--muc-phu); max-width: 60em; }
.js .so-sanh:not(.hien) .thuoc-thanh { transform: scaleX(0); }

/* Các bước */
.ds-buoc { list-style: none; counter-reset: b; margin: 36px 0 0; padding: 0; display: grid; gap: 14px; }
.ds-buoc li { counter-increment: b; position: relative; padding: 22px 22px 22px 76px; background: #fff; border-radius: 14px; border: 1px solid var(--ke); }
.ds-buoc li::before {
  content: counter(b); position: absolute; left: 20px; top: 20px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy); color: var(--cat); font: 800 18px/1 var(--chu-tieu);
}
.ds-buoc h3 { font-size: 20px; color: var(--navy); }
.ds-buoc p { margin-top: 6px; color: var(--muc-phu); font-size: 16px; }
@media (min-width: 960px) { .ds-buoc { grid-template-columns: repeat(4, 1fr); } .ds-buoc li { padding: 76px 22px 24px; } }

/* Hỏi đáp */
.hoi-dap details { border-bottom: 1px solid var(--ke); max-width: 52em; }
.hoi-dap details:first-of-type { margin-top: 28px; border-top: 1px solid var(--ke); }
.hoi-dap summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font: 700 19px/1.35 var(--chu-tieu); color: var(--navy);
}
.hoi-dap summary::-webkit-details-marker { display: none; }
.hoi-dap summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px;
  border-right: 3px solid var(--cam); border-bottom: 3px solid var(--cam); transform: rotate(45deg); transition: transform .3s var(--ra); }
.hoi-dap details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.hoi-dap details p { padding: 0 0 22px; color: var(--muc-phu); max-width: 42em; }

/* Chốt */
.chot { margin-top: 104px; background: var(--navy); color: var(--cat); text-align: center; padding: 88px var(--le) 120px; }
.chot h2 { color: #fff; max-width: 18em; margin: 0 auto 30px; font-size: clamp(28px, 5.4vw, 46px); }
.nut-lon { min-height: 60px; padding: 16px 32px; font-size: 21px; }
.chot p { margin-top: 18px; color: var(--cat-tren-navy); font-size: 15px; }

.chan { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; max-width: var(--rong); margin: 0 auto; padding: 32px var(--le) 110px; font-size: 14px; color: var(--muc-phu); }
.chan img { width: 110px; border-radius: 8px; }
.link-cookie { margin-left: auto; background: none; border: 0; color: var(--muc-phu); font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* Thanh Zalo dưới đáy điện thoại */
.thanh-zalo {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; justify-content: center; min-height: 54px; border-radius: 14px;
  background: var(--cam); color: #fff; font: 700 19px/1.2 var(--chu-tieu); text-decoration: none;
  box-shadow: 0 12px 28px -10px rgba(13,17,23,.55); transform: translateY(160%); transition: transform .45s var(--ra);
}
.thanh-zalo.hien { transform: none; }
.thanh-zalo:active { transform: scale(.97); }
@media (min-width: 860px) { .thanh-zalo { display: none; } }

.cookie {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; max-width: 560px; margin: 0 auto;
  background: #fff; border: 1px solid var(--ke); border-radius: 14px; padding: 16px; font-size: 15px;
  box-shadow: 0 20px 40px -20px rgba(13,17,23,.5);
}
.cookie div { display: flex; gap: 10px; margin-top: 12px; }
.cookie .nut { flex: 1; }

/* Chuyển động: chỉ khi có JS và người xem không tắt chuyển động */
@media (prefers-reduced-motion: no-preference) {
  .js .hien-dan { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ra), transform .8s var(--ra); }
  .js .hien-dan.hien { opacity: 1; transform: none; }
  .js .hoa-don-day .hoa-don:nth-child(2) { transition-delay: .12s; }
  .js .hoa-don-day .hoa-don:nth-child(3) { transition-delay: .24s; }
  
  .hero-tieu span { animation: len .9s var(--ra) both; }
  .hero-tieu span:nth-child(2) { animation-delay: .1s; }
  .hero-tieu span:nth-child(3) { animation-delay: .2s; }
  .hero-mo, .hero-nut, .hero-uu-dai { animation: len .9s var(--ra) .3s both; }
  .dien-thoai { animation: dt-vao 1.1s var(--ra) .25s both; }
  .dt-nhan li { animation: nhan 14s var(--ra) infinite both; }
  .dt-nhan li:nth-child(2) { animation-delay: 1.2s; }
  .dt-nhan li:nth-child(3) { animation-delay: 2.4s; }

  /* Khung điện thoại: tự cuộn trang chủ Lil' Sago, rồi chuyển sang màn đặt bàn và "chạm" nút */
  .dt-cuon { animation: cuon 14s cubic-bezier(.45,0,.25,1) infinite; }
  .dt-dat { animation: dat 14s ease infinite; }
  .dt-cham { animation: cham 14s ease infinite; }
}
@keyframes len { from { opacity: 0; transform: translateY(24px); } }
@keyframes dt-vao { from { opacity: 0; transform: translateY(40px) rotate(4deg); } }
@keyframes cuon {
  0%, 8% { transform: translateY(0); }
  30%, 36% { transform: translateY(calc(-34% + 0px)); }
  56%, 62% { transform: translateY(-62%); }
  70%, 100% { transform: translateY(-62%); }
}
@keyframes dat { 0%, 66% { opacity: 0; transform: translateX(30%); } 72%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes cham { 0%, 80% { opacity: 0; transform: scale(.4); } 84% { opacity: 1; transform: scale(1); } 90% { opacity: 0; transform: scale(1.6); } 100% { opacity: 0; } }
@keyframes nhan { 0% { opacity: 0; transform: translateY(10px) scale(.9); } 6%, 60% { opacity: 1; transform: none; } 68%, 100% { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .thanh-zalo, .thuoc-thanh, .ds-dau s { transition: none; }
}
