:root {
  --bg: #050608;
  --fg: #f2f3f5;
  --muted: rgba(242, 243, 245, 0.55);
  --line: rgba(242, 243, 245, 0.14);
  --accent: #ff7a1a;
  --paper: #e4e5ea;
  --ink: #0b0c10;
  --pad: clamp(16px, 3vw, 48px);
  --sphere: 140px; /* đường kính quả cầu intro, JS cập nhật theo màn hình */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Ẩn nội dung cho tới khi intro sẵn sàng, tránh nháy chữ */
.is-loading .nav,
.is-loading .hero { visibility: hidden; }

/* Lớp nhiễu hạt nhẹ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Nav (tự đảo màu nhờ mix-blend-mode) ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  color: #fff;
  mix-blend-mode: difference;
}
.logo { font-weight: 700; letter-spacing: 0.08em; font-size: 15px; }
.logo span { font-weight: 400; font-size: 0.7em; vertical-align: super; }
.nav-links { display: flex; gap: 32px; font-size: 14px; }
.nav-links a { opacity: 0.7; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 1; }
.nav-start { display: flex; align-items: center; gap: 24px; }
.nav-home { font-size: 14px; opacity: 0.7; transition: opacity 0.3s; }
.nav-home:hover { opacity: 1; }
/* Dưới 1024px không đủ chỗ cho chữ cạnh menu, chỉ giữ mũi tên */
@media (max-width: 1023px) { .nav-home span { display: none; } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}
.nav .pill:hover { background: #fff; color: #000; }

/* ---------- Stage (được pin khi scroll) ---------- */
.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  will-change: transform; /* ScrollTrigger translate layer này suốt chương 1 */
}
.webgl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.layer {
  position: absolute;
  inset: 0;
  padding: calc(84px + 2vh) var(--pad) var(--pad);
  pointer-events: none;
  will-change: transform, opacity; /* GSAP ghi transform/opacity mỗi frame khi scrub */
}
.layer a { pointer-events: auto; }
.eyebrow { font-size: 13px; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- (01) Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-title {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: calc(var(--sphere) + 4vw);
  font-size: clamp(40px, 6.4vw, 128px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}
.half { flex: 1; display: flex; gap: 0.24em; }
.half:first-child { justify-content: flex-end; }
.w {
  display: inline-block;
  overflow: hidden;
  /* chừa chỗ cho dấu tiếng Việt khi che chữ */
  padding: 0.16em 0 0.12em;
  margin: -0.16em 0 -0.12em;
}
.w > span { display: inline-block; }

.hero-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}
.scroll-hint { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.scroll-hint i {
  position: relative;
  width: 1px;
  height: 48px;
  overflow: hidden;
  background: var(--line);
}
.scroll-hint i::after {
  content: '';
  position: absolute;
  left: 0;
  top: -50%;
  width: 100%;
  height: 50%;
  background: var(--fg);
  animation: drip 1.8s cubic-bezier(0.6, 0, 0.2, 1) infinite;
}
@keyframes drip { to { top: 100%; } }

/* ---------- Panels ---------- */
.panel { visibility: hidden; opacity: 0; }
.panel h2 {
  margin-top: 16px;
  font-size: clamp(32px, 4.2vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

/* (02) */
.panel-network {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.stats li { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; }
.stats li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.stats strong {
  font-size: clamp(30px, 4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stats small { font-size: 13px; color: var(--muted); }

/* (03) */
.panel-services {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.services { width: min(560px, 46vw); margin-top: 24px; }
.service {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service .num { font-size: 13px; color: var(--accent); font-variant-numeric: tabular-nums; }
.service h3 { font-size: clamp(22px, 2.3vw, 36px); font-weight: 500; letter-spacing: -0.02em; }
.service p { margin-top: 4px; font-size: 14px; color: var(--muted); }

/* (04) */
.panel-tracking {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  /* phủ tối nửa phải để chữ không chìm vào các chấm khi zoom sát */
  background: linear-gradient(90deg, transparent 30%, rgba(5, 6, 8, 0.85) 70%);
}
.tracking { width: min(420px, 100%); }
.panel-tracking h2 { font-size: clamp(28px, 3vw, 48px); }
.track-card {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 12, 18, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.track-head small { font-size: 12px; color: var(--muted); }
.track-head b {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.status {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  color: var(--accent);
  background: rgba(255, 122, 26, 0.12);
}
.status.is-arrived { color: #4ade80; background: rgba(74, 222, 128, 0.12); }
.track-route { display: flex; align-items: center; gap: 12px; margin: 18px 0; font-size: 13px; }
.track-bar {
  position: relative;
  flex: 1;
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--line);
}
.track-bar i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.track-steps { position: relative; display: grid; gap: 14px; padding-left: 22px; }
.track-steps::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}
.track-step {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.3s;
}
.track-step::before {
  content: '';
  position: absolute;
  left: -22px;
  top: 5px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: var(--bg);
  transition: background 0.3s, border-color 0.3s;
}
.track-step b { font-weight: 500; }
.track-step small { font-size: 12px; }
.track-step.is-done { color: var(--fg); }
.track-step.is-done::before { background: var(--accent); border-color: var(--accent); }
.track-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.track-foot b { font-size: 14px; color: var(--fg); font-variant-numeric: tabular-nums; }

/* (05) */
.panel-process { display: flex; flex-direction: column; }
.process-track {
  display: flex;
  gap: 24px;
  width: max-content;
  margin-top: clamp(24px, 5vh, 56px);
}
.step-card {
  width: clamp(280px, 36vw, 500px);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 12, 18, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.step-num {
  display: block;
  font-size: clamp(48px, 5vw, 88px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
}
.step-card h3 {
  margin-top: clamp(24px, 6vh, 64px);
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.step-card p { max-width: 36ch; margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ---------- Thanh tiến độ cảnh ---------- */
.scene-progress {
  position: fixed;
  right: 14px;
  top: 50%;
  z-index: 45;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.6);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  mix-blend-mode: difference; /* tự đảo màu trên nền sáng/tối */
}
.scene-progress > i { position: relative; width: 1px; height: 120px; background: rgba(255, 255, 255, 0.25); }
.scene-progress > i > i {
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleY(0);
  transform-origin: top;
}

/* ---------- (06) Circle reveal ---------- */
.reveal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--pad);
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  clip-path: circle(var(--r, 0px) at 50% 50%);
  visibility: hidden;
}
.chapter .eyebrow { color: rgba(11, 12, 16, 0.55); }
.chapter h2 {
  margin: 20px 0 40px;
  font-size: clamp(36px, 5.4vw, 96px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.chapter-hint { justify-content: center; color: rgba(11, 12, 16, 0.55); }
.chapter-hint i { background: rgba(11, 12, 16, 0.15); }
.chapter-hint i::after { background: var(--ink); }

/* ================= Chương 2 ================= */
.ch2 h2 {
  margin-top: 16px;
  font-size: clamp(32px, 4.2vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.ch2 .lead { max-width: 46ch; margin-top: 16px; font-size: 16px; line-height: 1.6; opacity: 0.7; }
.light { color: var(--ink); background: var(--paper); }
.light .eyebrow { color: rgba(11, 12, 16, 0.55); }
.dark { color: var(--fg); background: var(--ink); }
.scene { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.scene-copy {
  position: absolute;
  top: calc(84px + 2vh);
  left: var(--pad);
  z-index: 2;
  max-width: min(560px, calc(100vw - 2 * var(--pad)));
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chips li { padding: 6px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 13px; opacity: 0.75; }

/* (07) Đường bộ */
.road-word {
  position: absolute;
  left: 0;
  top: 16vh;
  font-size: 24vw;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
  color: rgba(11, 12, 16, 0.05);
  pointer-events: none;
}
.road-layer { position: absolute; left: 0; bottom: 20vh; display: block; }
.road-far { width: 200vw; }
.road-near { width: 320vw; }
.asphalt {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20vh;
  background: #24272e;
  border-top: 6px solid #9aa1ad;
}
.lane {
  position: absolute;
  left: 0;
  right: 0;
  top: 45%;
  height: 6px;
  background: repeating-linear-gradient(90deg, rgba(242, 243, 245, 0.85) 0 70px, transparent 70px 140px);
  background-position-x: var(--lane, 0px);
}
.truck {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  width: min(1000px, 88vw);
  margin-left: calc(min(1000px, 88vw) / -2);
  overflow: visible;
}
.box-logo { font-size: 72px; font-weight: 700; letter-spacing: 10px; fill: #fff; }
.box-code { font-size: 18px; font-weight: 500; letter-spacing: 2px; fill: rgba(255, 255, 255, 0.85); }
.bounce { animation: bounce 0.45s ease-in-out infinite alternate; }
@keyframes bounce { to { transform: translateY(-3px); } }
.puff {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: puff 1.6s ease-out infinite;
}
@keyframes puff {
  0% { opacity: 0.55; transform: translate(0, 0) scale(0.4); }
  100% { opacity: 0; transform: translate(-60px, -40px) scale(1.8); }
}
.mini-stats { display: flex; gap: 32px; margin-top: 28px; }
.mini-stats strong {
  font-size: clamp(24px, 2.6vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.mini-stats small { display: block; margin-top: 4px; font-size: 12px; opacity: 0.6; }

/* (08–09) Cảng */
.port-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.port-copy {
  padding: 20px 24px;
  border-radius: 16px;
  background: rgba(228, 229, 234, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  visibility: hidden;
  opacity: 0;
}
.ship-name { font-size: 22px; font-weight: 600; letter-spacing: 4px; fill: #f2f3f5; }
.wave { animation: wave 3s ease-in-out infinite alternate; }
@keyframes wave { to { transform: translateX(30px); } }

/* (10) Kho bãi */
.yard-art {
  position: absolute;
  right: 3vw;
  top: 50%;
  width: min(60vw, 960px);
  transform: translateY(-44%);
  overflow: visible;
}
.yl-code { font-size: 20px; font-weight: 600; letter-spacing: 1px; fill: var(--ink); }
.yl-sub { font-size: 16px; fill: #3a8f5a; }

/* (11) Nội địa */
.line-art {
  position: absolute;
  left: var(--pad);
  top: 54%;
  width: calc(100% - 2 * var(--pad));
  transform: translateY(-40%);
  overflow: visible;
}
.line-track { fill: none; stroke: rgba(11, 12, 16, 0.18); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.line-progress { fill: none; stroke: var(--accent); stroke-width: 5; stroke-linecap: round; }
.station circle { fill: var(--paper); stroke: rgba(11, 12, 16, 0.3); stroke-width: 2; transition: fill 0.3s, stroke 0.3s; }
.station text { font-size: 24px; font-weight: 500; fill: rgba(11, 12, 16, 0.35); transition: fill 0.3s; }
.station .hour { font-size: 17px; font-weight: 400; }
.station.is-on circle { fill: var(--accent); stroke: var(--accent); }
.station.is-on text { fill: var(--ink); }
.line-hours { color: var(--accent); font-variant-numeric: tabular-nums; }
.line-stats {
  position: absolute;
  left: var(--pad);
  right: var(--pad);
  bottom: var(--pad);
  padding-top: 20px;
  border-top: 1px solid rgba(11, 12, 16, 0.12);
}

/* (12) Cam kết */
.marquee { padding: 18vh 0; overflow: hidden; }
.marquee .eyebrow { margin: 0 var(--pad) 4vh; }
.mq-row {
  display: flex;
  align-items: center;
  gap: 3vw;
  width: max-content;
  font-size: clamp(56px, 11vw, 200px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
}
.mq-row i { flex: none; width: 0.18em; height: 0.18em; border-radius: 50%; background: var(--accent); }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }

/* (13) Ngành hàng */
.industries { padding: 16vh var(--pad) 10vh; }
.ind-head { margin-bottom: 8vh; }
.ind-card {
  position: sticky;
  top: calc(14vh + var(--i, 0) * 18px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  min-height: 64vh;
  margin-bottom: 8vh;
  padding: clamp(24px, 4vw, 56px);
  border-radius: 28px;
  color: var(--card-ink);
  background: var(--card);
  transform-origin: 50% 0;
}
.ind-card:nth-child(2) { --i: 1; }
.ind-card:nth-child(3) { --i: 2; }
.ind-card:nth-child(4) { --i: 3; }
.ind-card:nth-child(5) { --i: 4; }
.ind-num { font-size: 13px; letter-spacing: 0.06em; opacity: 0.6; }
.ind-card h3 {
  margin-top: 10vh;
  font-size: clamp(32px, 4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.ind-card p { max-width: 44ch; margin-top: 16px; font-size: 17px; line-height: 1.6; opacity: 0.75; }
.ind-stat { align-self: end; justify-self: end; text-align: right; }
.ind-stat strong {
  display: block;
  font-size: clamp(56px, 8vw, 140px);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
}
.ind-stat small { font-size: 14px; opacity: 0.7; }

/* (14) Khách hàng */
.quote { display: grid; place-items: center; padding: 0 var(--pad); }
.quote-inner { max-width: 1100px; }
.quote-text {
  margin-top: 24px;
  font-size: clamp(28px, 3.6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.quote-text .word { opacity: 0.15; }
.quote-by { margin-top: 32px; font-size: 15px; color: rgba(11, 12, 16, 0.6); }
.quote-by b { color: var(--ink); font-weight: 600; }

/* (15) Liên hệ */
.contact { display: grid; place-items: center; text-align: center; background: var(--bg); }
.contact-orb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72vmin;
  height: 72vmin;
  margin: -36vmin 0 0 -36vmin;
  border-radius: 50%;
  background: radial-gradient(circle, #e0e3eb 0%, #d5d8e0 50%, #6b6e78 100%);
  box-shadow: 0 0 120px 20px rgba(255, 255, 255, 0.1);
}
.contact-copy { position: relative; padding: 0 var(--pad); }
.contact .eyebrow { color: rgba(255, 255, 255, 0.7); mix-blend-mode: difference; }
.contact h2 {
  margin: 20px 0 40px;
  font-size: clamp(36px, 5.4vw, 96px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: #fff;
  mix-blend-mode: difference; /* trắng trên nền tối, tối khi đè lên quả cầu */
}
.pill-solid {
  padding: 16px 28px;
  font-size: 15px;
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.pill-solid span { transition: transform 0.3s; }
.pill-solid:hover span { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 96px var(--pad) 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
.footer .muted,
.footer .label,
.footer .copy { color: rgba(11, 12, 16, 0.55); }
.footer .label { margin-bottom: 8px; font-size: 13px; }
.footer .copy { grid-column: 1 / -1; padding-top: 48px; border-top: 1px solid rgba(11, 12, 16, 0.12); }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .nav-links { display: none; }

  .hero-title {
    flex-direction: column;
    gap: calc(var(--sphere) + 32px);
    font-size: clamp(44px, 13vw, 72px);
  }
  .half { flex: none; }
  .half:first-child { justify-content: center; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 20px; font-size: 14px; }
  .hero-foot br { display: none; }

  .stats strong { font-size: 28px; }
  .stats small { font-size: 11px; }
  .stats li + li { padding-left: 12px; }

  .panel-services { justify-content: flex-end; }
  .services { width: 100%; }
  .service { gap: 16px; padding: 14px 0; }

  .panel-tracking {
    align-items: flex-end;
    background: linear-gradient(180deg, transparent 35%, rgba(5, 6, 8, 0.9) 65%);
  }
  .panel-tracking h2 { font-size: 26px; }
  .track-card { margin-top: 16px; padding: 16px; }
  .track-steps { gap: 10px; }

  .step-card { width: 78vw; padding: 22px; }
  .scene-progress { display: none; }

  .mini-stats { gap: 18px; }
  .mini-stats strong { font-size: 22px; }
  .port-copy { padding: 16px; }
  .yard-art { top: auto; right: 4vw; bottom: 4vh; width: 92vw; transform: none; }
  .line-art { top: 64%; }
  .station text { font-size: 44px; }
  .station .hour { font-size: 32px; }
  .ind-card { grid-template-columns: 1fr; min-height: 70vh; }
  .ind-card h3 { margin-top: 4vh; }
  .ind-stat { justify-self: start; text-align: left; }

  .footer { grid-template-columns: 1fr; padding-top: 64px; }
  .footer .copy { padding-top: 24px; }
}
