/* Trang chủ Nzim × Scroll Craft (21/11/2026)
   Chỉ nạp trên trang chủ, sau styles.css + sc/scrollcraft.css.
   Token Nzim 4B map sang token engine. KHÔNG sửa sc/scrollcraft.css / .js (đó là engine). */
:root {
  --sc-canvas: #F6E9DA;      /* beige: nền, drift nội suy giá trị này */
  --sc-surface: #FFF8EC;
  --sc-ink: #6B3A24;         /* brown */
  --sc-ink-soft: #7E5A47;
  --sc-accent: #7A1E25;      /* burgundy: CTA */
  --sc-accent-ink: #FFF8EC;
  --sc-font-display: 'Fraunces', Georgia, serif;
  --sc-font-text: 'Be Vietnam Pro', system-ui, sans-serif;
  --hdr: 120px;              /* chiều cao header dính, JS đo lại */
  --gut: clamp(20px, 4vw, 32px);
}
body { background: var(--sc-canvas); color: var(--brown); font: 400 16px/1.65 var(--sans); letter-spacing: 0; }
.nh-hero em, .nh-sleep em, .nh-close em { font-style: italic; color: var(--wine); }

/* ---------- 1 · Hero nhiều lớp ---------- */
.nh-hero { padding: 16px 0 72px; overflow: hidden; }
.nh-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; }
.nh-hero__text { position: relative; z-index: 3; }
.nh-hero__title { font: 700 clamp(46px, 6.4vw, 94px)/0.98 var(--serif); letter-spacing: -0.03em; color: var(--brown); text-wrap: balance; }
.nh-hero__title em { font-weight: 600; }
.nh-hero__brand { display: block; font: 600 13px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--wine); margin-bottom: 20px; }
.nh-hero__lead { font-size: 18px; max-width: 36ch; margin: 24px 0 30px; text-wrap: pretty; }
.nh-scene { position: relative; height: clamp(520px, 50vw, 660px); }
.nh-plane { position: absolute; inset: 0; }
.nh-plane img, .nh-card { max-width: none; }
.nh-plane--back img { position: absolute; right: 0; top: 2%; width: 80%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; opacity: .82; filter: saturate(.8); }
.nh-plane--mid { z-index: 1; }
.nh-arch { position: absolute; left: 10%; bottom: 0; width: 54%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px 28px 28px; box-shadow: 18px 18px 0 var(--blue), 0 30px 50px -24px rgba(75, 35, 20, .45); }
.nh-nhim { position: absolute; left: calc(10% - 46px); bottom: -6px; width: 104px; height: auto; }
.nh-plane--front { z-index: 2; }
.nh-card { position: absolute; margin: 0; background: var(--paper); padding: 8px 8px 24px; border-radius: 6px; box-shadow: 0 20px 34px -14px rgba(75, 35, 20, .42); }
.nh-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 3px; }
.nh-card--nail { right: 0; bottom: 4%; width: 31%; rotate: 6deg; }
.nh-card--mi { right: 30%; top: 0; width: 22%; rotate: -7deg; }

/* ---------- 2 · Đội ngũ ---------- */
.nh-story { padding: 64px 0 88px; }
.nh-story__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.nh-story__img { margin: 0; }
.nh-story__img img { width: 100%; height: auto; border-radius: 28px; }
.nh-story__text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.nh-story__text > p { max-width: 52ch; }
.nh-facts { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; width: 100%; }
.nh-facts li { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--latte); padding-top: 12px; font-size: 14px; }
.nh-facts b { font: 700 28px/1.1 var(--serif); color: var(--wine); }

/* ---------- 3 · Dịch vụ: rail ngang ---------- */
.nh-svc .nh-svc__stage[data-sc-stage] { top: var(--hdr); height: calc(100svh - var(--hdr)); display: flex; align-items: center; overflow: hidden; }
.nh-rail { display: flex; gap: 20px; padding: 0 var(--gut); width: max-content; align-items: stretch; }
.nh-rail .svc { width: clamp(280px, 25vw, 330px); flex: none; }
.nh-rail .svc img { aspect-ratio: 16 / 11; }
.nh-rail .svc__name { font-size: 23px; padding-top: 16px; }
.nh-rail .svc__label { font-size: 13.5px; }
.nh-rail .svc__label > div { grid-template-columns: 1fr; gap: 0; padding: 7px 0; }
.nh-rail .svc__actions { padding: 14px 20px 20px; }
.nh-rail .svc__actions .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.nh-rail__head, .nh-rail__end { width: clamp(260px, 24vw, 320px); flex: none; display: flex; flex-direction: column; justify-content: center; gap: 14px; align-items: flex-start; }
.nh-rail__end { background: var(--sand); border-radius: var(--r); padding: 28px; }
.nh-rail__end-title { font: 700 26px/1.2 var(--serif); color: var(--wine); }

/* ---------- 5 · Nzim Sleep (đỉnh) ---------- */
.nh-sleep .nh-sleep__stage[data-sc-stage] { top: var(--hdr); height: calc(100svh - var(--hdr)); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 0 max(var(--gut), calc((100vw - 1280px) / 2 + 32px)); overflow: hidden; }
.nh-sleep__planes { position: relative; height: min(72vh, 620px); }
.nh-sleep__p { position: absolute; height: auto; object-fit: cover; max-width: none; }
.nh-sleep__p--1 { left: 0; top: 4%; width: 66%; aspect-ratio: 4 / 3; border-radius: 24px; opacity: .78; filter: saturate(.75); }
.nh-sleep__p--2 { left: 26%; top: 18%; width: 46%; aspect-ratio: 4 / 5; border-radius: 999px 999px 24px 24px; box-shadow: 16px 16px 0 var(--blue), 0 30px 50px -24px rgba(40, 60, 66, .5); z-index: 1; }
.nh-sleep__p--3 { right: 0; bottom: 0; width: 32%; aspect-ratio: 4 / 5; border-radius: 18px; z-index: 2; box-shadow: 0 24px 40px -16px rgba(40, 60, 66, .5); }
.nh-sleep__copy { position: relative; height: min(72vh, 620px); }
.nh-sleep__line, .nh-sleep__menu { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.nh-sleep__line { font: 600 clamp(34px, 4.2vw, 60px)/1.08 var(--serif); letter-spacing: -0.02em; color: var(--brown); text-wrap: balance; }
.nh-sleep__menu { gap: 14px; }
.nh-sleep__menu .pl { max-width: 460px; }
.nh-sleep__menu .pl li { border-color: rgba(76, 106, 114, .35); }
.nh-sleep__menu .hero__actions { align-items: center; margin-top: 8px; }

/* ---------- 6 · App ---------- */
.nh-steps { list-style: none; counter-reset: st; margin: 4px 0 6px; padding: 0; display: grid; gap: 12px; }
.nh-steps li { counter-increment: st; display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; font-size: 15px; }
.nh-steps li::before { content: counter(st); grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; background: #FFF8EC; color: #4C6A72; display: grid; place-items: center; font: 700 15px/1 var(--serif); }
.nh-steps b { font-weight: 700; }

/* ---------- 8 · Cơ sở ---------- */
.nh-loc { padding: 80px 0; }
.nh-loc__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.nh-loc__item { display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.nh-loc__item figure { margin: 0 0 12px; border-radius: var(--r); overflow: hidden; }
.nh-loc__item img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.nh-loc__item h3 { font: 700 24px/1.2 var(--serif); }
.nh-loc__item h3 a { color: var(--brown); text-decoration: none; }

/* ---------- 9 · Kết + Phiếu hẹn ---------- */
.nh-close { padding: 88px 0 104px; background: var(--sand); }
.nh-close__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: start; }
.nh-close__title { font: 700 clamp(40px, 5.2vw, 76px)/1.02 var(--serif); letter-spacing: -0.025em; color: var(--brown); text-wrap: balance; margin-bottom: 20px; }
.nh-close__text > p { max-width: 46ch; font-size: 17px; }
.nh-close__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.slip { background: var(--paper); border-radius: 6px; padding: 26px 28px 22px; box-shadow: 0 24px 44px -20px rgba(75, 35, 20, .38); border-top: 3px dashed var(--latte); border-bottom: 3px dashed var(--latte); display: flex; flex-direction: column; gap: 12px; rotate: 1.2deg; }
.slip__brand { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--blue-dark); }
.slip__title { font: 700 34px/1.1 var(--serif); color: var(--wine); }
.slip__list { list-style: none; margin: 0; padding: 0; }
.slip__list li { display: grid; grid-template-columns: 1fr auto 32px; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--latte); font-size: 15px; }
.slip__list li b { color: var(--wine); white-space: nowrap; font-size: 14px; }
.slip__x { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--sand); color: var(--brown); font-size: 18px; line-height: 1; cursor: pointer; }
.slip__x:hover { background: var(--latte); }
.slip__empty { font-size: 14px; }
.slip__branch { border: 0; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.slip__branch legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.slip__branch label { display: flex; align-items: baseline; gap: 8px; cursor: pointer; min-height: 32px; }
.slip__branch small { opacity: .75; }
.slip__branch input { accent-color: var(--wine); width: 18px; height: 18px; translate: 0 3px; }
.slip__send { width: 100%; margin-top: 6px; }
.slip__status { font-size: 14px; font-weight: 600; color: var(--blue-dark); min-height: 1.2em; }
.slip__fine { font-size: 12.5px; opacity: .8; }
.slip__clear { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: var(--brown); text-decoration: underline; font: 500 13px var(--sans); cursor: pointer; }
.slip.is-bump { animation: slip-bump .4s cubic-bezier(.23, 1, .32, 1); }
@keyframes slip-bump { 40% { rotate: -0.6deg; } }

.slip-dock { position: fixed; left: 16px; bottom: 16px; z-index: 30; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 8px 0 18px; border-radius: 999px; background: var(--wine); color: var(--beige); text-decoration: none; font: 600 15px/1 var(--sans); box-shadow: 0 12px 26px -10px rgba(94, 22, 28, .6); transition: transform .18s cubic-bezier(.23, 1, .32, 1), opacity .18s; }
.slip-dock b { min-width: 32px; height: 32px; border-radius: 999px; background: var(--beige); color: var(--wine); display: grid; place-items: center; font-size: 15px; }
.slip-dock.is-away { opacity: 0; transform: translateY(12px); pointer-events: none; }
.slip-dock.is-bump b { animation: dock-bump .35s cubic-bezier(.23, 1, .32, 1); }
@keyframes dock-bump { 50% { transform: scale(1.18); } }

/* ---------- tablet ---------- */
@media (max-width: 1080px) {
  .nh-hero__grid, .nh-story__grid, .nh-close__grid { grid-template-columns: 1fr; }
  .nh-scene { height: 560px; max-width: 640px; }
  .nh-loc__list { grid-template-columns: 1fr 1fr; }
  .nh-sleep .nh-sleep__stage[data-sc-stage] { grid-template-columns: 1fr; grid-template-rows: 40% 60%; gap: 0; align-items: stretch; }
  .nh-sleep__planes, .nh-sleep__copy { height: auto; }
  .nh-sleep__planes { max-width: 560px; width: 100%; justify-self: center; }
}

/* ---------- phone: dựng lại bố cục, không chỉ thu nhỏ ---------- */
@media (max-width: 760px) {
  .nh-hero { padding: 4px 0 40px; }
  .nh-hero__title { font-size: clamp(40px, 11.5vw, 52px); }
  .nh-hero__brand { font-size: 11.5px; margin-bottom: 14px; }
  .nh-hero__lead { font-size: 16px; margin: 16px 0 22px; }
  .nh-hero .hero__actions .btn { flex: 1 1 auto; }
  .nh-scene { height: min(108vw, 440px); margin-top: 8px; }
  .nh-plane--back img { width: 84%; top: 0; border-radius: 20px; }
  .nh-arch { width: 58%; left: 6%; }
  .nh-nhim { width: 70px; left: 0; bottom: -4px; }
  .nh-card--nail { width: 34%; bottom: 2%; }
  .nh-card--mi { width: 26%; right: 4%; top: 6%; }
  .nh-story { padding: 40px 0 56px; }
  .nh-story__grid { gap: 28px; }
  .nh-facts b { font-size: 24px; }
  .nh-rail { gap: 14px; }
  .nh-rail .svc, .nh-rail__head, .nh-rail__end { width: 80vw; }
  .nh-rail .svc img { aspect-ratio: 16 / 9; }
  .nh-rail .svc__name { font-size: 21px; }
  .nh-sleep__line { font-size: 32px; }
  .nh-sleep__menu .h2 { font-size: 30px; }
  .nh-sleep__menu .pl li { padding: 7px 0; font-size: 14px; }

  .nh-sleep__menu .btn--lg { min-height: 48px; padding: 0 20px; font-size: 15px; }
  .nh-loc { padding: 56px 0; }
  .nh-loc__list { grid-template-columns: 1fr; }
  .nh-close { padding: 56px 0 72px; }
  .nh-close__actions .btn { width: 100%; }
  .slip { rotate: 0deg; padding: 22px 20px 18px; }
  .slip-dock { bottom: 76px; left: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .slip.is-bump, .slip-dock.is-bump b { animation: none; }
  .nh-card, .slip { rotate: 0deg; }
}
.slip[hidden], .slip-dock[hidden] { display: none; }

/* Phone: header không dính trên trang chủ để sân khấu pin có trọn chiều cao;
   chừa chỗ cho thanh Gọi / Đặt lịch cố định dưới đáy. */
@media (max-width: 760px) {
  :root { --bar: calc(76px + env(safe-area-inset-bottom)); }
  .header { position: relative; }
  .nh-svc .nh-svc__stage[data-sc-stage], .nh-sleep .nh-sleep__stage[data-sc-stage] { height: calc(100svh - var(--hdr) - var(--bar)); }
  .nh-sleep .nh-sleep__stage[data-sc-stage] { grid-template-rows: 32% 68%; padding-top: 12px; }
  .nh-rail .svc img { aspect-ratio: 2 / 1; }
  .nh-rail .svc__label > div { padding: 5px 0; }
}
@media (max-width: 760px) {
  .nh-hero .hero__actions, .nh-sleep .hero__actions { display: flex; }
  .nh-sleep__menu .pl small { display: block; font-size: 11.5px; }
  .nh-sleep__menu .hero__actions { gap: 8px; }
  .nh-sleep__menu .hero__actions .link { font-size: 13.5px; }
}
@media (max-width: 760px) {
  .nh-sleep__planes { overflow: hidden; }
  .nh-sleep__p--1 { width: 58%; top: 2%; }
  .nh-sleep__p--2 { width: 34%; left: 30%; top: 8%; }
  .nh-sleep__p--3 { width: 26%; bottom: 4%; }
}

/* Giảm chuyển động: bỏ khoảng cuộn bị giữ (pin) ở Dịch vụ và Nzim Sleep, trả về bố cục tĩnh đầy đủ nội dung. */
@media (prefers-reduced-motion: reduce) {
  .nh-svc[data-sc-act], .nh-sleep[data-sc-act] { height: auto !important; }
  .nh-svc .nh-svc__stage[data-sc-stage], .nh-sleep .nh-sleep__stage[data-sc-stage] { position: relative !important; top: auto !important; height: auto !important; overflow: visible; }
  .nh-svc .nh-svc__stage[data-sc-stage] { padding: 64px 0; display: block; }
  .nh-rail { width: auto; flex-wrap: wrap; justify-content: center; max-width: 1280px; margin: 0 auto; transform: none !important; }
  .nh-rail .svc, .nh-rail__head, .nh-rail__end { width: clamp(260px, 30%, 380px); }
  .nh-sleep .nh-sleep__stage[data-sc-stage] { padding-top: 72px; padding-bottom: 72px; }
  .nh-sleep__line { display: none; }
  .nh-sleep__copy { height: auto; }
  .nh-sleep__menu { position: static; opacity: 1 !important; transform: none !important; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  .nh-rail .svc, .nh-rail__head, .nh-rail__end { width: 100%; }
  .nh-sleep .nh-sleep__stage[data-sc-stage] { grid-template-rows: auto auto; gap: 24px; }
  .nh-sleep__planes { height: 300px; }
}

/* ===== 21/11/2026 · Bỏ giữ màn hình (pin) ở Dịch vụ + Nzim Sleep: chị thấy lag, khó lướt.
   Dịch vụ = rail tự chạy, dừng khi rê chuột/chạm, có nút ‹ ›, vuốt ngang được.
   Nzim Sleep = section thường, câu chữ tự đổi theo thời gian. Cuộn dọc đi qua bình thường. ===== */
.nh-svc { padding: 72px 0 64px; }
.nh-svc__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.nh-svc__head p { max-width: 60ch; margin-top: 10px; }
.nh-svc__ctrl { display: flex; gap: 10px; flex: none; }
.nh-arrow { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--wine); background: var(--paper); color: var(--wine); display: grid; place-items: center; cursor: pointer; transition: background-color .15s, color .15s, transform .12s; }
.nh-arrow:hover { background: var(--wine); color: var(--beige); }
.nh-arrow:active { transform: scale(.94); }
.nh-rail-wrap { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.nh-rail-wrap::-webkit-scrollbar { display: none; }
.nh-rail-wrap:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: -3px; }
.nh-rail-wrap .nh-rail { padding: 4px max(var(--gut), calc((100vw - 1280px) / 2 + 32px)) 18px; }
.nh-rail-wrap .svc, .nh-rail-wrap .nh-rail__end { scroll-snap-align: start; }
.nh-rail-wrap .svc { box-shadow: 0 14px 28px -18px rgba(107, 58, 36, .4); }

.nh-sleep { padding: 88px 0; overflow: hidden; }
.nh-sleep__stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.nh-sleep__copy { height: auto; display: flex; flex-direction: column; gap: 22px; }
.nh-sleep__tagline { position: relative; display: grid; min-height: 2.3em; font: 600 clamp(30px, 3.6vw, 50px)/1.1 var(--serif); letter-spacing: -0.02em; color: var(--brown); }
.nh-sleep__tagline > span { grid-area: 1 / 1; opacity: 0; transform: translateY(10px); transition: opacity .9s cubic-bezier(.23, 1, .32, 1), transform .9s cubic-bezier(.23, 1, .32, 1); }
.nh-sleep__tagline > span.is-on { opacity: 1; transform: none; }
.nh-sleep__menu { position: static; display: flex; flex-direction: column; gap: 14px; }

@media (max-width: 1080px) {
  .nh-sleep__stage { grid-template-columns: 1fr; gap: 32px; }
  .nh-sleep__planes { height: 420px; }
}
@media (max-width: 760px) {
  .nh-svc { padding: 48px 0 40px; }
  .nh-svc__head { align-items: flex-start; flex-direction: column; gap: 14px; }
  .nh-arrow { width: 44px; height: 44px; }
  .nh-rail-wrap .nh-rail { padding: 4px 20px 16px; }
  .nh-rail-wrap .svc, .nh-rail-wrap .nh-rail__end { width: 82vw; }
  .nh-rail .svc img { aspect-ratio: 16 / 10; }
  .nh-sleep { padding: 56px 0; }
  .nh-sleep__stage { padding: 0 20px; gap: 24px; }
  .nh-sleep__planes { height: 300px; }
  .nh-sleep__tagline { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .nh-rail-wrap .nh-rail { flex-wrap: nowrap; }
  .nh-sleep__tagline > span { transition: none; }
  .nh-sleep__tagline > span + span { display: none; }
  .nh-sleep__tagline > span:first-child { opacity: 1; transform: none; }
}
.nh-rail-wrap { scroll-padding-inline: max(var(--gut), calc((100vw - 1280px) / 2 + 32px)); }
@media (max-width: 760px) { .nh-rail-wrap { scroll-padding-inline: 20px; } }

/* Ảnh giữa hero = ảnh đội ngũ thật (thay ảnh chân dung, 21/11/2026). Ảnh nhóm: khung bo góc thay vì vòm để không cắt đầu người ở 2 góc trên. */
.nh-arch--team { aspect-ratio: 1414 / 1328; width: 62%; left: 6%; bottom: 2%; border-radius: 26px; object-fit: cover; }
.nh-plane--mid .nh-arch--team + .nh-nhim { left: calc(6% - 40px); }
@media (max-width: 760px) { .nh-arch--team { width: 70%; left: 4%; } .nh-plane--mid .nh-arch--team + .nh-nhim { left: -4px; } }
/* Ảnh 3 team (dọc 1414×2000) */
.nh-arch--team { aspect-ratio: 1414 / 2000; width: 50%; left: 12%; bottom: 0; }
.nh-plane--mid .nh-arch--team + .nh-nhim { left: calc(12% - 46px); }
@media (max-width: 760px) { .nh-arch--team { width: 52%; left: 8%; } .nh-plane--mid .nh-arch--team + .nh-nhim { left: 0; } }
