/* ==========================================================================
   UAV & AI — QUẢN LÝ TRẬT TỰ ĐÔ THỊ
   Hướng nghệ thuật: "kỹ thuật chính xác, sức nặng công vụ"
   Nền giấy ấm ↔ mực đêm · accent đỏ son · Be Vietnam Pro + Space Grotesk
   ========================================================================== */

:root {
  /* Màu */
  --paper:      #f5f2ec;
  --paper-2:    #ecE8df;
  --ink:        #141a24;
  --ink-2:      #39424f;
  --mute:       #5f6673;
  --line:       rgba(20, 26, 36, .14);
  --line-soft:  rgba(20, 26, 36, .08);
  --accent:     #b3271a;      /* đỏ son — chữ trên nền giấy, đạt AA */
  --accent-hi:  #d63a24;      /* đỏ tươi — khối màu, đường kẻ */
  --night:      #0c111c;
  --night-2:    #121a2a;
  --night-line: rgba(233, 230, 221, .16);
  --night-ink:  #ece9e1;
  --night-mute: #9aa3b2;
  --flight:     #e0a44e;      /* hổ phách — đường bay trên nền đêm */

  /* Chữ */
  --f-body: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-data: "Space Grotesk", "Be Vietnam Pro", ui-monospace, monospace;

  /* Nhịp */
  --ease: cubic-bezier(.22,.61,.36,1);
  --wrap: 1180px;
  --gut: clamp(18px, 4.5vw, 48px);
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:target { scroll-margin-top: 84px; }
section[id] { scroll-margin-top: 68px; }

::selection { background: var(--accent-hi); color: #fff; }

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }

/* Nhãn kỹ thuật */
.kicker {
  font-family: var(--f-data);
  font-size: .74rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .8em;
  margin-bottom: 1.1em;
}
.kicker::before {
  content: "";
  width: 2.2em; height: 2px;
  background: var(--accent-hi);
  flex: none;
}
.on-night .kicker { color: var(--flight); }
.on-night .kicker::before { background: var(--flight); }

.sec-num {
  font-family: var(--f-data);
  font-weight: 500;
  color: var(--mute);
  letter-spacing: .12em;
}

h2.sec-title {
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -.02em;
  max-width: 22ch;
  margin-bottom: .4em;
}
.sec-lead { color: var(--ink-2); max-width: 62ch; font-size: 1.04rem; }

/* ---------- Điều hướng ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 17, 28, .92);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  backdrop-filter: saturate(140%) blur(8px);
  color: var(--night-ink);
  border-bottom: 1px solid var(--night-line);
}
.topnav .bar {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-data);
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}
.brand svg { width: 26px; height: 26px; color: var(--flight); flex: none; }
.brand b { color: #fff; font-weight: 700; }
.brand span { color: var(--night-mute); font-weight: 500; }
.topnav nav {
  margin-left: auto;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.topnav nav::-webkit-scrollbar { display: none; }
.topnav nav a {
  font-family: var(--f-data);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--night-mute);
  padding: 8px 11px;
  border-radius: 3px;
  white-space: nowrap;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.topnav nav a:hover { color: #fff; }
.topnav nav a.active { color: var(--flight); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(224, 164, 78, .10), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night-2) 100%);
  color: var(--night-ink);
  overflow: hidden;
}
.hero .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(233,230,221,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,230,221,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, #000 20%, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 90%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  padding-top: clamp(56px, 9vw, 110px);
  padding-bottom: clamp(40px, 6vw, 72px);
  display: grid;
  grid-template-columns: minmax(0, 7.2fr) minmax(0, 4.8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.05rem, 5.6vw, 3.9rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.025em;
  margin: 0 0 .45em;
  color: #fff;
  max-width: 17ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--flight);
}
.hero .tagline {
  color: var(--night-mute);
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  max-width: 54ch;
  margin-bottom: 1.8em;
}
.hero .tagline strong { color: var(--night-ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--f-data);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 3px;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn svg { width: 15px; height: 15px; transform: translateY(1px); }
.btn-primary { background: var(--accent-hi); color: #fff; }
.btn-primary:hover { background: #e8492f; transform: translateY(-2px); }
.btn-demo {
  font-size: 1.05rem;
  padding: 18px 40px;
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(232, 73, 47, .45);
  animation: demo-pulse 2.2s var(--ease) infinite;
}
.btn-demo svg { width: 19px; height: 19px; }
.btn-demo:hover { animation-play-state: paused; box-shadow: 0 10px 32px rgba(232, 73, 47, .6); }
@keyframes demo-pulse {
  0%, 100% { box-shadow: 0 6px 24px rgba(232, 73, 47, .45); }
  50% { box-shadow: 0 6px 34px rgba(232, 73, 47, .75); }
}
@media (prefers-reduced-motion: reduce) { .btn-demo { animation: none; } }
.btn-ghost { color: var(--night-ink); box-shadow: inset 0 0 0 1px var(--night-line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--flight); color: var(--flight); transform: translateY(-2px); }

.hero-art { position: relative; min-width: 0; }
.hero-art svg { display: block; width: 100%; }

/* Dải số liệu */
.stat-strip {
  position: relative;
  border-top: 1px solid var(--night-line);
  background: rgba(255,255,255,.02);
}
.stat-strip .wrap {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-block: 0;
}
.stat {
  padding: 22px 18px 20px 0;
  border-left: 1px solid var(--night-line);
  padding-left: 18px;
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num {
  font-family: var(--f-data);
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
  line-height: 1.1;
  white-space: nowrap;
}
.stat .num sub, .stat .num .unit {
  font-size: .52em;
  font-weight: 500;
  color: var(--flight);
  letter-spacing: 0;
}
.stat .lbl {
  font-size: .78rem;
  color: var(--night-mute);
  margin-top: 4px;
  line-height: 1.45;
}

/* ---------- Khối section chung ---------- */
.sec { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { margin-bottom: clamp(30px, 4.5vw, 52px); }
.sec-tight { padding-block: clamp(52px, 7vw, 92px); }

.on-night { background: linear-gradient(180deg, var(--night-2), var(--night)); color: var(--night-ink); }
.on-night h2.sec-title { color: #fff; }
.on-night .sec-lead { color: var(--night-mute); }
.on-night .sec-num { color: var(--night-mute); }

.alt-bg { background: var(--paper-2); }

/* ---------- 01 · Vấn đề ---------- */
.problems {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}
.problem {
  padding: 26px 34px 26px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
}
.problem:nth-child(odd) { border-right: 1px solid var(--line); }
.problem:nth-child(even) { padding-left: 34px; padding-right: 0; }
.problem .idx {
  font-family: var(--f-data);
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent);
  padding-top: 3px;
}
.problem h3 { font-size: 1.13rem; font-weight: 700; margin-bottom: .35em; }
.problem p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.pull-conclusion {
  margin-top: clamp(28px, 4vw, 44px);
  padding-left: clamp(18px, 3vw, 28px);
  border-left: 3px solid var(--accent-hi);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  font-weight: 600;
  line-height: 1.5;
  max-width: 46ch;
}
.pull-conclusion .note { display: block; font-weight: 400; font-size: .8em; color: var(--mute); margin-top: .6em; }

/* ---------- 02 · Kiến trúc — sơ đồ SVG ---------- */
.diagram-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  background: #fbfaf7;
  border-radius: 6px;
  padding: clamp(10px, 2vw, 28px);
}
.diagram-scroll svg { display: block; min-width: 640px; margin-inline: auto; }
.diagram-hint {
  font-family: var(--f-data); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mute); margin-top: 10px;
}
@media (min-width: 760px) { .diagram-hint { display: none; } }

.arch-notes {
  margin-top: clamp(26px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 36px);
}
.arch-note { border-top: 2px solid var(--ink); padding-top: 14px; }
.arch-note h3 { font-size: .98rem; font-weight: 700; }
.arch-note p { font-size: .9rem; color: var(--ink-2); margin: 0; }

/* ---------- 03 · Một ngày vận hành ---------- */
.timeline { position: relative; margin-top: 8px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--line);
}
.tl-item {
  position: relative;
  padding: 0 0 34px 44px;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 28px;
}
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--accent-hi);
}
.tl-time {
  font-family: var(--f-data);
  font-weight: 700;
  font-size: .84rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 3px;
}
.tl-body h3 { font-size: 1.06rem; font-weight: 700; margin-bottom: .25em; }
.tl-body p { color: var(--ink-2); font-size: .93rem; margin: 0 0 .6em; }
.tl-out {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--f-data);
  font-size: .76rem; font-weight: 500;
  letter-spacing: .06em;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 13px;
}
.tl-out::before { content: "→"; color: var(--accent); font-weight: 700; }

/* ---------- 04 · Ba khối AI ---------- */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
.ai-card { border-top: 3px solid var(--accent-hi); padding-top: 20px; }
.ai-card .glyph {
  width: 52px; height: 52px;
  color: var(--ink);
  margin-bottom: 16px;
}
.ai-card h3 { font-size: 1.18rem; font-weight: 800; letter-spacing: -.01em; }
.ai-card .method {
  font-family: var(--f-data);
  font-size: .72rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9em;
}
.ai-card p { font-size: .93rem; color: var(--ink-2); }
.ai-card ul { margin: 0; padding-left: 1.15em; font-size: .9rem; color: var(--ink-2); }
.ai-card li { margin-bottom: .35em; }
.ai-foot {
  margin-top: clamp(26px, 4vw, 40px);
  padding: 18px 22px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  color: var(--ink-2);
  font-size: .93rem;
  max-width: 72ch;
}
.ai-foot b { color: var(--ink); }

/* ---------- 05 · Ma trận điều phối (nền đêm) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 6px; border: 1px solid var(--night-line); }
table.matrix {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: .88rem;
  background: rgba(255,255,255,.02);
}
table.matrix th, table.matrix td {
  padding: 15px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--night-line);
}
table.matrix thead th {
  font-family: var(--f-data);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--flight);
  border-bottom: 1px solid rgba(224,164,78,.4);
  white-space: nowrap;
}
table.matrix tbody tr:last-child td { border-bottom: 0; }
table.matrix td:first-child { font-weight: 700; color: #fff; min-width: 170px; }
table.matrix td { color: var(--night-mute); }
table.matrix ul { margin: 0; padding-left: 1.1em; }
table.matrix li { margin-bottom: .3em; }
table.matrix li::marker { color: var(--flight); }

.prio-row {
  margin-top: clamp(26px, 4vw, 42px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2.5vw, 26px);
}
.prio {
  border: 1px solid var(--night-line);
  border-radius: 6px;
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.prio::before {
  content: "";
  position: absolute; inset: 0 auto 0 0;
  width: 4px;
}
.prio-urgent::before { background: var(--accent-hi); }
.prio-high::before { background: var(--flight); }
.prio-normal::before { background: var(--night-mute); }
.prio .tag {
  font-family: var(--f-data);
  font-size: .72rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
}
.prio-urgent .tag { color: #ff6a52; }
.prio-high .tag { color: var(--flight); }
.prio-normal .tag { color: var(--night-mute); }
.prio .sla {
  font-family: var(--f-data);
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  margin: 6px 0 8px;
  letter-spacing: -.01em;
}
.prio p { font-size: .85rem; color: var(--night-mute); margin: 0; }
.esc-note { margin-top: 20px; font-size: .88rem; color: var(--night-mute); max-width: 70ch; }
.esc-note b { color: var(--night-ink); }

/* ---------- 06 · Tần suất bay ---------- */
.freq-list { border-top: 1px solid var(--line); }
.freq-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 10px 28px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.freq-row .f-name { font-family: var(--f-data); font-weight: 700; font-size: .95rem; }
.f-delay { display: flex; align-items: center; gap: 12px; min-width: 0; }
.f-bar {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-hi), #e2604a);
  flex: none;
}
.f-delay .val { font-family: var(--f-data); font-size: .82rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.freq-row .f-stage { font-size: .9rem; color: var(--ink-2); }
.freq-row.best .f-name { color: var(--accent); }
.freq-punch {
  margin-top: clamp(26px, 4vw, 40px);
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  font-weight: 600;
  max-width: 52ch;
  line-height: 1.55;
}
.freq-punch em { font-style: normal; color: var(--accent); }

/* ---------- 07 · So sánh ---------- */
table.compare {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: .9rem;
}
.table-scroll.light { border-color: var(--line); background: #fbfaf7; }
table.compare th, table.compare td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
table.compare thead th {
  font-family: var(--f-data);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--mute);
  white-space: nowrap;
}
table.compare td:first-child {
  font-weight: 600; color: var(--ink); white-space: nowrap;
  font-size: .85rem;
}
table.compare td { color: var(--ink-2); }
table.compare .win {
  background: rgba(214, 58, 36, .05);
  border-left: 1px solid rgba(214, 58, 36, .25);
  color: var(--ink);
}
table.compare thead .win {
  color: var(--accent);
  border-top: 3px solid var(--accent-hi);
}
table.compare tbody tr:last-child td { border-bottom: 0; }

/* ---------- 08 · Mở rộng ---------- */
.expand-principle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.5vw, 30px);
  margin-bottom: clamp(30px, 4vw, 48px);
}
.exp-step {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px;
}
.exp-step .n {
  font-family: var(--f-data); font-weight: 700; color: var(--accent);
  font-size: .8rem; letter-spacing: .1em;
}
.exp-step h3 { font-size: 1rem; margin: .3em 0 .3em; }
.exp-step p { font-size: .87rem; color: var(--ink-2); margin: 0; }

.expand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 36px); }
.exp-card { border-top: 2px solid var(--ink); padding-top: 16px; }
.exp-card .glyph { width: 40px; height: 40px; color: var(--accent); margin-bottom: 10px; }
.exp-card h3 { font-size: 1.05rem; font-weight: 700; }
.exp-card p { font-size: .9rem; color: var(--ink-2); margin-bottom: .5em; }
.exp-card .to {
  font-family: var(--f-data); font-size: .74rem; letter-spacing: .08em;
  color: var(--mute);
}
.exp-more { margin-top: clamp(24px, 3.5vw, 36px); color: var(--ink-2); font-size: .93rem; max-width: 74ch; }
.exp-more b { color: var(--ink); }

/* ---------- 09 · Rủi ro ---------- */
.risk-list { border-top: 1px solid var(--line); }
.risk-list details { border-bottom: 1px solid var(--line); }
.risk-list summary {
  cursor: pointer;
  list-style: none;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  font-weight: 700;
  font-size: 1rem;
  transition: color .2s var(--ease);
}
.risk-list summary::-webkit-details-marker { display: none; }
.risk-list summary:hover { color: var(--accent); }
.risk-list summary .rn {
  font-family: var(--f-data); font-weight: 500;
  color: var(--mute); font-size: .82rem;
}
.risk-list summary .chev {
  width: 18px; height: 18px; color: var(--mute);
  transition: transform .25s var(--ease);
  flex: none;
}
.risk-list details[open] summary { color: var(--accent); }
.risk-list details[open] .chev { transform: rotate(180deg); }
.risk-body {
  padding: 0 4px 20px 44px;
  color: var(--ink-2);
  font-size: .93rem;
  max-width: 78ch;
}
.risk-body b { color: var(--ink); }

/* ---------- Footer ---------- */
footer.site {
  background: var(--night);
  color: var(--night-mute);
  border-top: 1px solid var(--night-line);
}
footer.site .wrap {
  padding-block: clamp(44px, 6vw, 72px) 34px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
}
.foot-brand { display: flex; gap: 14px; align-items: flex-start; }
.foot-brand svg { width: 40px; height: 40px; color: var(--flight); flex: none; }
.foot-brand h3 { color: #fff; font-size: 1.05rem; margin-bottom: .3em; letter-spacing: -.01em; }
.foot-brand p { font-size: .87rem; margin: 0; }
footer.site h4 {
  font-family: var(--f-data);
  font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--flight);
  margin-bottom: 1em;
}
footer.site dl { margin: 0; font-size: .89rem; }
footer.site dt { color: var(--night-mute); font-size: .76rem; letter-spacing: .06em; text-transform: uppercase; font-family: var(--f-data); }
footer.site dd { margin: 2px 0 14px; color: var(--night-ink); }
.foot-bottom {
  border-top: 1px solid var(--night-line);
}
.foot-bottom .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  justify-content: space-between;
  padding-block: 18px;
  font-family: var(--f-data);
  font-size: .74rem;
  letter-spacing: .08em;
  color: var(--night-mute);
}

/* ---------- Drone lơ lửng ---------- */
@keyframes drone-hover {
  from { transform: translateY(0); }
  to   { transform: translateY(-8px); }
}
.drone-float { animation: drone-hover 2.6s var(--ease) infinite alternate; }

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--rd, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; }
  .stat-strip .wrap { grid-template-columns: repeat(3, 1fr); }
  .stat:nth-child(4) { border-left: 0; padding-left: 0; }
  .stat { padding-block: 16px; }
  .ai-grid, .expand-grid, .expand-principle { grid-template-columns: 1fr 1fr; }
  footer.site .wrap { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .problems { grid-template-columns: 1fr; }
  .problem, .problem:nth-child(even) { padding-inline: 0; border-right: 0 !important; }
  .tl-item { grid-template-columns: 1fr; gap: 4px; }
  .arch-notes { grid-template-columns: 1fr; }
  .ai-grid, .expand-grid, .expand-principle { grid-template-columns: 1fr; }
  .prio-row { grid-template-columns: 1fr; }
  .freq-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 0; }
  .stat-strip .wrap { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(4) { border-left: 1px solid var(--night-line); padding-left: 18px; }
  .stat:nth-child(5) { border-left: 0; padding-left: 0; }
  footer.site .wrap { grid-template-columns: 1fr; }
  .risk-body { padding-left: 4px; }
}

/* ---------- Thiết bị bay · mô hình 3D ---------- */
.uav3d-band {
  background: #0c111c;
  color: var(--night-ink);
}
.uav3d-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.uav3d-stage { min-width: 0; }
.uav3d-stage iframe {
  width: 100%;
  height: clamp(320px, 42vw, 520px);
  border: 0;
  display: block;
  background: #0c111c;
  border-radius: 10px;
}
.uav3d-hint {
  font-family: var(--f-data);
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--flight);
}
.uav3d-credit { font-size: .7rem; color: var(--night-mute); margin: 6px 2px 0; }
.uav3d-credit a { color: var(--night-mute); }
@media (max-width: 860px) {
  .uav3d-grid { grid-template-columns: 1fr; }
  .uav3d-stage iframe { height: 320px; }
}

.uav3d-stage model-viewer {
  width: 100%;
  height: clamp(320px, 42vw, 520px);
  display: block;
  background: transparent;
  --poster-color: transparent;
}
@media (max-width: 860px) { .uav3d-stage model-viewer { height: 320px; } }
