/* =========================================================
   KOULSPACE — nền móng + thành phần chung
   (giấy, chữ, khối giấy, nút, header, menu, footer, màn mở đầu)
   ========================================================= */

/* ---------- Reset gọn ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
/* Ảnh / video chỉ để xem (mục 11): không kéo ra ngoài, không bôi chọn, không hiện menu "Lưu ảnh" khi nhấn giữ trên iPhone.
   Chuột phải và kéo-thả còn được chặn bằng ui.js. Tài liệu chia sẻ cho phép tải: bọc trong [data-allow-save]. */
img, video { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
[data-allow-save] img, [data-allow-save] video { -webkit-user-drag: auto; user-select: auto; -webkit-touch-callout: default; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.intro-on body, .menu-open body { overflow: hidden; }

/* Chuyển sáng/tối mượt: chỉ bật trong lúc đổi */
.theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color .45s ease, color .45s ease, border-color .45s ease,
              fill .45s ease, stroke .45s ease !important;
}

/* ---------- Chất liệu giấy ----------
   Texture chỉ là lớp nền mờ phía sau (nền trang, và nền màn mở đầu để chuyển cảnh liền mạch).
   Các khối giấy (header, thẻ, nút, ô hình, 3 thanh, footer, menu) giữ màu đặc để hình và chữ rõ.
   Texture cuộn theo trang như giấy thật. Định nghĩa ở tokens.css (--paper-tex). */
html body,
html .intro__bg {
  background-image: var(--paper-tex);
  background-size: var(--paper-tex-size);
}

/* ---------- Chữ ---------- */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.01em;
  font-variation-settings: "SOFT" 60;
}
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
/* Nhãn nhỏ: chữ in hoa giãn cách, trang nhã (không dùng chữ viết tay) */
.kicker {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
}
.muted { color: var(--ink-soft); }
/* Đoạn văn căn đều hai bên thành một khối (chủ dự án chốt 2026-12-03). Dòng cuối vẫn canh trái.
   Chỗ đang căn giữa thì giữ căn giữa: các khối đó khai báo lại text-align (xem .is-center và danh sách cuối base.css). */
main p, main li, main dd, main blockquote, .site-footer p { text-align: justify; }
main li > :is(h1, h2, h3, h4, h5) { text-align: start; } /* tiêu đề trong mục danh sách không giãn chữ */
.is-center p, .soon-state p, .greet__inner p, .story__head p, .ikigai p, .quote p, .nf__inner p { text-align: inherit; }

/* Chỗ chưa có nội dung: hiển thị "Sắp ra mắt" (data-i18n="soon"), mô tả nội dung cần điền ghi ở data-need
   cho người dựng web (chủ dự án chốt 2026-12-03, thay cho khung [CẦN NỘI DUNG: …] hiện ra trên trang). */
/* Badge "Sắp ra mắt": MỘT kiểu duy nhất ở mọi chỗ (chủ dự án chốt 2026-12-03): viên thuốc nhỏ, chữ in hoa giãn cách,
   chấm tròn phía trước; màu theo môi trường (--accent / --fill: xanh lá ở phần chung, màu mảng trong từng mảng).
   Dùng cho mục / bài lớn chưa có nội dung. Ô thông tin chưa điền (năm, vai trò, link…) thì dùng .na-txt "Chưa có thông tin". */
.soon-badge {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .32em .85em .3em .72em;
  border: 1px solid var(--br-line, var(--line-strong));
  border-radius: 999px;
  background: var(--fill);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: .68rem;
  font-style: normal;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  vertical-align: middle;
}
.soon-badge::before {
  content: "";
  width: .55em; height: .55em;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: transparent;
  flex: none;
}
.soon-badge--lg { font-size: .78rem; }
h1 .soon-badge, h2 .soon-badge, h3 .soon-badge, h4 .soon-badge { margin-left: .5em; }
.na-txt { color: var(--ink-soft); font-style: normal; }
.soon-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: var(--ink-soft);
}
.soon-box .icon { width: 20px; height: 20px; flex: none; color: var(--accent); opacity: .8; }
/* Khung cũ [CẦN NỘI DUNG: …] — chỉ còn dùng trong công cụ nội bộ */
.ph {
  display: inline-block;
  padding: .1em .55em;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: .8em;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.45;
  color: var(--ink-soft);
}
.ph-note {
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

/* ---------- Khối giấy: nền giấy + viền mờ nhẹ, không bóng đổ ---------- */
.paper-block {
  background: var(--paper-raised);
  border: var(--stroke) solid var(--line);
  border-radius: var(--radius);
}

/* ---------- Nút ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .72em 1.3em;
  border: var(--stroke) solid var(--line-strong);
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  line-height: 1.2;
  background: var(--paper-raised);
  transition: transform .35s var(--ease-out), border-color .2s, background-color .2s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ink); }
.btn:active { transform: none; }
.btn--primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn--primary:hover { border-color: var(--accent); }
/* Nút viền theo màu mảng (dùng ở Trang chủ: chỉ viền + chữ mang màu mảng, không khối đặc) */
.btn--branch { color: var(--accent); border-color: var(--br-line, var(--line-strong)); }
.btn--branch:hover { border-color: var(--accent-2); }
/* Thẻ nhãn mảng nhỏ */
.mobile-menu__raw a.is-active .big { color: var(--accent); }
.btn svg { width: 1.15em; height: 1.15em; transition: transform .35s var(--ease-bounce); }
.btn:hover svg { transform: translateX(3px); }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================
   HEADER (mục 4.1)
   ========================================================= */
.site-header {
  position: fixed;
  top: var(--header-top);
  left: 0; right: 0;
  z-index: 60;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.site-header__inner {
  pointer-events: auto;
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px; /* đệm hai bên bằng nhau để logo nằm đúng trục giữa */
  transition: height .45s var(--ease-out), padding .45s var(--ease-out);
}
.is-compact .site-header__inner { height: 54px; }

.nav-main { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .2s;
}
/* Gạch dưới thẳng, mảnh, màu nhấn — hiện dần từ trái */
.nav-link::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover::after, .nav-link.is-active::after, .nav-link[aria-expanded="true"]::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--accent); }
.nav-link .chev { width: 16px; height: 16px; transition: transform .35s var(--ease-bounce); }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }

.brand { display: block; padding: 4px; border-radius: 12px; }
.brand__logo {
  display: block;
  width: 46px; height: 46px;
  transition: width .45s var(--ease-out), height .45s var(--ease-out), transform .4s var(--ease-bounce);
}
.brand:hover .brand__logo { transform: scale(1.06); }
.is-compact .brand__logo { width: 38px; height: 38px; }
.intro-on .brand__logo { visibility: hidden; }
.brand__logo.is-fallback::before { /* khi không tải được Lottie */
  content: "S"; display: grid; place-items: center; height: 100%;
  font-family: var(--font-display); font-size: 30px; color: var(--accent);
}

/* Bố cục header: [ngôn ngữ][sáng/tối] · logo · [3 tab điều hướng]  (điện thoại: ☰ thay cho 3 tab) */
.tools { grid-column: 1; grid-row: 1; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.brand { grid-column: 2; grid-row: 1; }
.nav-end { grid-column: 3; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.tool-btn {
  height: 40px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  border: var(--stroke) solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: transform .35s var(--ease-out), border-color .2s;
}
.tool-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.tool-btn:active { transform: none; }
.tool-btn .chev { width: 14px; height: 14px; transition: transform .35s var(--ease-bounce); }
.tool-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }

.flag {
  width: 24px; height: 16px;
  border-radius: 3px;
  outline: 1px solid var(--ink-faint);
  flex: none;
  overflow: hidden;
}

/* Nút sáng/tối: hiện mặt trăng ở giao diện sáng, mặt trời ở giao diện tối */
.theme-btn { padding: 0; width: 40px; position: relative; overflow: hidden; }
.theme-btn .icon { position: absolute; transition: transform .5s var(--ease-bounce), opacity .3s; }
.theme-btn .i-sun { transform: translateY(26px); opacity: 0; }
[data-theme="dark"] .theme-btn .i-sun { transform: none; opacity: 1; }
[data-theme="dark"] .theme-btn .i-moon { transform: translateY(-26px); opacity: 0; }

.menu-btn { display: none; padding: 0; width: 40px; position: relative; }
.menu-btn .icon { position: absolute; transition: transform .4s var(--ease-bounce), opacity .25s; }
.menu-btn .i-close { opacity: 0; transform: scale(.4); }
.menu-open .menu-btn .i-close { opacity: 1; transform: none; }
.menu-open .menu-btn .i-menu { opacity: 0; transform: scale(.4); }

/* ---------- Menu thả xuống (khối giấy) ---------- */
.dd { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.98);
  transform-origin: top center;
  transition: opacity .25s ease, transform .4s var(--ease-bounce), visibility 0s .4s;
}
.dd.is-open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .2s ease, transform .45s var(--ease-bounce), visibility 0s;
}

.explore__menu { right: -6px; width: 360px; padding: 10px; transform-origin: top right; } /* tab nằm bên phải → menu mở về phía trong */
.explore__item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  transition: background-color .2s;
}
.explore__item:hover, .explore__item:focus-visible { background: var(--fill-2); }
.explore__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: var(--stroke) solid var(--line);
  border-radius: 12px;
  background: var(--fill);
  transition: transform .4s var(--ease-bounce);
}
.explore__item:hover .explore__icon { transform: rotate(-4deg) scale(1.05); }
.explore__icon .icon { width: 26px; height: 26px; }
/* mỗi mục mang màu mảng của nó (data-branch): ô icon tông nhạt, icon và chữ cái đầu màu đậm */
.explore__item[data-branch] .explore__icon { color: var(--accent); border-color: var(--br-line); }
.explore__icon img.sw-mark { width: 30px; height: auto; }
img.sw-mark { display: block; height: auto; object-fit: contain; }
.explore__name { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.25; }
.explore__name b { color: var(--accent); font-weight: 700; }
.explore__desc { display: block; font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
.explore__ext { font-size: .72rem; color: var(--ink-soft); letter-spacing: .04em; }

.lang__menu { left: 0; width: 210px; padding: 8px; transform-origin: top left; } /* nút ngôn ngữ nằm bên trái */
.lang__opt {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  text-align: left;
  font-size: .95rem;
  transition: background-color .2s;
}
.lang__opt:hover, .lang__opt:focus-visible { background: var(--fill-2); }
.lang__opt .code { margin-left: auto; font-size: .75rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .05em; }
.lang__opt[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.lang__opt[aria-selected="true"] .code::after { content: " ✓"; color: var(--accent); }

/* ---------- Menu điện thoại toàn màn hình ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--paper);
  padding: calc(var(--header-top) + var(--header-h) + 32px) var(--gutter) 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .55s var(--ease-out), opacity .3s, visibility 0s .55s;
}
.menu-open .mobile-menu {
  opacity: 1;
  visibility: visible;
  clip-path: inset(0 0 0 0);
  transition: clip-path .6s var(--ease-out), opacity .2s, visibility 0s;
}
.mobile-menu__main a {
  display: block;
  padding: 6px 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
}
.mobile-menu__main a.is-active { color: var(--accent); }
.mobile-menu__label { font-size: .74rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; }
.mobile-menu__raw a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 0;
  border-top: var(--stroke) solid var(--ink-faint);
}
.mobile-menu__raw a:last-child { border-bottom: var(--stroke) solid var(--ink-faint); }
.mobile-menu__raw .big { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; line-height: 1; }
.mobile-menu__raw .big b { color: var(--accent); }
.mobile-menu__raw .desc { font-size: .85rem; color: var(--ink-soft); }
.mobile-menu > * { opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .5s var(--ease-out); }
.menu-open .mobile-menu > * { opacity: 1; transform: none; }
.menu-open .mobile-menu > :nth-child(2) { transition-delay: .08s; }
.menu-open .mobile-menu > :nth-child(3) { transition-delay: .16s; }

@media (max-width: 900px) {
  /* điện thoại: [ngôn ngữ][sáng/tối] · logo · [☰] — cùng phía với máy tính, nút ngôn ngữ luôn hiện sẵn */
  .nav-main { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header__inner { padding: 0 10px; }
  .lang__btn .code { display: none; }
}
@media (min-width: 901px) {
  .mobile-menu { display: none; }
}

/* ---------- Logo Kouls tô theo màu mảng (Rhythm vàng kim, Arcs xanh lá cỏ) ----------
   Dùng ở thẻ lĩnh vực trang Về tôi và 3 thanh R · A · W ở Trang chủ (KS.createLogoMark).
   Lottie ghi màu vào thuộc tính fill/stroke: nét liền + chấm = mã đậm, 5 vạch đứt = mã sáng. */
.kmark svg :where([fill]:not([fill="none"])) { fill: var(--br); }       /* :where = độ ưu tiên thấp, để quy tắc nét liền bên dưới thắng */
.kmark svg :where([stroke]:not([stroke="none"])) { stroke: var(--br); }
.kmark svg [fill="rgb(27,89,37)"], .kmark svg [fill="rgb(74,179,76)"] { fill: var(--br-ink); }
.kmark svg [stroke="rgb(27,89,37)"], .kmark svg [stroke="rgb(74,179,76)"] { stroke: var(--br-ink); }
[data-theme="dark"] .kmark svg [fill="rgb(202,228,225)"] { fill: color-mix(in srgb, var(--br) 55%, var(--ink)); }
[data-theme="dark"] .kmark svg [stroke="rgb(202,228,225)"] { stroke: color-mix(in srgb, var(--br) 55%, var(--ink)); }

/* ---------- Nút "Quay lại Tin nổi bật" (chủ dự án yêu cầu 2026-12-03) ----------
   Hiện ở góc dưới trái của trang vừa mở từ một tin trong khung Tin nổi bật (Trang chủ);
   bấm để về đúng tin đó ở Trang chủ, không phải cuộn lại. Tạo bằng ui.js. */
.hl-back {
  position: fixed;
  left: clamp(12px, 2.2vw, 28px);
  bottom: clamp(14px, 2.4vw, 28px);
  z-index: 50; /* dưới menu điện thoại và header */
  display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px);
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  border-color: var(--line-strong);
  color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none;
  animation: hl-back-in .5s var(--ease-out) .35s both;
  transition: color .2s, border-color .2s, transform .25s var(--ease-out);
}
.hl-back .icon { width: 18px; height: 18px; flex: none; color: var(--accent); transform: rotate(180deg); }
.hl-back:hover { color: var(--accent); border-color: var(--accent); transform: translateX(-2px); }
@keyframes hl-back-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.menu-open .hl-back { visibility: hidden; }

/* ---------- Toast & hộp thoại ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 250;
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  font-size: .92rem;
  transform: translate(-50%, 24px);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease-bounce), opacity .25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

.modal {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  overflow: visible;
}
.modal::backdrop { background: rgba(20, 20, 18, .45); }
.modal__card { width: min(340px, calc(100vw - 32px)); padding: 24px; text-align: center; }
.modal__qr {
  aspect-ratio: 1;
  margin: 16px 0;
  display: grid;
  place-items: center;
  padding: 16px;
  border: var(--stroke) dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

/* =========================================================
   MÀN MỞ ĐẦU (mục 4.4)
   ========================================================= */
.intro { display: none; }
.intro-on .intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.intro__bg { position: absolute; inset: 0; background: var(--paper); }
.intro__stage {
  position: relative;
  width: min(68vmin, 520px);
  aspect-ratio: 1;
  transform-origin: 0 0;
  will-change: transform;
}
.intro__anim, .intro__anim svg { width: 100%; height: 100%; }
.intro__skip {
  position: absolute;
  left: 0; right: 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  text-align: center;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  animation: intro-hint .6s 1.2s both;
}
@keyframes intro-hint { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* =========================================================
   LOGO TĨNH (SVG) · MÀN CHE CHUYỂN TRANG · MÀN CHỜ (mục 2, 3.4, 4.4)
   ========================================================= */
.ks-logo { display: block; width: 100%; height: auto; overflow: visible; }
.ks-logo .s { fill: none; stroke: var(--green-900); stroke-width: 30; }
.ks-logo .d { fill: none; stroke: var(--green-700); stroke-width: 30; stroke-dasharray: 40; }
.ks-logo .f { fill: var(--green-900); }
[data-theme="dark"] .ks-logo .s { stroke: var(--green-500); }
[data-theme="dark"] .ks-logo .d { stroke: var(--mint); }
[data-theme="dark"] .ks-logo .f { fill: var(--green-500); }

.veil {
  position: fixed;
  inset: 0;
  z-index: 95; /* trên header, dưới màn mở đầu */
  display: grid;
  place-items: center;
  background-color: var(--paper);
  background-image: var(--paper-tex);
  background-size: var(--paper-tex-size);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .42s var(--ease-out), visibility 0s .42s;
}
.veil-on .veil {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .26s ease-in, visibility 0s;
}
.veil__loader { width: 76px; opacity: 0; transform: scale(.94); transition: opacity .35s, transform .5s var(--ease-out); }
.veil.is-slow .veil__loader { opacity: 1; transform: none; }
/* Vạch đứt trượt dọc theo cung quanh chấm phải (xoay cả cung thì vạch đè lên nét chữ S) */
.veil.is-slow .ks-logo__ring .d { animation: ks-ring 1.8s linear infinite; }
@keyframes ks-ring { to { stroke-dashoffset: -80; } }

/* ---------- Trang 404 ---------- */
.nf { min-height: calc(100svh - 120px); display: grid; place-items: center; padding: 40px var(--gutter) 0; text-align: center; }
.nf__inner { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 560px; }
.nf__code { display: flex; align-items: center; gap: clamp(6px, 1.4vw, 14px); font-family: var(--font-display); font-weight: 600; font-size: clamp(5.5rem, 16vw, 9.5rem); line-height: 1; color: var(--ink); }
.nf__zero { width: .82em; display: block; }
.nf__zero .ks-logo__ring .d { animation: ks-ring 3.6s linear infinite; }
.nf__title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-top: 6px; }
.nf__text { color: var(--ink-soft); margin-bottom: 8px; }
.nf__or { margin-top: 18px; font-size: .85rem; color: var(--ink-soft); }
.nf__raw { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; }
.nf__raw a { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 600; padding: 6px 2px; border-bottom: var(--stroke) solid transparent; transition: border-color .2s, color .2s; }
.nf__raw a b { color: var(--br-ink, var(--accent)); }
.nf__raw a .icon { width: 18px; height: 18px; color: var(--br-ink, var(--accent)); }
.nf__raw a .sw-mark { width: 18px; height: auto; }
.nf__raw a:hover { border-color: var(--br, var(--accent)); }

/* =========================================================
   FOOTER (mục 4.3)
   ========================================================= */
.site-footer {
  position: relative;
  margin-top: clamp(80px, 12vw, 160px);
  padding: 0 var(--gutter) 28px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: clamp(28px, 4vw, 56px);
}
.footer__brand .display { font-size: 2rem; letter-spacing: .04em; }
.footer__brand p { margin-top: 8px; }
.footer__zalo { margin-top: 22px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.footer__col h3 { font-size: 1.25rem; margin-bottom: 4px; }
.footer__col h3 b { color: var(--accent); }
.footer__col .desc { font-size: .85rem; color: var(--ink-soft); margin-bottom: 14px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.social {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: var(--stroke) solid var(--line-strong);
  border-radius: 12px;
  transition: transform .35s var(--ease-out), background-color .2s, color .2s, border-color .2s;
}
.social:hover { transform: translateY(-1px); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.social .icon { width: 20px; height: 20px; }
/* Email: bấm icon thả xuống địa chỉ + nút sao chép */
.socials { position: relative; } /* ô email canh theo hàng icon để không tràn mép màn hình */
.mailpop.is-open > .social { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mailpop__panel {
  position: absolute; z-index: 5; top: calc(100% + 8px); left: 0;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 14px; border-radius: 12px; white-space: nowrap;
}
.mailpop__panel[hidden] { display: none; }
.mailpop__addr { font-size: .88rem; color: var(--ink); }
.mailpop__addr:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.mailpop__copy {
  width: 32px; height: 32px; display: grid; place-items: center; flex: none;
  border-radius: 9px; color: var(--ink-soft); transition: background-color .2s, color .2s;
}
.mailpop__copy:hover { background: var(--fill); color: var(--accent); }
.mailpop__copy.is-done { color: var(--accent); }
.mailpop__copy .icon { width: 17px; height: 17px; }
@media (min-width: 821px) { .footer__col:last-child .mailpop__panel { left: auto; right: 0; } }
.footer__copy { max-width: var(--maxw); margin: 18px auto 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--ink-soft); }

@media (max-width: 820px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; gap: 22px; }
}

/* =========================================================
   Giảm chuyển động
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
