/* Carved timber, royal-blue enamel, gilt, and parchment */
:root {
  color-scheme: dark;
  --ink: #f3e8cc;
  --gold: #efcc85;
  --line: #a67c43;
  --dark: #201822;
  --wood: repeating-linear-gradient(177deg, #ffd8a212 0 1px, #0000 2px 9px, #07020733 10px 12px, #0000 14px 30px),
    linear-gradient(165deg, #5c3b2c, #32202a 68%, #241922);
  --blue: linear-gradient(#3b6594, #263f69 51%, #182c50 53%, #213957);
  --serif: Georgia, "Times New Roman", serif;
  font: 16px/1.6 system-ui, sans-serif;
  color: var(--ink);
  background: #191621;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(#1a152854 0, #19162150 320px, #191621 860px),
    var(--world) center top / max(100vw, 1040px) auto no-repeat;
}
.theme-home { --world: url("/assets/art/background-main.webp"); }
.theme-news { --world: url("/assets/art/background-night.webp"); }
.theme-vault { --world: url("/assets/art/background-treasurevault.webp"); }
.theme-keep { --world: url("/assets/art/background-castle-interior.webp"); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: #fff1bf; }
:focus-visible { outline: 3px solid #fff3b6; outline-offset: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.08; font-family: var(--serif); }
h1 { font-size: clamp(2.45rem, 5.2vw, 4.5rem); letter-spacing: -0.045em; }
h2 { color: var(--gold); font-size: clamp(1.8rem, 3.5vw, 2.55rem); letter-spacing: -0.027em; }
h3 { font-size: 1.4rem; }
p { margin: 0.65rem 0 0; }
code { overflow-wrap: anywhere; font-size: 0.9em; }
.shell { width: min(1200px, calc(100% - 52px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 3; top: 8px; left: 12px; padding: 8px 14px; background: #201822; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header, .site-footer {
  background: repeating-linear-gradient(172deg, #e8d8c60a 0 1px, transparent 2px 10px),
    linear-gradient(#353346, #242030);
  border-bottom: 4px ridge #a7834d;
  box-shadow: 0 7px 18px #0008, inset 0 2px #c2b3a946;
}
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.15rem; }
.header-inner { min-height: 86px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand img, .portraits img {
  border: 4px ridge #d7af63;
  border-radius: 17% 17% 20% 20%;
  box-shadow: 0 3px 0 #22131a, 0 5px 8px #130d1580;
}
.brand img { width: 49px; height: 49px; }
.brand span { font: bold 1.35rem/0.95 var(--serif); }
.brand strong { display: block; margin-top: 5px; color: var(--gold); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.24em; }
.header-inner nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.button, .header-inner nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0.48rem 0.95rem;
  border: 3px ridge #b88c4e;
  border-radius: 6px 6px 9px 9px;
  background: var(--blue);
  box-shadow: 0 3px 0 #291b23, 0 5px 7px #100b1780, inset 0 0 0 1px #e3cd9f45;
  color: #fff1ce;
  font: bold 1rem/1.14 var(--serif);
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px #181424;
}
.header-inner nav a { padding-inline: 0.76rem; }
.button-gold {
  background: linear-gradient(#ffe39f, #edbd64 52%, #cf9140 54%, #e1a74f);
  border-color: #f1c77b;
  color: #3a1e17;
  text-shadow: 0 1px #fff1b5;
}
.button-gold::before, .button-gold::after {
  content: "";
  flex: 0 0 6px;
  height: 6px;
  background: #804922;
  transform: rotate(45deg);
  box-shadow: 1px 1px #fff2be;
}
.button:hover, .header-inner nav a:hover { filter: brightness(1.16); color: #fff6dd; }
.button-gold:hover { color: #3a1e17; }
.button:active, .header-inner nav a:active { transform: translateY(2px); box-shadow: 0 1px 0 #291b23; }
.header-inner nav a[aria-current] {
  background: linear-gradient(#5681a9, #335582 57%, #263f69 58%);
  border-color: #f4cd83;
  box-shadow: 0 3px 0 #291b23, inset 0 0 0 1px #ffdc90ab;
}

.main-stage {
  margin-block: clamp(14px, 3vw, 40px);
  border: 6px ridge #b18a59;
  background: var(--wood);
  box-shadow: 0 0 0 3px #302232, 0 16px 50px #120f19bb;
}
.hero {
  display: grid;
  align-items: center;
  position: relative;
  min-height: clamp(365px, 39vw, 520px);
  isolation: isolate;
  padding: clamp(18px, 4vw, 52px);
  border-bottom: 6px ridge #b18a59;
}
.hero-art {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-copy {
  width: min(100%, 445px);
  padding: clamp(16px, 3vw, 31px);
  border: 6px ridge #c19855;
  border-radius: 15px 15px 7px 7px;
  background: radial-gradient(ellipse at top, #3e598b, #1c2a4c 62%, #202039);
  box-shadow: 0 8px 18px #110b1fb0, inset 0 0 0 2px #ccac6880;
  text-shadow: 0 2px #181424;
}
.hero h1 { color: #fff0c4; }
.hero h1 em { display: block; color: #ffc969; }
.hero-copy > p { max-width: 34ch; }
.hero .hero-note { max-width: none; font-size: 0.81rem; color: #e9dbb9; }
.actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-block: 1.15rem; }
.release-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(14px, 3vw, 30px);
  border-bottom: 3px ridge #917146;
  background: var(--wood);
  font-family: var(--serif);
  font-size: 1.08rem;
}
.version-pill {
  display: inline-block;
  margin-right: 5px;
  background: #332235;
  border: 1px solid #ac8450;
  border-radius: 4px;
  color: #f4d493;
  padding: 2px 8px;
  font: bold 0.81rem/1.4 system-ui, sans-serif;
}

.section { padding: clamp(17px, 3.5vw, 40px); }
.section-heading { text-align: center; margin-bottom: 24px; }
.section-heading h2::after {
  content: "";
  display: block;
  height: 3px;
  width: min(182px, 58%);
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, #e0b369, transparent);
}
.feature-grid, .steps, .guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.parchment {
  background: radial-gradient(ellipse at 26% 15%, #fff1cfcc, transparent 76%),
    radial-gradient(ellipse at 85% 88%, #dbac69aa, transparent 80%),
    #edce92;
  border: 4px ridge #b38a55;
  border-radius: 9px 9px 6px 6px;
  padding: clamp(15px, 2.3vw, 25px);
  color: #36231e;
  box-shadow: 0 5px 0 #271923, inset 0 0 0 1px #ffe9b3, inset 0 0 16px #9354234e;
}
.parchment h3 { color: #56311c; }
.parchment a { color: #4a2712; }
.parchment a:hover { color: #622f03; }
.parchment :focus-visible { outline-color: #45240f; }
.portraits { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.portraits img { width: min(80px, 42%); }

.scene {
  border: 4px ridge #a9814c;
  border-radius: 9px;
  overflow: hidden;
  background: #282031;
  box-shadow: 0 5px 13px #150c19b0;
}
section.scene { padding: 0; }
.main-stage > .scene, .scene-grid { margin: 0 clamp(14px, 3.4vw, 40px) clamp(20px, 3.4vw, 40px); }
.scene-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.room-banner {
  display: flex;
  align-items: flex-end;
  min-height: clamp(150px, 24vw, 280px);
  padding: clamp(14px, 3vw, 32px);
  border-bottom: 4px ridge #a9814c;
  background: linear-gradient(90deg, #161322ae, transparent 76%), linear-gradient(0deg, #1d1725d9, transparent 72%),
    var(--banner) var(--position, center) / cover no-repeat;
}
.room-banner > div {
  max-width: 56ch;
  padding: 10px 16px;
  border-left: 3px solid #d8aa59;
  background: linear-gradient(90deg, #211927f5, #211927de 74%, #21192700);
  text-shadow: 0 2px 2px #170c13;
}
.room-banner h1, .room-banner h2 { color: #ffe4a8; }
.banner-download { --banner: url("/assets/art/header-download.webp"); --position: center 43%; }
.banner-events { --banner: url("/assets/art/header-leaderboards-events.webp"); }
.banner-community { --banner: url("/assets/art/header-community.webp"); --position: 64% center; }
.banner-support { --banner: url("/assets/art/header-faq-support.webp"); }
.banner-news { --banner: url("/assets/art/header-news-patchnotes.webp"); --position: 62% center; }
.banner-vault { --banner: url("/assets/art/background-treasurevault.webp"); --position: center 59%; }
.banner-keep { --banner: url("/assets/art/background-castle-interior.webp"); --position: center 44%; }
.page-heading { min-height: clamp(220px, 31vw, 355px); }
.steps { padding: clamp(14px, 3vw, 30px); margin: 0; list-style: none; }
.step-number {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  margin-bottom: 11px;
  background: var(--blue);
  border: 3px ridge #d7ae65;
  border-radius: 50%;
  color: #ffedc2;
  font: bold 1rem/1 var(--serif);
}
.room-actions { padding: 0 clamp(14px, 3vw, 30px) clamp(14px, 3vw, 30px); }
.scene-grid .room-banner { min-height: clamp(145px, 18vw, 220px); }
.scene-copy { padding: clamp(15px, 3vw, 26px); }
.scene-copy > p:first-child { margin-top: 0; }
.scene-copy .button { margin-top: 1rem; }
.community-scene .scene-copy {
  background: linear-gradient(#251c2bd9, #211924f0), url("/assets/art/background-sunset.webp") center 48% / cover;
}
.faq .scene-copy {
  background: linear-gradient(#211a2bad, #211924e6), url("/assets/art/background-night.webp") center 51% / cover;
}

.reading { max-width: 980px; margin-inline: auto; }
.reading h2:not(:first-child) { margin-top: 29px; }
.guide-grid { margin-top: 16px; }
.guide-grid strong { display: block; margin-top: 0.65rem; }
.muted { color: #e1cdb1; }
details {
  border: 2px solid #a48250;
  border-radius: 6px;
  background: #251e30;
}
details + details { margin-top: 10px; }
.release-list h2 { margin-bottom: 14px; }
summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--blue);
  color: #ffebc5;
  font: bold 1.09rem/1.3 var(--serif);
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: #ffdc8d; margin-left: auto; font-size: 1.25rem; }
details[open] > summary::after { content: "−"; }
summary:hover { filter: brightness(1.15); }
details > p, .release-body { padding: 10px 15px 15px; margin: 0; }
.release-body h3 { margin-top: 15px; color: #f4d99f; }
.release-date { font: 0.85rem/1.3 system-ui, sans-serif; }

.site-footer { border-bottom: 0; border-top: 4px ridge #a7834d; }
.footer-inner { padding-block: 21px; }
.footer-inner strong { font: bold 1.15rem/1.25 var(--serif); color: var(--gold); }
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 14px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { gap: 10px; flex-wrap: wrap; }
  .header-inner nav { order: 1; width: 100%; padding-top: 4px; }
}
@media (max-width: 670px) {
  .shell { width: calc(100% - 22px); }
  .main-stage { border-width: 4px; }
  .hero { padding: min(46vw, 290px) 12px 15px; min-height: 0; background: var(--wood); }
  .hero-art { height: auto; min-height: min(54vw, 340px); object-position: 63% center; }
  .hero-copy { width: 100%; }
  .hero h1 em { display: inline; }
  .feature-grid, .steps, .guide-grid, .scene-grid { grid-template-columns: 1fr; }
  .portraits img { width: 66px; }
  .scene-copy { padding: 14px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 400px) {
  .header-inner nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand img { width: 39px; height: 39px; }
  .brand { gap: 7px; }
  .brand span { font-size: 1.1rem; }
  .button, .header-inner nav a { padding-inline: 9px; }
  .release-strip { flex-wrap: wrap; }
}

