/* Interactive house — real UK photo + service hotspots */
.house-map {
  --hm-ink: #11241a;
  --hm-paper: #f7f6f2;
  --hm-gold: #b3915f;
  --hm-gold-bright: #d4b07a;
  position: relative;
  padding: 4.5rem var(--gutter, 3rem) 4rem;
  background:
    radial-gradient(ellipse 80% 55% at 12% 8%, rgba(179, 145, 95, 0.1), transparent 55%),
    radial-gradient(ellipse 60% 45% at 92% 85%, rgba(17, 36, 26, 0.05), transparent 50%),
    var(--hm-paper);
  color: var(--hm-ink);
}
.house-map::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(179, 145, 95, 0.4), transparent);
  pointer-events: none;
}

.house-map-head {
  max-width: 42rem;
  margin-bottom: 2rem;
}
.house-map-head .kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--hm-gold);
  margin-bottom: 0.55rem;
  font-family: "Archivo", sans-serif;
}
.house-map-head h2 {
  font-family: "Fraunces", "Epilogue", serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.85rem;
  text-transform: lowercase;
}
.house-map-head p {
  margin: 0;
  line-height: 1.7;
  color: #353835;
  max-width: 38rem;
  font-size: 1.05rem;
}

.hm-switch {
  display: inline-flex;
  gap: 0.25rem;
  margin: 0 0 1.25rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid rgba(17, 36, 26, 0.12);
  border-radius: 999px;
  box-shadow: 0 10px 24px -16px rgba(17, 36, 26, 0.45);
}
.hm-switch button {
  border: 0;
  cursor: pointer;
  min-height: 44px;
  padding: 0.4rem 1.25rem;
  border-radius: 999px;
  background: transparent;
  color: var(--hm-ink);
  font-family: "Archivo", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hm-switch button.is-on {
  background: var(--hm-ink);
  color: var(--hm-paper);
}

.house-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.75fr);
  gap: 1.5rem 2rem;
  align-items: stretch;
}

/* —— Photo stage —— */
.house-map--hero {
  padding-top: 3.5rem;
}
.house-map-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #1a2420;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 28px 56px -22px rgba(17, 36, 26, 0.45),
    0 10px 20px -10px rgba(17, 36, 26, 0.25);
  aspect-ratio: 16 / 9;
}
.hm-view {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.hm-view.is-on {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}
.hm-base {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.house-map-stage.is-picked .hm-view.is-on .hm-base {
  filter: brightness(0.94) saturate(1.04);
}
.hm-back {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 4;
  border: 0;
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #11241a;
  background: rgba(247, 246, 242, 0.92);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  box-shadow: 0 8px 20px -12px rgba(17, 36, 26, 0.6);
}
.house-map-chips[hidden] { display: none !important; }
.hm-hint {
  position: absolute;
  left: 1rem;
  bottom: 0.85rem;
  z-index: 3;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(17, 36, 26, 0.55);
  color: #f7f6f2;
  font-family: "Archivo", sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
  backdrop-filter: blur(6px);
}

/* —— Hotspots —— */
.hm-hotspot {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  -webkit-tap-highlight-color: transparent;
}
.hm-hotspot-pulse,
.hm-hotspot-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.hm-hotspot-pulse {
  width: 42px;
  height: 42px;
  border: 2px solid rgba(212, 176, 122, 0.85);
  background: rgba(212, 176, 122, 0.12);
  animation: hmPulse 2.4s ease-out infinite;
}
.hm-hotspot-dot {
  width: 14px;
  height: 14px;
  background: var(--hm-gold-bright);
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(17, 36, 26, 0.45);
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.hm-hotspot-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "Archivo", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(17, 36, 26, 0.72);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(4px);
}
.hm-hotspot:hover .hm-hotspot-label,
.hm-hotspot:focus-visible .hm-hotspot-label,
.hm-hotspot.is-active .hm-hotspot-label {
  opacity: 1;
}
.hm-hotspot:hover .hm-hotspot-dot,
.hm-hotspot:focus-visible .hm-hotspot-dot,
.hm-hotspot.is-active .hm-hotspot-dot {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.2);
  box-shadow: 0 0 0 4px rgba(179, 145, 95, 0.55), 0 4px 14px rgba(17, 36, 26, 0.4);
}
.hm-hotspot.is-active .hm-hotspot-pulse {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.15);
  animation: hmPulseActive 1.8s ease-out infinite;
}
.hm-hotspot:focus-visible {
  outline: none;
}

@keyframes hmPulse {
  0% { transform: translate(-50%, -50%) scale(0.55); opacity: 0.95; }
  100% { transform: translate(-50%, -50%) scale(1.55); opacity: 0; }
}
@keyframes hmPulseActive {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* —— Panel —— */
.house-map-panel {
  background: #fff;
  border: 1px solid rgba(17, 36, 26, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow:
    0 20px 40px -24px rgba(17, 36, 26, 0.3),
    0 4px 12px -6px rgba(17, 36, 26, 0.12);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.house-map-panel.is-swap {
  transform: translateY(6px);
}

.hm-photo-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--hm-ink);
  overflow: hidden;
}
.hm-photo-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition:
    opacity 0.45s ease,
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.house-map-panel.is-swap .hm-photo-wrap img {
  opacity: 0.35;
  transform: scale(1.1);
}
.hm-photo-scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(17, 36, 26, 0.35));
  pointer-events: none;
}

.hm-panel-body {
  padding: 1.35rem 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  transition: opacity 0.3s ease;
}
.house-map-panel.is-swap .hm-panel-body {
  opacity: 0.4;
}

.house-map-panel .hm-part {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--hm-gold);
  margin-bottom: 0.4rem;
  font-family: "Archivo", sans-serif;
}
.house-map-panel h3 {
  font-family: "Fraunces", "Epilogue", serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.55rem, 2.8vw, 1.95rem);
  text-transform: lowercase;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
  color: var(--hm-ink);
}
.house-map-panel .hm-blurb {
  flex: 1;
  margin: 0 0 1.1rem;
  line-height: 1.65;
  color: #353835;
  font-size: 0.98rem;
}
.house-map-panel .hm-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin-bottom: 1rem;
}
.house-map-panel .hm-links a {
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(179, 145, 95, 0.55);
  color: var(--hm-ink);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.house-map-panel .hm-links a:hover {
  border-color: var(--hm-ink);
  color: var(--hm-gold);
}
.house-map-panel .hm-cta {
  margin-top: auto;
  padding-top: 0.25rem;
}

/* —— Chips —— */
.house-map-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.35rem;
}
.house-map-chips button {
  font-family: "Archivo", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  min-height: 44px;
  border: 1px solid rgba(17, 36, 26, 0.14);
  background: rgba(255, 255, 255, 0.7);
  color: var(--hm-ink);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.house-map-chips button:hover {
  border-color: var(--hm-gold);
  transform: translateY(-1px);
}
.house-map-chips button.is-active {
  background: var(--hm-ink);
  border-color: var(--hm-ink);
  color: var(--hm-paper);
  box-shadow: 0 8px 20px -10px rgba(17, 36, 26, 0.55);
}

.hm-credit {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: rgba(17, 36, 26, 0.45);
}
.hm-credit a {
  color: inherit;
  border-bottom: 1px solid rgba(17, 36, 26, 0.25);
}

@media (max-width: 900px) {
  .house-map { padding: 3rem var(--gutter, 1.5rem) 3rem; }
  .house-map-layout {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }
  .house-map-panel { order: 2; }
  .house-map-stage { order: 1; }
  .house-map-chips { order: 3; }
  .hm-hotspot-label { font-size: 0.62rem; }
  .hm-credit { order: 4; }
}

@media (prefers-reduced-motion: reduce) {
  .hm-hotspot-pulse,
  .hm-view,
  .hm-photo-wrap img,
  .house-map-panel,
  .hm-panel-body {
    animation: none !important;
    transition: none !important;
  }
}
