/* ============ Ngũ Ấn Ký: Ấn Vỡ — landing ============ */
:root {
  --bg: #0a0806;
  --bg-alt: #0e0b08;
  --panel: #141009;
  --panel-2: #1a140b;
  --line: rgba(216, 161, 60, .16);
  --line-strong: rgba(216, 161, 60, .38);
  --text: #ece4d3;
  --muted: #b3a68c;
  --gold: #d8a13c;
  --gold-bright: #f0bc55;
  --gold-deep: #8a6420;
  --hoa: #e6512e;
  --thuy: #3f8ce0;
  --phong: #43b56c;
  --loi: #9a5cea;
  --tho: #d29a35;
  --radius: 14px;
  --container: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-bright); text-decoration: none; }
ul, ol { list-style: none; }
b, strong { color: var(--text); }
.container { max-width: var(--container); margin: 0 auto; padding: 0 22px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: .01em;
  margin: .35em 0 .55em;
}
h3 { font-weight: 700; }
.kicker {
  color: var(--gold);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .22em;
}
.kicker::before { content: "❖ "; color: var(--gold-deep); }
.section { padding: 88px 0; position: relative; }
.section-alt { background: var(--bg-alt); border-block: 1px solid rgba(216,161,60,.08); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-desc { color: var(--muted); }

/* màu hệ */
.c-hoa { color: var(--hoa); } .c-thuy { color: var(--thuy); }
.c-phong { color: var(--phong); } .c-loi { color: var(--loi); }
.c-tho { color: var(--tho); }

/* ============ nút ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-gold {
  background: linear-gradient(180deg, #f2c159, #cf9328);
  color: #221605;
  box-shadow: 0 4px 18px rgba(216, 161, 60, .28), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(216,161,60,.4), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(216,161,60,.05);
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(216,161,60,.12); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: .9rem; border-radius: 8px; }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 8, 6, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled {
  background: rgba(10, 8, 6, .88);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; gap: 26px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 14px rgba(216,161,60,.25); }
.brand-name {
  display: flex; flex-direction: column;
  color: var(--gold-bright);
  font-weight: 800; font-size: .95rem; letter-spacing: .12em; line-height: 1.15;
}
.brand-name em {
  font-style: normal; font-weight: 700; font-size: .62rem;
  color: var(--muted); letter-spacing: .34em;
}
.site-nav { display: flex; gap: 24px; margin-left: auto; }
.site-nav a {
  color: var(--muted); font-weight: 500; font-size: .95rem;
  transition: color .18s ease;
}
.site-nav a:hover { color: var(--gold-bright); }

/* ============ hero ============ */
.hero { position: relative; text-align: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(46% 34% at 18% 12%, rgba(230, 81, 46, .10), transparent 70%),
    radial-gradient(40% 30% at 84% 16%, rgba(63, 140, 224, .10), transparent 70%),
    radial-gradient(36% 28% at 12% 78%, rgba(154, 92, 234, .09), transparent 70%),
    radial-gradient(42% 30% at 88% 82%, rgba(67, 181, 108, .08), transparent 70%),
    radial-gradient(60% 52% at 50% 44%, rgba(216, 161, 60, .12), transparent 72%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
.hero-inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding-top: 44px; padding-bottom: 72px;
}
.hero-logo {
  width: min(380px, 72vw);
  filter: drop-shadow(0 0 46px rgba(216, 161, 60, .32)) drop-shadow(0 12px 40px rgba(0,0,0,.6));
  animation: logo-in 1s ease both;
}
@keyframes logo-in {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  background: rgba(20, 16, 9, .7);
  color: var(--muted);
  font-size: .8rem; font-weight: 600; letter-spacing: .06em;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 0 rgba(240, 188, 85, .55);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 188, 85, .55); }
  70% { box-shadow: 0 0 0 9px rgba(240, 188, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 188, 85, 0); }
}
.hero-tagline {
  margin-top: 22px;
  font-size: clamp(1.9rem, 5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.18;
  background: linear-gradient(180deg, #f7e3ae, #d8a13c 78%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.hero-sub {
  max-width: 620px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.04rem;
  text-wrap: pretty;
}
.hero-sub strong { color: var(--gold-bright); font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.hero-seals { display: flex; gap: 18px; margin-top: 44px; }
.seal {
  width: 13px; height: 13px; border-radius: 50%;
  transform: rotate(45deg);
  border-radius: 3px;
  opacity: .9;
}
.seal-hoa { background: var(--hoa); box-shadow: 0 0 12px var(--hoa); }
.seal-thuy { background: var(--thuy); box-shadow: 0 0 12px var(--thuy); }
.seal-phong { background: var(--phong); box-shadow: 0 0 12px var(--phong); }
.seal-loi { background: var(--loi); box-shadow: 0 0 12px var(--loi); }
.seal-tho { background: var(--tho); box-shadow: 0 0 12px var(--tho); }

/* ============ thế giới ============ */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 54px; align-items: start; }
.split-main p { margin-bottom: 1em; color: var(--muted); }
.split-main p b { font-weight: 700; }
.lead-gold {
  border-left: 3px solid var(--gold);
  padding: 10px 0 10px 18px;
  color: var(--text) !important;
  font-size: 1.06rem;
}
.lead-gold em { color: var(--gold-bright); font-style: normal; font-weight: 700; }
.chronicle {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
}
.chronicle h3 {
  color: var(--gold-bright);
  font-size: 1.02rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px;
}
.chronicle-list li {
  position: relative;
  padding: 0 0 18px 26px;
  color: var(--muted);
  font-size: .95rem;
}
.chronicle-list li::before {
  content: "";
  position: absolute; left: 6px; top: 8px;
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}
.chronicle-list li:not(:last-child)::after {
  content: "";
  position: absolute; left: 9px; top: 20px; bottom: 2px;
  width: 1px;
  background: linear-gradient(var(--line-strong), transparent);
}
.chronicle-list li span {
  display: block;
  color: var(--gold);
  font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  margin-bottom: 3px;
}

/* ============ ngũ hệ ============ */
.element-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(202px, 1fr));
  gap: 18px;
}
.element-card {
  --el: var(--gold);
  background: linear-gradient(180deg, var(--panel-2), var(--panel) 60%);
  border: 1px solid var(--line);
  border-top: 3px solid var(--el);
  border-radius: var(--radius);
  padding: 20px 18px 22px;
  text-align: center;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.element-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(0,0,0,.5), 0 0 0 1px color-mix(in srgb, var(--el) 45%, transparent);
}
.el-hoa { --el: var(--hoa); } .el-thuy { --el: var(--thuy); }
.el-phong { --el: var(--phong); } .el-loi { --el: var(--loi); }
.el-tho { --el: var(--tho); }
.element-art { position: relative; height: 218px; display: flex; justify-content: center; margin-bottom: 14px; }
.element-art::before {
  content: "";
  position: absolute; inset: auto 0 -4px;
  height: 74%;
  margin-inline: auto; width: 78%;
  background: radial-gradient(50% 60% at 50% 88%, color-mix(in srgb, var(--el) 30%, transparent), transparent 75%);
}
.element-art img {
  position: relative;
  height: 100%; width: auto; max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
  transition: transform .25s ease;
}
.element-card:hover .element-art img { transform: translateY(-5px) scale(1.03); }
.element-card h3 { color: var(--el); font-size: 1.22rem; font-weight: 800; }
.element-village {
  color: var(--muted);
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .16em;
  margin: 2px 0 10px;
}
.element-desc { color: var(--muted); font-size: .92rem; min-height: 3.2em; margin-bottom: 12px; }
.school-list { display: flex; flex-direction: column; gap: 6px; }
.school-list li {
  font-size: .84rem; font-weight: 600;
  color: var(--text);
  background: color-mix(in srgb, var(--el) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--el) 26%, transparent);
  border-radius: 7px;
  padding: 5px 8px;
}

/* ============ tính năng ============ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}
.feature-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 38px rgba(0,0,0,.45);
}
.feature-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: var(--gold-bright);
  background: rgba(216,161,60,.1);
  border: 1px solid var(--line-strong);
  margin-bottom: 16px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.06rem; margin-bottom: 7px; }
.feature-card p { color: var(--muted); font-size: .93rem; }

/* ============ hành trình (rank) ============ */
.rank-track {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  counter-reset: rank;
  position: relative;
}
.rank-track li {
  counter-increment: rank;
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 10px 15px;
  text-align: center;
  transition: transform .2s ease, border-color .2s ease;
}
.rank-track li:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.rank-track li::before {
  content: counter(rank);
  display: grid; place-items: center;
  width: 30px; height: 30px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: rgba(216,161,60,.12);
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  font-weight: 800; font-size: .85rem;
}
.rank-track b { display: block; font-size: .96rem; color: var(--text); }
.rank-track span { color: var(--muted); font-size: .8rem; }
.rank-final {
  border-color: var(--gold) !important;
  box-shadow: 0 0 24px rgba(216,161,60,.18), inset 0 0 22px rgba(216,161,60,.06);
}
.rank-final::before {
  background: linear-gradient(180deg, #f2c159, #cf9328) !important;
  color: #221605 !important;
  content: "✦" !important;
}
.rank-final b { color: var(--gold-bright); }

/* ============ tải game ============ */
.section-download {
  background:
    radial-gradient(52% 40% at 50% 0%, rgba(216,161,60,.1), transparent 75%),
    var(--bg-alt);
  border-top: 1px solid rgba(216,161,60,.08);
}
.section-download .section-head { text-align: center; margin-inline: auto; }
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(198px, 1fr));
  gap: 16px;
}
.dl-card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 18px 22px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.dl-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 16px 36px rgba(0,0,0,.4); }
.dl-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: var(--gold-bright);
  background: rgba(216,161,60,.09);
  border: 1px solid var(--line-strong);
  margin-bottom: 14px;
}
.dl-icon svg { width: 28px; height: 28px; }
.dl-card h3 { font-size: 1.05rem; }
.dl-req { color: var(--muted); font-size: .8rem; margin: 5px 0 16px; min-height: 2.4em; }
.dl-btn {
  width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  font-size: .9rem;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  background: rgba(216,161,60,.05);
}
.dl-btn[aria-disabled="true"] { cursor: default; opacity: .68; }
.dl-btn.is-ready {
  background: linear-gradient(180deg, #f2c159, #cf9328);
  border-color: transparent;
  color: #221605;
  opacity: 1;
  box-shadow: 0 4px 16px rgba(216,161,60,.3);
}
.dl-btn.is-ready:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(216,161,60,.42); }
.dl-status { font-size: .76rem; color: var(--gold); margin-top: 9px; }
.dl-meta { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 26px; }
.dl-note { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 6px; }
.dl-note a { border-bottom: 1px dotted var(--gold-deep); }

/* ============ footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  background: #070604;
  padding: 40px 0 46px;
}
.footer-inner {
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.footer-inner img { border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong); }
.footer-inner p { color: var(--muted); font-size: .88rem; flex: 1 1 320px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); font-size: .88rem; }
.footer-links a:hover { color: var(--gold-bright); }

/* ============ reveal animation ============ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo { animation: none; }
  .pulse-dot { animation: none; }
}

/* ============ responsive ============ */
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; gap: 34px; }
  .rank-track { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .site-nav { display: none; }
  .hero-inner { padding-top: 26px; padding-bottom: 56px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .rank-track { grid-template-columns: repeat(2, 1fr); }
  .element-desc { min-height: 0; }
}
