@font-face {
  font-family: mt-serif;
  src: local(Georgia);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: #100d0a;
  color: #e9dfca;
  font-family: Manrope, Arial, sans-serif;
  line-height: 1.6;
}
a {
  color: inherit;
}
.topbar {
  height: 58px;
  padding: 0 clamp(18px, 4vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #5d4a3277;
  font-size: 11px;
  letter-spacing: 0.15em;
}
.topbar a {
  text-decoration: none;
}
.topbar b,
.eyebrow,
.num {
  color: #c14732;
}
.hero {
  min-height: calc(100svh - 58px);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 7vw;
  overflow: hidden;
  background: radial-gradient(
    circle at 73% 37%,
    #5d4127 0,
    #241a11 26%,
    #100d0a 57%
  );
}
.hero:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, transparent 0 89px, #d0a86b08 90px),
    repeating-linear-gradient(0deg, transparent 0 89px, #d0a86b08 90px);
  pointer-events: none;
}
.hero-copy {
  z-index: 1;
  max-width: 730px;
}
.eyebrow,
.num {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero h1,
h2 {
  font:
    400 clamp(48px, 8vw, 128px)/0.83 mt-serif,
    Georgia,
    serif;
  letter-spacing: -0.055em;
  margin: 0.25em 0;
}
.hero h1 em,
h2 em {
  font-weight: 400;
  color: #d3a264;
}
.lead {
  max-width: 620px;
  font:
    clamp(17px, 1.6vw, 24px)/1.55 mt-serif,
    Georgia,
    serif;
}
.enter,
.seal {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 18px;
  border: 1px solid #b58c55;
  background: transparent;
  color: #f1e7d2;
  text-decoration: none;
  font:
    700 11px Manrope,
    Arial,
    sans-serif;
  letter-spacing: 0.14em;
  cursor: pointer;
}
.automaton {
  position: relative;
  width: min(40vw, 490px);
  aspect-ratio: 1/1.15;
  margin: auto;
  filter: drop-shadow(0 28px 35px #000);
}
.head {
  position: absolute;
  width: 25%;
  aspect-ratio: 0.8;
  left: 58%;
  top: 2%;
  border-radius: 50% 50% 42% 42%;
  background: #a15b33;
  border: 6px solid #2b1a10;
  text-align: center;
  padding-top: 10%;
  font-size: 30px;
}
.body {
  position: absolute;
  left: 57%;
  top: 20%;
  width: 31%;
  height: 31%;
  background: linear-gradient(110deg, #922d25, #54201d);
  border-radius: 40% 40% 5% 5%;
}
.board {
  position: absolute;
  top: 43%;
  left: 9%;
  right: 8%;
  height: 9%;
  background: #d5b078;
  color: #20160f;
  border: 7px solid #2a190e;
  padding: 1.3% 4%;
  word-spacing: 12px;
  white-space: nowrap;
  overflow: hidden;
}
.cabinet {
  position: absolute;
  left: 11%;
  top: 51%;
  width: 75%;
  height: 40%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 9px solid #2c1a0e;
  background: #6b472a;
}
.cabinet i {
  border: 1px solid #b0824d;
  background: repeating-radial-gradient(
    circle at 30%,
    #b78649 0 2px,
    #47301d 3px 10px
  );
}
.recon {
  position: absolute;
  right: 4%;
  bottom: 3%;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #a89478;
}
.story,
.engraving,
.timeline,
.myths,
.sources,
.reveal {
  padding: clamp(70px, 10vw, 160px) clamp(20px, 8vw, 140px);
}
.story {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 7vw;
  background: #e4d7bd;
  color: #231b14;
}
.story > div {
  max-width: 850px;
}
.story h2,
.engraving h2,
.reveal h2,
.sources h2 {
  font-size: clamp(44px, 7vw, 105px);
}
.big {
  font:
    clamp(20px, 2.4vw, 34px)/1.45 mt-serif,
    Georgia,
    serif;
}
.engraving {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 7vw;
  align-items: center;
  background: #19140f;
}
.engraving figure {
  margin: 0;
}
.engraving img {
  width: 100%;
  height: auto;
  filter: sepia(0.5) contrast(1.12);
  border: 1px solid #6f5638;
}
.engraving figcaption {
  font-size: 12px;
  color: #ad9b81;
  margin-top: 12px;
}
.game {
  padding: clamp(60px, 8vw, 120px) clamp(16px, 6vw, 100px);
  background: #0a0908;
  border-block: 1px solid #58442d;
}
.game-head {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: end;
  margin-bottom: 35px;
}
.game-head h2 {
  font-size: clamp(40px, 6vw, 85px);
  margin: 0.1em 0;
}
.game-head > p {
  max-width: 460px;
}
.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.5fr);
  gap: 30px;
}
.stage {
  min-height: 520px;
  padding: 7%;
  background: radial-gradient(circle, #3a2b1b, #18120d 60%);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.beam {
  position: absolute;
  width: 30%;
  height: 150%;
  background: #efc88016;
  transform: rotate(23deg);
  filter: blur(10px);
}
.machine {
  position: relative;
  width: min(100%, 650px);
  aspect-ratio: 1.7;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 18px solid #50331c;
  box-shadow: 0 25px 50px #000;
}
.machine button {
  min-width: 0;
  border: 2px solid #8c673d;
  background: #21170f;
  color: #e7d7b8;
  cursor: pointer;
  transition: 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.machine button span {
  font:
    52px mt-serif,
    serif;
}
.machine button small {
  font-size: 10px;
  letter-spacing: 0.14em;
}
.machine button.seen-zone {
  background: radial-gradient(circle, #a7773d, #392719);
  color: #fff1cc;
}
.machine button.safe-zone {
  background: repeating-radial-gradient(
    circle,
    #6e5538 0 3px,
    #17120d 4px 13px
  );
}
.machine button:hover,
.machine button:focus-visible {
  outline: 3px solid #e2b466;
  outline-offset: -8px;
}
.machine button.wrong {
  background: #922f29;
  animation: shake 0.3s;
}
.machine button.correct {
  background: #4d6f55;
}
aside {
  padding: 30px;
  border: 1px solid #57442f;
  background: #15110d;
}
.step {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #c14732;
}
aside h3 {
  font:
    35px mt-serif,
    serif;
  margin: 0.4em 0;
}
.legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11px;
  margin: 25px 0;
}
.legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 7px;
}
.legend .seen {
  background: #a7773d;
}
.legend .safe {
  background: #312419;
}
.status {
  min-height: 58px;
  color: #dcc294;
}
.text-button {
  border: 0;
  border-bottom: 1px solid;
  background: transparent;
  color: #cbb89c;
  padding: 8px 0;
  cursor: pointer;
}
.reveal {
  background: #a3392c;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 7vw;
}
.reveal[hidden] {
  display: none;
}
.timeline {
  background: #dfd1b5;
  color: #211a13;
}
.timeline ol {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 25px;
  padding: 28px 0;
  border-top: 1px solid #9e8e70;
}
.timeline time {
  font:
    38px mt-serif,
    serif;
  color: #a23829;
}
.timeline h3 {
  font:
    29px mt-serif,
    serif;
  margin: 0;
}
.timeline p {
  max-width: 750px;
}
.myths {
  background: #1b1510;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cards article {
  border: 1px solid #5a4933;
  padding: 25px;
}
.cards b {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #d09b58;
}
.cards h3 {
  font:
    28px mt-serif,
    serif;
}
.sources {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 7vw;
  background: #0d0b09;
}
.sources a {
  line-height: 2;
}
.rights {
  border-top: 1px solid #51412d;
  margin-top: 25px;
  color: #b9aa93;
}
footer {
  padding: 35px clamp(20px, 6vw, 100px);
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.13em;
  color: #9c8b72;
}
@keyframes shake {
  30% {
    transform: translateX(-7px);
  }
  70% {
    transform: translateX(7px);
  }
}
@media (max-width: 760px) {
  .topbar span {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 50px 20px;
  }
  .automaton {
    width: min(85vw, 400px);
  }
  .recon {
    right: 15px;
  }
  .story,
  .engraving,
  .reveal,
  .sources {
    grid-template-columns: 1fr;
  }
  .engraving figure {
    order: 2;
  }
  .game-head {
    display: block;
  }
  .game-grid {
    grid-template-columns: 1fr;
  }
  .stage {
    min-height: 340px;
    padding: 5%;
  }
  .machine {
    border-width: 10px;
  }
  .machine button span {
    font-size: 36px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .timeline li {
    grid-template-columns: 80px 1fr;
  }
  .timeline time {
    font-size: 26px;
  }
  footer span {
    display: none;
  }
}
@media (max-width: 380px) {
  .hero h1 {
    font-size: min(48px, 13vw);
  }
  .machine button small {
    font-size: 9px;
    letter-spacing: 0.05em;
  }
  .story h2,
  .engraving h2,
  .reveal h2,
  .sources h2 {
    font-size: min(44px, 12vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}

/* The inspection result appears only after a choice; the neutral grid gives no answer away. */
.machine button.safe-zone { background: #21170f; }
.machine button.blocked-zone { background: repeating-radial-gradient(circle, #775d3e 0 3px, #17120d 4px 13px); }
.machine button.wrong { background: #a53d35; }
.machine button.correct { background: #496b51; }
.step { color: #df705d; }
.clues { padding-left: 1.25em; margin: 18px 0; }
.clues li { margin: .7em 0; }
.legend i { width: 14px; height: 14px; vertical-align: -2px; border: 1px solid #d6c7ae; }
.legend .blocked { background: repeating-radial-gradient(circle, #775d3e 0 2px, #17120d 3px 6px); }
.status { color: #ead2a9; }
.text-button { min-height: 44px; color: #e1cfb4; padding: 10px 2px; }
.topbar a, footer a, .sources a { min-height: 24px; }
.topbar a, footer a { display: inline-flex; align-items: center; }
.story > .num, .timeline > .num { color: #8b281d; }
.story h2 em { color: #74420b; }
.engraving .num, .game .num, .myths .num, .sources .num { color: #ef806c; }
.sources a { display: inline-block; }
:focus-visible{outline:3px solid #e9dfca;outline-offset:3px;box-shadow:0 0 0 6px #000}

/* Игровой шкаф сохраняет реальный визуальный контекст гравюры Ракница. */
.game-intro{max-width:520px}.game-intro>p{margin:.45em 0}.game-intro strong{color:#f0c982}.game-intro ol{margin:.8em 0;padding-left:1.3em;font-size:13px;color:#cdbda5}.machine button{position:relative;overflow:hidden;isolation:isolate;background-color:#21170f;background-image:linear-gradient(#130e09aa,#130e09d8),url("assets/racknitz.webp");background-repeat:no-repeat;background-size:205% auto;text-shadow:0 2px 7px #000}.machine button[data-zone="0"]{background-position:8% 67%}.machine button[data-zone="1"]{background-position:92% 65%}.machine button[data-zone="2"]{background-position:8% 96%}.machine button[data-zone="3"]{background-position:92% 96%}.machine button span,.machine button small{position:relative;z-index:2}.machine button span{color:#f3e4c6}.machine button small{padding:3px 7px;background:#0d0907cc}.zone-result{position:absolute;z-index:3;left:8px;right:8px;bottom:8px;min-height:22px;padding:3px 5px;border:1px solid #e8d0a777;background:#120d09e8;color:#fff1d2;font:700 9px/1.35 Manrope,Arial,sans-serif;letter-spacing:.09em;text-align:center;font-style:normal}.zone-result:empty{display:none}.machine button.hint-seen{box-shadow:inset 0 0 0 7px #dcad62}.machine button.hint-blocked{box-shadow:inset 0 0 0 7px #9c7860}.machine button.hint-seen:after,.machine button.hint-blocked:after{position:absolute;z-index:3;top:7px;right:7px;padding:3px 5px;background:#110d09e8;font:700 9px/1.2 Manrope,Arial,sans-serif;letter-spacing:.08em}.machine button.hint-seen:after{content:"ОТКРЫТО";color:#ffd992}.machine button.hint-blocked:after{content:"МЕХАНИЗМ";color:#f0cbbb}.machine button.seen-zone{background-image:linear-gradient(#9b692999,#392719bb),url("assets/racknitz.webp")}.machine button.blocked-zone{background-image:repeating-radial-gradient(circle,#775d3e99 0 3px,#17120dcc 4px 13px),url("assets/racknitz.webp")}.machine button.correct{background-image:linear-gradient(#355d3aba,#18301dcc),url("assets/racknitz.webp")}.machine button.wrong{background-image:linear-gradient(#922f29c7,#40100ddd),url("assets/racknitz.webp")}.clues{list-style:none;padding:0}.clues li{display:grid;grid-template-columns:1fr auto;gap:5px 12px;padding:14px 0;border-top:1px solid #4e3e2c}.clues li>b{grid-column:1/-1;font-size:9px;letter-spacing:.13em}.clues li>b.seen{color:#f0bf70}.clues li>b.blocked{color:#d5aa90}.clues li>span{font:16px/1.45 mt-serif,Georgia,serif}.mark-clue{align-self:end;min-height:34px;padding:6px 9px;border:1px solid #755d40;background:#21180f;color:#f1dfc2;cursor:pointer;font:700 9px/1.25 Manrope,Arial,sans-serif;letter-spacing:.06em}.mark-clue[aria-pressed="true"]{background:#e0c697;color:#25180e}
@media(max-width:520px){.clues li{grid-template-columns:1fr}.mark-clue{justify-self:start;min-height:40px}.machine button span{font-size:31px}.machine button small{font-size:9px}.zone-result{font-size:8px;left:4px;right:4px;bottom:4px}.machine button.hint-seen:after,.machine button.hint-blocked:after{top:4px;right:4px;font-size:8px}}
