/* Affina DS v1 — lớp áp design system lên trang (xem DESIGN-SYSTEM.md)
   Plan "Một khung cảnh, nhiều ô cửa": hero là điểm nhấn duy nhất, các section còn lại yên tĩnh.
   Luật đọc: không chữ < 12px (chú thích 12/16 theo Affina One, 25/11), chữ magenta dùng --af-magenta-ink, số dùng tabular-nums. */

/* ---------- Toàn site: header CTA (viền magenta 2.67:1 -> magenta-ink 4.88:1) ---------- */
html body .site-header .header-cta{
  --bs-btn-color:var(--af-magenta-ink);--bs-btn-border-color:var(--af-magenta-ink);
  --bs-btn-hover-color:#fff;--bs-btn-hover-bg:var(--af-magenta-ink);--bs-btn-hover-border-color:var(--af-magenta-ink);
  color:var(--af-magenta-ink);border-color:var(--af-magenta-ink)}
html body .site-header .header-cta:hover{color:#fff;background:var(--af-magenta-ink)}
html body .site-footer .footer-bottom{font-size:var(--af-fs-micro)}
/* 25/11 · một khung cho header + footer mọi trang (khớp khung Affina One): nội dung tối đa 1280, lề 32, điện thoại 16.
   Trước đó mỗi trang một cỡ: 1120 (trang chủ), 1180 (về chúng tôi), 1240 (các trang khác). */
html body .site-header .affina-container.affina-container,html body .site-footer > .container.affina-container{
  max-width:none;width:100%;padding-inline:max(32px,calc((100% - 1280px) / 2))}
/* footer: hàng Bootstrap lùi -12px ở máy tính → cộng lại 12 để chữ thẳng cột với header */
@media (min-width:992px){html body .site-footer > .container.affina-container{padding-inline:calc(max(32px,calc((100% - 1280px) / 2)) + 12px)}}
@media (max-width:860px){html body .site-header .affina-container.affina-container,html body .site-footer > .container.affina-container{padding-inline:16px}}

/* ---------- Homepage ---------- */
.home-refresh{--v3-mag:var(--af-magenta-ink)}
.affina-route-home .pm-btn__go{background:var(--af-magenta-icon)}
/* stats: không phải chuỗi tuần tự -> bỏ số 01–04, số đọc thẳng hàng */
.affina-route-home .app3 b{font-variant-numeric:tabular-nums lining-nums}
/* câu chuyện: tên + vai trò, sentence case, 13px+ */
.affina-route-home .sto3__meta{font:400 14px/1.35 var(--af-font-body);letter-spacing:0;text-transform:none;color:rgba(255,255,255,.86)}
.affina-route-home .sto3__meta b{font-weight:600;color:#fff}
.affina-route-home .sto3__meta span::before{content:"— "}
.affina-route-home .sto3__more{text-decoration:underline;text-underline-offset:3px}
.affina-route-home .sto3 .v3-pill--glass{background:rgba(25,23,52,.35)}
.affina-route-home .sto3 .v3-pill--glass:hover{background:rgba(25,23,52,.5)}
.affina-route-home .hub3__tag{font-size:12px;color:var(--af-ink-900)}

/* ---------- /enterprise/ (aone) — chữ nhỏ = chú thích 12px (!important: sme-draft-v4 nạp sau, selector :root) ---------- */
html body .aone .hh .hs__who,html body .aone .hs__who{font-size:12px!important}
html body .aone .aone-tag,html body .aone-tag{font-size:12px!important}
html body .aone .ax-glass p{font-size:12px!important}
html body .aone .ob-demo,html body .aone .ob-pill,html body .aone .ob-on,
html body .aone .ob-flt span,html body .aone .ob-kpi dt,html body .aone .ob-ev b,html body .aone .ob-ev time,
html body .aone .ob-plan span,html body .aone .ob-bar span,html body .aone .ob-bar b,
html body .aone .ob-wb span,html body .aone .ob-perks span,html body .aone .ob-acct span,
html body .aone .ob-sb__l span,html body .aone .ob-sb__l em,html body .aone .ob-jd__meta dt,
html body .aone .ob-uv__key li,html body .aone .ob-w-user span,html body .aone .ob-w-ttl,html body .aone .ob-w-user i,html body .aone .ob-av{font-size:12px!important}
html body .aone .ob-kpi dd,html body .aone .ob-bar b,html body .aone .ob-ev time{font-variant-numeric:tabular-nums}
html body .affina-lead-consent,html body .affina-lead-consent span,html body .affina-lead-consent a{font-size:12px!important}

/* ---------- /tuyen-dung/ ---------- */
html body #app .td-page .td-need,
html body #app .td-page .td-hero-tag,
html body #app .td-page .td-c-vi{font-size:13px}

/* ---------- Step 3 · critique → polish ---------- */
/* P1: chữ trắng trên trời pastel -> thêm lớp tối dưới tiêu đề hero + vùng số liệu */
.affina-route-home .hv3__copy h1{text-shadow:0 2px 24px rgba(25,23,52,.35)}
.affina-route-home .hv3 .v3-pill--glass{background:rgba(25,23,52,.35)}
.affina-route-home .hv3 .v3-pill--glass:hover{background:rgba(25,23,52,.5)}
/* P1: chữ nhấn gradient hồng (2.7–3.4:1) -> giữ hiệu ứng bóng, đổi sang dải magenta đạt AA chữ lớn */
.home-refresh h1 span,.home-refresh h2 span{
  background:linear-gradient(180deg,rgba(255,255,255,.28) 0%,rgba(255,255,255,.1) 22%,rgba(255,255,255,0) 46%),
             linear-gradient(90deg,var(--af-magenta-icon) 0%,var(--af-magenta-ink) 70%);
  -webkit-background-clip:text;background-clip:text}
/* P2: tiêu đề không để chữ mồ côi ("Tổ / chức") */
.affina-route-home h1,.affina-route-home h2,.affina-route-home h3,.aone h2,.aone h3,#app .td-page h1,#app .td-page h2{text-wrap:balance}
/* P2: chú thích bước trên ảnh -> kính tối hơn để chữ trắng đọc rõ */
.affina-route-home .onl3__glass{background:rgba(25,23,52,.38)}
.affina-route-home .onl3__glass p{color:#fff}
/* P3: số liệu sao trong app đọc rõ hơn */
.affina-route-home .app3__stars{color:#e0a100}
/* P2: trang tuyển dụng theo giọng DS: Be Vietnam Pro, nhãn không ALL CAPS */
html body #app .td-page{font-family:var(--af-font-body)}
html body #app .td-page .td-hero-tag{font-family:var(--af-font-body);text-transform:none;letter-spacing:0;font-size:15px}
/* bề mặt trình duyệt */
::selection{background:rgba(209,20,158,.18);color:var(--af-ink-900)}

/* ---------- Step 4 · Web Interface Guidelines ---------- */
/* Skip link: ẩn tới khi bấm Tab */
.af-skip-link{position:fixed;left:16px;top:-80px;z-index:10000;padding:12px 20px;border-radius:var(--af-radius-pill);background:var(--af-ink-900);color:#fff;font:600 15px/1.2 var(--af-font-body);text-decoration:none;transition:top var(--af-dur-ui) var(--af-ease)}
.af-skip-link:focus,.af-skip-link:focus-visible{top:16px;color:#fff}
#af-main:focus{outline:none}
#af-main{scroll-margin-top:96px}
/* ảnh có width/height thật: giữ tỉ lệ khi CSS chỉ đặt chiều ngang (specificity 0, mọi rule class vẫn thắng) */
:where(.home-refresh img[width][height]){height:auto}
/* nút tạm dừng video FINA, cùng kiểu nút âm thanh */
.hv3__fina .home-hero-video-pause{position:absolute;right:62px;bottom:16px;width:40px;height:40px;display:grid;place-items:center;border-radius:20px;border:1px solid rgba(255,255,255,.7);background:rgba(20,12,36,.32);color:#fff;cursor:pointer;transition:background-color var(--af-dur-ui) var(--af-ease)}
.hv3__fina .home-hero-video-pause:hover{background:rgba(20,12,36,.55)}
.hv3__fina .home-hero-video-pause .hv-ico--play,.hv3__fina .home-hero-video-pause.is-paused .hv-ico--pause{display:none}
.hv3__fina .home-hero-video-pause.is-paused .hv-ico--play{display:block}

/* ---------- Step 5 · sửa layout từ ảnh chụp 390/1440 ---------- */
/* slider doanh nghiệp mượn từ /enterprise/ có margin-top âm -> trên mobile đè lên tiêu đề */
html body .home-refresh .aone.aone--home{margin-top:0}
/* app trên mobile: nền trời xanh đậm phía trên -> tiêu đề tối gần như mất, chuyển sang chữ trắng */
/* tiêu đề app: chữ trắng như đoạn văn bên dưới (chữ tối trên nền trời xanh đậm gần như mất) */
.affina-route-home .app3 h2,.affina-route-home .app3 h2 *{background:none;color:#fff;-webkit-text-fill-color:#fff;text-shadow:0 2px 18px rgba(8,40,98,.35)}
/* footer đăng ký (trang con): ô email + nút rộng hơn cột -> justify flex-end đẩy ô email lòi ra trái */
@media (max-width:767.98px){
  html body .site-footer .footer-signup-form{justify-content:flex-start}
  html body .site-footer .footer-signup-form .footer-signup-input{flex:1 1 auto;min-width:0}
}

/* ---------- Scroll-craft · hero -> số liệu: một khung ảnh, lấy mờ dần theo cuộn ----------
   .hv3__bg phủ cả thẻ (hero + số liệu); .hv3__frame dính ở đỉnh màn hình trong suốt quãng đó.
   --hv3p (0→1, JS làm mượt bằng lerp) đổi độ trong của 2 lớp ảnh mờ sẵn + lớp tối; không animate filter. */
.affina-route-home .hv3{overflow:hidden}
@supports (overflow:clip){.affina-route-home .hv3{overflow:clip}}
.affina-route-home .hv3__bg{inset:0;height:auto}
.affina-route-home .hv3__bg::after{content:none}
.affina-route-home .hv3__frame{position:sticky;top:0;height:var(--hv3-frame,840px);overflow:hidden}
.affina-route-home .hv3__frame img,.affina-route-home .hv3__frame video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.affina-route-home .hv3__soft{filter:blur(10px);transform:scale(1.04);opacity:clamp(0,(var(--hv3p,0) - .04) / .4,1)}
.affina-route-home .hv3__deep{filter:blur(34px) saturate(1.1);transform:scale(1.12);opacity:clamp(0,(var(--hv3p,0) - .3) / .5,1)}
/* tối dần: lúc đầu chỉ dưới chân tiêu đề hero, về sau phủ đều để số liệu đọc rõ */
.affina-route-home .hv3__frame::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(25,23,52,0) 28%,rgba(25,23,52,.5) 80%,rgba(25,23,52,.62))}
.affina-route-home .hv3__veil{position:absolute;inset:0;background:linear-gradient(180deg,rgba(25,23,52,.42),rgba(25,23,52,.3) 45%,rgba(25,23,52,.55));opacity:clamp(0,(var(--hv3p,0) - .15) / .55,1)}
.affina-route-home .hv3__frame video{opacity:calc(1 - clamp(0,(var(--hv3p,0) - .45) / .4,1))}
.affina-route-home .hv3__nums{overflow:visible}
.affina-route-home .hv3__nums::before,.affina-route-home .hv3__nums::after{content:none}
@media (max-width:767.98px){.affina-route-home .hv3__frame{height:var(--hv3-frame,100svh)}}
/* điện thoại (Lucas 25/11): nền hero mờ ngay từ đầu, không chờ cuộn; lớp mờ sâu + lớp tối vẫn tăng dần theo cuộn cho khối số liệu */
@media (max-width:860px){.affina-route-home .hv3__soft{opacity:1}}

/* ---------- Đồng nhất cấu trúc UI trang chủ (design critique + ui review, 24/11) ----------
   Trước: 7 tiêu đề section dùng 4 cỡ (52/56/64/66) và 4 độ đậm (400/500/600/700); mép trái nội dung lệch
   93–144px; nút chính lúc bo 16px cao 64, lúc pill cao 52; bo góc thẻ 0/24/28/32/40.
   Sau: 1 kiểu H2, 1 khung nội dung 1200px, 2 cỡ nút, 2 bậc bo góc (thẻ lớn 28 · thẻ nhỏ/ảnh 24). */

/* 1 · Tiêu đề section: cùng font, cỡ, độ đậm, khoảng chữ */
.affina-route-home .home-refresh :is(.protect-melt__title,.sto3__head h2,.v3-head h2,.app3__copy h2,.ptn3 h2){
  font-family:"Familjen Grotesk",var(--af-font-display),sans-serif;font-weight:600;
  font-size:clamp(34px,1.4rem + 2.9vw,60px);line-height:1.05;letter-spacing:-.03em}
.affina-route-home .home-refresh :is(.sto3__head h2,.app3__copy h2) em{font-weight:600;font-style:italic}
.affina-route-home .home-refresh .v3-head p,.affina-route-home .home-refresh .sto3__head p{font-size:17px;line-height:1.5;margin-top:14px}

/* 2 · Một khung nội dung 1200px, mép trái thẳng hàng giữa các section */
.affina-route-home .home-refresh{--af-edge:max(20px,calc((100% - var(--af-container)) / 2))}
.affina-route-home .home-refresh .v3-sec{max-width:none;padding-inline:var(--af-edge)}
.affina-route-home .home-refresh .sto3{padding-inline:max(20px,calc((100% - var(--af-container)) / 2))}
.affina-route-home .home-refresh .sto3__head{margin-left:0}
@media (min-width:992px){.affina-route-home .home-refresh .protect-melt__grid{grid-template-columns:repeat(2,minmax(0,calc((var(--af-container) - 40px) / 2)))}}
.affina-route-home .home-refresh .app3{max-width:none;padding-inline:var(--af-edge)}
.affina-route-home .home-refresh .app3__box{padding-left:56px}
/* 3 · Nhịp dọc giữa các section dùng chung một thang */
.affina-route-home .home-refresh .v3-sec{padding-block:var(--af-section-y)}
.affina-route-home .home-refresh .protect-melt{padding-block:var(--af-section-y)}
.affina-route-home .home-refresh .ptn3{padding-block:calc(var(--af-section-y) + 24px) var(--af-section-y)}
.affina-route-home .home-refresh .sto3{padding-block:calc(var(--af-section-y) + 16px)}

/* 4 · Nút: 1 kiểu nút chính (pill, cao 56) + 1 kiểu nút phụ (pill, cao 48) */
.affina-route-home .home-refresh .pm-btn{min-height:56px;padding:8px 8px 8px 28px;gap:16px;border-radius:var(--af-radius-pill);font-size:17px;line-height:1.2}
.affina-route-home .home-refresh .pm-btn__go{border-radius:50%}
.affina-route-home .home-refresh .pm-btn__go img{width:32px;height:32px}
.affina-route-home .home-refresh .v3-pill--dark{min-height:56px;font-size:17px;font-weight:600;padding:8px 8px 8px 28px;gap:16px}
.affina-route-home .home-refresh .v3-pill--dark .v3-pill__go img{width:32px;height:32px}
.affina-route-home .home-refresh :is(.v3-pill--light,.v3-pill--glass){min-height:48px;font-size:15px}
.affina-route-home .home-refresh .v3-pill__go--dark{background:var(--af-ink-900);border-radius:50%}
.affina-route-home .home-refresh .v3-pill__go--dark img{width:32px;height:32px}

/* 5 · Bo góc: thẻ lớn 28 · thẻ nhỏ / ảnh trong thẻ 24 */
.affina-route-home .home-refresh .pm-card{border-radius:var(--af-radius-xl)}
.affina-route-home .home-refresh .ptn3__card{border-radius:var(--af-radius-xl)}
.affina-route-home .home-refresh .app3__box{border-radius:var(--af-radius-xl)}
.affina-route-home .home-refresh .onl3__step{border-radius:var(--af-radius-xl)}
.affina-route-home .home-refresh :is(.sto3__card,.hub3__img,.onl3__glass){border-radius:var(--af-radius-lg)}

@media (max-width:767.98px){
  .affina-route-home .home-refresh .app3__box{padding-left:24px}
  .affina-route-home .home-refresh .pm-btn,.affina-route-home .home-refresh .v3-pill--dark{font-size:16px;padding-left:22px}
}

.affina-route-home .home-refresh .ptn3 h2{max-width:1000px}

/* ---------- Quy tắc nhấn mạnh trong tiêu đề, khối "Chia sẻ từ khách hàng doanh nghiệp" ----------
   Áp cho CẢ trang chủ và /enterprise/ để hai trang vẫn giống hệt nhau: chữ nhấn đậm như tiêu đề + tô dải focal Affina One.
   (sme-draft-v4 reset .hl bằng :root .aone .hl → cần selector có #testimonials) */
html body .aone #testimonials .aone-h2 .hl{
  font-family:inherit;font-weight:inherit;font-style:normal;color:#840085;
  background:linear-gradient(100deg,#5560ee,#7a3ff0 55%,#b83ac8);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
