:root {
  --ink: #0b100d;
  --deep: #111713;
  --forest: #1b2a20;
  --moss: #516945;
  --leaf: #86a665;
  --sand: #e6d9bd;
  --sand-soft: #c4b99f;
  --clay: #a8633f;
  --ember: #e79a52;
  --sky: #7ba2bc;
  --line: rgba(230, 217, 189, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --shell: min(1180px, calc(100% - 40px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--deep);
  color: var(--sand);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
  text-wrap: balance;
}

h1,
h2 {
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(2.4rem, 5vw, 5rem);
  font-weight: 780;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--sand);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid transparent;
  transition: background-color 220ms ease, border-color 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(11, 16, 13, 0.88);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.wordmark {
  color: var(--sand);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-decoration: none;
}

.primary-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 3vw, 38px);
}

.primary-nav a {
  color: rgba(230, 217, 189, 0.78);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  transition: color 160ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--sand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.codex-launch {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(134, 166, 101, 0.42);
  background: rgba(17, 23, 19, 0.74);
  color: var(--sand);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

kbd {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  padding-inline: 6px;
  border: 1px solid rgba(230, 217, 189, 0.36);
  border-bottom-width: 3px;
  background: rgba(230, 217, 189, 0.08);
  color: var(--sand-soft);
  font-family: inherit;
  font-size: 0.7rem;
  line-height: 1;
}

.language-picker select {
  min-width: 118px;
  padding: 9px 30px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(17, 23, 19, 0.72);
  color: var(--sand);
  font: inherit;
  font-size: 0.82rem;
}

.language-picker select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 4px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero-world,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-world {
  z-index: -3;
  background: url("assets/hero-world.webp") center 58% / cover no-repeat;
  transform: scale(1.015);
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 13, 10, 0.94) 0%, rgba(8, 13, 10, 0.7) 48%, rgba(8, 13, 10, 0.28) 78%, rgba(8, 13, 10, 0.4) 100%),
    linear-gradient(0deg, var(--deep) 0%, transparent 25%, rgba(8, 13, 10, 0.25) 100%);
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: radial-gradient(circle at 76% 55%, transparent 0 15%, rgba(11, 16, 13, 0.22) 55%);
  pointer-events: none;
}

.hero-content {
  padding-block: 140px 110px;
}

.eyebrow,
.kicker {
  margin-bottom: 18px;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.versalox-logo {
  width: min(620px, 86vw);
  height: auto;
  margin: 0 0 30px -12px;
  filter: drop-shadow(0 12px 10px rgba(0, 0, 0, 0.45));
}

.hero h1 {
  max-width: 820px;
  margin-bottom: 24px;
  font-size: clamp(2.6rem, 6.2vw, 6.3rem);
  font-weight: 780;
}

.hero-copy {
  max-width: 680px;
  margin-bottom: 32px;
  color: rgba(230, 217, 189, 0.76);
  font-size: clamp(1.05rem, 1.8vw, 1.28rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  font-weight: 760;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

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

.button-primary {
  background: var(--sand);
  color: var(--ink);
}

.button-primary:hover {
  background: #fff2d7;
}

.button-ghost {
  border-color: rgba(230, 217, 189, 0.36);
  background: rgba(11, 16, 13, 0.3);
  color: var(--sand);
  backdrop-filter: blur(8px);
}

.button-ghost:hover {
  border-color: var(--sand);
  background: rgba(11, 16, 13, 0.55);
}

.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 34px;
  color: rgba(230, 217, 189, 0.72);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
}

.status-strip > :last-child {
  margin-left: 4px;
  color: var(--sand);
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 0 5px rgba(231, 154, 82, 0.13), 0 0 18px rgba(231, 154, 82, 0.55);
}

.hero-edge {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 28px;
  background: var(--deep);
  clip-path: polygon(0 45%, 7% 62%, 12% 26%, 21% 58%, 29% 38%, 36% 70%, 43% 32%, 52% 56%, 62% 24%, 70% 62%, 79% 34%, 88% 66%, 95% 36%, 100% 52%, 100% 100%, 0 100%);
}

.section {
  padding-block: clamp(90px, 12vw, 160px);
}

.intro {
  background:
    radial-gradient(circle at 10% 20%, rgba(81, 105, 69, 0.16), transparent 30%),
    var(--deep);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(42px, 8vw, 110px);
  align-items: end;
}

.section-heading h2 {
  margin-bottom: 0;
}

.intro-copy > p,
.gallery-heading > p,
.games-layout .section-heading > p,
.prototype-copy > p,
.about-panel > p {
  color: var(--sand-soft);
  font-size: 1.08rem;
}

.fact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 42px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.fact-row div {
  display: grid;
  gap: 2px;
}

.fact-row strong {
  color: var(--sand);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.fact-row span {
  color: rgba(230, 217, 189, 0.58);
  font-size: 0.78rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 90px;
  background: var(--line);
  border: 1px solid var(--line);
}

.feature-card {
  position: relative;
  min-height: 310px;
  padding: 32px 26px;
  background: #141d17;
  overflow: hidden;
}

.feature-card::after {
  position: absolute;
  right: -28px;
  bottom: -44px;
  width: 120px;
  height: 120px;
  content: "";
  border: 1px solid rgba(134, 166, 101, 0.12);
  transform: rotate(45deg);
}

.feature-number {
  display: block;
  margin-bottom: 72px;
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.feature-card h3 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.feature-card p {
  margin-bottom: 0;
  color: rgba(230, 217, 189, 0.58);
  font-size: 0.92rem;
}

.material-system {
  position: relative;
  background:
    linear-gradient(135deg, rgba(168, 99, 63, 0.1), transparent 40%),
    #0e1511;
  border-block: 1px solid var(--line);
  overflow: hidden;
}

.material-system::after {
  position: absolute;
  top: 18%;
  right: -120px;
  width: 360px;
  height: 360px;
  content: "";
  border: 1px solid rgba(230, 217, 189, 0.06);
  transform: rotate(45deg);
  pointer-events: none;
}

.material-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(560px, 1.28fr);
  gap: clamp(48px, 8vw, 112px);
  align-items: center;
}

.material-copy > p:not(.kicker) {
  color: var(--sand-soft);
  font-size: 1.05rem;
}

.material-copy h2 {
  font-size: clamp(2.5rem, 4.8vw, 5rem);
}

.material-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 34px;
}

.material-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(168, 99, 63, 0.35);
  background: rgba(168, 99, 63, 0.08);
  color: rgba(230, 217, 189, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.material-scale-panel {
  position: relative;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(230, 217, 189, 0.2);
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    #18231b;
  background-size: 18px 18px;
  box-shadow: 14px 14px 0 rgba(0, 0, 0, 0.22);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.scale-label {
  margin-bottom: 26px;
  color: var(--leaf);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.unit-scale {
  display: grid;
  grid-template-columns: 0.8fr auto 0.92fr auto 1fr auto 1.12fr auto 1.28fr;
  align-items: center;
  gap: 8px;
}

.unit-step {
  display: grid;
  min-height: 100px;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(230, 217, 189, 0.18);
  background: rgba(11, 16, 13, 0.48);
}

.unit-step strong {
  color: var(--sand);
  font-size: clamp(1.3rem, 2.2vw, 2.2rem);
  line-height: 1;
}

.unit-step span {
  color: rgba(230, 217, 189, 0.48);
  font-size: 0.68rem;
}

.unit-step-largest {
  border-color: rgba(231, 154, 82, 0.45);
  background: rgba(168, 99, 63, 0.14);
}

.unit-arrow {
  color: var(--clay);
  font-size: 0.66rem;
  font-weight: 800;
}

.conversion-band {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 18px;
  border-left: 3px solid var(--ember);
  background: rgba(11, 16, 13, 0.55);
}

.conversion-band strong {
  color: var(--ember);
  font-size: 0.7rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.conversion-band span {
  font-size: clamp(0.88rem, 1.5vw, 1.05rem);
  font-weight: 700;
}

.volume-note {
  margin: 19px 0 0;
  color: rgba(230, 217, 189, 0.56);
  font-size: 0.82rem;
}

.prototype-section {
  position: relative;
  background: #e2d5b9;
  color: #172019;
}

.prototype-section::before,
.prototype-section::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 24px;
  content: "";
  background: var(--deep);
}

.prototype-section::before {
  top: -1px;
  clip-path: polygon(0 0, 100% 0, 100% 38%, 91% 70%, 82% 30%, 72% 66%, 61% 32%, 50% 72%, 39% 34%, 28% 68%, 17% 30%, 8% 66%, 0 40%);
}

.prototype-section::after {
  bottom: -1px;
  transform: rotate(180deg);
  clip-path: polygon(0 0, 100% 0, 100% 38%, 91% 70%, 82% 30%, 72% 66%, 61% 32%, 50% 72%, 39% 34%, 28% 68%, 17% 30%, 8% 66%, 0 40%);
}

.prototype-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: center;
}

.prototype-visual {
  position: relative;
  margin: 0;
  background: #111713;
  box-shadow: 16px 16px 0 rgba(91, 62, 40, 0.18), var(--shadow);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
}

.prototype-visual img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.prototype-visual figcaption {
  padding: 14px 18px;
  color: rgba(230, 217, 189, 0.72);
  font-size: 0.78rem;
}

.prototype-copy .kicker {
  color: #6d583a;
}

.prototype-copy h2 {
  font-size: clamp(2.4rem, 4.6vw, 4.7rem);
}

.prototype-copy > p {
  color: rgba(23, 32, 25, 0.7);
}

.era-list {
  display: grid;
  gap: 13px;
  margin: 30px 0;
  padding: 0;
  list-style: none;
}

.era-list li {
  position: relative;
  padding-left: 27px;
  font-weight: 650;
}

.era-list li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 10px;
  height: 10px;
  content: "";
  background: var(--clay);
  box-shadow: 4px 4px 0 rgba(23, 32, 25, 0.14);
}

.development-note {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding-top: 24px;
  border-top: 1px solid rgba(23, 32, 25, 0.2);
}

.development-note .status-dot {
  margin-top: 7px;
}

.development-note div {
  display: grid;
  gap: 3px;
}

.development-note span:last-child {
  color: rgba(23, 32, 25, 0.64);
  font-size: 0.86rem;
}

.gallery-section {
  background: var(--deep);
}

.gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 50px;
  align-items: end;
  margin-bottom: 54px;
}

.gallery-heading > p {
  max-width: 370px;
  justify-self: end;
  margin-bottom: 6px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.gallery-wide {
  grid-column: 1 / -1;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1), filter 300ms ease;
}

.gallery-wide img {
  aspect-ratio: 2.2 / 1;
}

.gallery-item:hover img {
  transform: scale(1.025);
  filter: saturate(1.08);
}

.gallery-item figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 12px 15px;
  background: rgba(11, 16, 13, 0.76);
  color: rgba(230, 217, 189, 0.8);
  font-size: 0.78rem;
  backdrop-filter: blur(10px);
}

.games-section {
  background: #172019;
  border-block: 1px solid var(--line);
}

.games-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(480px, 1.2fr);
  gap: clamp(50px, 9vw, 120px);
  align-items: start;
}

.games-layout .section-heading {
  position: sticky;
  top: 120px;
}

.games-layout .section-heading > p {
  margin-top: 28px;
}

.game-list {
  display: grid;
  gap: 14px;
}

.game-card {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 22px;
  align-items: center;
  min-height: 160px;
  padding: 24px;
  border: 1px solid var(--line);
  background: rgba(11, 16, 13, 0.35);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.game-card:hover {
  transform: translateX(5px);
  border-color: rgba(230, 217, 189, 0.38);
  background: rgba(11, 16, 13, 0.6);
}

.game-mark {
  display: grid;
  width: 80px;
  height: 80px;
  place-items: center;
  background: var(--moss);
  color: var(--sand);
  font-weight: 850;
  letter-spacing: 0.1em;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.2);
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 18% 100%, 0 82%);
}

.game-mark-alt {
  background: #71513d;
}

.game-card-copy {
  display: grid;
  gap: 6px;
}

.game-card-copy strong {
  font-size: 1.55rem;
  line-height: 1.1;
}

.game-card-copy > span:last-child {
  color: rgba(230, 217, 189, 0.58);
  font-size: 0.88rem;
}

.game-meta {
  color: var(--leaf);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.game-arrow {
  color: var(--sand-soft);
  font-size: 1.25rem;
}

.about-section {
  background:
    radial-gradient(circle at 90% 30%, rgba(123, 162, 188, 0.15), transparent 28%),
    radial-gradient(circle at 15% 80%, rgba(168, 99, 63, 0.14), transparent 30%),
    var(--deep);
}

.about-panel {
  max-width: 900px;
  text-align: center;
}

.about-panel .kicker {
  margin-bottom: 24px;
}

.about-panel h2 {
  margin-bottom: 28px;
}

.about-panel > p {
  max-width: 720px;
  margin: 0 auto 34px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--ink);
}

.footer-inner {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: rgba(230, 217, 189, 0.5);
  font-size: 0.78rem;
}

.footer-inner a {
  color: var(--sand-soft);
  text-decoration: none;
}

.codex-shell[hidden] {
  display: none;
}

.codex-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
}

.codex-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(5, 8, 6, 0.88);
  cursor: default;
  backdrop-filter: blur(12px);
}

.codex-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1440px, 100%);
  height: min(900px, calc(100svh - 56px));
  border: 2px solid #887b5d;
  background: #302b1f;
  color: #efe2c6;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.62), inset 0 0 0 5px #171711;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}

.codex-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 28px 18px;
  border-bottom: 1px solid rgba(239, 226, 198, 0.18);
  background: #27241a;
}

.codex-brand {
  margin: 0 0 4px;
  color: #a7b884;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.codex-header h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.7rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.codex-header p:last-child {
  margin: 5px 0 0;
  color: rgba(239, 226, 198, 0.58);
  font-size: 0.78rem;
}

.codex-close {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px 9px 14px;
  border: 1px solid rgba(239, 226, 198, 0.22);
  background: #191912;
  color: #efe2c6;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.codex-categories {
  display: flex;
  gap: 7px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(239, 226, 198, 0.14);
  background: #242117;
  overflow-x: auto;
  scrollbar-width: thin;
}

.codex-category {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(239, 226, 198, 0.18);
  background: #393326;
  color: rgba(239, 226, 198, 0.72);
  font: inherit;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.codex-category[aria-pressed="true"] {
  border-color: #a7b884;
  background: #4b5034;
  color: #fff1d2;
}

.codex-content {
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
  min-height: 0;
}

.codex-index {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  min-height: 0;
  padding: 18px;
  border-right: 1px solid rgba(239, 226, 198, 0.16);
  background: #28251b;
}

.codex-search-label {
  margin-bottom: 7px;
  color: rgba(239, 226, 198, 0.62);
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.codex-search {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #74694f;
  border-radius: 0;
  outline: 0;
  background: #171710;
  color: #efe2c6;
  font: inherit;
}

.codex-search:focus {
  border-color: #a7b884;
  box-shadow: 0 0 0 2px rgba(167, 184, 132, 0.15);
}

.codex-count {
  margin: 12px 0 8px;
  color: rgba(239, 226, 198, 0.42);
  font-size: 0.7rem;
}

.codex-entry-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-color: #756b50 #1a1912;
}

.codex-entry {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 11px;
  align-items: center;
  min-height: 64px;
  padding: 8px;
  border: 1px solid rgba(239, 226, 198, 0.12);
  background: #343025;
  color: #efe2c6;
  text-align: left;
  cursor: pointer;
}

.codex-entry[aria-selected="true"] {
  border-color: #a7b884;
  background: #464832;
}

.codex-entry img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
  background: #171710;
}

.codex-entry-copy {
  display: grid;
  gap: 2px;
}

.codex-entry-copy strong {
  font-size: 0.8rem;
  line-height: 1.2;
}

.codex-entry-copy span {
  color: rgba(239, 226, 198, 0.46);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.codex-empty {
  padding: 22px 10px;
  color: rgba(239, 226, 198, 0.5);
  text-align: center;
  font-size: 0.8rem;
}

.codex-detail {
  min-height: 0;
  padding: clamp(24px, 4vw, 52px);
  outline: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    #302b1f;
  background-size: 18px 18px;
  overflow-y: auto;
}

.codex-detail-heading {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(239, 226, 198, 0.18);
}

.codex-icon-frame {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #74694f;
  background: #171710;
  box-shadow: 7px 7px 0 rgba(0, 0, 0, 0.18);
}

.codex-icon-frame img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  image-rendering: pixelated;
}

.codex-entry-meta {
  margin: 0 0 6px;
  color: #a7b884;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.codex-detail h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 3.2rem);
  text-transform: uppercase;
}

.codex-lead {
  max-width: 780px;
  margin: 28px 0 36px;
  color: rgba(239, 226, 198, 0.7);
  font-size: 1.05rem;
}

.codex-article {
  display: grid;
  gap: 30px;
  max-width: 860px;
}

.codex-section h4 {
  margin: 0 0 11px;
  color: #d9bd7e;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.codex-section p {
  margin: 0;
  color: rgba(239, 226, 198, 0.68);
}

.codex-section code {
  padding: 2px 5px;
  background: rgba(0, 0, 0, 0.22);
  color: #f0cc8c;
}

.codex-unit-table {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-top: 14px;
}

.codex-unit-table div {
  display: grid;
  min-height: 88px;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid rgba(239, 226, 198, 0.18);
  background: rgba(23, 23, 16, 0.62);
}

.codex-unit-table strong {
  font-size: 1.25rem;
}

.codex-unit-table span {
  color: rgba(239, 226, 198, 0.48);
  font-size: 0.68rem;
}

.codex-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.codex-facts span {
  padding: 10px 12px;
  border-left: 2px solid #a7b884;
  background: rgba(23, 23, 16, 0.48);
  color: rgba(239, 226, 198, 0.72);
  font-size: 0.78rem;
}

.codex-footer {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  padding: 9px 20px;
  border-top: 1px solid rgba(239, 226, 198, 0.15);
  background: #1c1b14;
  color: rgba(239, 226, 198, 0.45);
  font-size: 0.67rem;
}

body.codex-open {
  overflow: hidden;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .primary-nav {
    display: none;
  }

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

  .prototype-grid,
  .games-layout,
  .material-layout {
    grid-template-columns: 1fr;
  }

  .prototype-visual {
    max-width: 760px;
  }

  .games-layout .section-heading {
    position: static;
  }

  .codex-content {
    grid-template-columns: minmax(240px, 0.42fr) minmax(0, 0.58fr);
  }
}

@media (max-width: 720px) {
  :root {
    --shell: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 64px;
    padding-inline: 14px;
  }

  .wordmark {
    font-size: 0.78rem;
  }

  .language-picker select {
    min-width: 104px;
    max-width: 138px;
  }

  .codex-launch > span {
    display: none;
  }

  .codex-launch {
    padding-inline: 7px;
  }

  .hero-content {
    padding-block: 116px 88px;
  }

  .hero-world {
    background-position: 61% 56%;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(8, 13, 10, 0.94), rgba(8, 13, 10, 0.62)),
      linear-gradient(0deg, var(--deep), transparent 38%);
  }

  .versalox-logo {
    margin-left: -5px;
  }

  .hero h1 {
    font-size: clamp(2.45rem, 12vw, 4.3rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .status-strip {
    align-items: flex-start;
  }

  .intro-grid,
  .gallery-heading {
    grid-template-columns: 1fr;
  }

  .gallery-heading > p {
    justify-self: start;
  }

  .fact-row {
    gap: 8px;
  }

  .feature-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .unit-scale {
    grid-template-columns: 1fr;
  }

  .unit-arrow {
    text-align: center;
    transform: rotate(90deg);
  }

  .unit-step {
    min-height: 72px;
  }

  .feature-card {
    min-height: 250px;
  }

  .feature-number {
    margin-bottom: 48px;
  }

  .gallery-wide {
    grid-column: auto;
  }

  .gallery-wide img,
  .gallery-item img {
    aspect-ratio: 4 / 3;
  }

  .game-card {
    grid-template-columns: 64px 1fr;
    gap: 16px;
    padding: 18px;
  }

  .game-mark {
    width: 60px;
    height: 60px;
  }

  .game-arrow {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding-block: 22px;
    text-align: center;
  }

  .codex-shell {
    padding: 0;
  }

  .codex-panel {
    width: 100%;
    height: 100svh;
    border-width: 0;
    clip-path: none;
  }

  .codex-header {
    padding: 14px;
  }

  .codex-header p:last-child,
  .codex-close > span {
    display: none;
  }

  .codex-categories {
    padding-inline: 10px;
  }

  .codex-content {
    display: block;
    overflow-y: auto;
  }

  .codex-index {
    max-height: 330px;
    border-right: 0;
    border-bottom: 1px solid rgba(239, 226, 198, 0.16);
  }

  .codex-entry-list {
    max-height: 190px;
  }

  .codex-detail {
    min-height: 520px;
    overflow: visible;
  }

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

  .codex-facts {
    grid-template-columns: 1fr;
  }

  .codex-footer {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Codex website */
.codex-launch {
  text-decoration: none;
}

.primary-nav a.is-active {
  color: var(--sand);
}

.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.codex-page {
  background: #101612;
}

.codex-masthead {
  position: relative;
  display: grid;
  min-height: 560px;
  align-items: end;
  padding: 180px 0 94px;
  isolation: isolate;
  overflow: hidden;
}

.codex-masthead::after {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 160px;
  content: "";
  background: linear-gradient(to bottom, transparent, #101612);
}

.codex-masthead-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(8, 12, 9, 0.93) 0%, rgba(8, 12, 9, 0.68) 52%, rgba(8, 12, 9, 0.52) 100%),
    linear-gradient(0deg, rgba(16, 22, 18, 0.4), rgba(16, 22, 18, 0.1)),
    url("assets/hero-world.webp") center 44% / cover;
  filter: saturate(0.72);
  transform: scale(1.02);
}

.codex-masthead-content {
  position: relative;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 54px;
  color: rgba(230, 217, 189, 0.48);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: rgba(230, 217, 189, 0.72);
  text-decoration: none;
}

.codex-masthead h1 {
  max-width: 820px;
  margin: 0 0 24px;
  font-size: clamp(3.2rem, 8vw, 7.4rem);
  letter-spacing: -0.06em;
}

.codex-masthead-content > p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: rgba(230, 217, 189, 0.72);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.codex-library {
  padding-top: 110px;
}

.codex-library-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(300px, 0.28fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 54px;
}

.codex-library-heading h2 {
  margin-bottom: 0;
}

.codex-library-heading > p {
  margin-bottom: 8px;
  color: var(--sand-soft);
}

.codex-tools {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 20px;
}

.site-search {
  display: grid;
  grid-template-columns: auto 1fr;
  width: min(620px, 100%);
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--leaf);
}

.site-search:focus-within {
  border-color: rgba(134, 166, 101, 0.72);
  box-shadow: 0 0 0 3px rgba(134, 166, 101, 0.09);
}

.site-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sand);
  font: inherit;
}

.site-search input::placeholder {
  color: rgba(230, 217, 189, 0.38);
}

.codex-page .codex-count {
  flex: 0 0 auto;
  margin: 0;
  color: rgba(230, 217, 189, 0.48);
  font-size: 0.76rem;
}

.codex-page .codex-categories {
  gap: 9px;
  margin-bottom: 38px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.codex-page .codex-category {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: rgba(230, 217, 189, 0.58);
  font-size: 0.67rem;
  letter-spacing: 0.045em;
  text-transform: none;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.codex-page .codex-category:hover,
.codex-page .codex-category[aria-pressed="true"] {
  border-color: rgba(134, 166, 101, 0.6);
  background: rgba(134, 166, 101, 0.12);
  color: var(--sand);
}

.codex-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.codex-card {
  display: grid;
  min-height: 390px;
  grid-template-rows: 150px 1fr;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.codex-card:hover {
  border-color: rgba(134, 166, 101, 0.48);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-4px);
}

.codex-card-image {
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at center, rgba(134, 166, 101, 0.16), transparent 56%),
    linear-gradient(135deg, rgba(81, 105, 69, 0.12), rgba(168, 99, 63, 0.08));
}

.codex-card-image img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.32));
}

.codex-card-copy {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.codex-card-copy h3 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  letter-spacing: -0.025em;
}

.codex-card-copy > p:not(.codex-entry-meta) {
  margin-bottom: 24px;
  color: rgba(230, 217, 189, 0.6);
  font-size: 0.88rem;
}

.codex-card-link {
  margin-top: auto;
  color: var(--leaf);
  font-size: 0.75rem;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.codex-card-link::after {
  position: absolute;
  inset: 0;
  content: "";
}

.codex-card {
  position: relative;
}

.codex-card[hidden] {
  display: none;
}

.codex-page .codex-empty {
  grid-column: 1 / -1;
  padding: 72px 20px;
  border: 1px dashed var(--line);
  color: rgba(230, 217, 189, 0.52);
}

.codex-article-section {
  border-block: 1px solid var(--line);
  background:
    radial-gradient(circle at 80% 8%, rgba(168, 99, 63, 0.1), transparent 32%),
    #151c17;
}

.codex-article-page {
  max-width: 980px;
}

.codex-back-link {
  display: inline-flex;
  margin-bottom: 62px;
  color: var(--leaf);
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none;
  text-transform: uppercase;
}

.codex-article-hero {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 36px;
  align-items: center;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.codex-article-icon {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
}

.codex-article-icon img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  image-rendering: pixelated;
}

.codex-article-hero h1,
.codex-article-hero h2 {
  margin-bottom: 18px;
  font-size: clamp(2.8rem, 7vw, 6rem);
}

.codex-page .codex-lead {
  margin: 0;
  color: rgba(230, 217, 189, 0.66);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.codex-prose {
  max-width: 780px;
  margin: 52px auto 0;
  color: rgba(230, 217, 189, 0.76);
  font-size: 1.06rem;
}

.codex-prose > p {
  margin-bottom: 24px;
}

.codex-prose h3 {
  margin: 52px 0 18px;
  font-size: 1.75rem;
}

.codex-page .codex-unit-table {
  margin: 0 0 42px;
}

.codex-page .codex-unit-table div {
  min-height: 104px;
  border-color: var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
}

.codex-page .codex-unit-table span {
  color: rgba(230, 217, 189, 0.5);
}

.codex-page .codex-facts {
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0;
  margin: 36px 0 0;
  list-style: none;
}

.codex-page .codex-facts li {
  padding: 14px 16px;
  border-left: 2px solid var(--leaf);
  background: rgba(255, 255, 255, 0.028);
  color: rgba(230, 217, 189, 0.76);
  font-size: 0.88rem;
}

.codex-cta {
  padding-block: 90px;
}

.codex-cta-inner {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 44px;
  padding: 54px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    radial-gradient(circle at 90% 20%, rgba(134, 166, 101, 0.16), transparent 36%),
    rgba(255, 255, 255, 0.025);
}

.codex-cta h2 {
  max-width: 650px;
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
}

.codex-cta p:last-child {
  margin-bottom: 0;
  color: var(--sand-soft);
}

.article-breadcrumb-band {
  padding: 150px 0 26px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(8, 12, 9, 0.9), rgba(8, 12, 9, 0.62)),
    url("assets/hero-world.webp") center 42% / cover;
}

.article-breadcrumb-band .breadcrumbs {
  margin: 0;
}

.article-breadcrumb-band .breadcrumbs span:last-child {
  color: var(--sand);
}

.codex-article-standalone .codex-article-section {
  border-top: 0;
}

.related-codex {
  margin-top: 90px;
  padding-top: 54px;
  border-top: 1px solid var(--line);
}

.related-codex > h2 {
  margin-bottom: 32px;
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.related-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-entry {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 15px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
}

.related-entry img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
}

.related-entry h3 {
  margin: 0;
  font-size: 1rem;
}

.related-entry h3 a {
  text-decoration: none;
}

@media (max-width: 980px) {
  .codex-library-heading {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

  .related-entry-grid {
    grid-template-columns: 1fr;
  }

  .codex-page .codex-categories {
    padding-inline: 0;
  }
}

@media (max-width: 680px) {
  .codex-masthead {
    min-height: 500px;
    padding: 150px 0 70px;
  }

  .breadcrumbs {
    margin-bottom: 38px;
  }

  .codex-library {
    padding-top: 76px;
  }

  .codex-tools {
    display: grid;
    gap: 10px;
  }

  .codex-card-grid {
    grid-template-columns: 1fr;
  }

  .codex-card {
    min-height: 350px;
  }

  .codex-article-hero {
    grid-template-columns: 1fr;
  }

  .codex-article-icon {
    width: 116px;
    height: 116px;
  }

  .codex-article-icon img {
    width: 92px;
    height: 92px;
  }

  .codex-page .codex-unit-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .codex-cta-inner {
    display: grid;
    padding: 32px 24px;
  }
}
