/* ===== Brand Ratio — Trang App (POS/PMS/Accounting/CRM/HRM) — dùng CHUNG (.app-*) =====
   Bố cục: hero căn giữa + 3 device placeholder · dải trust · 3 use-case ảnh ·
   3 hàng zigzag (offline=video, đa kênh+nhà hàng=ảnh) · hệ sinh thái hub+4 thẻ · dải tải app · FAQ tối · CTA.
   Owner chốt 2026-06-23: KHÔNG vẽ UI giả — vùng minh hoạ là PLACEHOLDER (.app-ph) để upload ảnh/video sau.
   PHẲNG (không hard-shadow giả 3D). Token-only var(--brand-*). Chiều rộng nội dung chuẩn site = 1496px. */

.app-wrap { max-width: 1496px; margin: 0 auto; padding: 0 28px; }
.app-h2 { font-family: var(--brand-font-display); font-weight: var(--brand-weight-display); font-size: clamp(28px, 3.6vw, 46px); letter-spacing: -0.028em; line-height: 1.06; margin: 0; color: var(--brand-ink); }
.app-sechead { max-width: 680px; margin: 0 auto clamp(40px, 5vw, 60px); text-align: center; }
.app-sechead-sub { color: var(--brand-ink-2); margin: 16px 0 0; font-size: clamp(15px, 1.5vw, 17px); line-height: 1.6; }

.app-eyebrow { display: inline-flex; align-items: center; gap: 9px; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-ink); font-weight: 700; }
.app-eyebrow-center { justify-content: center; }
.app-eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-mint); box-shadow: 0 0 0 4px rgba(37, 216, 177, 0.2); flex: none; }

/* ---------- NÚT: dùng PATTERN brand có sẵn — KHÔNG tự chế màu/hover ----------
   Primary  = .btn-primary.btn-sweep    (base.css + components.css) — phẳng, hover quét đen→mint
   Secondary = .btn-outline.btn-sweep-out — viền, hover fill đen rồi quét mint (fix hover-shift @ components.css)
   Chữ bọc <span class="btn-sweep-label">. Container .app-hero-cta / .app-cta-actions chỉ lo layout. */

/* ---------- PLACEHOLDER ảnh/video dùng CHUNG: icon mờ căn giữa, để upload media thật sau ---------- */
.app-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--brand-muted); }
.app-ph svg { width: clamp(34px, 6vw, 52px); height: auto; opacity: 0.5; }

/* ===================== 1. HERO (căn giữa) ===================== */
.app-hero { padding-top: clamp(44px, 6vw, 80px); }
.app-hero-head { max-width: 800px; margin: 0 auto; padding: 0 28px; text-align: center; }
.app-hero-title { font-family: var(--brand-font-display); font-weight: var(--brand-weight-display); font-size: clamp(40px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.032em; margin: 22px 0 0; color: var(--brand-ink); text-wrap: balance; }
.app-hero-title-em { font-weight: var(--brand-weight-thin); letter-spacing: -0.01em; }
.app-hero-sub { font-size: clamp(16px, 1.7vw, 20px); line-height: 1.6; color: var(--brand-ink-2); max-width: 600px; margin: 22px auto 0; }
.app-hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; margin-top: 32px; }

/* hero stage = dải giấy + MacBook, iPad, iPhone (khung device-frame.css). Màn hình = PLACEHOLDER (.app-ph).
   Một đơn vị --u ≈ 1cm thật cho cả 3 máy (bề rộng ngoài: MacBook 13" 30,4 · iPad 11" 17,85 · iPhone 7,16) nên đúng
   tỷ lệ đời thực; độ dày máy (--dv-depth) cũng theo --u. Desktop một hàng đáy thẳng nhau, nghiêng nhẹ vào giữa. */
.app-stage {
  --u: min(17px, calc((100vw - 136px) / 55.4));
  margin-top: clamp(44px, 6vw, 72px); background: var(--brand-strip-2);
  padding: clamp(40px, 6vw, 64px) 28px clamp(36px, 5vw, 56px);
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(20px, 3vw, 40px);
}
.app-dev { margin: 0; flex: none; perspective: 1400px; }
.app-dev-desktop { width: calc(var(--u) * 30.4); }
.app-dev-tablet { width: calc(var(--u) * 17.85); }
.app-dev-mobile { width: calc(var(--u) * 7.16); }
.app-dev-desktop .dv-laptop { --dv-depth: calc(var(--u) * 0.5); transform: rotateY(7deg) rotateX(3deg); }
.app-dev-tablet .dv-tablet { --dv-depth: calc(var(--u) * 0.6); transform: rotateX(3deg); }
.app-dev-mobile .dv-phone { --dv-depth: calc(var(--u) * 0.8); transform: rotateY(-18deg) rotateX(3deg); }
.app-dev-cap { text-align: center; margin-top: 16px; font-size: 12px; font-weight: 650; letter-spacing: 0.02em; color: var(--brand-ink-2); white-space: nowrap; }
/* Mobile: iPad + iPhone hàng trên (nghiêng vào nhau), MacBook rộng hết khung bên dưới — cùng --u nên giữ tỷ lệ thật */
@media (max-width: 720px) {
  .app-stage {
    --u: calc((100vw - 40px) / 30.4);
    display: grid; grid-template-columns: auto auto; grid-template-areas: "tablet mobile" "desktop desktop";
    justify-content: center; align-items: end; column-gap: 28px; row-gap: 28px; padding: 36px 20px 32px;
  }
  .app-dev-desktop { grid-area: desktop; justify-self: center; }
  .app-dev-tablet { grid-area: tablet; }
  .app-dev-mobile { grid-area: mobile; }
  .app-dev-desktop .dv-laptop { transform: rotateX(4deg); }
  .app-dev-tablet .dv-tablet { transform: rotateY(12deg) rotateX(3deg); }
}

/* ===================== 2. THANH TRUST ===================== */
.app-trust { max-width: 1100px; margin: 0 auto; padding: clamp(28px, 3.5vw, 40px) 28px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 26px; border-bottom: 1px solid rgba(40, 40, 47, 0.1); }
.app-trust-item { font-size: clamp(13px, 1.4vw, 15px); font-weight: 650; color: var(--brand-ink); letter-spacing: -0.01em; }
.app-trust-sep { width: 5px; height: 5px; border-radius: 50%; background: var(--brand-mint); }

/* ===================== 3. USE-CASE (3 cột — ảnh placeholder) ===================== */
.app-cases { max-width: 1496px; margin: 0 auto; padding: clamp(64px, 8vw, 100px) 28px; }
.app-cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.app-case { display: flex; flex-direction: column; }
.app-case-art { position: relative; aspect-ratio: 5 / 3.4; border-radius: 18px; border: 1px solid var(--brand-line); overflow: hidden; margin-bottom: 20px; background: var(--brand-strip-2); }
.app-case-title { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 8px; color: var(--brand-ink); }
.app-case-desc { font-size: 15px; line-height: 1.6; color: var(--brand-ink-2); margin: 0; }

/* ===================== 4. HIGHLIGHTS (zigzag — ảnh/video placeholder) ===================== */
.app-hl { max-width: 1496px; margin: 0 auto; padding: clamp(20px, 3vw, 36px) 28px clamp(64px, 8vw, 96px); display: flex; flex-direction: column; gap: clamp(40px, 6vw, 84px); }
.app-hl-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.app-hl-row.is-rev .app-hl-copy { order: 2; }
.app-hl-title { font-family: var(--brand-font-display); font-weight: var(--brand-weight-display); font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.025em; line-height: 1.08; margin: 16px 0 0; color: var(--brand-ink); }
.app-hl-desc { font-size: clamp(15px, 1.6vw, 17px); line-height: 1.65; color: var(--brand-ink-2); margin: 16px 0 0; max-width: 460px; }
.app-hl-art { position: relative; aspect-ratio: 16 / 11; border-radius: 20px; border: 1px solid var(--brand-line); overflow: hidden; box-shadow: var(--brand-shadow-md); background: var(--brand-strip-2); }
.app-hl-art.is-video { background: var(--brand-strip); }

/* ===================== 5. HỆ SINH THÁI (hub POS + 4 thẻ app — redesign sạch) ===================== */
.app-showcase { background: var(--brand-strip); border-top: 1px solid rgba(40, 40, 47, 0.08); border-bottom: 1px solid rgba(40, 40, 47, 0.08); padding: clamp(64px, 8vw, 100px) 28px; }
.app-showcase-head { max-width: 680px; margin: 0 auto clamp(36px, 5vw, 52px); text-align: center; }
.app-eco { max-width: 1040px; margin: 0 auto; }
.app-eco-hub { width: fit-content; margin: 0 auto; display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; background: var(--brand-ink); color: #fff; border-radius: 999px; position: relative; }
.app-eco-hub-ico { display: inline-flex; }
.app-eco-hub-ico svg { width: 20px; height: 20px; display: block; }
.app-eco-hub-txt { font-family: var(--brand-font-display); font-weight: 750; font-size: 15px; letter-spacing: -0.01em; }
.app-eco-hub::after { content: ''; position: absolute; left: 50%; top: 100%; width: 2px; height: clamp(22px, 3vw, 34px); background: rgba(40, 40, 47, 0.2); transform: translateX(-50%); }
.app-eco-grid { margin-top: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.app-eco-card { background: var(--brand-surface); border: 1px solid rgba(40, 40, 47, 0.12); border-radius: 16px; padding: 22px 20px; transition: transform var(--brand-dur) var(--brand-ease), box-shadow var(--brand-dur) var(--brand-ease); }
.app-eco-card:hover { transform: translateY(-4px); box-shadow: var(--brand-shadow-md); }
.app-eco-ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-strip-2); color: var(--brand-ink); margin-bottom: 14px; }
.app-eco-ico svg { width: 24px; height: 24px; display: block; }
.app-eco-name { font-family: var(--brand-font-display); font-weight: 750; font-size: 18px; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--brand-ink); }
.app-eco-desc { font-size: 13.5px; line-height: 1.55; color: var(--brand-ink-2); margin: 0; }

/* ===================== 6. TẢI APP (badge store) ===================== */
.app-dl { max-width: 1496px; margin: 0 auto; padding: clamp(64px, 8vw, 100px) 28px; }
.app-dl-inner { max-width: 680px; margin: 0 auto; text-align: center; }
.app-dl-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: clamp(28px, 4vw, 40px); }
.app-dl-badge { display: inline-flex; align-items: center; gap: 12px; padding: 11px 20px; border-radius: 14px; border: 1.5px solid var(--brand-ink); background: var(--brand-surface); color: var(--brand-ink); text-decoration: none; transition: background var(--brand-dur-fast) var(--brand-ease), transform var(--brand-dur-fast) var(--brand-ease); }
.app-dl-badge:hover { background: var(--brand-strip-2); transform: translateY(-2px); }
.app-dl-ico { display: inline-flex; flex: none; }
.app-dl-ico svg { width: 26px; height: 26px; display: block; }
.app-dl-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.app-dl-sm { font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--brand-muted); }
.app-dl-name { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }

/* ===================== 7. FAQ (nền tối, accordion) ===================== */
.app-faq { background: var(--brand-dark); color: var(--brand-dark-ink); padding: clamp(64px, 8vw, 100px) 28px; }
.app-faq-inner { max-width: 820px; margin: 0 auto; }
.app-faq-title { font-family: var(--brand-font-display); font-weight: var(--brand-weight-display); font-size: clamp(26px, 3.4vw, 42px); letter-spacing: -0.025em; margin: 0 0 clamp(28px, 4vw, 44px); color: #fff; text-align: center; }
.app-faq-item { border-bottom: 1px solid rgba(246, 245, 242, 0.16); }
.app-faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 4px; font-size: clamp(15px, 1.8vw, 18px); font-weight: 650; color: var(--brand-dark-ink); }
.app-faq-item summary::-webkit-details-marker { display: none; }
.app-faq-item summary:hover { color: var(--brand-mint); }
.app-faq-mark { position: relative; width: 18px; height: 18px; flex: none; }
.app-faq-mark::before, .app-faq-mark::after { content: ''; position: absolute; background: var(--brand-mint); border-radius: 2px; transition: transform var(--brand-dur) var(--brand-ease); }
.app-faq-mark::before { left: 0; top: 8px; width: 18px; height: 2px; }
.app-faq-mark::after { left: 8px; top: 0; width: 2px; height: 18px; }
.app-faq-item[open] .app-faq-mark::after { transform: scaleY(0); }
.app-faq-item p { margin: 0; padding: 0 4px 24px; font-size: 15px; line-height: 1.7; color: rgba(246, 245, 242, 0.66); max-width: 68ch; }

/* ===================== 8. CTA (dải giấy đậm + chữ "R" mờ — như /about) ===================== */
.app-cta { background: var(--brand-strip-2); position: relative; overflow: hidden; }
.app-cta-mark { position: absolute; right: -28px; top: 50%; transform: translateY(-54%); font-family: var(--brand-font-display); font-weight: var(--brand-weight-display); font-size: clamp(220px, 30vw, 380px); line-height: 1; color: rgba(40, 40, 47, 0.05); pointer-events: none; user-select: none; }
.app-cta-inner { position: relative; max-width: 760px; margin: 0 auto; padding: clamp(64px, 9vw, 104px) 28px; text-align: center; }
.app-cta-inner h2 { font-family: var(--brand-font-display); font-weight: var(--brand-weight-display); font-size: clamp(32px, 4.4vw, 54px); letter-spacing: -0.03em; line-height: 1.04; margin: 0 0 14px; color: var(--brand-ink); }
.app-cta-inner p { font-size: clamp(15px, 1.7vw, 18px); color: var(--brand-ink-2); line-height: 1.6; margin: 0 auto 30px; max-width: 460px; }
.app-cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
  .app-hl-row { grid-template-columns: 1fr; gap: 28px; }
  .app-hl-row.is-rev .app-hl-copy { order: 0; }
  .app-hl-art { max-width: 560px; }
  .app-cases-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .app-eco-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  /* Use-case + Highlights → SLIDER vuốt ngang (CSS scroll-snap, KHÔNG JS) trên điện thoại.
     Hé card kế bên (card rộng 86-88%) để gợi ý vuốt; gọn trang, tránh xếp dọc dài. */
  .app-cases-grid, .app-hl {
    display: flex; flex-direction: row; gap: 16px; grid-template-columns: none;
    max-width: none; margin: 0;
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .app-cases-grid::-webkit-scrollbar, .app-hl::-webkit-scrollbar { display: none; }
  .app-hl { padding-bottom: clamp(40px, 7vw, 56px); }
  .app-case { flex: 0 0 86%; scroll-snap-align: start; }
  .app-hl-row { flex: 0 0 88%; scroll-snap-align: start; grid-template-columns: 1fr; gap: 16px; align-content: start; }
  .app-hl-row .app-hl-copy, .app-hl-row.is-rev .app-hl-copy { order: 2; }
  .app-hl-row .app-hl-art { order: 1; max-width: none; }
}
@media (max-width: 520px) {
  .app-hero-cta .btn-primary, .app-hero-cta .btn-outline { flex: 1; }
  .app-trust { gap: 10px 16px; }
  .app-eco-grid { grid-template-columns: 1fr; }
  .app-dl-badge { flex: 1 1 100%; justify-content: center; }
}
