/* ======================= */
/* RESET */
/* ======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ======================= */
/* BASE */
/* ======================= */
html, body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  background: #000;
  font-family: sans-serif;
    overflow: hidden;
  position: fixed;
  width: 100%;
}

/* ======================= */
/* VIEWPORT */
/* ======================= */
.viewport {
  width: 100vw;
  height: 100dvh; /* moderno */
  height: calc(var(--vh, 1vh) * 100); /* fallback */
  position: relative;
  overflow: hidden;

  touch-action: none;
  user-select: none;
  overscroll-behavior: none;
}

/* ======================= */
/* WORLD */
/* ======================= */
.world {
  position: absolute;
  isolation: isolate;
  width: 3800px;
  height: 1100px;
  top: 0;
  left: 0;
}

/* ======================= */
/* LAYERS */
/* ======================= */
.layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transform: translateZ(0);
  /* 🔥 performance */
  will-change: transform;
}

/* ======================= */
/* CAPAS ESPECÍFICAS */
/* ======================= */
.bg {
  background-image: url("imgs/ciudad-back.webp");
  z-index: 1000;
}

.mid {
  background-image: url("imgs/ciudad.webp");
  z-index: 1010;
}

.fg {
  width: 4600px;
  height: 1450px;
  top: 0;
  left: 0;

  background-image: url("imgs/ciudad-front.webp");

  pointer-events: none; /* deja pasar clicks */
  z-index: 1020;
}

/* ======================= */
/* ZONAS INTERACTIVAS */
/* ======================= */
.zone {
  position: absolute;
  width: 80px;
  height: 80px;

  background: rgba(255,255,255,0.2);
  border: 2px solid #fff;

  cursor: pointer;
  z-index: 1100;
}

/* ======================= */
/* PANEL */
/* ======================= */
.info-panel {
  position: absolute;
  top: 20px;
  right: -400px;

  width: 300px;
  height: calc(100% - 40px);

  background: #111;
  color: #fff;
  padding: 20px;

  transition: right 0.4s ease;
  z-index: 2000;
}

.info-panel.active {
  right: 20px;
}

.close {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

/* ======================= */
/* CURSOR */
/* ======================= */
.cursor-hand {
  position: fixed;
  width: 60px;
  height: 60px;

  pointer-events: none;
  z-index: 3000;
}

.hand-inner {
  width: 100%;
  height: 100%;
  background: url("imgs/zombie-hand.webp") no-repeat center / contain;
}

/* ======================= */
/* PROXY (si lo usas) */
/* ======================= */
#drag-proxy {
  position: fixed;
  width: 1px;
  height: 1px;
  top: 0;
  left: 0;
  pointer-events: none;
}

/* ======================= */
/* MOBILE AJUSTES */
/* ======================= */
@media (pointer: coarse) {

  .zone {
    width: 100px;
    height: 100px;
  }

  .info-panel {
    width: 80%;
    right: -100%;
  }

  .info-panel.active {
    right: 0;
  }

}