/* =========================================================
   Infestation Việt Nam — zone.infestation.vn
   Design system lấy từ file Figma "ISSVN"
   ========================================================= */

:root {
  --bg: #131512;
  --bg-dark: #0c0d0b;
  --card: #191c17;
  --card-alt: #1f231d;
  --line: #282d25;
  --line-strong: #353b31;
  --text: #ece8db;
  --text-2: #c9c4b3;
  --muted: #a29e8e;
  --accent: #d0601c;
  --accent-text: #e27a33;
  --green: #9db86a;
  --tick: #6f6c60;

  --display: "Big Shoulders Stencil Display", "Barlow Condensed", sans-serif;
  --cond: "Barlow Condensed", "Barlow", sans-serif;
  --semi: "Barlow Semi Condensed", "Barlow", sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --cross: url("../tex/cross.png");
  --ruler: url("../tex/ruler.png");

  --wrap: 1440px;
  --gutter: 64px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--bg-dark);
  font-family: var(--cond);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .04em;
  color: var(--accent-text);
}
.eyebrow .dash {
  flex: 0 0 auto;
  width: 24px;
  height: 3px;
  background: var(--accent);
}

.section-title {
  font-family: var(--cond);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: .01em;
  color: var(--text);
}
.section-title--sm { font-size: 44px; }

.section-lead {
  max-width: 640px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 28px;
  border: 0;
  background: transparent;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .03em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.btn--primary { background: var(--accent); color: var(--bg-dark); }
.btn--primary:hover { background: var(--accent-text); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost { box-shadow: inset 0 0 0 2px var(--text-2); color: var(--text); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--accent-text); color: var(--accent-text); }

.btn--sm { height: 44px; padding: 0 22px; font-size: 16px; }
.btn--lg { height: 56px; padding: 0 28px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--accent-text);
  text-decoration: none;
  white-space: nowrap;
}
.link-arrow::after {
  content: "→";
  transition: transform .18s ease;
}
.link-arrow:hover { color: var(--text); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Decorative brackets ---------- */
.brackets { position: relative; }
.brackets::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(var(--text-2), var(--text-2)) left top / 28px 2px no-repeat,
    linear-gradient(var(--text-2), var(--text-2)) left top / 2px 28px no-repeat,
    linear-gradient(var(--text-2), var(--text-2)) right bottom / 28px 2px no-repeat,
    linear-gradient(var(--text-2), var(--text-2)) right bottom / 2px 28px no-repeat;
}
.brackets--dim::before {
  background:
    linear-gradient(var(--tick), var(--tick)) left top / 16px 2px no-repeat,
    linear-gradient(var(--tick), var(--tick)) left top / 2px 16px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 16px 2px no-repeat,
    linear-gradient(var(--tick), var(--tick)) right bottom / 2px 16px no-repeat;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--bg);
}

.statusbar {
  height: 44px;
  background: var(--bg-dark);
}
.statusbar__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 100%;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
}
.statusbar__online {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
}
.statusbar__online .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(157, 184, 106, .16);
}
.statusbar__players { color: var(--text); }
.statusbar__players strong { font-weight: 600; }
.statusbar__meta { justify-self: end; color: var(--text-2); }

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 96px;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
}
.logo__name {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--text);
}
.logo__sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent-text);
}
.logo__dash { width: 24px; height: 3px; background: var(--accent); }

.nav { margin-inline: auto; }
.nav__list { display: flex; }
.nav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 144px;
  height: 44px;
  text-decoration: none;
}
.nav__freq {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--muted);
  transition: color .18s ease;
}
.nav__label {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-2);
  transition: color .18s ease;
}
.nav__item:hover .nav__label,
.nav__item:focus-visible .nav__label { color: var(--text); }
.nav__item:hover .nav__freq { color: var(--accent-text); }
.nav__item.is-active .nav__freq { color: var(--accent-text); }
.nav__item.is-active .nav__label { color: var(--text); }
.nav__item.is-active::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 40px;
  width: 3px;
  height: 26px;
  background: var(--accent);
  transform: translateX(-50%);
}
.nav__ruler {
  display: block;
  height: 14px;
  margin-top: 10px;
  background: var(--ruler) repeat-x center / auto 14px;
}

.auth { display: flex; gap: 12px; }
.auth__user {
  flex: 1 0 100%;
  max-width: 100%;
  overflow: hidden;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--line);
  background: var(--bg-dark);
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu__list { padding: 8px var(--gutter); }
.mobile-menu__list a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--cond);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
}
.mobile-menu__list a span {
  min-width: 44px;
  font-size: 15px;
  color: var(--accent-text);
}
.mobile-menu__list a[aria-current="page"] { color: var(--text); }
.mobile-menu__auth {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px var(--gutter) 24px;
}
.mobile-menu__auth .btn { flex: 1; height: 48px; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 720px;
  background: var(--cross) repeat center / 640px auto;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 20% 30%, rgba(19, 21, 18, .35), rgba(19, 21, 18, .92) 75%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 624px;
  gap: 48px;
  align-items: center;
  padding-block: 64px;
}
.hero__title {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  font-family: var(--display);
  font-size: clamp(56px, 6.7vw, 96px);
  font-weight: 900;
  line-height: 1.1667;
  letter-spacing: .005em;
  color: var(--text);
  text-transform: uppercase;
}
.hero__title .accent { color: var(--accent-text); }
.hero__lead {
  max-width: 560px;
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}
.hero__note {
  margin-top: 24px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}

/* Starter kit panel */
.kit {
  display: flex;
  flex-direction: column;
  min-height: 592px;
  padding: 28px 32px 0;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  overflow: hidden;
}
.kit__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}
.kit__main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 322px;
  margin-top: 16px;
}
.kit__weapon {
  width: 100%;
  max-width: 528px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .45));
}
.kit__tag {
  position: absolute;
  left: 8px;
  top: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  padding-left: 13px;
  border-left: 3px solid var(--accent);
}
.kit__tag b {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.kit__tag small {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.kit__items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: auto;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line-strong);
}
.kit__items li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.kit__items img {
  width: auto;
  height: 78px;
  object-fit: contain;
}
.kit__items span {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-2);
  text-align: center;
}

/* =========================================================
   Facts strip
   ========================================================= */
.facts {
  background: var(--bg-dark);
  border-block: 1px solid var(--line);
}
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 138px;
  padding-left: 33px;
  border-left: 1px solid var(--line);
}
.fact:first-child { padding-left: 0; border-left: 0; }
.fact__value {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
}
.fact__label {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
}

/* =========================================================
   Steps
   ========================================================= */
.steps { padding-block: 96px; }
.section-head { max-width: 640px; }
.section-head .section-title { margin-top: 12px; }
.section-head .section-lead { margin-top: 12px; }

.callout {
  max-width: 960px;
  margin-top: 48px;
  padding: 8px 24px 0;
  border: 4px solid var(--accent);
  background: rgba(208, 96, 28, .04);
}
.callout__kicker {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--accent-text);
}
.callout__text {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
}

.step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 354px;
  padding: 46px 32px 32px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.step::before {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 1px;
  height: 14px;
  background: var(--ruler) repeat-x center / auto 14px;
  opacity: .9;
}
.step__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.step__icon {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--line-strong);
}
.step__icon img { width: 48px; height: 48px; object-fit: contain; }
.step__num {
  font-family: var(--display);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.2;
  color: var(--muted);
}
.step__title {
  margin-top: 16px;
  font-family: var(--cond);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text);
}
.step__text {
  margin-top: 16px;
  min-height: 56px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
}
.step .link-arrow { margin-top: auto; align-self: flex-start; }

/* =========================================================
   News + ranking
   ========================================================= */
.news {
  padding-block: 96px;
  background: var(--bg-dark);
}
.news__grid {
  display: grid;
  grid-template-columns: minmax(0, 704px) minmax(0, 560px);
  justify-content: space-between;
  gap: 48px;
}
.col-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.news__list { margin-top: 24px; }
.news__list a {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 60px;
  align-items: center;
  min-height: 63px;
  text-decoration: none;
  transition: background-color .16s ease;
}
.news__list a:hover { background: rgba(255, 255, 255, .025); }
.tag {
  justify-self: start;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-2);
}
.news__title {
  padding-right: 16px;
  font-family: var(--cond);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  transition: color .16s ease;
}
.news__list a:hover .news__title { color: var(--accent-text); }
.news__date {
  font-family: var(--semi);
  font-size: 18px;
  font-weight: 500;
  color: var(--muted);
  text-align: right;
}

.rank { margin-top: 24px; }
.rank__head,
.rank__row {
  display: grid;
  grid-template-columns: 88px 52px minmax(0, 1fr) 136px 104px;
  align-items: center;
  padding-inline: 16px;
}
.rank__head {
  min-height: 37px;
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
}
.rank__head span:first-child { grid-column: span 2; }
.rank__head .num { text-align: right; }
.rank__row {
  min-height: 69px;
  text-decoration: none;
  transition: background-color .16s ease;
}
.rank__row.is-top { background: var(--card-alt); }
.rank__row:hover { background: #262b23; }
.rank__pos {
  font-family: var(--semi);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--muted);
}
.rank__row.is-top .rank__pos { color: var(--accent-text); }
.rank__avatar img { width: 36px; height: 36px; object-fit: contain; }
.rank__who {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding-right: 12px;
}
.rank__who b {
  overflow: hidden;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank__who small {
  overflow: hidden;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rank__val {
  font-family: var(--semi);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}
.rank__val--muted { color: var(--text-2); }

/* =========================================================
   Store
   ========================================================= */
.store { padding-block: 96px; }
.store__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.store__head .section-title { margin-top: 12px; }
.store__head .section-lead { margin-top: 12px; }

.store__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.item-card {
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.item-card:hover {
  box-shadow: inset 0 0 0 1px var(--line-strong), 0 16px 32px rgba(0, 0, 0, .35);
  transform: translateY(-2px);
}
.item-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 302 / 176;
  margin: 1px 1px 0;
  padding: 8px 16px;
  background-color: var(--card-alt);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  overflow: hidden;
}
.item-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}
.item-card:hover .item-card__media img { transform: scale(1.04); }
.item-card__body { padding: 16px; }
.item-card__type {
  font-family: var(--cond);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: .04em;
  color: var(--muted);
}
.item-card__name {
  margin-top: 4px;
  font-family: var(--cond);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
.item-card__stat {
  margin-top: 4px;
  font-family: var(--semi);
  font-size: 18px;
  line-height: 1.33;
  color: var(--text-2);
}

/* =========================================================
   CTA
   ========================================================= */
.cta { padding-bottom: 96px; }
.cta__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-height: 340px;
  padding: 56px 64px;
  background-color: var(--card);
  background-image: var(--cross);
  background-repeat: repeat;
  background-size: 640px auto;
  box-shadow: inset 0 0 0 1px var(--line);
}
.cta__title {
  margin-top: 12px;
  font-family: var(--display);
  font-size: 64px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: .005em;
  color: var(--text);
}
.cta__text {
  margin-top: 24px;
  font-size: 20px;
  line-height: 1.6;
  color: var(--text-2);
}
.cta__actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 16px;
  width: 198px;
}
.cta__actions .btn { width: 100%; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding-block: 65px 40px;
  background: var(--bg-dark);
  box-shadow: inset 0 1px 0 var(--line);
}
.footer__grid {
  display: grid;
  grid-template-columns: 400px 240px 240px 240px;
  justify-content: space-between;
  gap: 64px;
}
.footer__brand p {
  max-width: 400px;
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-2);
}
.footer__col h2 {
  font-family: var(--cond);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text);
}
.footer__col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.footer__col a {
  font-size: 18px;
  color: var(--text-2);
  text-decoration: none;
  transition: color .16s ease;
}
.footer__col a:hover { color: var(--accent-text); }
.footer__ruler {
  height: 14px;
  margin-top: 40px;
  background: var(--ruler) repeat-x center / auto 14px;
}
.footer__legal {
  margin-top: 40px;
  font-size: 16px;
  color: var(--muted);
}

/* =========================================================
   Mobile tab bar
   ========================================================= */
.tabbar { display: none; }

/* =========================================================
   Motion
   ========================================================= */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero__copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: .06s; }
.hero__copy > :nth-child(3) { animation-delay: .12s; }
.hero__copy > :nth-child(4) { animation-delay: .18s; }
.hero__copy > :nth-child(5) { animation-delay: .24s; }
.kit { animation: rise .8s .15s cubic-bezier(.2, .7, .2, 1) both; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1300px) {
  :root { --gutter: 40px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr) 500px; gap: 32px; }
  .news__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 32px; }
  .footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
  .nav__item { width: 124px; }
}

@media (max-width: 1199px) {
  .nav, .auth { display: none; }
  .menu-toggle { display: block; }
  html.menu-open body { overflow: hidden; }
  .hero { min-height: 0; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
    padding-block: 56px 64px;
  }
  .hero__title { font-size: clamp(56px, 9vw, 88px); }
  .kit { width: 100%; max-width: 624px; min-height: 0; margin-inline: auto; }
  .kit__main { height: auto; padding-block: 24px; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 24px 24px 24px 33px; }
  .fact:nth-child(odd) { padding-left: 0; border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .news__grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .store__grid { grid-template-columns: repeat(2, 1fr); }
  .store__head { flex-direction: column; align-items: flex-start; }
  .cta__box { flex-direction: column; align-items: flex-start; gap: 32px; padding: 48px; }
  .cta__actions { flex-direction: row; width: auto; flex-wrap: wrap; }
  .cta__actions .btn { width: auto; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }

  body { font-size: 17px; padding-bottom: 64px; }

  .statusbar { height: 36px; }
  .statusbar__inner { grid-template-columns: 1fr auto; font-size: 13px; }
  .statusbar__meta { display: none; }
  .statusbar__players { justify-self: end; }

  .masthead__inner { height: 72px; gap: 16px; }
  .logo__name { font-size: 30px; }
  .logo__sub { font-size: 15px; gap: 6px; }
  .logo__dash { width: 18px; }
  /* Mobile: ẩn nút đăng nhập rời, dùng menu thu gọn (đủ 7 mục + đăng nhập) */
  .menu-toggle { display: block; }
  .auth { display: none; }

  .hero__grid { padding-block: 40px 48px; gap: 40px; }
  .hero__title { font-size: clamp(44px, 12.5vw, 64px); }
  .hero__lead { font-size: 17px; }
  .hero__actions { gap: 12px; }
  .hero__actions .btn { flex: 1 1 auto; padding-inline: 18px; }
  .hero__note { font-size: 14px; }

  .kit { padding: 20px 20px 0; }
  .kit__main { padding-block: 16px; }
  .kit__tag { left: 0; top: 0; }
  .kit__items { gap: 8px; padding: 16px 0 20px; }
  .kit__items img { height: 56px; }
  .kit__items span { font-size: 13px; }

  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact { min-height: 104px; padding: 18px 16px 18px 20px; }
  .fact__value { font-size: 30px; }
  .fact__label { font-size: 15px; }

  .steps, .news, .store { padding-block: 64px; }
  .section-title, .section-title--sm { font-size: 32px; }
  .section-lead { font-size: 17px; }
  .callout { margin-top: 48px; padding: 10px 16px 14px; border-width: 3px; }
  .callout__text { font-size: 17px; }
  .step-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 32px; }
  .step { min-height: 0; padding: 40px 24px 24px; }
  .step__text { min-height: 0; }
  .step__title { font-size: 28px; }

  .col-head { align-items: center; }
  .news__list { margin-top: 16px; }
  .news__list a {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "tag date"
      "title title";
    row-gap: 10px;
    min-height: 0;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .tag { grid-area: tag; }
  .news__title { grid-area: title; padding-right: 0; font-size: 20px; }
  .news__date { grid-area: date; font-size: 16px; }

  .rank__head, .rank__row { grid-template-columns: 48px 44px minmax(0, 1fr) 92px; padding-inline: 8px; }
  .rank__head span:nth-child(4), .rank__row .rank__val--muted { display: none; }
  .rank__pos { font-size: 24px; }
  .rank__avatar img { width: 32px; height: 32px; }
  .rank__who b { font-size: 16px; }
  .rank__who small { font-size: 14px; }
  .rank__val { font-size: 16px; }

  .store__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 32px; }
  .item-card__media { aspect-ratio: 169 / 112; padding: 6px 10px; }
  .item-card__body { padding: 12px; }
  .item-card__name { margin-top: 2px; font-size: 20px; }
  .item-card__stat { display: none; }
  .item-card__type { font-size: 14px; }

  .cta { padding-bottom: 64px; }
  .cta__box { padding: 32px 24px; gap: 24px; min-height: 0; }
  .cta__title { font-size: clamp(40px, 10vw, 56px); }
  .cta__text { font-size: 17px; margin-top: 16px; }
  .cta__actions { flex-direction: column; width: 100%; }

  .site-footer { padding-block: 48px 32px; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .footer__brand { grid-column: 1 / -1; }
  .footer__brand p { font-size: 16px; }
  .footer__col a { font-size: 16px; }
  .footer__ruler { margin-top: 32px; }
  .footer__legal { margin-top: 24px; font-size: 14px; }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(12, 13, 11, .98);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(8px);
  }
  .tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 0 6px;
    font-family: var(--cond);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
    text-decoration: none;
  }
  .tabbar__item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: square;
  }
  .tabbar__item.is-active { color: var(--accent-text); }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .footer__brand { grid-column: auto; }
  .hero__actions .btn { flex: 1 1 100%; }
  .kit__items img { height: 48px; }
  .kit__items span { font-size: 11px; }
}

/* =========================================================
   Popup sự kiện (bảng hx_popup)
   ========================================================= */
html.popup-open,
html.popup-open body { overflow: hidden; }

.ivn-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(8, 9, 7, .86);
}
.ivn-popup[hidden] { display: none; }

.ivn-popup__box {
  position: relative;
  width: 100%;
  max-width: 860px;
  max-height: calc(100vh - 64px);
  overflow: auto;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .7);
}
.ivn-popup__box::before {
  content: "";
  position: absolute;
  inset: 1px 1px auto;
  height: 8px;
  background: var(--ruler) repeat-x center / auto 8px;
  opacity: .45;
  pointer-events: none;
}

.ivn-popup__link { display: block; }
.ivn-popup__img { display: block; width: 100%; height: auto; }

.ivn-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(236, 232, 219, .55);
  background: rgba(12, 13, 11, .82);
  color: var(--text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.ivn-popup__close:hover,
.ivn-popup__close:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.ivn-popup__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.ivn-popup__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--cond);
  font-size: 15px;
  letter-spacing: .02em;
  color: var(--muted);
  cursor: pointer;
}
.ivn-popup__check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

@media (max-width: 576px) {
  .ivn-popup { padding: 14px; }
  .ivn-popup__box { padding: 10px; max-height: calc(100vh - 28px); }
  .ivn-popup__close { top: 6px; right: 6px; width: 34px; height: 34px; font-size: 22px; }
  .ivn-popup__foot { justify-content: center; }
}
