:root {
  --ink: #171717;
  --bar: #000;
  --paper: #f1ecdf;
  --gold: #e5cd92;
  --accent: #795a28;
  --edge: clamp(1.5rem, 4vw, 5rem);
  --header: 5rem;
  --title: Tungsten, Impact, "Arial Narrow", sans-serif;
  --ui: Arial, sans-serif;
  --surface: #232323;
  --surface-hover: #363636;
  --lavender: #d6b8ff;
  --plum: #502f63;
  font: 400 100%/1.55 DIN, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  scroll-padding-top: var(--header);
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
body { min-width: 280px; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }
:focus-visible { outline: 3px solid #c88930; outline-offset: 4px; }
.skip { position: fixed; left: 1rem; top: -8rem; z-index: 20; background: white; padding: .75rem; }
.skip:focus { top: .5rem; }
.page-width { width: min(100%, 105rem); padding-inline: var(--edge); margin-inline: auto; }
.topbar {
  position: sticky; top: 0; z-index: 10; height: var(--header);
  display: flex; align-items: center; gap: 1.5rem; padding-inline: clamp(1rem, 2.85vw, 3rem);
  background: var(--bar); color: #f8f3e7; border-bottom: 2px solid #242424;
  font: 700 .82rem/1.15 var(--ui); letter-spacing: .06em; text-transform: uppercase;
}
.brand, .utilities, #primary-nav, #primary-nav summary, .dropdown a { display: flex; align-items: center; }
.brand { gap: .75rem; flex-shrink: 0; }

.brand > img:first-child { width: 2rem; height: 2rem; }
.brand-name { width: 5.875rem; height: auto; }
#primary-nav { gap: clamp(.05rem, .45vw, 1rem); }
#primary-nav > a, #primary-nav summary { display: flex; align-items: center; gap: .36rem; min-height: 2.1rem; padding-inline: clamp(.4rem,.85vw,1rem); border-radius: .4rem; white-space: nowrap; }
#primary-nav > a:hover, #primary-nav summary:hover, #primary-nav details[open] > summary { background: var(--surface-hover); }
.caret { border-inline: 4px solid transparent; border-top: 5px solid #aaa; }
.popover[open] .caret { transform: rotate(180deg); }
.popover { position: relative; }

.dropdown { position: absolute; top: calc(100% + .55rem); left: 0; min-width: 13rem; padding: .65rem; background: var(--surface); border-top: 4px solid var(--gold); border-radius: 0 0 .25rem .25rem; box-shadow: 0 .65rem 1.25rem #0006; }
.dropdown a { padding: .75rem .65rem; border-radius: .3rem; line-height: 1.3; }
.dropdown a:hover, .dropdown a:focus-visible { background: var(--surface-hover); color: #fff; }
.utilities { gap: .55rem; margin-left: auto; }
.icon-button { display: grid; place-items: center; border: 0; border-radius: 1rem; background: var(--surface); width: 2.75rem; height: 2.75rem; }
.icon-button:hover { background: var(--surface-hover); }
.search summary svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tool-panel { left: auto; right: 0; width: min(19rem, calc(100vw - 2rem)); padding: 1rem; }
.tool-panel label { display: block; margin-bottom: .65rem; }
.tool-panel input { width: 100%; padding: .7rem; color: white; background: var(--ink); border: 1px solid #888; }
#results { max-height: min(50vh, 20rem); overflow-y: auto; }
#results p { padding: .8rem 0 .25rem; text-transform: none; letter-spacing: 0; font-weight: 400; }

.play-now, #primary-nav .mobile-play { display: inline-flex; align-items: center; justify-content: center; padding: .6rem 1.05rem; border-radius: .8rem; background: linear-gradient(110deg,#d6b16c,var(--gold)); color: var(--ink); }
.play-now:hover, #primary-nav .mobile-play:hover { filter: brightness(1.12); }
.topbar .menu-toggle, #primary-nav .mobile-play { display: none; }
.hero { position: relative; isolation: isolate; min-height: min(80dvh, 1080px); display: grid; place-items: center; padding: 4rem var(--edge); color: #fff8e9; text-align: center; background: var(--bar); }
.hero > video, .hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero > video { object-fit: cover; object-position: 56% center; }
.hero::after { content: ""; background: radial-gradient(ellipse at 50% 55%, #0006 0%, transparent 66%),linear-gradient(to top,#000c,transparent 42%),linear-gradient(#0002,#0002); }
.hero-content { display: flex; align-items: center; flex-direction: column; }

.wordmark { display: flex; justify-content: center; align-items: center; gap: 2%; width: min(100%, 32rem); }
.wordmark .hero-mark { width: 13%; height: auto; filter: drop-shadow(0 2px 4px #1a142b80); }
.wordmark .hero-name { width: 84.375%; height: auto; image-rendering: pixelated; }
.hero-content p { max-width: 49ch; margin: 1.45rem 0 2.65rem; font: 500 clamp(1.125rem, 1.65vw, 1.45rem)/1.4 DIN, Arial, sans-serif; color: #fffaf2; text-wrap: balance; text-shadow: 0 1px 2px #142338, 0 2px 8px #122037; }
.cta {
  --button-bg: var(--bar); --button-fg: var(--paper);
  --hover-bg: var(--surface-hover); --hover-fg: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  border: 0; border-radius: 0; padding: 1.125rem 2rem; background: var(--button-bg); color: var(--button-fg);
  font: 500 1.125rem/1.75rem DIN, Arial, sans-serif; text-align: center; text-transform: uppercase;
  transition: color .25s ease-in-out, background-color .3s ease-in-out;
}
.cta.light { --button-bg: var(--gold); --button-fg: var(--ink); --hover-bg: var(--paper); --hover-fg: var(--ink); }
.cta:hover { background: var(--hover-bg); color: var(--hover-fg); }
.hero-cta { --button-bg: #b6e3ff; --button-fg: #112c40; --hover-bg: #def2ff; --hover-fg: #112c40; outline: 1px solid #def2ff; outline-offset: 3px; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; }
.discord-cta { --button-bg: #242035; --button-fg: #f2eaff; --hover-bg: #41334f; --hover-fg: white; box-shadow: inset 0 0 0 1px #d6b8ff; }
.cta:focus-visible { outline: none; }
.cta:focus-visible::before { content: ""; position: absolute; inset: -8px; border: 4px solid currentColor; border-radius: 4px; }
.hero-cta:focus-visible::before, .cta.light:focus-visible::before { border-color: var(--paper); }
.overview .cta:focus-visible::before { border-color: var(--ink); }
.motion { position: absolute; right: 1rem; bottom: 1rem; width: 2.25rem; height: 2.25rem; display: grid; place-items: center; color: white; background: #000c; border: 1px solid #fff8; opacity: 0; transition: opacity .18s; }
.hero:hover .motion, .gameplay:hover .motion, .motion:focus-visible { opacity: 1; }
.motion span { border-left: .55rem solid currentColor; border-block: .37rem solid transparent; }
.motion.playing span { width: .62rem; height: .8rem; border: 0; border-inline: 3px solid currentColor; }
.news { padding-block: 3rem 4.5rem; }

.news-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.news-heading h2, .feature h2 { font: 400 3rem/1 var(--title); text-transform: uppercase; }
.news-all { display: inline-flex; align-items: center; gap: .4rem; font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; text-transform: uppercase; }
.news-all svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: var(--accent); stroke-width: 1.7; }
.news-all:hover { color: #555; }
.story:hover h3 { text-decoration: underline; text-underline-offset: .17em; }
.news-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1.2rem,2.3vw,2.5rem); }
.story { display: block; min-width: 0; }
.story-art { aspect-ratio: 16/9; overflow: hidden; background: var(--ink); }
.story-art img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .25s; }
.story:hover .story-art img { transform: scale(1.025); }

.meta, .section-label { color: var(--accent); font-weight: 700; text-transform: uppercase; }
.meta { font-size: .875rem; margin: 1.25rem 0 .65rem; }
.story h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.16; }
.story p { margin-top: .5rem; color: #454545; line-height: 1.55; }
.news-controls { display: none; }
.feature { display: grid; align-items: center; min-height: clamp(32rem,45vw,43rem); padding-block: 4rem; }
.feature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: center; gap: clamp(2rem,6vw,6rem); }
.feature h2 { font-size: clamp(4rem,7.05vw,7.5rem); margin-bottom: 1rem; }
.feature .section-label { margin: 0 0 1rem; font-size: 1.125rem; }
.feature .copy > p:not(.section-label) { max-width: 50ch; font-size: 1.125rem; line-height: 1.65; }
.feature .cta { margin-top: 3rem; }
.campaign {
  --cape-art: url("./media/heromans-cape.webp?v=dev-muted");
  color: white; background: linear-gradient(90deg,#000e 1%,#000b 36%,#0001 72%), var(--cape-art) right top/cover;
}
.campaign .section-label { color: var(--gold); }
.overview, .worlds { background: var(--paper); }
.worlds .cta {
  --button-bg: var(--lavender); --button-fg: #281936;
  --hover-bg: #e3ccff; --hover-fg: #281936;
}
.worlds .cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: 0 0 12px 2px #b76af48c, 0 0 28px 5px #c982fc66;
  opacity: .8; animation: monument-glow 2.8s ease-in-out infinite alternate;
}
@keyframes monument-glow { from { opacity: .35; } to { opacity: .95; } }
.worlds .cta:is(:hover, :focus-visible)::after { animation: none; opacity: 1; }
.worlds .cta:focus-visible::before { border-color: var(--plum); }
.gameplay { position: relative; }
.gameplay video, .feature-art { width: 100%; aspect-ratio: 16/9; height: auto; object-fit: cover; background: var(--ink); }
.player-guide { color: #24192c; background: radial-gradient(ellipse at 24% 45%, #ffe7f3, transparent 58%), linear-gradient(110deg, #efd8ed, #dfccf2 78%); }
.guide-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: 2rem; border-bottom: 1px solid #ac90b6; }
.guide-head h2 { margin: 0 0 .65rem; }
.player-guide :focus-visible { outline-color: var(--plum); }
.guide-pane { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); align-items: start; gap: clamp(2rem,4vw,5rem); }
.guide-photo { display: block; cursor: zoom-in; }
.guide-photo img { width: 100%; height: auto; }
.guide-photo span { display: block; margin-top: .45rem; color: var(--plum); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; }
.guide-copy h2, .guide-copy h3 { font: 400 clamp(2rem,3vw,3.25rem)/1 var(--title); text-transform: uppercase; }
.guide-copy .guide-intro { margin-top: .6rem; font-weight: 600; }
.guide-copy dl { margin: 1.25rem 0 0; }
.guide-copy dt { margin-top: .85rem; font-weight: 700; color: var(--plum); }
.guide-copy dd { margin: .12rem 0 0; max-width: 50ch; }
.guide-copy dd p + p { margin-top: .7em; }
.guide-copy kbd { display: inline-block; padding: 0 .26em; border: 1px solid #a689b2; border-radius: .2em; background: #fff7; color: #302037; font: 600 .85em/1.25 var(--ui); }
.release { min-height: 0; color: var(--paper); background: #19161f; }
.release .section-label { color: var(--lavender); }
.release h2 { margin-bottom: 0; }
footer { text-align: center; background: var(--bar); color: var(--paper); padding-bottom: 1rem; }
footer nav { font: 700 .8125rem/1.15 var(--ui); letter-spacing: .05em; text-transform: uppercase; display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem; padding: 1.3rem 1rem; background: var(--bar); border-bottom: 1px solid #292929; }
footer nav a { padding: .6rem 1rem; border-radius: .4rem; }
footer nav a:hover { background: var(--surface-hover); }
.footer-brand { display: inline-flex; align-items: center; gap: .75rem; margin: 2.5rem 0 1rem; }
footer p { color: #c4c4c4; font-size: .875rem; }
.footer-contact { margin-bottom: .5rem; }
.footer-contact a { color: var(--lavender); text-decoration: underline; text-underline-offset: .18em; }
.footer-contact a:hover { color: white; }
.footer-copyright { margin: 1.5rem var(--edge) 0; text-align: right; }
#viewer { width: min(64rem,94vw); max-height: 92dvh; overflow: auto; border: 1px solid #a39370; padding: 0; background: var(--bar); color: var(--paper); box-shadow: 0 1rem 5rem #0009; }
#viewer::backdrop { background: #000d; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; gap: 1rem; }

.viewer-head h2 { font: 400 1.65rem/1 var(--title); text-transform: uppercase; }
.close-viewer { font-size: 1.5rem; line-height: 1; color: var(--paper); }
#viewer video, #viewer img { width: 100%; max-height: 74dvh; object-fit: contain; background: var(--bar); }
[hidden] { display: none !important; }
@media (max-width: 1024px) {
  .topbar { gap: 1.4rem; }
  .cta, .news-all { font-size: 1rem; line-height: 1.5rem; }
  .topbar .menu-toggle { display: grid; order: 1; }
  .utilities .play-now { display: none; }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 1.25rem; height: 2px; background: currentColor; }
  .menu-toggle span { position: relative; }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; top: -6px; }
  .menu-toggle span::after { top: 6px; }
  .menu-toggle[aria-expanded="true"] span { background: transparent; }
  .menu-toggle[aria-expanded="true"] span::before, .menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }
  #primary-nav { display: none; position: absolute; top: 100%; right: 0; width: min(100%,26rem); max-height: calc(100dvh - var(--header)); overflow: auto; background: var(--bar); padding: .6rem 1.5rem 1.5rem; box-shadow: 0 1rem 1rem #0004; }
  #primary-nav.open, #primary-nav > a, #primary-nav .mobile-play { display: block; }
  #primary-nav > a, #primary-nav summary { padding: .9rem; margin-block: .3rem; background: var(--surface); }
  #primary-nav .mobile-play { margin-top: 1.25rem; padding: .9rem; text-align: center; background: linear-gradient(110deg,#d6b16c,var(--gold)); border-radius: .8rem; }
  #primary-nav .dropdown { position: static; box-shadow: none; border: none; background: var(--ink); }
  .news-row { grid-auto-flow: column; grid-auto-columns: min(72%,29rem); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: .35rem; }
  .story { scroll-snap-align: start; }
  .news-controls { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
  .news-controls button { display: grid; place-items: center; padding: 0; background: transparent; border: 0; width: 2rem; height: 2rem; color: var(--accent); }
  .news-controls svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; }
  .news-controls button:hover:enabled { color: var(--ink); }
  .news-controls button:disabled { opacity: .3; cursor: default; }
}
@media (max-width: 720px) {
  .hero-content { width: 100%; }
  .news { padding-block: 2rem; }
  .news-heading h2 { font-size: 2rem; }
  .news-row { grid-auto-columns: 90%; gap: 1rem; }
  .feature { min-height: auto; padding-block: 3.5rem; }
  .feature-grid { grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .feature h2 { font-size: clamp(2.5rem,11.5vw,4rem); }
  .feature .copy > p:not(.section-label) { font-size: 1rem; }
  .campaign {
    min-height: 30rem; align-items: end;
    background: linear-gradient(to top,#000 38%,#000b 52%,transparent 74%), var(--cape-art) right top / max(100%,36rem) auto no-repeat, #000;
  }
  .guide-head { display: block; margin-bottom: 1.25rem; }
  .guide-pane { grid-template-columns: minmax(0,1fr); gap: 1.25rem; }
  .tool-panel { position: fixed; top: var(--header); right: 1rem; }
  .feature .cta { margin-top: 1.45rem; }
  footer nav { gap: 1.2rem; }
}
@media (max-width: 600px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-content p { margin: 1rem 0 2rem; }
  .cta, .news-all { font-size: .875rem; line-height: 1.375rem; }
  .cta { width: 100%; }
  .story h3 { font-size: 1.3rem; }
  .feature .section-label { font-size: 1rem; }
}
@media (hover: none) { .motion { opacity: .8; } }
@keyframes section-arrival {
  from { opacity: .55; transform: translateY(.75rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
  .in-view > :is(.hero-content, .feature-grid, .news-heading, .news-row, .guide-photo, .guide-copy),
  .player-guide.in-view .guide-head {
    animation: section-arrival .5s cubic-bezier(.2,.7,.2,1);
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
  .worlds .cta::after { animation: none; }
}
