/* AI Coach 360 - trang chủ v4: thành phần dùng chung cho 3 mẫu A/B/C.
   HTML/CSS thuần, không thư viện. Cách dùng: mockups-v4/THIET-KE.md mục (iv). Xem chạy thật: shared/demo.html.
   Mẫu nào cũng đổi màu bằng cách ghi đè các biến --v4-* trên <body> hoặc trên khối bọc, KHÔNG sửa tệp này. */

/* ---------- Phông tự phục vụ (không gọi Google Fonts) ---------- */
@font-face{font-family:"Be Vietnam Pro";font-style:normal;font-weight:400 500;font-display:swap;src:url("/assets/brand/fonts/BeVietnamPro-Regular.woff2") format("woff2")}
@font-face{font-family:"Be Vietnam Pro";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/brand/fonts/BeVietnamPro-SemiBold.woff2") format("woff2")}
@font-face{font-family:"Be Vietnam Pro";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/brand/fonts/BeVietnamPro-Bold.woff2") format("woff2")}
@font-face{font-family:"Be Vietnam Pro";font-style:normal;font-weight:800 900;font-display:swap;src:url("/assets/brand/fonts/BeVietnamPro-Black.woff2") format("woff2")}

:root{
  --v4-font:"Be Vietnam Pro",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --v4-ink:#14161B;            /* chữ chính */
  --v4-muted:#5B6270;          /* chữ phụ (tương phản >= 4.5 trên nền sáng) */
  --v4-bg:#F2F2F7;             /* nền trang */
  --v4-card:#FFFFFF;           /* nền thẻ */
  --v4-line:#E3E6EC;           /* viền mảnh */
  --v4-accent:#FF3B30;         /* đỏ nút hành động của app */
  --v4-accent-ink:#FFFFFF;
  --v4-frame:#0B0D12;          /* thân khung điện thoại */
  --v4-frame-ring:#C9CED8;     /* viền ngoài khung điện thoại */
  --v4-screen:#F2F2F7;         /* nền chờ trong màn khi ảnh chưa tải */
  --v4-focus:#1D4ED8;
  --icon-accent:#FF3B30;       /* điểm nhấn của icon chính thức */
  --v4-ease:cubic-bezier(.2,.8,.2,1);
}

/* ---------- Icon một nét (shared/icons.svg) ---------- */
.v4-ic{width:24px;height:24px;flex:none;color:inherit}
.v4-ic--lg{width:32px;height:32px}
.v4-ic--sm{width:20px;height:20px}

/* ---------- Khung điện thoại quanh ảnh màn app ----------
   <div class="v4-phone"><img ... width="660" height="1430"></div>
   Bề rộng do phần tử cha quyết định (đặt width cho .v4-phone). Tỉ lệ ảnh 660:1430. */
.v4-phone{position:relative;box-sizing:border-box;width:100%;padding:3.4%;border-radius:15.5%/7.2%;background:var(--v4-frame);
  box-shadow:0 0 0 1.5px var(--v4-frame-ring),0 24px 48px -28px rgba(11,13,18,.45)}
.v4-phone::before{content:"";position:absolute;left:50%;top:3.1%;width:31%;height:3.6%;border-radius:999px;background:var(--v4-frame);transform:translateX(-50%);z-index:2}
.v4-phone img,.v4-phone video{display:block;width:100%;height:auto;aspect-ratio:660/1430;border-radius:12.6%/5.8%;background:var(--v4-screen);object-fit:cover;
  -webkit-user-drag:none;user-select:none}

/* ---------- Dải ảnh màn app chạy ngang ----------
   Không JS hoặc bật "giảm chuyển động": là một hàng cuộn ngang bình thường (vuốt được, có scroll-snap).
   Có JS: v4.js thêm .is-live, hàng tự chạy liên tục, dừng khi rê chuột / chạm / focus, kéo và vuốt có quán tính. */
.v4-strip{position:relative}
.v4-strip-row{position:relative;overflow-x:auto;overflow-y:hidden;padding:20px 0 28px;scroll-snap-type:x proximity;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.v4-strip-row::-webkit-scrollbar{display:none}
.v4-strip-track{display:flex;gap:24px;width:max-content;margin:0;padding:0 24px;list-style:none}
.v4-shot{flex:none;width:232px;margin:0;scroll-snap-align:center}
.v4-shot figure{margin:0}
.v4-shot figcaption{margin-top:16px;padding:0 4px;text-align:center;font-family:var(--v4-font)}
.v4-shot figcaption b{display:block;font-size:16px;line-height:1.3;font-weight:700;color:var(--v4-ink);text-wrap:balance}
.v4-shot figcaption span{display:block;margin-top:6px;font-size:14px;line-height:1.45;color:var(--v4-muted);text-wrap:pretty}
.v4-strip.is-live .v4-strip-row{overflow:hidden;overflow:clip;scroll-snap-type:none;touch-action:pan-y;cursor:grab;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent);mask-image:linear-gradient(90deg,transparent 0,#000 4%,#000 96%,transparent)}
.v4-strip.is-live .v4-strip-track{will-change:transform;backface-visibility:hidden}
.v4-strip.is-dragging .v4-strip-row{cursor:grabbing}
.v4-strip.is-dragging .v4-shot{pointer-events:none}
/* biến thể thẻ: mỗi màn nằm trong thẻ có nền (mẫu C). Thêm class v4-strip--card vào .v4-strip */
.v4-strip--card .v4-shot{width:264px;padding:20px 20px 22px;border-radius:24px;background:var(--v4-card);box-sizing:border-box}
.v4-strip--card .v4-shot .v4-phone{width:78%;margin:0 auto}
/* biến thể câu chuyện kiểu eatclean.live (mẫu C): thẻ rộng 600 gồm điện thoại bên trái + chữ bên phải; điện thoại: một cột.
   Thêm class v4-strip--story. Trong figcaption dùng <small class="v4-shot-k">nhãn bước</small><b>tiêu đề</b><span>đoạn chữ</span><ul>3 ý</ul> */
.v4-strip--story .v4-shot{width:600px;padding:26px 28px;border-radius:28px;background:var(--v4-card);box-sizing:border-box}
.v4-strip--story .v4-shot figure{display:grid;grid-template-columns:230px 1fr;gap:28px;align-items:center}
.v4-strip--story .v4-shot figcaption{margin:0;padding:0;text-align:left}
.v4-strip--story .v4-shot-k{display:block;margin-bottom:8px;font-size:14px;font-weight:600;color:var(--v4-accent)}
.v4-strip--story .v4-shot figcaption b{font-size:24px;line-height:1.18;font-weight:800;letter-spacing:-.01em}
.v4-strip--story .v4-shot figcaption span{margin-top:10px;font-size:16px;line-height:1.55}
.v4-strip--story .v4-shot ul{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:6px}
.v4-strip--story .v4-shot li{position:relative;padding-left:18px;font-size:14.5px;line-height:1.45;color:var(--v4-muted)}
.v4-strip--story .v4-shot li::before{content:"";position:absolute;left:0;top:.5em;width:8px;height:8px;border-radius:50%;background:var(--v4-accent)}
@media (max-width:600px){
  .v4-strip--story .v4-shot{width:min(84vw,340px);padding:18px 18px 20px}
  .v4-strip--story .v4-shot figure{grid-template-columns:1fr;gap:16px;align-items:start}
  .v4-strip--story .v4-shot .v4-phone{width:62%;margin:0 auto}
  .v4-strip--story .v4-shot figcaption b{font-size:21px}
  .v4-strip--story .v4-shot figcaption span{font-size:15px}
  .v4-strip--story .v4-shot ul{display:none}
}
/* nút lùi / tới (không bắt buộc) */
.v4-strip-nav{display:flex;gap:10px}
.v4-strip-btn{display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--v4-line);background:var(--v4-card);color:var(--v4-ink);cursor:pointer;
  transition:transform .2s var(--v4-ease),background-color .2s}
.v4-strip-btn:active{transform:scale(.96)}
.v4-strip-btn:focus-visible,.v4-badge:focus-visible,.v4-video-toggle:focus-visible,.v4-sticky a:focus-visible{outline:3px solid var(--v4-focus);outline-offset:3px}
@media (hover:hover){.v4-strip-btn:hover{background:var(--v4-bg)}}
@media (max-width:600px){
  .v4-strip-track{gap:14px;padding:0 16px}
  .v4-shot{width:200px}
  .v4-strip--card .v4-shot{width:232px;padding:16px 16px 18px}
  .v4-shot figcaption b{font-size:15px}
  .v4-shot figcaption span{font-size:13.5px}
}

/* ---------- Nút tải dạng huy hiệu chính thức ----------
   Không đổi màu, không bo thêm, không đổ bóng lên huy hiệu; cao tối thiểu 40 px; khoảng trống quanh mỗi huy hiệu >= 1/4 chiều cao. */
.v4-badges{--v4-badge-h:48px;display:flex;flex-wrap:wrap;align-items:center;gap:14px}
.v4-badges--lg{--v4-badge-h:56px;gap:16px}
.v4-badges--center{justify-content:center}
.v4-badge{display:inline-block;line-height:0;border-radius:8px;transition:transform .2s var(--v4-ease)}
.v4-badge img{display:block;height:var(--v4-badge-h);width:auto}
.v4-badge:active{transform:scale(.97)}
@media (hover:hover){.v4-badge:hover{transform:translateY(-2px)}}
/* main.js gắn .is-ios / .is-android lên <html> trên điện thoại. Với .v4-badges--smart, điện thoại chỉ hiện đúng cửa hàng của máy. */
.is-ios .v4-badges--smart .v4-badge[data-platform="android"],
.is-android .v4-badges--smart .v4-badge[data-platform="ios"]{display:none}
/* điện thoại: cặp huy hiệu cỡ lớn phải nằm trên MỘT hàng ở màn 360-430 px */
@media (max-width:430px){.v4-badges--lg{--v4-badge-h:50px;gap:12px}}
@media (max-width:374px){.v4-badges,.v4-badges--lg{--v4-badge-h:44px;gap:10px}}
@media (max-width:339px){.v4-badges,.v4-badges--lg{--v4-badge-h:40px;gap:10px}}

/* ---------- Video hero (tự phát, tắt tiếng, lặp; chỉ nạp tệp sau khi trang tải xong) ---------- */
.v4-video{position:relative;overflow:hidden;border-radius:24px;background:#0B0D12;aspect-ratio:16/9;isolation:isolate}
.v4-video video,.v4-video>img{display:block;width:100%;height:100%;object-fit:cover}
.v4-video-toggle{position:absolute;right:10px;top:10px;z-index:2;display:inline-grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;
  background:rgba(11,13,18,.62);box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);color:#fff;cursor:pointer;transition:transform .2s var(--v4-ease),opacity .2s}
.v4-video-toggle:active{transform:scale(.96)}
.v4-video-toggle svg{width:20px;height:20px;--icon-accent:currentColor}
.v4-video-toggle .v4-i-play,.v4-video.is-paused .v4-video-toggle .v4-i-pause{display:none}
.v4-video.is-paused .v4-video-toggle .v4-i-play{display:block}
html:not(.js) .v4-video-toggle{display:none}
@media (max-width:600px){.v4-video{border-radius:18px}}

/* ---------- Thanh tải dính đáy (chỉ điện thoại) ----------
   Có icon app + chữ + nút. Mã vị trí giữ nguyên "sticky". v4.js ẩn thanh khi huy hiệu ở hero hoặc ở khối cuối đang trong màn hình. */
.v4-sticky{display:none}
@media (max-width:720px){
  .v4-sticky{position:fixed;left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:40;display:block;font-family:var(--v4-font);
    transform:translateY(140%);opacity:0;transition:transform .32s var(--v4-ease),opacity .2s}
  .v4-sticky.is-on{transform:none;opacity:1}
  .v4-sticky a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:20px;background:var(--v4-card);color:var(--v4-ink);text-decoration:none;
    box-shadow:0 0 0 1px var(--v4-line),0 14px 32px -12px rgba(11,13,18,.38)}
  .v4-sticky img{width:44px;height:44px;border-radius:11px;flex:none}
  .v4-sticky-txt{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
  .v4-sticky-txt b{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .v4-sticky-txt span{font-size:12.5px;color:var(--v4-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .v4-sticky-go{flex:none;display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 18px;border-radius:999px;background:var(--v4-accent);color:var(--v4-accent-ink);font-size:15px;font-weight:700}
  .v4-sticky-go svg{width:18px;height:18px;--icon-accent:currentColor}
}

/* ---------- Giảm chuyển động ---------- */
@media (prefers-reduced-motion:reduce){
  .v4-badge,.v4-strip-btn,.v4-video-toggle{transition:none}
  .v4-sticky{transition:opacity .2s}
  .v4-sticky.is-on,.v4-sticky{transform:none}
  .v4-sticky:not(.is-on){visibility:hidden}
}
