/* Giao diện tương tác "Chuỗi cung ứng": ảnh nền toàn màn hình + điểm nóng đặt theo % */
:root {
    --accent: #e4002b;
    --ink: #111;
    --muted: #8a8d93;
}
@view-transition { navigation: auto; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: 'Archivo', 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: #f2f3f5;
    overflow: hidden;
}

.scene { position: relative; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; }

/* ---------- Stage: giữ tỉ lệ 16:9, phủ kín màn hình ---------- */
.stage {
    position: absolute;
    top: 50%; left: 50%;
    width: max(100vw, 100dvh * 16 / 9);
    aspect-ratio: 16 / 9;
    transform: translate(-50%, -50%);
    container-type: inline-size;
    animation: fade .6s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.stage-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.stage-lines line { stroke: var(--accent); stroke-width: 1.5; }

/* ---------- Hotspots ---------- */
.hs-dot {
    position: absolute;
    left: calc(var(--px) * 1%); top: calc(var(--py) * 1%);
    width: 1cqw; height: 1cqw; min-width: 8px; min-height: 8px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 .3cqw rgba(228, 0, 43, .25);
    animation: pulse 2.2s ease-out infinite;
    pointer-events: none;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(228, 0, 43, .45); }
    100% { box-shadow: 0 0 0 1.2cqw rgba(228, 0, 43, 0); }
}

.hs {
    position: absolute;
    left: calc(var(--lx) * 1%); top: calc(var(--ly) * 1%);
    transform: translate(-50%, -50%);
    display: inline-flex; align-items: center; gap: .6cqw;
    text-decoration: none; color: var(--ink);
    font-size: max(.8cqw, 9px);
    font-weight: 800; letter-spacing: .06em; text-transform: uppercase; text-align: center; line-height: 1.25;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.hs.is-static { cursor: default; }
.hs b { font-weight: 800; }

.hs-box {
    padding: .7cqw 1.3cqw;
    max-width: 14cqw;
    background: #fff;
    border: .12cqw solid var(--accent);
    border-radius: .5cqw;
    box-shadow: 0 .3cqw 1cqw rgba(0, 0, 0, .12);
}
.hs-box:not(.is-static):hover, .hs-box:not(.is-static):focus-visible {
    background: var(--accent); color: #fff;
    transform: translate(-50%, -50%) scale(1.08);
    outline: none;
}

.hs-pill { padding: 0; gap: 0; }
.hs-pill b {
    background: var(--accent); color: #fff;
    padding: .55cqw 1.2cqw .55cqw 2cqw; margin-left: -1.4cqw;
    border-radius: 0 .5cqw .5cqw 0;
    font-size: inherit;
}
.hs-pill .hs-icon {
    position: relative; z-index: 1;
    width: 3.4cqw; height: 3.4cqw; min-width: 28px; min-height: 28px;
    display: grid; place-items: center;
    background: #fff; color: var(--ink);
    border: .15cqw solid var(--accent); border-radius: 50%;
    font-size: 1.5cqw;
    box-shadow: 0 .3cqw 1cqw rgba(0, 0, 0, .15);
}
.hs-pill:not(.is-static):hover { transform: translate(-50%, -50%) scale(1.08); }
.hs-pill:not(.is-static):hover .hs-icon { background: var(--accent); color: #fff; }

/* ---------- Copy panel ---------- */
.copy {
    position: absolute; z-index: 5;
    top: 4.5vh; left: clamp(20px, 3.8vw, 72px);
    width: min(34vw, 500px);
    animation: rise .7s .1s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.crumbs { display: flex; flex-wrap: wrap; gap: .5em; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #b4b7bd; margin-bottom: 4vh; }
.crumbs a { color: #b4b7bd; text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs em { font-style: normal; color: #666; }
.is-home .crumbs { display: none; }

.copy h1 { font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: -.01em; font-size: clamp(30px, 4vw, 68px); }
.copy h1 .t1 { display: block; color: var(--accent); }
.copy h1 .t2 { display: block; color: var(--ink); }

.lead {
    margin-top: 3vh; padding-left: 14px; border-left: 3px solid var(--accent);
    font-size: clamp(12px, 1.02vw, 17px); line-height: 1.55; color: #2b2d31;
}

.video-card {
    position: relative; display: block; margin-top: 4vh; width: min(14vw, 230px); min-width: 150px; aspect-ratio: 16 / 10;
    border: 0; padding: 0; cursor: pointer; background: #fff; overflow: hidden; border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.video-card img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.video-card .play {
    position: absolute; inset: 0; margin: auto; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--accent); font-size: 14px;
    transition: transform .2s;
}
.video-card:hover .play { transform: scale(1.15); }

.foot-link {
    position: fixed; left: clamp(20px, 3.8vw, 72px); bottom: 4vh; z-index: 5;
    display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--accent);
    font-weight: 800; font-size: 13px; line-height: 1.1;
}
.foot-link i { font-size: 30px; }

/* ---------- Menu ---------- */
.menu-btn {
    position: fixed; top: 0; right: 0; z-index: 20; width: 110px; height: 110px;
    border: 0; background: #000; color: #fff; cursor: pointer;
    border-radius: 0 0 0 100%;
    padding: 0 0 38px 34px; font-size: 20px;
    transition: transform .2s;
}
.menu-btn:hover { transform: scale(1.06); transform-origin: top right; }
.menu-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.menu-panel, .video-modal {
    position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 12, .96); color: #fff;
    overflow-y: auto; padding: 90px 8vw 60px;
}
.menu-panel[hidden], .video-modal[hidden] { display: none; }
.menu-close {
    position: fixed; top: 22px; right: 28px; width: 46px; height: 46px; border-radius: 50%;
    border: 2px solid #fff; background: transparent; color: #fff; font-size: 18px; cursor: pointer; z-index: 60;
}
.menu-close:hover { background: var(--accent); border-color: var(--accent); }
.menu-panel ul { list-style: none; }
.menu-panel nav > ul > li > a { font-size: clamp(26px, 4vw, 52px); font-weight: 900; text-transform: uppercase; }
.menu-panel li ul { margin: 6px 0 22px 18px; padding-left: 16px; border-left: 2px solid var(--accent); }
.menu-panel li li > a { font-size: clamp(14px, 1.5vw, 20px); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #d6d8dc; }
.menu-panel li li li > a { font-size: 13px; font-weight: 500; color: #9b9ea5; }
.menu-panel a { display: inline-block; padding: 4px 0; color: #fff; text-decoration: none; }
.menu-panel a:hover, .menu-panel a.current { color: var(--accent); }

.video-modal { display: grid; place-items: center; padding: 60px 5vw; }
.video-frame { width: min(1000px, 100%); aspect-ratio: 16 / 9; background: #000; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; }

/* ---------- Mobile: chữ ở trên, ảnh có hotspot bên dưới ---------- */
@media (max-width: 800px) {
    body { overflow: auto; }
    .scene { height: auto; min-height: 100dvh; overflow: visible; display: flex; flex-direction: column; }
    .copy { position: static; width: auto; padding: 22px 20px 0; order: 1; }
    .stage { position: relative; order: 2; top: auto; left: auto; transform: none; width: 100%; margin-top: 16px; }
    .stage-bg { object-fit: contain; }
    .hs { font-size: 8px; }
    .hs-box { max-width: 26cqw; padding: 1.2cqw 2cqw; }
    .hs-pill .hs-icon { width: 7cqw; height: 7cqw; font-size: 3.4cqw; min-width: 0; min-height: 0; }
    .hs-dot { min-width: 6px; min-height: 6px; }
    .crumbs { margin-bottom: 18px; }
    .foot-link { position: static; order: 3; margin: 18px 20px 24px; }
    .menu-btn { width: 84px; height: 84px; padding: 0 0 28px 26px; }
}
@media (prefers-reduced-motion: reduce) {
    .stage, .copy, .hs-dot { animation: none; }
}
