/* ========================================================================
   NECROBYTE STUDIO — shared stylesheet
   Loaded by every page. Edit once, propagates everywhere.
   ======================================================================== */

/* ============ TOKENS ============ */
:root {
  --void:        #0a0710;
  --void-2:      #110c1a;
  --surface:     #1a1326;
  --surface-2:   #241a34;
  --bone:        #ede4d3;
  --bone-dim:    #a89e88;
  --phosphor:    #d4a843;
  --phosphor-hi: #f5c860;
  --phosphor-dim:#8c6f2c;
  --blood:       #c4302b;
  --blood-dim:   #6b1c19;
  --ash:         #5a5466;
  --grid:        rgba(212,168,67,0.06);

  /* per-page accent override; defaults to phosphor */
  --accent:      var(--phosphor);
  --accent-hi:   var(--phosphor-hi);
  --accent-dim:  var(--phosphor-dim);

  --f-display: 'Pixelify Sans', monospace;
  --f-body:    'VT323', monospace;
  --f-hud:     'Silkscreen', monospace;
}

/* per-page accent: Midnight Curse leans cool */
body[data-accent="midnight"] {
  --accent:     #6ea3d4;
  --accent-hi:  #9bc4ef;
  --accent-dim: #3a5a78;
  --grid:       rgba(110,163,212,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: 22px;
  line-height: 1.5;
  overflow-x: hidden;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><rect x='10' y='2' width='4' height='4' fill='%23d4a843'/><rect x='10' y='18' width='4' height='4' fill='%23d4a843'/><rect x='2' y='10' width='4' height='4' fill='%23d4a843'/><rect x='18' y='10' width='4' height='4' fill='%23d4a843'/><rect x='10' y='10' width='4' height='4' fill='%23ede4d3'/></svg>") 12 12, crosshair;
}

::selection { background: var(--accent); color: var(--void); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border: 2px solid var(--void); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dim); }

a { color: var(--accent); text-decoration: none; }

/* ============ ATMOSPHERIC LAYERS ============ */
#bg-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.layer-grid {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 1;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.layer-scanlines {
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.18) 0,
    rgba(0,0,0,0.18) 1px,
    transparent 1px,
    transparent 3px
  );
  z-index: 9998;
  pointer-events: none;
  mix-blend-mode: multiply;
}

.layer-vignette {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.85) 100%);
  z-index: 9997;
  pointer-events: none;
}

.layer-noise {
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.92  0 0 0 0 0.89  0 0 0 0 0.82  0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  z-index: 9996;
  pointer-events: none;
  opacity: 0.06;
  animation: noise 0.5s steps(2) infinite;
}
@keyframes noise {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2px,1px); }
  50%  { transform: translate(1px,-1px); }
  75%  { transform: translate(-1px,2px); }
  100% { transform: translate(2px,0); }
}

.layer-flicker {
  position: fixed; inset: 0;
  background: rgba(212, 168, 67, 0.02);
  z-index: 9999;
  pointer-events: none;
  animation: flicker 8s infinite;
}
@keyframes flicker {
  0%, 96%, 100% { opacity: 0; }
  97% { opacity: 1; }
  98% { opacity: 0; }
  99% { opacity: 0.6; }
}

/* ============ BOOT SEQUENCE ============ */
#boot {
  position: fixed; inset: 0;
  background: var(--void);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-body);
  font-size: 26px;
  color: var(--accent);
  transition: opacity 0.6s steps(6), visibility 0.6s;
}
#boot.dismissed { opacity: 0; visibility: hidden; }
.boot-inner { max-width: 600px; padding: 2rem; }
.boot-line { opacity: 0; margin-bottom: 0.4rem; }
.boot-line .ok { color: var(--bone); }
.boot-line .warn { color: var(--blood); }
.boot-line.b1 { animation: bootIn 0.1s 0.3s forwards; }
.boot-line.b2 { animation: bootIn 0.1s 0.7s forwards; }
.boot-line.b3 { animation: bootIn 0.1s 1.0s forwards; }
.boot-line.b4 { animation: bootIn 0.1s 1.3s forwards; }
.boot-line.b5 { animation: bootIn 0.1s 1.6s forwards; }
.boot-line.b6 { animation: bootIn 0.1s 1.9s forwards; }
.boot-line.b7 {
  animation: bootIn 0.1s 2.2s forwards, blink 0.9s 2.2s steps(2) infinite;
  margin-top: 1rem;
  color: var(--bone);
}
@keyframes bootIn { to { opacity: 1; } }
@keyframes blink { 50% { opacity: 0; } }

/* ============ NAVIGATION ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.4rem;
  background: linear-gradient(to bottom, rgba(10,7,16,0.92), rgba(10,7,16,0.6) 70%, transparent);
  backdrop-filter: blur(2px);
}
.logo-mark {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--bone);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-mark a {
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.logo-mark .diamond {
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--accent);
  transform: rotate(45deg);
  box-shadow: 0 0 8px var(--accent);
}
.nav ul {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav ul a {
  font-family: var(--f-hud);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--bone-dim);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.15s;
}
.nav ul a:hover,
.nav ul a.is-active { color: var(--accent); }
.nav ul a::before {
  content: '▸ ';
  opacity: 0;
  transition: opacity 0.15s;
}
.nav ul a:hover::before,
.nav ul a.is-active::before { opacity: 1; }

/* ============ HUD CORNER ============ */
.hud-corner {
  position: fixed;
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--ash);
  z-index: 50;
  pointer-events: none;
}
.hud-br { bottom: 1.4rem; right: 2.4rem; }
.hud-br .blink-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--blood);
  margin-right: 0.5rem;
  vertical-align: 1px;
  animation: blink 1.2s steps(2) infinite;
}

/* ============ HERO (home) ============ */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 4rem;
  text-align: center;
}

.hero-overline {
  font-family: var(--f-hud);
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s steps(8) forwards;
}
.hero-overline::before { content: '◢◣ '; color: var(--blood); }
.hero-overline::after  { content: ' ◢◣'; color: var(--blood); }

.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.5rem, 13vw, 11rem);
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--bone);
  position: relative;
  margin-bottom: 1.8rem;
  text-shadow:
    0 0 24px rgba(212,168,67,0.18),
    0 0 80px rgba(196,48,43,0.08);
  opacity: 0;
  animation: titleIn 1.2s 0.5s steps(8) forwards;
}
@keyframes titleIn { to { opacity: 1; } }

.hero-title::before,
.hero-title::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
}
.hero-title::before {
  color: var(--blood);
  mix-blend-mode: screen;
  animation: glitchA 6s infinite steps(1);
  opacity: 0.7;
}
.hero-title::after {
  color: var(--accent);
  mix-blend-mode: screen;
  animation: glitchB 6s infinite steps(1);
  opacity: 0.7;
}
@keyframes glitchA {
  0%, 92%, 100%   { transform: translate(0,0); opacity: 0; }
  93% { transform: translate(-3px, 1px); opacity: 0.7; }
  94% { transform: translate(2px, -2px); opacity: 0.7; }
  95% { transform: translate(-1px, 2px); opacity: 0.7; }
}
@keyframes glitchB {
  0%, 92%, 100%   { transform: translate(0,0); opacity: 0; }
  93% { transform: translate(2px, -1px); opacity: 0.7; }
  94% { transform: translate(-2px, 2px); opacity: 0.7; }
  95% { transform: translate(1px, -2px); opacity: 0.7; }
}

.hero-tagline {
  font-family: var(--f-body);
  font-size: 1.4rem;
  color: var(--bone-dim);
  max-width: 560px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp 0.8s 1.4s steps(8) forwards;
}
.hero-tagline em {
  font-style: normal;
  color: var(--accent);
}

.btn {
  display: inline-block;
  font-family: var(--f-hud);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--bone);
  padding: 1rem 2rem;
  border: 2px solid var(--accent-dim);
  background: rgba(212,168,67,0.04);
  position: relative;
  cursor: pointer;
  transition: all 0.15s steps(2);
}
.btn::before { content: '▸ '; }
.btn::after  { content: ' ◂'; }
.btn:hover {
  background: var(--accent);
  color: var(--void);
  border-color: var(--accent);
  box-shadow: 0 0 32px rgba(212,168,67,0.4);
}
.btn.btn-ghost {
  background: transparent;
  border-color: var(--surface-2);
  color: var(--bone-dim);
}
.btn.btn-ghost:hover {
  background: var(--surface);
  color: var(--bone);
  border-color: var(--accent-dim);
  box-shadow: none;
}

.hero-cta {
  opacity: 0;
  animation: fadeUp 0.8s 1.8s steps(8) forwards, ctaBlink 2.6s 2.6s infinite;
}
.hero-cta:hover { animation: fadeUp 0.8s 1.8s steps(8) forwards; }
@keyframes ctaBlink {
  0%, 80%, 100% { border-color: var(--accent-dim); }
  85%, 95% { border-color: var(--accent); box-shadow: 0 0 16px rgba(212,168,67,0.3); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-scene {
  width: 200px;
  height: 96px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 1s 0.1s steps(8) forwards;
}
.hero-scene svg { width: 100%; height: 100%; image-rendering: pixelated; }

/* ============ GENERIC SECTION ============ */
section {
  position: relative;
  z-index: 2;
  padding: 8rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--accent-dim);
  background: rgba(212,168,67,0.04);
}
.section-label::before { content: '◆ '; }

.section-title {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--bone);
  margin-bottom: 2rem;
  max-width: 900px;
}
.section-title .accent { color: var(--accent); }

.section-lead {
  font-family: var(--f-body);
  font-size: 1.55rem;
  color: var(--bone-dim);
  max-width: 700px;
  margin-bottom: 1.5rem;
}

/* ============ STUDIO / ABOUT ============ */
.about {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 4rem;
  align-items: start;
}
.about-left .section-title { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.about-right p { margin-bottom: 1.2rem; font-size: 1.4rem; color: var(--bone); }
.about-right p:last-of-type { color: var(--bone-dim); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px dashed var(--surface-2);
}
.stat { font-family: var(--f-hud); }
.stat-num {
  display: block;
  font-family: var(--f-display);
  font-size: 2.4rem;
  color: var(--accent);
  margin-bottom: 0.3rem;
}
.stat-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
}

/* ============ GAMES LISTING / CARTRIDGES ============ */
.games-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.games-count {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
}

.cartridge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.8rem;
}

.cartridge {
  background: var(--surface);
  border: 2px solid var(--surface-2);
  padding: 2rem;
  position: relative;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s steps(3);
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  clip-path: polygon(0 16px, 16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px));
}
.cartridge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,0.15) 0 1px, transparent 1px 3px);
  pointer-events: none;
  opacity: 0.5;
}
.cartridge:hover {
  border-color: var(--accent);
  background: var(--surface-2);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent-dim);
}
.cartridge:hover .cart-art { animation: cartFlicker 0.4s steps(3) 1; }
@keyframes cartFlicker {
  0%, 100% { filter: brightness(1); }
  25% { filter: brightness(1.4) hue-rotate(20deg); }
  50% { filter: brightness(0.6); transform: translateX(2px); }
  75% { filter: brightness(1.2); transform: translateX(-2px); }
}

.cart-tag {
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.cart-tag.upcoming { color: var(--blood); }

.cart-art {
  margin-bottom: 1.5rem;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cart-art svg { image-rendering: pixelated; max-width: 100%; max-height: 100%; }
.cart-art img {
  max-width: 100%;
  max-height: 100%;
  image-rendering: pixelated;
}

.cart-title {
  font-family: var(--f-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--bone);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.cartridge.featured .cart-title { font-size: 2.2rem; }
.cart-genre {
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
  margin-bottom: 1rem;
}
.cart-desc {
  font-size: 1.15rem;
  color: var(--bone-dim);
  margin-bottom: 1.5rem;
}
.cart-link {
  font-family: var(--f-hud);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.cart-link::after { content: ' ▸'; }

/* ============ DEVLOG ============ */
.devlog-list {
  list-style: none;
  border-top: 1px dashed var(--surface-2);
}
.devlog-entry {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 2rem;
  padding: 1.6rem 0.5rem;
  border-bottom: 1px dashed var(--surface-2);
  align-items: center;
  transition: background 0.15s, padding 0.15s;
}
.devlog-entry:hover {
  background: rgba(212,168,67,0.03);
  padding-left: 1.5rem;
}
.devlog-date {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.devlog-title {
  font-family: var(--f-body);
  font-size: 1.4rem;
  color: var(--bone);
}
.devlog-tag {
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--surface-2);
}

/* ============ FOOTER ============ */
footer.site-footer {
  position: relative;
  z-index: 2;
  margin-top: 6rem;
  padding: 4rem 2rem 2rem;
  border-top: 2px solid var(--surface-2);
  background: linear-gradient(to bottom, transparent, var(--void-2));
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}
.foot-col h4 {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.foot-col a {
  display: block;
  font-size: 1.2rem;
  color: var(--bone-dim);
  margin-bottom: 0.4rem;
}
.foot-col a:hover { color: var(--accent); }
.foot-brand .logo-mark { font-size: 1.6rem; margin-bottom: 0.8rem; }
.foot-brand p {
  font-size: 1.15rem;
  color: var(--bone-dim);
  max-width: 320px;
}
.foot-bar {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px dashed var(--surface-2);
  display: flex;
  justify-content: space-between;
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--ash);
  gap: 1rem;
  flex-wrap: wrap;
}

/* ========================================================================
   GAME LANDING PAGES (shadow-triad, midnight-curse)
   ======================================================================== */

.game-page main { padding-top: 5rem; }

/* ----- game hero ----- */
.game-hero {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.game-hero-text { position: relative; }
.game-hero-tag {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--accent-dim);
}
.game-hero-tag::before { content: '▸ '; }

.game-hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.95;
  color: var(--bone);
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
  text-shadow: 0 0 32px rgba(0,0,0,0.5);
}
.game-hero-title .accent { color: var(--accent); }

.game-hero-sub {
  font-family: var(--f-body);
  font-size: 1.5rem;
  color: var(--bone-dim);
  margin-bottom: 2rem;
  max-width: 480px;
}

.game-hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.game-hero-art {
  position: relative;
}

/* ----- frame component (image slots) ----- */
.frame {
  position: relative;
  background: var(--void-2);
  border: 1px solid var(--surface-2);
  overflow: hidden;
}
.frame-16x9 { aspect-ratio: 16 / 9; }
.frame-3x4  { aspect-ratio: 3 / 4; }
.frame-1x1  { aspect-ratio: 1 / 1; }
.frame img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: auto;
  cursor: zoom-in;
  transition: transform 0.3s steps(4);
}
.frame img:hover {
  transform: scale(1.02);
}
.frame img.missing { visibility: hidden; }
.frame::before {
  content: '';
  position: absolute;
  inset: 14px;
  border: 1px dashed var(--accent-dim);
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
}
.frame::after {
  content: 'IMAGE SLOT // ' attr(data-slot);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-hud);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--bone-dim);
  z-index: 0;
  pointer-events: none;
}
/* once an image is loaded successfully it covers the ::after slot label */
.frame img:not(.missing) { position: relative; z-index: 2; }

.frame-cap {
  position: absolute;
  bottom: 10px; left: 10px;
  font-family: var(--f-hud);
  font-size: 0.55rem;
  letter-spacing: 0.22em;
  color: var(--accent);
  padding: 4px 8px;
  background: rgba(10,7,16,0.85);
  border: 1px solid var(--accent-dim);
  z-index: 3;
  pointer-events: none;
}
.frame-cap.tr { left: auto; right: 10px; }

/* ----- pitch strip ----- */
.pitch-strip {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 2rem;
  border-top: 1px dashed var(--surface-2);
  border-bottom: 1px dashed var(--surface-2);
  text-align: center;
}
.pitch-strip p {
  font-family: var(--f-body);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  color: var(--bone);
  max-width: 920px;
  margin: 0 auto;
  line-height: 1.35;
}
.pitch-strip p em {
  font-style: normal;
  color: var(--accent);
}

/* ----- features ----- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.feature {
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-top: 3px solid var(--accent-dim);
  position: relative;
  transition: all 0.15s;
}
.feature:hover {
  border-top-color: var(--accent);
  background: var(--surface-2);
}
.feature-num {
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.feature-title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bone);
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.feature-desc {
  font-size: 1.15rem;
  color: var(--bone-dim);
  line-height: 1.5;
}

/* ----- world / story block ----- */
.world-block {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}
.world-text p {
  font-size: 1.4rem;
  color: var(--bone);
  margin-bottom: 1.2rem;
}
.world-text p:last-child { color: var(--bone-dim); }
.world-text blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--f-body);
  font-size: 1.5rem;
  color: var(--bone);
  font-style: italic;
}
.world-text blockquote footer {
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
  margin-top: 0.6rem;
  font-style: normal;
}
.world-text blockquote footer::before { content: '— '; }

/* ----- chapter-style lore blocks ----- */
.lore-chapter {
  margin-bottom: 2rem;
  padding-top: 0.5rem;
}
.lore-chapter:not(:first-of-type) {
  border-top: 1px dashed var(--surface-2);
  padding-top: 2.2rem;
  margin-top: 0.5rem;
}
.lore-chapter h4 {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  font-weight: 400;
  text-transform: uppercase;
}
.lore-chapter h4::before { content: '◆ '; }
.lore-chapter p {
  font-size: 1.35rem;
  color: var(--bone);
  margin-bottom: 1rem;
  line-height: 1.55;
}
.lore-chapter p:last-child { margin-bottom: 0; }
.lore-chapter p .accent { color: var(--accent); }

/* specs: allow it to scroll within its sticky frame for long lore */
.specs.tall {
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

/* ========================================================================
   LIGHTBOX (click-to-enlarge)
   ======================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 3, 8, 0.96);
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4rem 5rem;
  cursor: zoom-out;
  animation: lbFade 0.2s steps(4);
}
.lightbox.open { display: flex; }
@keyframes lbFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-stage {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: default;
}

.lightbox-img-wrap {
  position: relative;
  border: 1px solid var(--accent-dim);
  background: var(--void);
  box-shadow: 0 0 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,168,67,0.15);
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  overflow: hidden;
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  width: auto; height: auto;
  image-rendering: auto;
}

.lightbox-caption {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--accent);
  margin-top: 1rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--accent-dim);
  background: rgba(10,7,16,0.85);
  text-transform: uppercase;
}
.lightbox-caption::before { content: '◆ '; color: var(--blood); }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(10,7,16,0.85);
  border: 2px solid var(--accent-dim);
  color: var(--accent);
  font-family: var(--f-display);
  font-size: 1.6rem;
  width: 52px;
  height: 52px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s steps(2);
  z-index: 2;
  font-weight: 700;
  line-height: 1;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent);
  color: var(--void);
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(212,168,67,0.4);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-hud);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--bone-dim);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--surface-2);
  background: rgba(10,7,16,0.85);
}

@media (max-width: 700px) {
  .lightbox { padding: 4rem 1rem 5rem; }
  .lightbox-close { top: 1rem; right: 1rem; width: 44px; height: 44px; font-size: 1.2rem; }
  .lightbox-prev  { left: 0.5rem; width: 38px; height: 60px; font-size: 1.4rem; }
  .lightbox-next  { right: 0.5rem; width: 38px; height: 60px; font-size: 1.4rem; }
  .lightbox-img-wrap { max-height: calc(100vh - 12rem); }
}

/* ----- gallery ----- */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  margin-top: 3rem;
}
.gallery .g1 { grid-column: 1; grid-row: 1 / 3; aspect-ratio: auto; }
.gallery .g2 { grid-column: 2; grid-row: 1; }
.gallery .g3 { grid-column: 3; grid-row: 1; }
.gallery .g4 { grid-column: 2 / 4; grid-row: 2; }
.gallery .frame { aspect-ratio: auto; min-height: 200px; }
.gallery .g1.frame { min-height: 416px; }

/* 5-frame variant: featured left, 2×2 grid on right */
.gallery.gallery-5 .g4 { grid-column: 2; grid-row: 2; }
.gallery.gallery-5 .g5 { grid-column: 3; grid-row: 2; }

/* frame variant for marketing art: contain rather than crop */
.frame.frame-art img {
  object-fit: contain;
  background: var(--void);
}
.frame.frame-art {
  background: var(--void);
}

/* ----- specs sidebar (used inside world-block) ----- */
.specs {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  padding: 1.8rem;
  font-family: var(--f-body);
  position: sticky;
  top: 6rem;
}
.specs h3 {
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--accent);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px dashed var(--surface-2);
}
.specs h3::before { content: '◆ '; }
.specs dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.2rem;
  font-size: 1.15rem;
}
.specs dt {
  font-family: var(--f-hud);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--bone-dim);
  align-self: center;
}
.specs dd { color: var(--bone); }
.specs dd .accent { color: var(--accent); }

/* ----- CTA strip ----- */
.cta-strip {
  max-width: 1280px;
  margin: 4rem auto 0;
  padding: 4rem 2rem;
  text-align: center;
  border: 1px solid var(--surface-2);
  background: linear-gradient(135deg, var(--surface) 0%, var(--void-2) 100%);
  position: relative;
  z-index: 2;
}
.cta-strip h3 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--bone);
  margin-bottom: 1rem;
}
.cta-strip h3 .accent { color: var(--accent); }
.cta-strip p {
  font-size: 1.3rem;
  color: var(--bone-dim);
  max-width: 540px;
  margin: 0 auto 2rem;
}
.cta-strip-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ----- back link ----- */
.back-link {
  display: inline-block;
  font-family: var(--f-hud);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--bone-dim);
  margin-bottom: 2rem;
}
.back-link:hover { color: var(--accent); }
.back-link::before { content: '◂ '; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1000px) {
  .game-hero { grid-template-columns: 1fr; gap: 2rem; }
  .game-hero-art { order: -1; }
  .world-block { grid-template-columns: 1fr; }
  .specs { position: static; }
  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-template-rows: auto; }
  .gallery .g1, .gallery .g2, .gallery .g3, .gallery .g4, .gallery .g5 { grid-column: 1; grid-row: auto; }
  .gallery .g1.frame { min-height: 240px; }
}
@media (max-width: 900px) {
  .nav { padding: 1rem; }
  .nav ul { gap: 1rem; }
  .nav ul a { font-size: 0.6rem; }
  .about { grid-template-columns: 1fr; gap: 2rem; }
  .stat-row { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .stat-num { font-size: 1.6rem; }
  .games-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .devlog-entry { grid-template-columns: 1fr; gap: 0.4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  body { font-size: 18px; }
  .hud-br { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  section { padding: 5rem 1.2rem; }
  .game-hero { padding: 5rem 1.2rem 3rem; }
}
