:root {
  color-scheme: dark;
  --ink: #111417;
  --deep: #0c0f13;
  --panel: #181d22;
  --ivory: #f7e9d2;
  --text: #c7c1b8;
  --gold: #e4b77e;
  --line: #423932;
  --heading: "Baskervville", "Baskerville", Georgia, serif;
  --body: "Instrument Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 1rem/1.65 var(--body);
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: .22em; }
a:hover { color: var(--ivory); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
button { font: inherit; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { color: var(--ivory); line-height: 1.05; }
h2, h3, .tagline { font-family: var(--heading); font-weight: 400; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -.045em; }
h3 { font-size: clamp(1.65rem, 2.6vw, 2.25rem); letter-spacing: -.025em; }
em { color: var(--gold); }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 4;
  top: .75rem;
  left: .75rem;
  padding: .65rem 1rem;
  background: var(--deep);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header { background: var(--deep); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  min-height: 4.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .65rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: var(--ivory);
  font-size: 1.1rem;
  font-weight: 850;
  letter-spacing: .11em;
  text-decoration: none;
}
.brand img { flex: none; border: 1px solid #624337; border-radius: 8px; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 0 1.75rem; }
.site-header nav a, .site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .86rem;
  text-decoration: none;
}
.site-header nav a { color: var(--text); }
.site-header nav a:hover, .site-header nav [aria-current] { color: var(--gold); }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(105deg, #101316 28%, #191a19 70%, #11191c);
  border-bottom: 1px solid var(--line);
}
.hero-art {
  position: absolute;
  z-index: -2;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  object-fit: cover;
  object-position: center 41%;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #101316 30%, #101316 42%, #10131600 70%),
    linear-gradient(0deg, #101316 1%, #10131600 25%, #10131600 90%, #10131645);
}
.hero-inner {
  min-height: clamp(35rem, 47vw, 45rem);
  display: grid;
  align-items: center;
  padding-block: 5rem;
}
.hero-copy { max-width: 36rem; }
.eyebrow {
  color: var(--gold);
  font: 650 .72rem/1.45 var(--body);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero h1 {
  margin: .4rem 0 .35rem -.055em;
  color: #fff0d8;
  font-family: "Archivo Black", "Arial Black", var(--body);
  font-size: clamp(5.7rem, 13vw, 12rem);
  font-weight: 950;
  line-height: .96;
  letter-spacing: -.085em;
}
.tagline {
  color: var(--ivory);
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.tagline em { white-space: nowrap; }
.hero-intro { max-width: 29ch; margin-top: 1.45rem; font-size: 1.09rem; }
.store-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.store {
  display: grid;
  min-width: 8.5rem;
  border: 1px solid #74583f;
  padding: .6rem .95rem;
  background: #1e1c19;
  color: var(--ivory);
  text-decoration: none;
}
.store strong { font-weight: 650; line-height: 1.25; }
.store span { color: var(--gold); font-size: .69rem; letter-spacing: .12em; text-transform: uppercase; }

.story, .gameplay {
  display: grid;
  grid-template-columns: .85fr 1fr;
  gap: clamp(2rem, 8vw, 8rem);
  align-items: center;
  padding-block: clamp(3.5rem, 8vw, 7rem);
}
.story h2, .gameplay h2, .section-heading h2 { margin-top: .6rem; }
.story-copy { font-size: clamp(1rem, 1.75vw, 1.18rem); }
.story-copy p + p { margin-top: 1rem; color: var(--ivory); }
.chapters, .access {
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: linear-gradient(125deg, #151a21, #101419 80%);
  border-block: 1px solid var(--line);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.8rem;
}
.section-heading > p { font-size: .91rem; }
.chapter-grid, .access-grid { display: grid; gap: 1rem; }
.chapter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chapter {
  --chapter-accent: #c69a62;
  background: linear-gradient(160deg, #21201d, #181b1e 65%);
  border: 1px solid var(--line);
  border-top: 2px solid var(--chapter-accent);
}
.machinery { --chapter-accent: #91a7a7; background: linear-gradient(160deg, #1a2529, #181b1e 65%); }
.red-rooms { --chapter-accent: #d48776; background: linear-gradient(160deg, #2a1c1e, #181b1e 65%); }
.shot { position: relative; display: block; }
.shot img { width: 100%; }
.shot:hover .expand, .shot:focus-visible .expand { background: var(--ivory); color: var(--deep); }
.expand {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  width: 2.1rem;
  border: 1px solid var(--chapter-accent);
  background: #141318;
  color: var(--ivory);
  text-align: center;
  transition: background-color .18s, color .18s;
}
.chapter-copy { padding: 1.15rem 1.25rem 1.35rem; }
.chapter-copy h3 { margin-block: .45rem .65rem; }
.chapter-copy .eyebrow { color: var(--chapter-accent); }

.gameplay { grid-template-columns: .7fr 1fr; align-items: start; }
.gameplay-intro > p:last-child { margin-top: 1.15rem; max-width: 41ch; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1.8rem; }
.feature-grid div { padding-top: .9rem; border-top: 1px solid var(--line); }
.feature-grid dt { color: var(--ivory); font-weight: 650; }
.feature-grid dd { font-size: .92rem; margin-top: .22rem; }
.access { background: linear-gradient(135deg, #1a1b1b, #171719 60%, #251a1b); }
.access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.access-grid article { border: 1px solid #68523f; padding: clamp(1rem, 3vw, 1.75rem); background: #14171b; }
.access-grid article + article { background: #291e1d; }
.access-grid p { margin-top: .7rem; max-width: 54ch; }
.history { text-align: center; padding-block: clamp(3.5rem, 7vw, 6rem); }
.history h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.history p { max-width: 55ch; margin: 1rem auto 0; }
.site-footer { border-top: 1px solid var(--line); background: var(--deep); }
.footer-inner { padding-block: .75rem; font-size: .84rem; }
.footer-inner span { color: var(--gold); padding-inline: .3rem; }

.gallery {
  width: min(68rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100% - 1.5rem);
  padding: .8rem;
  background: var(--panel);
  color: var(--ivory);
  border: 1px solid #80654d;
}
.gallery::backdrop { background: #07090beb; }
body:has(.gallery[open]) { overflow: hidden; }
.gallery-bar, .gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.gallery-bar { padding-bottom: .65rem; }
.gallery-bar h2 { font-size: clamp(1.35rem, 4vw, 1.85rem); padding-inline-start: .35rem; }
.gallery-image { width: 100%; max-height: 68dvh; object-fit: contain; background: var(--deep); touch-action: pan-y pinch-zoom; }
.gallery-controls { padding-top: .65rem; text-align: center; }
.gallery button {
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid #80654d;
  background: var(--deep);
  color: var(--ivory);
  font-size: 1.4rem;
  line-height: 1;
}
.gallery button:hover { background: #3a2921; }

.document-banner {
  background: radial-gradient(ellipse at 82% 135%, #382323, transparent 60%), linear-gradient(115deg, #15191e, #10151a);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.8rem, 6vw, 5rem);
}
.document-banner .wrap { width: min(100% - 3rem, 61rem); }
.document-banner h1 {
  font: 400 clamp(2.75rem, 7vw, 5.5rem)/1.02 var(--heading);
  letter-spacing: -.055em;
  margin-block: .45rem .7rem;
}
.document-banner p:last-child { max-width: 58ch; }
.document { width: min(100% - 3rem, 61rem); margin: 0 auto; padding-block: clamp(2.25rem, 6vw, 4.5rem); }
.document h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); }
.document h3 { font-size: clamp(1.35rem, 3vw, 1.85rem); }
.document p { max-width: 72ch; }
.document p + p { margin-top: .75rem; }
.document h2 + p, .document h3 + p { margin-top: .6rem; }
.policy-meta { color: var(--gold); font-size: .88rem; margin-bottom: 1rem; }
.policy + .policy { margin-top: 3rem; }
.policy section { border-top: 1px solid var(--line); padding-block: 1.25rem; }
.language-nav { display: flex; gap: .65rem; margin: 0 0 1.45rem; }
.language-nav a {
  display: inline-grid;
  min-height: 44px;
  place-items: center;
  background: var(--panel);
  border: 1px solid #74583f;
  padding-inline: .85rem;
}
.language-nav [aria-current] { background: var(--gold); color: var(--deep); text-decoration: none; }
.support-section + .support-section { margin-top: 2.5rem; }
.support-section h2 { margin-bottom: .8rem; }
details { border-block-start: 1px solid var(--line); padding-inline: .95rem; }
details:last-child { border-block-end: 1px solid var(--line); }
summary { color: var(--ivory); cursor: pointer; padding-block: .85rem; font-weight: 650; }
summary::marker { color: var(--gold); }
details[open] { background: #171c20; }
details p, details ol { margin: 0 0 1rem 1rem; }
details ol { padding-left: 1.25rem; }
.support-contact { padding: clamp(1.1rem, 4vw, 2rem); border: 1px solid #68523f; background: #1c1b1b; }
.support-contact a, .policy a { overflow-wrap: anywhere; }

@media (min-width: 751px) and (max-width: 1000px) {
  .hero-art { width: 62%; object-position: 25% 41%; }
  .hero::after {
    background: linear-gradient(90deg, #101316 30%, #10131622 67%, transparent 82%),
      linear-gradient(0deg, #101316 1%, transparent 25%);
  }
}

@media (max-width: 750px) {
  .wrap, .document, .document-banner .wrap { width: calc(100% - 2rem); }
  .site-header nav, .site-footer nav { gap: 0 .95rem; }
  .header-inner { min-height: 3.7rem; }
  .brand { gap: .4rem; font-size: .92rem; }
  .brand img { width: 30px; height: 30px; }
  .site-header nav a { font-size: .82rem; }
  .hero-inner { align-items: start; min-height: 0; padding-block: 2.6rem 2.4rem; }
  .hero-art { right: -12%; width: min(78%, 32rem); height: 84%; object-position: left 34%; }
  .hero::after {
    background: linear-gradient(90deg, #101316 15%, #101316aa 40%, transparent 77%),
      linear-gradient(0deg, #101316 18%, #101316dc 32%, #10131600 72%);
  }
  .hero h1 { font-size: clamp(4.8rem, 19vw, 8rem); }
  .tagline { font-size: clamp(1.65rem, 5vw, 2.35rem); }
  .hero-intro { margin-top: 5.7rem; font-size: 1rem; }
  .store-row { margin-top: 1.15rem; }
  .story, .gameplay { grid-template-columns: 1fr; gap: 1.15rem; }
  .chapter-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-wrap: wrap; }
}

@media (max-width: 470px) {
  .access-grid { grid-template-columns: 1fr; }
  .feature-grid { gap: .95rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: enter .65s ease-out both; }
  @keyframes enter {
    from { opacity: 0; transform: translateY(.6rem); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
