@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;1,500;1,600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

@font-face {
  font-family: 'BeautiqueDisplay';
  src: url('fonts/BeautiqueDisplay-Black.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', 'BeautiqueDisplay', Georgia, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  background-color: #00000000;
}

/* ══════════════════════════════════════════
   BACKGROUND — Dark Midnight Navy
══════════════════════════════════════════ */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  /* background: linear-gradient(135deg, #e7d4c2 0%, #dbbfab 50%, #cfb29a 100%); */
}

/* ══════════════════════════════════════════
   BRAND HEADER
══════════════════════════════════════════ */
.brand-header {
  width: 100%;
  padding: clamp(18px, 3vh, 34px) clamp(24px, 4vw, 64px) 0;
}

.brand-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: clamp(10.5px, 0.85vw, 12.5px);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9772c00;
  margin-bottom: 6px;
}

.brand-eyebrow span {
  color: #c9a14b00;
  margin: 0 2px;
}

.brand-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 38px);
  color: #2f3b2c00;
  letter-spacing: 0.005em;
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.layout {
  width: 100vw;
  height: calc(100vh - clamp(70px, 11vh, 110px));
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 40px);
  padding: clamp(6px, 1.4vh, 14px) clamp(24px, 4vw, 64px) clamp(16px, 2.4vh, 28px);
}

/* ══════════════════════════════════════════
   SVG CONTAINER & MAP
══════════════════════════════════════════ */
.svg-container {
  position: relative;
  aspect-ratio: 1920 / 1080;
  width: min(calc(100vw - clamp(230px, 20vw, 320px) - 40px - 8vw), calc(92% * (1920 / 1080)));
  height: auto;
  max-height: 100%;
  z-index: 1;
  border-radius: 0;
  overflow: visible;
  border: none;
  box-shadow: none;
  background: transparent;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-composite: source-in, source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-composite: intersect;
}

svg#masterplan-svg {
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
}

.zoom-controls {
  display: none;
}

/* ══════════════════════════════════════════
   ZOOM HINT OVERLAY
══════════════════════════════════════════ */
.zoom-hint-overlay {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}

.zoom-hint-overlay.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.zoom-hint-overlay span {
  font-family: 'Inter', sans-serif;
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 700;
  color: #ffffff;
  background: rgba(22, 16, 12, 0.92);
  border: 1.5px solid rgba(232, 185, 49, 0.5);
  border-radius: 30px;
  padding: 8px 22px;
  text-align: center;
  letter-spacing: 0.04em;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    0 0 15px rgba(232, 185, 49, 0.15);
}

/* ══════════════════════════════════════════
   HOTSPOT ANIMATIONS
══════════════════════════════════════════ */
.hotspot-group {
  cursor: pointer;
}

.hotspot-shape {
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
  transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease;
}

.pulse-ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

.pulse-ring-1 {
  animation: pulse-ring 2s ease-out infinite;
}

.pulse-ring-2 {
  animation: pulse-ring 2s ease-out infinite 1s;
}

.hotspot-group.is-hover .hotspot-shape {
  fill: #ffffff !important;
  stroke: #00cfff;
  stroke-width: 3.5;
  filter:
    drop-shadow(0 0 8px rgba(0, 210, 255, 1))
    drop-shadow(0 0 20px rgba(0, 180, 255, 0.7))
    drop-shadow(0 0 40px rgba(0, 150, 255, 0.4));
}

@keyframes pulse-ring {
  0%   { opacity: 0.95; transform: scale(1); }
  70%  { opacity: 0;    transform: scale(1.9); }
  100% { opacity: 0;    transform: scale(1.9); }
}

#masterplan-svg text {
  pointer-events: none;
  user-select: none;
  font-family: 'Inter', 'BeautiqueDisplay', Georgia, sans-serif !important;
}

/* ══════════════════════════════════════════
   INFO PANEL — Glassmorphism Dark Premium
══════════════════════════════════════════ */
.info-panel {
  width: clamp(250px, 21vw, 340px) !important;
  min-width: clamp(250px, 21vw, 340px) !important;
  max-width: clamp(100%, 21vw, 340px) !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  border-radius: 0;
  border: none !important;
  padding: clamp(6px, 1vh, 14px) 0 20px clamp(20px, 2.4vw, 34px) !important;
  background: transparent !important;
  box-shadow: none !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 140, 80, 0.35) transparent;
  scroll-behavior: smooth;
  position: relative;
  color: #2b241c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.info-panel::-webkit-scrollbar {
  width: 3px;
}

.info-panel::-webkit-scrollbar-thumb {
  background: rgba(180, 140, 80, 0.35) !important;
  border-radius: 4px;
}

/* ══════════════════════════════════════════
   SECTION HEADER
══════════════════════════════════════════ */
.info-section {
  width: 100%;
}

/* Khu section title */
.section-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-style: italic;
  font-size: clamp(25px, 2.3vw, 33px) !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  text-align: left !important;
  color: #3a4a34 !important;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin-bottom: 5px !important;
}

.khu-b .section-title { color: #3f6b3a !important; }

/* Sub-label under section title */
.section-sub {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.13em !important;
  text-transform: uppercase !important;
  text-align: left !important;
  color: #b8863c !important;
  margin-bottom: 20px !important;
}

.khu-b .section-sub { color: #6f9a52 !important; }

.section-divider {
  width: 100%;
  height: 1px;
  background: rgba(180, 140, 80, 0.4);
  margin: 18px 0 20px;
}

.info-footnote {
  padding-top: 30px;
  font-family: 'Inter', sans-serif;
  font-size: 9.5px;
  font-style: italic;
  color: #8a7c68;
  line-height: 1.5;
  max-width: 100%;
  min-width: 0;
}

/* ══════════════════════════════════════════
   INFO ITEMS
══════════════════════════════════════════ */
.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.info-item {
  display: flex !important;
  align-items: baseline !important;
  gap: 10px !important;
  padding: 2px 4px 2px 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.15s ease, opacity 0.15s ease !important;
}

.info-item:hover,
.info-item.is-hover {
  transform: translateX(3px) !important;
  opacity: 0.75;
}

.info-text {
  flex: 1;
  min-width: 0;
  font-family: 'Inter', sans-serif !important;
  font-size: clamp(14.5px, 1.2vw, 17px) !important;
  font-weight: 500 !important;
  color: #2b241c !important;
  white-space: normal;
  word-break: break-word;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

/* Number label (replaces circular badge) */
.item-num {
  font-family: 'Inter', sans-serif !important;
  font-size: clamp(14.5px, 1.2vw, 17px) !important;
  font-weight: 700 !important;
  color: #b8863c !important;
  flex-shrink: 0;
  min-width: 58px;
  letter-spacing: 0.02em;
}

.khu-b .item-num { color: #4d7d3e !important; }

/* ══════════════════════════════════════════
   LIGHTBOX / IMAGE MODAL
══════════════════════════════════════════ */
/* ══════════════════════════════════════════
   LIGHTBOX / POPUP MODAL
══════════════════════════════════════════ */
.img-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.img-modal.active {
  display: flex;
}

.img-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 16, 28, 0);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.img-content-wrapper {
  position: relative;
  z-index: 2;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modalImg {
  display: block;
  max-width: 75vw;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  user-select: none;
  -webkit-user-drag: none;
}

#modalVideo {
  display: block;
  max-width: 85vw;
  max-height: 80vh;
  border-radius: 12px;
}

.img-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 10;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #33261d;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.img-close:hover {
  background: #e63946;
  border-color: transparent;
  color: #ffffff;
  transform: scale(1.08);
}

/* ══════════════════════════════════════════
   LARGE PLACEHOLDER POPUP CARD
══════════════════════════════════════════ */
.modal-placeholder-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(90vw, 440px);
  padding: 24px 22px 20px;
  background: #fffdfa;
  border: 1.5px solid rgba(212, 163, 89, 0.4);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.9),
    0 20px 60px rgba(70, 45, 20, 0.25);
  position: relative;
  animation: modal-in 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
  color: #261e17;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.placeholder-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding-right: 28px;
  margin-bottom: 16px;
}

.placeholder-badge {
  min-width: 26px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.placeholder-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(13.5px, 1.2vw, 16px);
  font-weight: 700;
  color: #261e17;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-align: left;
}

.placeholder-frame {
  width: 100%;
  padding: 22px 16px;
  background: rgba(212, 163, 89, 0.06);
  border: 1.5px dashed rgba(212, 163, 89, 0.4);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}

.placeholder-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(212, 163, 89, 0.12);
  border: 1px solid rgba(212, 163, 89, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.placeholder-main-msg {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #c68a00;
  letter-spacing: 0.01em;
}

.placeholder-sub-msg {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #635243;
  line-height: 1.45;
  max-width: 340px;
}

.placeholder-btn-close {
  padding: 8px 26px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.05);
  color: #261e17;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.placeholder-btn-close:hover {
  background: #261e17;
  color: #ffffff;
  border-color: #261e17;
  transform: translateY(-1px);
}

.img-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.img-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.img-nav.prev { left: 16px; }
.img-nav.next { right: 16px; }

/* ══════════════════════════════════════════
   SVG TOOLTIP
══════════════════════════════════════════ */
@property --tt-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

#svg-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px) scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s ease;
  border-radius: 14px;
  padding: 2px;
  background: conic-gradient(from var(--tt-angle), #E8B931, #5CE831 25%, #ffffff 45%, #5CE831 65%, #E8B931 80%, #FFD700 100%);
  animation: none;
}

#svg-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: ttSpin 3s linear infinite, ttPulseGlow 2s ease-in-out infinite;
}

@keyframes ttSpin {
  to { --tt-angle: 360deg; }
}

@keyframes ttPulseGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(232, 185, 49, 0.5)); }
  50%       { filter: drop-shadow(0 0 14px rgba(92, 232, 49, 0.7)); }
}

#svg-tooltip .tt-inner {
  background: linear-gradient(160deg, rgba(5, 12, 26, 0.97) 0%, rgba(3, 8, 18, 0.97) 100%);
  border-radius: 12px;
  overflow: hidden;
  width: 200px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  position: relative;
}

#svg-tooltip .tt-img {
  width: 200px;
  height: 130px;
  object-fit: cover;
  display: block;
}

#svg-tooltip .tt-label {
  padding: 7px 10px 8px;
  font-size: 10px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #d0e8ff;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid rgba(232, 185, 49, 0.12);
  background: linear-gradient(90deg, rgba(232, 185, 49, 0.06), transparent);
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent !important;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  .brand-header { display: none; }

  .layout {
    height: auto;
    min-height: auto;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
  }

  .mobile-image-viewer {
    width: 100%;
    height: 20vh;
    background: transparent;
    order: 1;
    transition: all 0.3s ease;
  }

  .mobile-image-viewer:empty { display: none; }

  .svg-container {
    width: 100%;
    aspect-ratio: 1920 / 1080;
    height: auto;
    flex-shrink: 0;
    overflow: hidden;
    touch-action: pan-y;
    position: relative;
    order: 2;
    z-index: 1;
    border: none;
    border-radius: 0;
  }

  #masterplan-svg {
    width: 100%;
    height: 100%;
    transform-origin: center center;
  }

  .info-panel {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    flex: none;
    justify-content: flex-start !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    padding: 18px 20px 40px !important;
    border-radius: 0 !important;
    border-left: none !important;
    background: transparent !important;
    box-shadow: none !important;
    position: static !important;
    order: 3;
    margin-top: 0 !important;
    z-index: 10;
  }

  .info-section + .section-divider { margin: 14px 0; }

  .section-title { font-size: 22px !important; }

  .zoom-controls {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 20;
    pointer-events: all;
  }

  .zoom-controls button {
    width: 44px;
    height: 44px;
    font-size: 26px;
    font-weight: bold;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    color: #06101f;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
    cursor: pointer;
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.1s ease;
  }

  .zoom-controls button:active { transform: scale(0.92); }

  .img-nav { width: 38px; height: 38px; font-size: 22px; }
  .img-nav.prev { left: 6px; }
  .img-nav.next { right: 6px; }
  .img-close { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 15px; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET / SMALL DESKTOP
══════════════════════════════════════════ */
@media (max-width: 1280px) {
  .info-panel {
    padding-left: 18px !important;
  }

  .info-text {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }

  .section-title {
    font-size: 20px !important;
    margin-bottom: 3px !important;
  }

  .item-num {
    min-width: 44px;
    font-size: 12.5px !important;
  }

  .info-item {
    gap: 8px !important;
  }
}

@media (max-width: 1024px) {
  .info-text {
    font-size: 11.5px !important;
    line-height: 1.3 !important;
  }

  .item-num {
    font-size: 11.5px !important;
  }

  .section-title {
    font-size: 17px !important;
  }
}

@media (max-height: 750px) {
  .layout { gap: 8px; padding: 8px; }
}

/* Mobile font sizes — placed last so it wins over the tablet (1280/1024) overrides above */
@media (max-width: 768px) {
  .section-title { font-size: 24px !important; }

  .section-sub { font-size: 14.5px !important; }

  .info-text {
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  .item-num {
    font-size: 15px !important;
    min-width: 62px;
  }

  .info-footnote { font-size: 11px !important; }
}

/* ══════════════════════════════════════════
   TOAST NOTIFICATION
══════════════════════════════════════════ */
#mg-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 99999;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(0, 207, 255, 0.25);
  background: rgba(5, 14, 30, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(0, 207, 255, 0.08),
    0 0 24px rgba(0, 180, 255, 0.18),
    0 8px 32px rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

#mg-toast-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

#mg-toast-msg {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: rgba(220, 240, 255, 0.92);
  letter-spacing: 0.02em;
}

/* Visible state */
#mg-toast.mg-toast-show {
  display: flex;
  animation: mg-toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Hide state */
#mg-toast.mg-toast-show.mg-toast-hide {
  animation: mg-toast-out 0.38s ease forwards;
}

@keyframes mg-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes mg-toast-out {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(12px) scale(0.95);
  }
}