/* ScanPeek technology museum: a calm, schematic floor plan.
   This is a demonstrator, not an architectural evacuation drawing. */
.sp-floorplan {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 76px 0 64px;
  color: #302b26;
}

.sp-floorplan-inner {
  /* Match the full object width without changing the scroll-reveal parent. */
  position: relative;
  left: 50%;
  width: min(1120px, calc(100vw - 48px));
  max-width: none;
  min-width: 0;
  transform: translateX(-50%);
}

.sp-floorplan-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.sp-floorplan-intro h2 {
  margin: 8px 0 9px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 700;
  font-style: italic;
  letter-spacing: -.035em;
  line-height: 1.14;
}

.sp-floorplan-intro p {
  margin: 0;
  color: #81796f;
  font-size: 14px;
  line-height: 1.7;
}

.sp-floorplan-level {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #ded5c8;
  border-radius: 999px;
  color: #856f59;
  background: #f9f6f1;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  white-space: nowrap;
}

.sp-floorplan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(315px, 1fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ded7cd;
  border-radius: 22px;
  background: #fbf9f5;
  box-shadow: 0 14px 34px rgba(61, 50, 39, .045);
}

.sp-floorplan-canvas {
  position: relative;
  min-width: 0;
  width: 100%;
  align-self: center;
  aspect-ratio: 740 / 500;
  overflow: hidden;
  background: #f0ece5;
}

.sp-floorplan-art {
  display: block;
  width: 100%;
  height: 100%;
}

.sp-floorplan-pin {
  position: absolute;
  left: var(--pin-x);
  top: var(--pin-y);
  z-index: 1;
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  transform: translate(-50%, -50%);
  border: 3px solid #fbf9f5;
  border-radius: 50%;
  background: #574639;
  color: #fff;
  box-shadow: 0 5px 15px rgba(59, 45, 34, .16);
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.sp-floorplan-pin span {
  font: 700 12px/1 "DM Sans", sans-serif;
  letter-spacing: .02em;
}

.sp-floorplan-pin:hover,
.sp-floorplan-pin:focus-visible {
  z-index: 2;
  transform: translate(-50%, -50%) scale(1.14);
  background: #92704f;
  box-shadow: 0 7px 18px rgba(59, 45, 34, .2);
}

.sp-floorplan-pin:focus-visible {
  outline: 3px solid #92704f;
  outline-offset: 3px;
}

.sp-floorplan-index {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 20px 26px;
  border-left: 1px solid #e4dcd2;
  background: #fbfaf7;
}

.sp-floorplan-index-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  padding: 2px 0 14px;
  color: #967d65;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
}

.sp-floorplan-item {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 9px 3px;
  border-top: 1px solid #ebe5dd;
  color: #3b342e;
  text-decoration: none;
  transition: color .18s ease, background .18s ease;
}

.sp-floorplan-item:hover,
.sp-floorplan-item:focus-visible {
  color: #906d4b;
}

.sp-floorplan-item:focus-visible {
  outline: 2px solid #906d4b;
  outline-offset: -2px;
  border-radius: 6px;
}

.sp-floorplan-item-number {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e3d9cc;
  border-radius: 9px;
  background: #f4eee6;
  color: #80654c;
  font-size: 10px;
  font-weight: 800;
}

.sp-floorplan-item-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.sp-floorplan-disclaimer {
  margin: 12px 0 0;
  color: #8a827a;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .sp-floorplan-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sp-floorplan-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 22px;
    padding: 18px 26px 24px;
    border-top: 1px solid #e4dcd2;
    border-left: 0;
  }

  .sp-floorplan-index-top {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .sp-floorplan {
    margin: 54px 0 44px;
  }

  .sp-floorplan-inner {
    position: static;
    left: auto;
    width: 100%;
    max-width: 100%;
    transform: none;
  }
}

@media (max-width: 600px) {
  .sp-floorplan-intro {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
  }

  .sp-floorplan-level {
    padding: 8px 11px;
  }

  .sp-floorplan-layout {
    border-radius: 17px;
  }

  .sp-floorplan-index {
    display: flex;
    padding: 16px 19px 21px;
  }

  .sp-floorplan-pin {
    width: 31px;
    height: 31px;
    border-width: 2px;
  }

  .sp-floorplan-pin span {
    font-size: 10px;
  }
}

@media (max-width: 390px) {
  .sp-floorplan-pin {
    width: 27px;
    height: 27px;
  }

  .sp-floorplan-pin span {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sp-floorplan-pin,
  .sp-floorplan-item {
    transition: none;
  }
}
