:root {
  --gold: #f4c86a;
  --gold-2: #fff0ad;
  --red: #9d1f32;
  --ink: #10050a;
  --font-display: 'Cinzel', 'Be Vietnam Pro', serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: #080308;
  color: #fff;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

@keyframes autoSheen {
  0%, 65% {
    left: -120%;
  }
  100% {
    left: 150%;
  }
}

@keyframes lineFlow {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Thanh topbar trên cùng */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(16, 5, 12, 0.92), rgba(22, 6, 15, 0.72));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 200, 106, 0.22);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 224, 140, 0.85) 50%, transparent 100%);
  background-size: 50% 100%;
  animation: lineFlow 5s linear infinite;
  pointer-events: none;
}

.topbar-inner {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  position: relative;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(.82rem, 1.8vw, 1rem);
  letter-spacing: .12em;
  color: var(--gold-2);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 8px;
  transition: .25s ease;
}

.brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 240, 173, 0.45) 50%, transparent 80%);
  transform: translateX(-140%);
  transition: transform .55s ease;
  pointer-events: none;
}

.brand:hover {
  color: #fff;
  text-shadow: 0 0 14px rgba(244, 200, 106, 0.65);
}

.brand:hover::after {
  transform: translateX(140%);
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  overflow: hidden;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: #f3dfb5;
  text-decoration: none;
  border: 1px solid rgba(244, 200, 106, 0.14);
  background: rgba(255, 255, 255, 0.02);
  transition: transform .22s ease, color .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
  white-space: nowrap;
}

.nav-link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 75%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 248, 210, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
  pointer-events: none;
}

.nav-link:hover {
  transform: translateY(-2px);
  color: #fff8d6;
  background: linear-gradient(135deg, rgba(157, 31, 50, 0.5), rgba(244, 200, 106, 0.22));
  border-color: rgba(244, 200, 106, 0.65);
  box-shadow: 0 0 16px rgba(244, 200, 106, 0.35), inset 0 0 10px rgba(255, 240, 173, 0.15);
}

.nav-link:hover::after {
  left: 140%;
}

.nav-link.is-active {
  color: var(--gold-2);
  background: linear-gradient(135deg, rgba(157, 31, 50, 0.55), rgba(244, 200, 106, 0.16));
  border-color: rgba(244, 200, 106, 0.5);
  box-shadow: 0 0 12px rgba(244, 200, 106, 0.18);
}

.page {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 78px 18px 36px;
  background: #17070d url('assets/hero-reference.png') center/cover no-repeat fixed;
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, rgba(9,2,9,.45), rgba(22,2,10,.86) 68%, #090207);
}

.page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% 44%, rgba(177,24,38,.3), transparent 34%), linear-gradient(90deg, rgba(18,2,12,.75), transparent 42%, rgba(18,2,12,.75));
  pointer-events: none;
}

.shell {
  width: min(100%, 1080px);
  text-align: center;
}

.eyebrow {
  position: relative;
  top: -50px;
  color: #f6dca0;
  font-size: clamp(.78rem, 1.8vw, .98rem);
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin: 0 0 20px;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0,0,0,.9);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--gold-2);
  font-size: clamp(2.8rem, 8.5vw, 6.8rem);
  line-height: 1.05;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #5a1c0a, 0 0 22px rgba(255, 85, 43, .75), 0 8px 24px #000;
}

h1 span {
  display: block;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .46em;
  letter-spacing: .18em;
  margin-top: 12px;
  color: #f5c351;
}

.divider {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin: 26px auto 24px;
  max-width: 570px;
  color: var(--gold);
}

.divider::before, .divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px var(--gold);
}

.rune {
  width: 28px;
  height: 28px;
  transform: rotate(45deg);
  border: 1px solid #df5547;
  background: linear-gradient(135deg, #3a0c19, #a71e32, #260714);
  box-shadow: 0 0 0 5px rgba(56,8,19,.5), 0 0 18px #c22b34;
}

.subtitle {
  margin: 0 auto 36px;
  max-width: 720px;
  color: #fae6c3;
  font-size: clamp(.95rem, 2.4vw, 1.25rem);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1.5;
  text-shadow: 0 2px 10px #000;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 980px;
  margin: 0 auto;
}

.download {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 13px 14px;
  border: 1px solid #a8544e;
  border-radius: 12px;
  color: #fff6d6;
  text-decoration: none;
  text-align: left;
  background: linear-gradient(135deg, rgba(20,10,30,.96), rgba(95,18,34,.92));
  box-shadow: inset 0 0 18px rgba(0,0,0,.7), 0 7px 17px rgba(0,0,0,.5);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  overflow: hidden;
}

.download::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 65%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 245, 195, 0.42), transparent);
  transform: skewX(-22deg);
  transition: left .6s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.download:hover {
  transform: translateY(-4px);
  border-color: #ffd97d;
  box-shadow: 0 0 28px rgba(255, 175, 70, 0.55), inset 0 0 18px rgba(255, 215, 130, 0.2);
}

.download:hover::before {
  left: 145%;
}

.icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--gold-2);
  background: linear-gradient(145deg, rgba(244, 200, 106, 0.18), rgba(157, 31, 50, 0.25));
  border: 1px solid rgba(244, 200, 106, 0.35);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: .25s ease;
}

.icon svg {
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  transition: .25s ease;
}

.download:hover .icon {
  color: #fff;
  background: linear-gradient(145deg, rgba(244, 200, 106, 0.38), rgba(210, 45, 65, 0.5));
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(244, 200, 106, 0.55);
}

.download:hover .icon svg {
  transform: scale(1.12);
}

.download small {
  display: block;
  color: #ebd094;
  font-size: .74rem;
  font-weight: 500;
  margin-bottom: 3px;
}

.download strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.cta {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 290px;
  margin: 36px auto 0;
  padding: 18px 36px;
  color: #fff3bd;
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid #d16d5b;
  border-radius: 14px;
  background: linear-gradient(180deg, #541424, #1e0817);
  box-shadow: inset 0 0 0 2px rgba(255,201,111,.15), 0 0 0 6px rgba(25,5,15,.45), 0 10px 28px rgba(0,0,0,.6);
  transition: .22s ease;
}

.cta::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 246, 200, 0.55), transparent);
  transform: skewX(-22deg);
  animation: autoSheen 3.5s ease-in-out infinite;
  pointer-events: none;
}

.cta:hover {
  transform: scale(1.04);
  color: #fff;
  border-color: var(--gold);
  box-shadow: 0 0 34px rgba(255, 145, 65, 0.6), 0 0 0 6px rgba(25,5,15,.45);
}

.cta:hover::after {
  animation: none;
  left: 145%;
  transition: left .5s ease;
}

.note {
  margin: 24px auto 0;
  color: #e3ccb0;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .12em;
  opacity: .9;
}

@media (max-width: 900px) {
  .downloads {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 620px;
  }
}

@media (max-width: 720px) {
  .topbar-inner { padding: 10px 12px; }
  .brand { font-size: .76rem; letter-spacing: .08em; padding: 5px 6px; }
  .nav-link { padding: 6px 10px; font-size: .78rem; }
  .page { padding: 72px 14px 36px; background-attachment: scroll; }
  .eyebrow { letter-spacing: .18em; }
  .subtitle { letter-spacing: .08em; line-height: 1.55; }
  .downloads { grid-template-columns: 1fr; max-width: 430px; }
  .download { min-height: 68px; }
  .cta { width: 100%; max-width: 430px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}