/* Base reset */
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: #0f172a;
  background: #f8fafc;
}

.site-header { position: fixed; left: 0; right: 0; top: 8px; text-align: center; z-index: 20; }
.site-header h1 { margin: 0; font-size: clamp(16px, 2.2vw, 22px); display: inline-block; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.6); backdrop-filter: blur(8px); }
.subtitle { display: none; }

.stage { height: 100vh; height: 100dvh; width: 100vw; margin: 0; padding: 0; }

.image-wrap { position: relative; height: 100%; width: 100%; display: grid; place-items: center; background: #0b1220; }
.image-stage { position: relative; display: inline-block; line-height: 0; }
.image-stage img {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  height: auto;
  width: auto;
}

/* Hotspots */
.hotspot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 30%, #22d3ee, #0284c7);
  border: 2px solid white;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(3, 105, 161, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
}
.hotspot .ping {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 2px solid rgba(3,105,161,0.6);
  animation: ping 1.8s cubic-bezier(0,0,0.2,1) infinite;
}
@keyframes ping {
  0% { transform: scale(1); opacity: 0.8; }
  80% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.hotspot:focus-visible {
  outline: 3px solid #22d3ee;
  outline-offset: 3px;
}

.view-toggle { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 20; display: flex; align-items: center; gap: 8px; color: #0f172a; background: rgba(255,255,255,0.8); backdrop-filter: blur(8px); padding: 8px 12px; border-radius: 999px; box-shadow: 0 6px 18px rgba(2,6,23,0.2); }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999; /* ensure above hotspots and UI chrome */
}
.modal[aria-hidden="false"] { display: block; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(2, 6, 23, 0.75);
  animation: fadeIn 180ms ease-out;
}
.modal-dialog {
  position: absolute; inset: 0;
  margin: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #0b1220; /* dark letterbox behind image */
  overflow: hidden;
}
.modal-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.modal-media img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  object-fit: contain;
}
.modal-content {
  position: absolute; right: 16px; bottom: 16px;
  max-width: min(520px, 92vw);
  background: rgba(255,255,255,0.9);
  border-radius: 12px;
  padding: 16px 16px 18px;
  overflow: auto;
  max-height: 70vh;
  box-shadow: 0 12px 30px rgba(2,6,23,0.35);
}
.modal-content h2 { margin: 0 0 8px 0; font-size: 22px; }
.detail-text { color: #475569; margin: 0 0 12px 0; }
.spec-list { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
.spec-list dt { color: #334155; font-weight: 600; }
.spec-list dd { margin: 0; color: #0f172a; }
.close {
  position: absolute; right: 10px; top: 8px;
  border: none; background: transparent; font-size: 28px; line-height: 1;
  color: #94a3b8; cursor: pointer;
  z-index: 10001; /* ensure above media layer */
}
.close:hover { color: #0ea5e9; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoomIn { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.site-footer { display: none; }
