@font-face {
  font-family: "Sora";
  src: url("assets/official-reference/fonts/sora.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Cinzel";
  src: url("assets/official-reference/fonts/cinzel.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("assets/official-reference/fonts/caveat.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ash: #140f0b;
  --ash-soft: #211711;
  --ash-raised: #2c1d15;
  --gold: #d4a020;
  --gold-bright: #f6c544;
  --ember: #c0392b;
  --ember-bright: #f0592f;
  --parchment: #f3e4c4;
  --parchment-deep: #e5cda1;
  --ink: #3a2a18;
  --cream: #f5e9cf;
  --muted: #c2ad8a;
  --line: rgb(212 160 32 / 32%);
  --shadow: 0 24px 70px rgb(0 0 0 / 35%);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cream);
  background:
    radial-gradient(circle at 15% 0%, rgb(192 57 43 / 12%), transparent 30rem),
    radial-gradient(circle at 90% 30%, rgb(212 160 32 / 8%), transparent 24rem),
    var(--ash);
  font-family: "Sora", system-ui, sans-serif;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: .65rem 1rem;
  color: var(--ink);
  background: var(--gold-bright);
  border-radius: .4rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  background: rgb(20 15 11 / 90%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-weight: 700;
  letter-spacing: .02em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line), 0 0 24px rgb(240 89 47 / 18%);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: .2rem;
}

.desktop-nav a,
.mobile-links a {
  padding: .7rem .8rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: .4rem;
  font-size: .92rem;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"],
.mobile-links a:hover,
.mobile-links a[aria-current="page"] {
  color: var(--gold-bright);
  background: rgb(212 160 32 / 8%);
}

.desktop-nav .steam-link {
  margin-left: .35rem;
  color: #fff8e8;
  background: var(--ember);
}

.desktop-nav .steam-link:hover {
  color: #fff;
  background: var(--ember-bright);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.language-menu {
  position: relative;
}

.language-menu summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: .45rem;
  padding: .5rem .7rem;
  cursor: pointer;
  color: var(--cream);
  background: rgb(255 255 255 / 3%);
  border: 1px solid var(--line);
  border-radius: .4rem;
  list-style: none;
  font-size: .82rem;
  font-weight: 700;
}

.language-menu summary::-webkit-details-marker {
  display: none;
}

.language-menu summary::after {
  color: var(--muted);
  content: "▾";
  font-size: .7rem;
}

.language-current {
  color: var(--gold-bright);
  font-size: .86rem;
  letter-spacing: .12em;
}

.language-abbr {
  width: 2rem;
  min-height: 1.55rem;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  background: rgb(212 160 32 / 9%);
  border: 1px solid rgb(212 160 32 / 24%);
  border-radius: .35rem;
  font-size: .63rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.language-abbr-cjk {
  font-size: .72rem;
  letter-spacing: 0;
}

.language-menu[open] summary,
.language-menu summary:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.language-options {
  position: absolute;
  z-index: 60;
  top: calc(100% + .55rem);
  right: 0;
  display: grid;
  width: min(270px, calc(100vw - 2rem));
  padding: .55rem;
  background: var(--ash-soft);
  border: 1px solid var(--line);
  border-radius: .6rem;
  box-shadow: var(--shadow);
}

.language-option {
  display: grid;
  min-height: 40px;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: .55rem;
  padding: .5rem .6rem;
  color: var(--muted);
  border-radius: .35rem;
  text-decoration: none;
  font-size: .85rem;
}

a.language-option:hover,
a.language-option[aria-current="true"] {
  color: var(--gold-bright);
  background: rgb(212 160 32 / 9%);
}

a.language-option[aria-current="true"] .language-abbr {
  color: var(--ash);
  background: var(--gold-bright);
  border-color: var(--gold-bright);
}

.language-option[aria-disabled="true"] {
  opacity: .55;
  cursor: not-allowed;
}

.language-option small {
  color: #9d8968;
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mobile-nav {
  display: none;
}

.mobile-nav summary {
  cursor: pointer;
  color: var(--gold-bright);
  list-style: none;
  padding: .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: .4rem;
}

.mobile-links {
  position: absolute;
  right: 1rem;
  left: 1rem;
  top: 64px;
  display: grid;
  padding: .6rem;
  background: #211711;
  border: 1px solid var(--line);
  border-radius: .6rem;
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 690px;
  display: grid;
  align-items: end;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  content: "";
  background: var(--hero-image) center 40% / cover no-repeat;
}

.hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgb(20 15 11 / 88%) 0%, rgb(20 15 11 / 50%) 48%, rgb(20 15 11 / 32%) 75%),
    linear-gradient(0deg, var(--ash) 0%, transparent 58%);
}

.hero-content {
  max-width: 720px;
  padding-block: 7rem 5rem;
}

.game-logo {
  width: min(620px, 92vw);
  height: auto;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 12px 24px rgb(0 0 0 / 55%));
}

.eyebrow,
.kicker {
  color: var(--gold-bright);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-family: "Cinzel", Georgia, serif;
  line-height: 1.14;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
}

h2 {
  font-size: clamp(1.9rem, 4vw, 3.15rem);
}

h3 {
  font-size: 1.25rem;
}

.hero h1 {
  margin-bottom: 1rem;
}

.hero-copy {
  max-width: 650px;
  margin: 0 0 1.75rem;
  color: #f8edd8;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  text-shadow: 0 2px 12px rgb(0 0 0 / 55%);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: .45rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff8e8;
  background: var(--ember);
  box-shadow: 0 10px 28px rgb(192 57 43 / 25%);
}

.button-primary:hover {
  background: var(--ember-bright);
}

.button-secondary {
  color: var(--gold-bright);
  background: rgb(20 15 11 / 58%);
  border-color: var(--gold);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 2rem;
  border: 1px solid var(--line);
  border-radius: .6rem;
  background: rgb(20 15 11 / 68%);
  backdrop-filter: blur(10px);
}

.stat {
  padding: .9rem 1rem;
  text-align: center;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat strong {
  display: block;
  color: var(--gold-bright);
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
}

.stat span {
  color: var(--muted);
  font-size: .76rem;
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
}

.section-tight {
  padding-block: 3.5rem;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-heading p,
.lede,
.muted {
  color: var(--muted);
}

.ornamental-rule {
  display: flex;
  width: min(calc(100% - 2rem), 760px);
  margin: 0 auto;
  align-items: center;
  gap: 18px;
}

.ornamental-rule::before,
.ornamental-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(214 160 32 / 55%), transparent);
}

.ornamental-rule img {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 2px 10px rgb(240 89 47 / 40%));
}

.flow-grid,
.card-grid,
.official-grid,
.question-grid,
.fact-grid {
  display: grid;
  gap: 1rem;
}

.flow-grid {
  grid-template-columns: repeat(5, 1fr);
}

.flow-step {
  position: relative;
  min-height: 190px;
  padding: 1.25rem;
  color: var(--ink);
  background:
    linear-gradient(rgb(243 228 196 / 96%), rgb(229 205 161 / 96%)),
    var(--parchment);
  border: 1px solid rgb(212 160 32 / 45%);
  border-radius: .6rem;
  box-shadow: 0 14px 40px rgb(0 0 0 / 20%);
}

.flow-step img {
  width: 72px;
  height: 72px;
  margin-bottom: .8rem;
  object-fit: contain;
}

.flow-step .number {
  position: absolute;
  top: .8rem;
  right: .9rem;
  color: rgb(58 42 24 / 38%);
  font-family: "Cinzel", serif;
  font-weight: 800;
}

.flow-step p {
  margin-bottom: 0;
  font-size: .9rem;
}

.card-grid {
  grid-template-columns: repeat(4, 1fr);
}

.portal-card {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  padding: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(145deg, var(--parchment), var(--parchment-deep));
  border: 1px solid rgb(212 160 32 / 45%);
  border-radius: .65rem;
  box-shadow: 0 14px 42px rgb(0 0 0 / 22%);
  transition: transform .18s ease, box-shadow .18s ease;
}

.portal-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 52px rgb(0 0 0 / 30%);
}

.portal-card img {
  width: 112px;
  height: 112px;
  margin: 0 auto 1rem;
  object-fit: contain;
}

.portal-card p {
  margin: 0;
}

.portal-card .card-link {
  margin-top: auto;
  padding-top: 1rem;
  color: #8b321f;
  font-weight: 700;
}

.parchment-panel {
  color: var(--ink);
  background:
    linear-gradient(rgb(243 228 196 / 98%), rgb(238 218 179 / 98%)),
    var(--parchment);
  border: 1px solid rgb(212 160 32 / 48%);
  border-radius: .75rem;
  box-shadow: var(--shadow);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.fact-grid {
  grid-template-columns: repeat(2, 1fr);
  align-content: start;
}

.fact {
  padding: 1rem;
  background: rgb(255 250 235 / 35%);
  border: 1px solid rgb(58 42 24 / 16%);
  border-radius: .45rem;
}

.fact span {
  display: block;
  color: #705a3d;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.fact strong {
  font-family: "Cinzel", serif;
}

.question-grid {
  grid-template-columns: repeat(2, 1fr);
}

.question-card {
  padding: 1.25rem;
  text-decoration: none;
  background: var(--ash-soft);
  border: 1px solid var(--line);
  border-radius: .55rem;
}

.question-card h3 {
  color: var(--cream);
}

.question-card:hover h3 {
  color: var(--gold-bright);
}

.question-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.illustrated-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: start;
  column-gap: 1rem;
}

.illustrated-card img {
  width: 72px;
  height: 72px;
  grid-row: 1 / 3;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgb(0 0 0 / 35%));
}

.faq-more {
  justify-content: center;
  margin-top: 1.5rem;
}

.faq-list {
  display: grid;
  gap: .8rem;
}

.faq-item {
  background: rgb(255 250 235 / 35%);
  border: 1px solid rgb(58 42 24 / 16%);
  border-radius: .5rem;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 3rem 1rem 1.1rem;
  list-style: none;
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.faq-item summary::after {
  float: right;
  margin-right: -2rem;
  color: #8b321f;
  content: "+";
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 1.1rem 1.1rem;
}

.official-grid {
  grid-template-columns: repeat(4, 1fr);
}

.official-link {
  padding: 1.15rem;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: rgb(255 255 255 / 3%);
}

.official-link:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}

.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: 6rem 4.5rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.page-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  opacity: .14;
  background: var(--page-image) right 15% center / min(42vw, 520px) auto no-repeat;
  filter: saturate(.9);
}

.page-hero h1 {
  max-width: 860px;
  margin-bottom: 1rem;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.08rem;
}

.error-page {
  min-height: calc(100vh - 230px);
}

.error-hero {
  position: relative;
  min-height: calc(100vh - 150px);
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background: var(--error-image) center / cover no-repeat;
}

.error-hero::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgb(20 15 11 / 96%) 0%, rgb(20 15 11 / 86%) 42%, rgb(20 15 11 / 18%) 78%);
}

.error-content {
  padding-block: 5rem;
}

.error-card {
  max-width: 650px;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: rgb(20 15 11 / 78%);
  border: 1px solid var(--line);
  border-radius: .8rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.error-code {
  margin: 0 0 -.65rem;
  color: rgb(246 197 68 / 18%);
  font-family: "Cinzel", serif;
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  line-height: .85;
}

.error-card h1 {
  margin: .35rem 0 1rem;
}

.error-card > p:not(.error-code, .eyebrow) {
  max-width: 560px;
  margin: 0 0 1.75rem;
  color: var(--cream);
  font-size: 1.08rem;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 2rem;
  align-items: start;
}

.article {
  padding: clamp(1.4rem, 4vw, 3rem);
}

.article h2 {
  margin-top: 2.8rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgb(58 42 24 / 20%);
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.article h2:first-child {
  margin-top: 0;
}

.article a {
  color: #8b321f;
  font-weight: 700;
}

.article img.wide-shot {
  width: 100%;
  margin: 1.5rem 0;
  border: 4px solid rgb(58 42 24 / 22%);
  border-radius: .45rem;
  box-shadow: 0 14px 30px rgb(58 42 24 / 16%);
}

.guide-figure {
  margin: 1.5rem 0 2.25rem;
}

.guide-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
  border: 4px solid rgb(58 42 24 / 22%);
  border-radius: .45rem;
  box-shadow: 0 14px 30px rgb(58 42 24 / 16%);
}

.guide-frame img {
  width: 149.5%;
  max-width: none;
}

.guide-figure figcaption {
  padding: .8rem .2rem 0;
  color: #715b3c;
  font-size: .9rem;
}

.guide-figure figcaption strong {
  color: #8b321f;
}

.quick-answer,
.note,
.warning {
  margin-block: 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: .4rem;
}

.quick-answer {
  background: rgb(212 160 32 / 15%);
  border-left: 4px solid var(--gold);
}

.note {
  background: rgb(58 42 24 / 7%);
  border-left: 4px solid #8e6a3a;
}

.warning {
  background: rgb(192 57 43 / 10%);
  border-left: 4px solid var(--ember);
}

.toc {
  position: sticky;
  top: 95px;
  padding: 1.1rem;
  background: var(--ash-soft);
  border: 1px solid var(--line);
  border-radius: .55rem;
}

.toc strong {
  display: block;
  margin-bottom: .6rem;
  color: var(--gold-bright);
  font-family: "Cinzel", serif;
}

.toc a {
  display: block;
  margin-inline: -.55rem;
  padding: .38rem .55rem;
  color: var(--muted);
  border-radius: .35rem;
  text-decoration: none;
  font-size: .87rem;
  transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.toc a:hover,
.toc a[aria-current="location"] {
  color: var(--cream);
  background: rgb(212 160 32 / 6%);
}

.toc a[aria-current="location"] {
  font-weight: 600;
}

.mechanic-list {
  display: grid;
  gap: .8rem;
  padding: 0;
  list-style: none;
  counter-reset: rules;
}

.mechanic-list li {
  position: relative;
  padding: 1rem 1rem 1rem 3.2rem;
  background: rgb(255 250 235 / 35%);
  border: 1px solid rgb(58 42 24 / 14%);
  border-radius: .45rem;
  counter-increment: rules;
}

.mechanic-list li::before {
  position: absolute;
  top: .9rem;
  left: 1rem;
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  color: var(--parchment);
  background: var(--ember);
  border-radius: 50%;
  content: counter(rules);
  font-weight: 800;
  font-size: .75rem;
}

.formula {
  margin-block: 1.5rem;
  padding: 1.3rem;
  text-align: center;
  color: var(--parchment);
  background: var(--ink);
  border-radius: .45rem;
  font-family: "Cinzel", serif;
  font-size: clamp(1rem, 2vw, 1.3rem);
}

.entity-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.entity-card {
  padding: 1rem;
  color: var(--ink);
  background: linear-gradient(145deg, var(--parchment), var(--parchment-deep));
  border: 1px solid rgb(212 160 32 / 45%);
  border-radius: .55rem;
  box-shadow: 0 10px 28px rgb(0 0 0 / 18%);
}

.entity-card img {
  width: 100%;
  height: 150px;
  padding: .35rem;
  object-fit: contain;
}

.entity-card h3 {
  margin: .7rem 0 .2rem;
  font-size: 1rem;
}

.entity-card p {
  margin: 0;
  color: #715b3c;
  font-size: .78rem;
}

.site-footer {
  margin-top: 5rem;
  padding-block: 3rem;
  color: var(--muted);
  background: #0e0a08;
  border-top: 1px solid var(--line);
  font-size: .86rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-links a:hover {
  color: var(--gold-bright);
}

:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero::after {
    background: linear-gradient(0deg, var(--ash) 0%, rgb(20 15 11 / 45%) 75%, rgb(20 15 11 / 55%));
  }

  .flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-step:last-child {
    grid-column: 1 / -1;
  }

  .card-grid,
  .entity-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    order: -1;
  }

  .official-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .brand span {
    max-width: 150px;
    font-size: .82rem;
    line-height: 1.15;
  }

  .nav-shell {
    gap: .5rem;
  }

  .language-menu summary {
    padding-inline: .6rem;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding-block: 5rem 3.5rem;
  }

  .game-logo {
    width: 94%;
  }

  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(3) {
    border-left: 0;
  }

  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .flow-grid,
  .card-grid,
  .entity-grid,
  .question-grid,
  .official-grid,
  .fact-grid {
    grid-template-columns: 1fr;
  }

  .flow-step:last-child {
    grid-column: auto;
  }

  .portal-card {
    min-height: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .page-hero::before {
    opacity: .08;
    background-position: center;
    background-size: 90vw auto;
  }

  .error-hero {
    min-height: calc(100vh - 120px);
    background-position: 62% center;
  }

  .error-hero::after {
    background: rgb(20 15 11 / 70%);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
