:root {
  --bg: #f6efe2;
  --paper: #fffaf0;
  --ink: #2b1d14;
  --muted: #6e5b4b;
  --red: #a4161a;
  --red-dark: #7a0f12;
  --gold: #c9962b;
  --line: #e3d5bd;
  --band: #2b1d14;
  --band-ink: #f6efe2;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17110c;
    --paper: #221912;
    --ink: #f3e8d6;
    --muted: #bba68d;
    --line: #3a2c20;
    --band: #0f0b08;
  }
}
:root[data-theme="dark"] {
  --bg: #17110c;
  --paper: #221912;
  --ink: #f3e8d6;
  --muted: #bba68d;
  --line: #3a2c20;
  --band: #0f0b08;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 'Be Vietnam Pro', system-ui, sans-serif; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, .logo { font-family: 'Noto Serif', Georgia, serif; line-height: 1.2; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
h3 { margin: .2rem 0 .4rem; font-size: 1.15rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 72px 16px; }
.sub { color: var(--muted); max-width: 720px; margin: 0 0 32px; }

/* nút */
.btn { display: inline-block; background: var(--red); color: #fff; text-decoration: none; font-weight: 700; padding: 13px 26px; border-radius: 999px; border: 2px solid var(--red); cursor: pointer; font: inherit; font-weight: 700; transition: background .15s; }
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-sm { padding: 8px 18px; font-size: .9rem; }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: default; }

/* thanh điều hướng */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 12px 16px; background: color-mix(in srgb, var(--band) 92%, transparent); color: var(--band-ink); backdrop-filter: blur(8px); }
.nav .logo { text-decoration: none; font-size: 1.25rem; margin-right: auto; }
.logo b { color: var(--gold); }
.nav nav { display: flex; gap: 20px; }
.nav nav a { text-decoration: none; opacity: .85; }
.nav nav a:hover { opacity: 1; color: var(--gold); }
@media (max-width: 720px) { .nav nav { display: none; } }

/* hero */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; overflow: hidden; background: #1a120c; color: #fff; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,12,6,.92) 0%, rgba(20,12,6,.55) 55%, rgba(20,12,6,.2) 100%); }
.hero-in { position: relative; z-index: 1; max-width: 1120px; width: 100%; margin: 0 auto; padding: 64px 16px; }
.hero-in > * { max-width: 600px; }
.beta { display: inline-block; background: var(--red); color: #fff; font-size: .78rem; padding: 3px 10px; border-radius: 999px; margin-right: 8px; letter-spacing: 0; }
.eyebrow { color: var(--gold); font-weight: 600; letter-spacing: .04em; margin: 0 0 12px; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.8rem); font-weight: 900; margin: 0 0 16px; text-shadow: 0 3px 0 var(--red-dark); }
.lead { font-size: 1.1rem; opacity: .92; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-char { position: absolute; z-index: 1; right: max(16px, calc(50% - 600px)); width: min(36vw, 400px); aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: #fffaf0; border: 6px solid var(--gold); bottom: auto; top: 50%; transform: translateY(-50%); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
@media (max-width: 860px) { .hero-char { display: none; } }

/* ba cuộc kháng chiến */
.eras { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.eras article { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); padding: 24px; }
.year { font-family: 'Noto Serif', serif; font-weight: 900; font-size: 1.8rem; color: var(--red); }
.eras p { margin: 0 0 10px; }
.eras small, .event small { color: var(--muted); }
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.shots img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; } }

/* dải tối: ngũ hành, cửa hàng */
.band { background: var(--band); color: var(--band-ink); }
.band .sub { color: color-mix(in srgb, var(--band-ink) 70%, transparent); }
.he { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.he figure { margin: 0; background: #fffaf0; color: #2b1d14; border-radius: var(--radius); overflow: hidden; border-bottom: 5px solid var(--c); }
.he img { aspect-ratio: 1; object-fit: cover; object-position: center 30%; }
.he figcaption { padding: 12px 14px 16px; font-size: .9rem; }
.he figcaption b { display: block; font-family: 'Noto Serif', serif; font-size: 1.3rem; color: var(--c); }
.kim { --c: #8a8f98; } .moc { --c: #2f8a3e; } .thuy { --c: #1f6fb2; } .hoa { --c: #c8341c; } .tho { --c: #9a6a2c; }
@media (max-width: 900px) { .he { grid-template-columns: repeat(2, 1fr); } }

/* sự kiện */
.events { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.event { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.event ul { padding-left: 20px; margin: 0 0 12px; }
.tag { display: inline-block; background: var(--gold); color: #2b1d14; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
@media (max-width: 900px) { .events { grid-template-columns: 1fr; } }

/* cửa hàng */
.shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.item { background: #fffaf0; color: #2b1d14; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.item .thumb { background: #f6efe2; border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.item img { aspect-ratio: 1; object-fit: cover; object-position: center 30%; mix-blend-mode: multiply; }
.item p { color: #6e5b4b; font-size: .9rem; margin: 0 0 12px; flex: 1; }
.buy { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; color: var(--red); }
.note { margin: 24px 0 0; opacity: .75; }

.foot { border-top: 1px solid var(--line); }
.foot .wrap { padding: 40px 16px; color: var(--muted); }
.foot .logo { font-size: 1.2rem; color: var(--ink); margin: 0 0 6px; }
.foot p { margin: 4px 0; }

/* tiền tệ */
.money { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 28px; }
.coin { border: 1px solid color-mix(in srgb, var(--band-ink) 20%, transparent); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 16px 18px; font-size: .92rem; }
.coin b { display: block; font-family: 'Noto Serif', serif; font-size: 1.2rem; color: var(--c); margin-bottom: 4px; }
.coin strong { color: var(--band-ink); }
.xu { --c: #d9b26a; } .vang { --c: #f2c230; } .moi { --c: #e0604a; }
@media (max-width: 900px) { .money { grid-template-columns: 1fr; } }
