:root {
  --bg: #0b0a12;
  --bg-2: #14111f;
  --card: #1a1626;
  --line: rgba(255, 190, 110, .16);
  --text: #f3ece2;
  --muted: #b3a99c;
  --gold: #ffb02e;
  --gold-2: #ffd77a;
  --ember: #e4572e;
  --violet: #8b5cf6;
  --radius: 18px;
  --wrap: 1160px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold-2); }
code {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .86em;
  background: rgba(255, 255, 255, .06);
  padding: .1em .4em;
  border-radius: 6px;
  word-break: break-all;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px max(16px, calc((100% - var(--wrap)) / 2));
  background: linear-gradient(to bottom, rgba(11, 10, 18, .92), rgba(11, 10, 18, .6));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem;
}
.brand-mark {
  display: inline-block; width: 22px; height: 22px;
  background: url("../img/favicon.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255, 176, 46, .7));
}
.nav nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: 6px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.nav nav a:hover, .nav nav a:focus-visible { color: var(--text); background: rgba(255, 176, 46, .12); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: clamp(560px, 100vh, 980px); min-height: clamp(560px, 100svh, 980px);
  display: flex; align-items: center;
  padding: 110px max(16px, calc((100% - var(--wrap)) / 2)) 80px;
  overflow: hidden;
  isolation: isolate;
}
/* the in-game city, blurred and dimmed, behind the art of a seven-star hero */
.hero-bg {
  position: absolute; inset: -20px; z-index: -3;
  background: url("../img/shots/city-full.jpg") center / cover no-repeat;
  filter: blur(4px) brightness(.45) saturate(1.2);
  animation: drift 24s ease-in-out infinite alternate;
}
.hero-art {
  position: absolute; right: 0; top: 0; z-index: -1;
  height: 100%; width: min(60%, 900px); object-fit: cover; object-position: 50% 15%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 85%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 22%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 85%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 22%);
  mask-composite: intersect;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(90deg, rgba(11, 10, 18, .85) 0%, rgba(11, 10, 18, .35) 50%, rgba(11, 10, 18, 0) 75%),
    linear-gradient(to top, var(--bg) 0%, rgba(11, 10, 18, 0) 30%);
}
@keyframes drift { from { transform: scale(1.04); } to { transform: scale(1.1) translateX(-1.5%); } }

.hero-content { max-width: 560px; }
.eyebrow {
  margin: 0 0 14px; color: var(--gold-2);
  font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .8rem;
}
.logo {
  margin: 0; line-height: .92;
  font-family: Impact, "Arial Black", "Segoe UI Black", sans-serif;
  font-weight: 900; text-transform: uppercase; letter-spacing: .02em;
  font-size: clamp(3.4rem, 10vw, 7rem);
  background: linear-gradient(180deg, #fff6d6 0%, var(--gold) 55%, var(--ember) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #3b1203) drop-shadow(0 0 28px rgba(255, 140, 30, .45));
}
.logo span { display: block; font-size: .62em; letter-spacing: .26em; }
.tagline { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: #e9dfd1; margin: 22px 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin-top: 18px; color: var(--muted); font-size: .9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 800; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; font-size: .9rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.btn-primary {
  color: #2a0d02;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 50%, #f08a1c);
  box-shadow: 0 8px 28px rgba(255, 140, 30, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.btn-primary:hover { box-shadow: 0 12px 36px rgba(255, 140, 30, .55), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-ghost { color: var(--text); border: 1px solid rgba(255, 215, 122, .45); background: rgba(11, 10, 18, .35); }
.btn-ghost:hover { background: rgba(255, 176, 46, .12); }

/* ---------- sections ---------- */
.section { padding: 96px max(16px, calc((100% - var(--wrap)) / 2)); }
.section-title {
  margin: 0 0 12px; text-align: center;
  font-family: Impact, "Arial Black", sans-serif; font-weight: 900; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: .04em;
}
.section-title::after {
  content: ""; display: block; width: 84px; height: 3px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.section-lead { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 620px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255, 176, 46, .45); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card a { display: block; }
.card-body { padding: 22px 24px 26px; }
.card h3 { margin: 0 0 8px; font-size: 1.25rem; color: var(--gold-2); }
.card p { margin: 0; color: var(--muted); }

/* ---------- legendary heroes: three large cards ---------- */
.heroes { background: radial-gradient(ellipse at 50% 0%, rgba(255, 140, 30, .14), transparent 60%); }
.legends { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 48px; }
.legend {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--card); border: 1px solid rgba(255, 190, 90, .35);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 20px 50px rgba(0, 0, 0, .45);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.legend:hover {
  transform: translateY(-8px); border-color: rgba(255, 200, 90, .8);
  box-shadow: 0 0 0 1px rgba(255, 176, 46, .4), 0 24px 60px rgba(255, 140, 30, .28);
}
.legend img { width: 100%; aspect-ratio: 640 / 560; object-fit: cover; object-position: 50% 10%; transition: transform .6s ease; }
.legend:hover img { transform: scale(1.04); }
.legend-body {
  position: relative; margin-top: -90px; padding: 90px 24px 26px;
  background: linear-gradient(to top, var(--card) 55%, rgba(26, 22, 38, 0));
}
.legend-tag {
  display: inline-block; margin-bottom: 10px; padding: 3px 12px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: #2a0d02; background: linear-gradient(180deg, var(--gold-2), var(--gold));
}
.legend h3 {
  margin: 0 0 8px; line-height: 1.05; text-transform: uppercase; letter-spacing: .02em;
  font-family: Impact, "Arial Black", sans-serif; font-size: clamp(1.5rem, 2.4vw, 2rem);
  background: linear-gradient(180deg, #fff6d6 0%, var(--gold) 60%, var(--ember) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 #3b1203);
}
.legend p { margin: 0; color: var(--muted); }

/* ---------- clashes: special moves captured in the game ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 48px; }
.shot {
  display: block; overflow: hidden; border-radius: var(--radius);
  border: 1px solid rgba(255, 190, 90, .3); box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .6s ease; }
.shot:hover { transform: translateY(-6px); border-color: rgba(255, 200, 90, .8); box-shadow: 0 22px 50px rgba(255, 140, 30, .25); }
.shot:hover img { transform: scale(1.05); }

/* ---------- gift codes ---------- */
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.code-card {
  background: var(--card); border: 1px solid rgba(255, 190, 90, .3); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35);
}
.code-name {
  margin: 0 0 14px; font-family: Impact, "Arial Black", sans-serif; font-size: 1.7rem; letter-spacing: .06em;
  background: linear-gradient(180deg, #fff6d6 0%, var(--gold) 60%, var(--ember) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  user-select: all;
}
.code-rewards { list-style: none; margin: 0; padding: 0; }
.code-rewards li {
  display: flex; justify-content: space-between; gap: 12px; padding: 6px 0;
  border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem;
}
.code-rewards b { color: var(--gold-2); white-space: nowrap; }

/* ---------- battle ---------- */
.world {
  position: relative; isolation: isolate;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(11, 10, 18, .88) 45%, rgba(11, 10, 18, .35) 100%),
    url("../img/shots/special-full.jpg") center / cover no-repeat;
  border-block: 1px solid var(--line);
}
.world-text { max-width: 600px; }
.world .section-title { text-align: left; }
.world .section-title::after { margin-left: 0; }
.world p { color: #ddd3c5; }
.world strong { color: var(--gold-2); }
.stats { list-style: none; padding: 0; margin: 32px 0 0; display: flex; gap: 14px; flex-wrap: wrap; }
.stats li {
  flex: 1 1 140px; padding: 16px 18px; border-radius: 14px;
  background: rgba(20, 17, 31, .75); border: 1px solid var(--line);
}
.stats b { display: block; font-size: 1.6rem; color: var(--gold); line-height: 1.1; }
.stats span { color: var(--muted); font-size: .9rem; }

/* ---------- download ---------- */
#download { background: radial-gradient(ellipse at top, rgba(139, 92, 246, .14), transparent 60%), var(--bg-2); }
.downloads { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.dl {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
}
.dl h3 { margin: 0; font-size: 1.6rem; }
.dl-meta { margin: 0; color: var(--muted); font-size: .92rem; }
.dl .btn { align-self: flex-start; }
.steps { margin: 4px 0 0; padding-left: 1.2em; color: #ddd3c5; }
.steps li { margin: 4px 0; }
details { border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; font-weight: 700; color: var(--gold-2); }
summary:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; border-radius: 4px; }
details code { display: block; margin-top: 10px; padding: 10px 12px; }

.notice {
  margin-top: 28px; padding: 22px 26px; border-radius: var(--radius);
  background: rgba(228, 87, 46, .08); border: 1px solid rgba(228, 87, 46, .35);
}
.notice h3 { margin: 0 0 8px; color: #ffb59c; }
.notice ul { margin: 0; padding-left: 1.2em; color: #ddd3c5; }
.notice li { margin: 4px 0; }

/* ---------- faq ---------- */
/* a narrower column than the other sections (here and for a news post): the side padding centres 760px (a max-width on
   top of the section padding would squeeze the column to nothing on wide screens) */
.faq { padding-inline: max(16px, calc((100% - 760px) / 2)); }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 20px; margin-top: 12px;
}
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* ---------- news ---------- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.news-card {
  display: flex; flex-direction: column; gap: 8px; padding: 22px 24px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease;
}
.news-card:hover, .news-card:focus-visible { transform: translateY(-4px); border-color: rgba(255, 176, 46, .5); }
.news-card h3 { margin: 4px 0 0; font-size: 1.15rem; color: var(--gold-2); }
.news-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.news-card time, .post-meta time { color: var(--muted); font-size: .85rem; }
.news-tag {
  align-self: flex-start; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(255, 176, 46, .16); color: var(--gold-2);
}
.tag-maintenance { background: rgba(228, 87, 46, .18); color: #ffb59c; }
.tag-event { background: rgba(139, 92, 246, .2); color: #c9b5ff; }
.tag-notice { background: rgba(94, 200, 255, .16); color: #a9e2ff; }
.news-more { text-align: center; margin: 32px 0 0; }
.news-empty { color: var(--muted); }
.news-page { padding-top: 64px; min-height: 70vh; }
.post { padding-inline: max(16px, calc((100% - 760px) / 2)); }
.post h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.2; margin: 10px 0 24px; }
.post-back { color: var(--muted); text-decoration: none; font-size: .9rem; }
.post-back:hover { color: var(--gold-2); }
.post-meta { display: flex; align-items: center; gap: 12px; margin: 24px 0 0; }
.post-body { color: #ddd3c5; }
.post-body h2 { color: var(--gold-2); font-size: 1.3rem; margin: 32px 0 8px; }
.post-body li { margin: 6px 0; }
.post-body strong { color: var(--text); }

/* ---------- footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 28px max(16px, calc((100% - var(--wrap)) / 2));
  border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem;
}
.footer p { margin: 0; display: inline-flex; align-items: center; gap: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .legends { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .downloads { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav nav a { padding: 6px 8px; font-size: .85rem; }
  .nav nav a[href$="#battle"], .nav nav a[href$="#faq"] { display: none; }
  .legends, .shots { gap: 12px; }
  .legend-body { margin-top: -60px; padding: 60px 12px 14px; }
  .legend-tag { font-size: .6rem; padding: 2px 8px; }
  .legend h3 { font-size: 1.05rem; }
  .legend p { font-size: .82rem; }
  .hero { align-items: flex-end; }
  .hero-art {
    width: 100%; height: 52%; object-position: 50% 8%;
    -webkit-mask-image: linear-gradient(0deg, transparent 0%, #000 45%);
    mask-image: linear-gradient(0deg, transparent 0%, #000 45%);
  }
  .hero-content { text-shadow: 0 2px 6px #000, 0 0 2px #000; }
  /* a text shadow would paint over the transparent text of the gradient logo */
  .hero-content .logo, .hero-content .logo span, .hero-content .btn { text-shadow: none; }
  .hero-bg { background-position: 72% center; }
  .hero::before {
    background: linear-gradient(to top, var(--bg) 8%, rgba(11, 10, 18, .75) 45%, rgba(11, 10, 18, .1) 80%);
  }
  .section { padding-block: 72px; }
  .dl { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  .card, .btn, .legend, .legend img, .shot, .shot img { transition: none; }
}
