/* =================================================================
   APLICO · DESIGN SYSTEM
   Premium Industrial Responsive Experience
   v1.0 — May 2026
   ================================================================= */

/* -----------------------------------------------------------------
   1. TOKENS (CSS variables)
   ----------------------------------------------------------------- */
:root {
  /* COLOR — Primary */
  --c-red:        #A8231C;   /* Industrial Red */
  --c-red-deep:   #8E1A14;
  --c-navy:       #14264E;   /* APH Deep Navy */
  --c-navy-deep:  #0E1C3D;

  /* COLOR — Secondary */
  --c-graphite:   #3A3F45;   /* Steel Graphite */
  --c-grey:       #9CA0A4;   /* Concrete Grey */
  --c-grey-soft:  #D7D9DB;

  /* COLOR — Neutral */
  --c-pearl:      #F5F4F0;
  --c-pearl-2:    #ECEAE3;
  --c-charcoal:   #1A1A1A;
  --c-white:      #FFFFFF;

  /* COLOR — Functional / Reserved */
  --c-amber:      #E89B3C;
  --c-green:      #2E8B57;

  /* SEMANTIC tokens — light mode default */
  --bg:           var(--c-pearl);
  --bg-alt:       var(--c-white);
  --bg-deep:      var(--c-pearl-2);
  --fg:           var(--c-charcoal);
  --fg-soft:      var(--c-graphite);
  --fg-mute:      var(--c-grey);
  --line:         rgba(58, 63, 69, 0.18);
  --line-strong:  rgba(58, 63, 69, 0.45);
  --grid-line:    rgba(156, 160, 164, 0.18);
  --accent:       var(--c-red);
  --accent-fg:    var(--c-white);
  --inverse-bg:   var(--c-navy-deep);
  --inverse-fg:   var(--c-pearl);
  --card-bg:      var(--c-white);
  --card-line:    rgba(58, 63, 69, 0.14);
  --shadow-1:     0 1px 0 rgba(20, 38, 78, 0.04), 0 8px 24px -16px rgba(20, 38, 78, 0.20);
  --shadow-2:     0 1px 0 rgba(20, 38, 78, 0.05), 0 30px 60px -30px rgba(20, 38, 78, 0.30);

  /* TYPOGRAPHY */
  --f-display: "IBM Plex Sans", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-body:    "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  /* SPACING (8-pt grid) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;
  --s-11: 160px;

  /* RADIUS — rất tiết chế */
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 6px;

  /* MOTION */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 320ms;
  --dur-2: 700ms;
  --dur-3: 1100ms;

  /* LAYOUT */
  --container: 1280px;
  --container-narrow: 1080px;
  --header-h: 76px;
}

/* DARK MODE — Industrial dark, không gaming */
[data-theme="dark"] {
  --bg:          #0E1626;          /* navy/charcoal mix */
  --bg-alt:      #131C30;
  --bg-deep:     #0A1220;
  --fg:          #E7E6E1;
  --fg-soft:     #B7BDC7;
  --fg-mute:     #6E757F;
  --line:        rgba(199, 205, 215, 0.14);
  --line-strong: rgba(199, 205, 215, 0.30);
  --grid-line:   rgba(199, 205, 215, 0.07);
  --card-bg:     #131C30;
  --card-line:   rgba(199, 205, 215, 0.12);
  --inverse-bg:  #060B17;
  --inverse-fg:  #E7E6E1;
  --shadow-1:    0 1px 0 rgba(0,0,0,0.3), 0 12px 32px -16px rgba(0,0,0,0.6);
  --shadow-2:    0 1px 0 rgba(0,0,0,0.3), 0 30px 60px -30px rgba(0,0,0,0.7);
}

/* -----------------------------------------------------------------
   2. RESET & BASE
   ----------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Cấm horizontal scroll bất kỳ — tránh nội dung tràn ra ngoài viewport iPhone */
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

/* Japanese line-height */
:lang(ja),
[lang="ja"] body {
  line-height: 1.85;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-1) var(--ease-out), opacity var(--dur-1) var(--ease-out);
}
a:hover { color: var(--accent); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul { list-style: none; padding: 0; margin: 0; }

::selection { background: var(--c-red); color: var(--c-white); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--c-charcoal);
  color: var(--c-white);
  padding: var(--s-3) var(--s-4);
  font-family: var(--f-mono);
  font-size: 12px;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* -----------------------------------------------------------------
   3. TYPOGRAPHY
   ----------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
  margin: 0;
  color: var(--fg);
}
h1 { font-weight: 700; }

p { margin: 0 0 var(--s-4); }

.mono {
  font-family: var(--f-mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.02em;
}

.small { font-size: 12px; }

strong { font-weight: 600; color: inherit; }

.lead {
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.65;
  color: var(--fg-soft);
}

/* -----------------------------------------------------------------
   4. LAYOUT
   ----------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
  /* Tránh padding làm tổng width vượt 100vw trên iOS */
  box-sizing: border-box;
}
@media (min-width: 768px) {
  .container { padding: 0 var(--s-6); }
}
@media (min-width: 1280px) {
  .container { padding: 0 var(--s-7); }
}

.section {
  padding: clamp(64px, 9vw, 140px) 0;
  position: relative;
}

.section + .section { border-top: 1px solid var(--line); }

.section-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-red);
  padding: 6px 0;
  margin-bottom: var(--s-4);
  position: relative;
  padding-left: 28px;
}
.section-eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 20px;
  height: 1px;
  background: var(--c-red);
}
.section-eyebrow.inverse {
  color: var(--c-pearl);
}
.section-eyebrow.inverse::before { background: var(--c-pearl); }

.section-title {
  font-size: clamp(30px, 4.4vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.06;
  margin-bottom: var(--s-5);
  max-width: 22ch;
}
.section-title.inverse { color: var(--inverse-fg); }
.section-title.quoted::before {
  content: "“";
  display: block;
  font-family: var(--f-display);
  color: var(--c-red);
  font-size: 1.1em;
  line-height: 0.4;
  margin-bottom: var(--s-3);
}

.section-sub {
  max-width: 60ch;
  color: var(--fg-soft);
}

.section-head {
  margin-bottom: var(--s-8);
  max-width: 80ch;
}

/* 12-column grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-7);
  align-items: start;
}
.grid-12 > * { min-width: 0; }
.col-span-5  { grid-column: span 12; }
.col-span-6  { grid-column: span 12; }
.col-span-7  { grid-column: span 12; }
@media (min-width: 960px) {
  .col-span-5  { grid-column: span 5; }
  .col-span-6  { grid-column: span 6; }
  .col-span-7  { grid-column: span 7; }
}

/* -----------------------------------------------------------------
   5. ENGINEERING GRAPHIC SYSTEM
   ----------------------------------------------------------------- */
/* 5.1 Engineering grid */
.engineering-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, #000 50%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 50%, transparent 100%);
}
.engineering-grid.soft { background-size: 56px 56px; opacity: .7; }
.engineering-grid.micro { background-size: 24px 24px; opacity: .9; }

/* 5.2 Light axis — nêm ánh sáng đỏ */
.light-axis {
  position: absolute;
  left: -10%;
  top: -10%;
  width: 70%;
  height: 130%;
  background: linear-gradient(105deg,
    transparent 0%,
    transparent 35%,
    rgba(168, 35, 28, 0.10) 48%,
    rgba(168, 35, 28, 0.22) 52%,
    transparent 65%,
    transparent 100%);
  filter: blur(6px);
  transform: rotate(-18deg);
  pointer-events: none;
  opacity: .85;
  animation: axisDrift 18s ease-in-out infinite alternate;
}
.light-axis-2 {
  left: auto;
  right: -10%;
  width: 50%;
  transform: rotate(18deg);
  background: linear-gradient(105deg,
    transparent 0%,
    transparent 40%,
    rgba(232, 155, 60, 0.05) 50%,
    transparent 60%);
  animation-duration: 24s;
}
.light-axis-3 {
  width: 60%;
  opacity: .55;
  animation-duration: 30s;
}
@keyframes axisDrift {
  0%   { transform: rotate(-18deg) translateX(-2%); opacity: .65; }
  100% { transform: rotate(-19deg) translateX(2%);  opacity: .9; }
}

/* 5.3 Cross-section motif — used in icons inline */

/* 5.4 Dimension line */
.dim-line {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--c-red);
  position: relative;
  margin-right: var(--s-3);
  vertical-align: middle;
}
.dim-line::before,
.dim-line::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--c-red);
}
.dim-line::before { left: 0; }
.dim-line::after  { right: 0; }
.dim-line.horizontal { width: 80px; }

.dim-arrow {
  display: block;
  width: 1px;
  height: 28px;
  background: var(--fg-mute);
  position: relative;
  margin: 0 auto var(--s-2);
}
.dim-arrow::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: -3px;
  width: 7px;
  height: 1px;
  background: var(--fg-mute);
  transform-origin: center;
}
.dim-arrow::before {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 7px;
  height: 1px;
  background: var(--fg-mute);
  transform: translateX(-50%) rotate(45deg);
  transform-origin: center;
  box-shadow: 0 -2px 0 var(--fg-mute);
}

/* -----------------------------------------------------------------
   6. HEADER
   ----------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out);
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 96%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: var(--s-5);
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* Logo — bắt buộc giữ tỷ lệ gốc */
.logo-img {
  width: auto;
  height: 42px;
  max-width: 190px;
  object-fit: contain;
  display: block;
}

.primary-nav { display: none; }
@media (min-width: 1080px) {
  .primary-nav { display: block; flex: 1; }
  .primary-nav ul {
    display: flex;
    justify-content: center;
    gap: var(--s-6);
  }
  .primary-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg-soft);
    padding: 8px 0;
    position: relative;
  }
  .primary-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--c-red);
    transition: width var(--dur-1) var(--ease-out);
  }
  .primary-nav a:hover { color: var(--fg); }
  .primary-nav a:hover::after { width: 100%; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

/* Language switcher */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.lang-btn {
  color: var(--fg-mute);
  padding: 6px 4px;
  transition: color var(--dur-1) var(--ease-out);
}
.lang-btn.is-active { color: var(--c-red); }
.lang-btn:hover { color: var(--fg); }
.lang-divider { color: var(--fg-mute); opacity: .5; }

/* Theme toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--fg-soft);
  transition: border-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}
.theme-toggle:hover {
  border-color: var(--c-red);
  color: var(--c-red);
}
.theme-icon { position: absolute; inset: 0; display: inline-flex; align-items: center; justify-content: center; transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out); }
[data-theme="light"] .theme-icon-sun  { opacity: 1; transform: scale(1); }
[data-theme="light"] .theme-icon-moon { opacity: 0; transform: scale(.6); }
[data-theme="dark"]  .theme-icon-sun  { opacity: 0; transform: scale(.6); }
[data-theme="dark"]  .theme-icon-moon { opacity: 1; transform: scale(1); }

/* Mobile menu trigger */
.menu-trigger {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.menu-line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--fg);
  transition: transform var(--dur-1) var(--ease-out), opacity var(--dur-1) var(--ease-out);
}
.menu-trigger[aria-expanded="true"] .menu-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-trigger[aria-expanded="true"] .menu-line:nth-child(2) { opacity: 0; }
.menu-trigger[aria-expanded="true"] .menu-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 1080px) {
  .menu-trigger { display: none; }
}

/* Mobile fullscreen menu */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-out), visibility var(--dur-1);
  overflow-y: auto;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu-inner {
  padding: var(--s-7) 0 var(--s-9);
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));
}
.mobile-menu nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.mobile-menu nav a {
  display: block;
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--line);
}
.mobile-menu-footer {
  margin-top: auto;
  padding-top: var(--s-6);
  color: var(--fg-mute);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -----------------------------------------------------------------
   7. BUTTONS
   ----------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: 14px 24px;
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--r-2);
  border: 1px solid transparent;
  position: relative;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out);
  white-space: nowrap;
}
.btn::after {
  content: "→";
  font-family: var(--f-mono);
  transition: transform var(--dur-1) var(--ease-out);
}
.btn:hover::after { transform: translateX(3px); }

.btn-primary {
  background: var(--c-red);
  color: var(--c-white);
  border-color: var(--c-red);
}
.btn-primary:hover {
  background: var(--c-red-deep);
  color: var(--c-white);
  border-color: var(--c-red-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--fg);
  color: var(--fg);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-red);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur-1) var(--ease-out);
}
.link-arrow:hover { border-bottom-color: var(--c-red); color: var(--c-red); }

/* -----------------------------------------------------------------
   8. HERO
   ----------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--s-9) 0 var(--s-9);
}
@media (min-width: 960px) {
  .hero { padding: var(--s-11) 0 var(--s-9); }
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-visual-placeholder {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(168, 35, 28, 0.15), transparent 55%),
    radial-gradient(ellipse at 30% 80%, rgba(20, 38, 78, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
[data-theme="dark"] .hero-visual-placeholder {
  background:
    radial-gradient(ellipse at 75% 30%, rgba(168, 35, 28, 0.30), transparent 55%),
    radial-gradient(ellipse at 30% 80%, rgba(20, 38, 78, 0.55), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}
.placeholder-veil {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg,
      transparent 0,
      transparent 79px,
      var(--grid-line) 79px,
      var(--grid-line) 80px);
  opacity: .6;
  mask-image: linear-gradient(180deg, transparent 0%, black 30%, black 70%, transparent 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-narrow);
}

.hero-meta {
  display: flex;
  align-items: center;
  margin-bottom: var(--s-6);
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
}

.hero-title {
  font-size: clamp(40px, 8.6vw, 128px);
  font-weight: 700;
  /* Line-height tăng để chứa descender + dấu thanh tiếng Việt (g/y/p/q + ́ ̀ ̂ ̃) */
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: var(--s-6);
  /* Cho phép xuống dòng nếu từ quá dài trên màn hình hẹp */
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
}
.hero-title-line {
  display: block;
  /* KHÔNG dùng overflow:hidden — sẽ cắt đuôi 'g', 'y' trong tiếng Việt */
  padding-bottom: 0.04em;
}
.hero-title-line.accent { color: var(--c-red); }
:lang(ja) .hero-title { font-size: clamp(32px, 6vw, 92px); letter-spacing: -0.02em; line-height: 1.18; }

/* Mobile (≤480px): scale font hero, đảm bảo "Toả sáng" / "từ nền móng." nằm gọn 1 dòng */
@media (max-width: 480px) {
  .hero-title { font-size: clamp(36px, 11vw, 56px); line-height: 1.08; }
}

.hero-sub {
  max-width: 56ch;
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--fg-soft);
  margin-bottom: var(--s-7);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-bottom: var(--s-8);
}

.hero-spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
  padding-top: var(--s-5);
  font-size: 12px;
  width: 100%;
  max-width: 100%;
}
@media (min-width: 760px) {
  .hero-spec { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hero-spec li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  word-break: break-word;
}
.hero-spec .k {
  color: var(--fg-mute);
  letter-spacing: 0.12em;
  font-size: 10.5px;
  text-transform: uppercase;
}
.hero-spec .v { color: var(--fg); }

.hero-scroll-cue {
  position: absolute;
  bottom: var(--s-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-mute);
}

/* -----------------------------------------------------------------
   9. ABOUT
   ----------------------------------------------------------------- */
.about .col-left { position: sticky; top: calc(var(--header-h) + var(--s-5)); }
@media (max-width: 959px) { .about .col-left { position: static; } }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-5);
  margin-top: var(--s-7);
  border-top: 1px solid var(--line);
  padding-top: var(--s-6);
}
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat { display: flex; flex-direction: column; gap: var(--s-2); }
.stat-num {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
  color: var(--c-red);
  letter-spacing: -0.02em;
  font-feature-settings: "tnum" 1;
}
.stat-label {
  font-size: 12px;
  color: var(--fg-soft);
  letter-spacing: 0.04em;
}

/* -----------------------------------------------------------------
   10. PROMISE
   ----------------------------------------------------------------- */
.promise { background: var(--bg-alt); }
[data-theme="dark"] .promise { background: var(--bg-alt); }

.promise-head {
  max-width: 80ch;
  margin: 0 auto var(--s-8);
  text-align: center;
}
.promise-head .section-eyebrow { padding-left: 0; }
.promise-head .section-eyebrow::before { display: none; }
.promise-head .section-title { margin-left: auto; margin-right: auto; max-width: 28ch; }

.promise-cards {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: 1fr;
}
@media (min-width: 880px) {
  .promise-cards { grid-template-columns: repeat(3, 1fr); }
}

.proof-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  padding: var(--s-7) var(--s-6) var(--s-6);
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.proof-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 1px;
  background: var(--c-red);
}
.proof-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 32px;
  background: var(--c-red);
}
.proof-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}
.proof-icon {
  width: 56px;
  height: 56px;
  color: var(--c-red);
  margin-bottom: var(--s-5);
}
.proof-index {
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: var(--s-3);
}
.proof-title {
  font-size: 24px;
  margin-bottom: var(--s-3);
}
.proof-text {
  color: var(--fg-soft);
  font-size: 15px;
  margin: 0;
}

/* -----------------------------------------------------------------
   11. CAPABILITIES
   ----------------------------------------------------------------- */
.cap-grid {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
@media (min-width: 880px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
}
.cap-card {
  position: relative;
  padding: var(--s-7) var(--s-6);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background var(--dur-1) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.cap-card:hover { background: var(--bg-deep); }
.cap-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 2px;
  background: var(--c-red);
  transition: width var(--dur-2) var(--ease-out);
}
.cap-card:hover::before { width: 100%; }
.cap-card header {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
}
.cap-num {
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.12em;
}
.cap-title { font-size: clamp(20px, 1.8vw, 26px); }
.cap-card p { color: var(--fg-soft); margin: 0; font-size: 15px; }
.cap-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: auto;
  padding-top: var(--s-4);
  border-top: 1px dashed var(--line);
  font-size: 11px;
  color: var(--fg-soft);
}
.cap-points li {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-1);
}

/* -----------------------------------------------------------------
   12. FACTORY
   ----------------------------------------------------------------- */
.factory { background: var(--bg-deep); }

.factory-image-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 25% 35%, rgba(168, 35, 28, 0.15), transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(20, 38, 78, 0.20), transparent 50%),
    linear-gradient(135deg, var(--c-pearl-2), var(--c-pearl));
  border: 1px solid var(--line);
  overflow: hidden;
}
[data-theme="dark"] .factory-image-placeholder {
  background:
    radial-gradient(circle at 25% 35%, rgba(168, 35, 28, 0.30), transparent 50%),
    radial-gradient(circle at 75% 65%, rgba(20, 38, 78, 0.5), transparent 55%),
    linear-gradient(135deg, #0F1A30, #0A1220);
}
.placeholder-meta {
  position: absolute;
  left: var(--s-5);
  bottom: var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  font-size: 11px;
  color: var(--fg-soft);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.factory-spec {
  margin-top: var(--s-5);
  border: 1px solid var(--line);
  background: var(--card-bg);
  padding: var(--s-4) var(--s-5);
}
.spec-row {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px dashed var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: var(--fg-mute); letter-spacing: 0.1em; text-transform: uppercase; font-size: 10.5px; }
.spec-row .v { color: var(--fg); }

.process-timeline {
  display: flex;
  flex-direction: column;
  margin-top: var(--s-5);
  counter-reset: step;
  border-left: 1px solid var(--line);
}
.process-timeline li {
  position: relative;
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-7);
}
.process-timeline li + li { border-top: 1px solid var(--line); }
.process-timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: var(--s-6);
  width: 9px;
  height: 9px;
  background: var(--c-red);
  border-radius: 50%;
}
.process-timeline .step-num {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--fg-mute);
  margin-bottom: var(--s-2);
}
.process-timeline h4 {
  font-size: 17px;
  margin-bottom: 4px;
}
.process-timeline p { font-size: 14px; color: var(--fg-soft); margin: 0; }

/* -----------------------------------------------------------------
   13. PRODUCTS
   ----------------------------------------------------------------- */
.prod-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}

.prod-card {
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  display: flex;
  flex-direction: column;
  transition: border-color var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
  overflow: hidden;
}
.prod-card:hover {
  border-color: var(--c-red);
  transform: translateY(-3px);
}

.product-image-placeholder,
.prod-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at center, rgba(168, 35, 28, 0.10), transparent 60%),
    linear-gradient(135deg, var(--c-pearl-2), var(--c-pearl));
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
[data-theme="dark"] .product-image-placeholder {
  background:
    radial-gradient(circle at center, rgba(168, 35, 28, 0.20), transparent 60%),
    linear-gradient(135deg, #0F1A30, #0A1220);
}
.product-image-placeholder::after {
  content: attr(data-product);
  position: absolute;
  right: var(--s-3);
  bottom: var(--s-3);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-mute);
  opacity: .8;
}

.prod-body {
  padding: var(--s-5) var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  flex: 1;
}
.prod-cat {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-red);
}
.prod-card h3 { font-size: 20px; }
.prod-card p { font-size: 14px; color: var(--fg-soft); margin: 0; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: var(--s-2);
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-weight: 400;
}
.spec-table th { color: var(--fg-mute); letter-spacing: 0.06em; width: 38%; }
.spec-table td { color: var(--fg); }
.spec-table tr:last-child th,
.spec-table tr:last-child td { border-bottom: 0; }

/* -----------------------------------------------------------------
   14. PROJECTS
   ----------------------------------------------------------------- */
.projects { background: var(--bg-alt); }

.proj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .proj-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .proj-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .proj-grid > .proj-card { grid-column: span 2; }
  .proj-grid > .proj-card--wide { grid-column: span 6; }
}

.proj-card {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--card-line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.proj-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }

.project-night-placeholder,
.proj-image {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(ellipse at 30% 70%, rgba(232, 155, 60, 0.18), transparent 50%),
    radial-gradient(circle at 70% 40%, rgba(168, 35, 28, 0.18), transparent 60%),
    linear-gradient(180deg, #0E1626 0%, #060B17 100%);
  border-bottom: 1px solid var(--line-strong);
  overflow: hidden;
}
.project-night-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(180deg,
      transparent 0,
      transparent 39px,
      rgba(255, 255, 255, 0.04) 39px,
      rgba(255, 255, 255, 0.04) 40px);
}
.project-night-placeholder::after {
  /* Tia ánh sáng đường */
  content: "";
  position: absolute;
  left: 18%;
  bottom: 6%;
  width: 64%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 155, 60, .7), transparent);
  filter: blur(.4px);
  box-shadow: 0 0 24px rgba(232, 155, 60, .4);
}

.proj-body {
  padding: var(--s-5) var(--s-5) var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.proj-cat {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-red);
}
.proj-card h3 { font-size: 22px; }
.proj-card p { font-size: 14px; color: var(--fg-soft); margin: 0; }
.proj-loc {
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: auto;
  padding-top: var(--s-3);
  border-top: 1px dashed var(--line);
}

/* -----------------------------------------------------------------
   15. QUALITY SYSTEM
   ----------------------------------------------------------------- */
.check-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
}
@media (min-width: 720px) {
  .check-list { grid-template-columns: repeat(2, 1fr); }
}
.check-list li {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--line);
  background: var(--card-bg);
  transition: border-color var(--dur-1) var(--ease-out);
}
.check-list li:hover { border-color: var(--line-strong); }
.chk {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid var(--c-red);
  color: var(--c-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 12px;
}
.check-list h4 { font-size: 16px; margin-bottom: 4px; }
.check-list p { font-size: 13px; color: var(--fg-soft); margin: 0; }

/* -----------------------------------------------------------------
   16. ESG
   ----------------------------------------------------------------- */
.esg { background: var(--bg-deep); }
.esg-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
@media (min-width: 720px) {
  .esg-cards { grid-template-columns: repeat(2, 1fr); }
}
.esg-card {
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.esg-tag {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-green);
  border-left: 2px solid var(--c-green);
  padding-left: 8px;
  align-self: flex-start;
}
.esg-card h4 { font-size: 18px; margin-top: 4px; }
.esg-card p { font-size: 14px; color: var(--fg-soft); margin: 0; }

/* -----------------------------------------------------------------
   17. APH ENDORSEMENT
   ----------------------------------------------------------------- */
.endorsement {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  position: relative;
  overflow: hidden;
}
.endorsement::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(199, 205, 215, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(199, 205, 215, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  pointer-events: none;
}
.endorsement .lead.inverse { color: rgba(231, 230, 225, 0.85); }
.endorsement .inverse { color: var(--inverse-fg); }

.endorsement-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(231, 230, 225, 0.12);
  padding: var(--s-6);
  position: relative;
}
.endorsement-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 36px; height: 1px;
  background: var(--c-red);
}
.end-mark {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--c-red);
  margin-bottom: var(--s-4);
}
.end-meta { display: flex; flex-direction: column; gap: var(--s-3); }
.end-meta li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: var(--s-3);
  border-bottom: 1px dashed rgba(231, 230, 225, 0.16);
}
.end-meta li:last-child { border-bottom: 0; padding-bottom: 0; }
.end-meta .k {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(231, 230, 225, 0.55);
  text-transform: uppercase;
}
.end-meta .v {
  font-size: 15px;
  color: var(--inverse-fg);
}
.end-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--s-5);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(231, 230, 225, 0.16);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-pearl);
  width: 100%;
  transition: color var(--dur-1) var(--ease-out);
}
.end-link:hover { color: var(--c-red); }

.footer-aph-link {
  display: inline-flex;
  align-items: center;
  margin-top: var(--s-3);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--c-red);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color var(--dur-1) var(--ease-out);
}
.footer-aph-link:hover { border-bottom-color: var(--c-red); color: var(--c-red); }

/* -----------------------------------------------------------------
   18. CONTACT
   ----------------------------------------------------------------- */
.contact-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--card-line);
  padding: var(--s-6);
}
.contact-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}
@media (min-width: 720px) {
  .contact-list { grid-template-columns: 1fr 1fr; }
}
.contact-list > div {
  padding: var(--s-3) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px dashed var(--line);
}
.contact-list dt {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-mute);
}
.contact-list dd {
  margin: 0;
  font-size: 14px;
  color: var(--fg);
}
.contact-list a:hover { color: var(--c-red); }

/* -----------------------------------------------------------------
   19. FOOTER
   ----------------------------------------------------------------- */
.site-footer {
  background: var(--inverse-bg);
  color: var(--inverse-fg);
  padding: var(--s-9) 0 var(--s-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-7);
  padding-bottom: var(--s-7);
  border-bottom: 1px solid rgba(231, 230, 225, 0.10);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand .logo-img {
  /* KHÔNG dùng filter brightness/invert — logo gốc có nền trắng sẽ thành 1 khối trắng.
     Thay bằng phiên bản logo dành riêng cho nền tối: assets/logo-aplico-white.png */
  height: 56px;
  max-width: 220px;
  margin-bottom: var(--s-4);
  opacity: 1;
}
.footer-tagline {
  font-family: var(--f-display);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: var(--s-3);
  color: var(--c-pearl);
}
.footer-endorsement {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(231, 230, 225, 0.55);
  text-transform: uppercase;
  max-width: 32ch;
}

.footer-col h5 {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: rgba(231, 230, 225, 0.5);
  text-transform: uppercase;
  margin-bottom: var(--s-3);
}
.footer-col ul li {
  padding: 6px 0;
  font-size: 13px;
  color: rgba(231, 230, 225, 0.85);
}
.footer-col a:hover { color: var(--c-red); }
.footer-contact li { line-height: 1.6; }

.footer-bottom {
  padding-top: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-size: 11px;
  color: rgba(231, 230, 225, 0.45);
  letter-spacing: 0.06em;
}
@media (min-width: 720px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* -----------------------------------------------------------------
   20. SCROLL REVEAL
   ----------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-2) var(--ease-out);
}
.reveal-stagger.is-visible > * {
  opacity: 1;
  transform: none;
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 80ms; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 400ms; }

/* Mobile: animation nhẹ hơn */
@media (max-width: 720px) {
  .reveal { transform: translateY(10px); }
  .reveal-stagger > * { transform: translateY(8px); }
  .light-axis { animation: none; opacity: .55; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .light-axis { animation: none; }
}

/* -----------------------------------------------------------------
   21. RESPONSIVE FINE-TUNING
   ----------------------------------------------------------------- */
@media (max-width: 720px) {
  .logo-img {
    height: 34px;
    max-width: 155px;
  }
  .logo-img--footer {
    height: 48px;
    max-width: 200px;
  }
  .header-actions { gap: var(--s-2); }
  .lang-switch { font-size: 11px; }
  /* Mobile section padding nhỏ hơn để tránh nội dung dài bị bóp */
  .container { padding: 0 var(--s-4); }
  .section-title { word-break: normal; overflow-wrap: break-word; }
  .lead, p { word-break: normal; overflow-wrap: break-word; }
  /* Hero spec strip — gọn lại trên iPhone narrow */
  .hero-spec { gap: var(--s-3); font-size: 11.5px; }
  .hero-spec .v { font-size: 13px; }
}

/* iPhone rất hẹp (≤380px) */
@media (max-width: 380px) {
  .header-actions .lang-divider { display: none; }
  .lang-switch { gap: 2px; }
  .lang-btn { padding: 6px 2px; }
}

@media (min-width: 1600px) {
  :root { --container: 1380px; }
  .hero-title { font-size: clamp(56px, 8vw, 144px); }
}
