:root {
  --cream: #f0e2c8;
  --peach: #da9365;
  --olive: #8c873e;
  --moss: #59551d;
  --dark: #312a20;
}

/* Hide default WordPress page framing on the homepage only */
body.home .entry-title,
body.front-page .entry-title,
body.home .wp-block-post-title,
body.front-page .wp-block-post-title,
body.home header,
body.front-page header,
body.home footer,
body.front-page footer,
body.home .site-header,
body.front-page .site-header,
body.home .site-footer,
body.front-page .site-footer,
body.home .wp-site-blocks > header,
body.front-page .wp-site-blocks > header,
body.home .wp-site-blocks > footer,
body.front-page .wp-site-blocks > footer {
  display: none !important;
}

/* Full-bleed homepage only */
body.home,
body.front-page {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  background: var(--cream) !important;
}

body.home .wp-site-blocks,
body.front-page .wp-site-blocks,
body.home .entry-content,
body.front-page .entry-content,
body.home .wp-block-post-content,
body.front-page .wp-block-post-content,
body.home .wp-block-group,
body.front-page .wp-block-group,
body.home .is-layout-constrained,
body.front-page .is-layout-constrained,
body.home .is-layout-flow,
body.front-page .is-layout-flow,
body.home main,
body.front-page main,
body.home article,
body.front-page article {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* Main topo homepage scene */
body.home .topo-home,
body.front-page .topo-home {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  overflow: hidden !important;
  background: var(--cream) !important;
  color: var(--dark) !important;
  font-family: Georgia, "Times New Roman", serif;
  z-index: 1 !important;
}

/* Terrain canvas */
body.home #topo-canvas,
body.front-page #topo-canvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: block !important;
  z-index: 1 !important;
  transition: transform 0.16s ease-out;
  background: var(--cream) !important;
}

/* Title block */
body.home .topo-title,
body.front-page .topo-title {
  position: fixed !important;
  left: 6vw !important;
  top: 7vh !important;
  z-index: 50 !important;
  pointer-events: auto !important;
}

/* Wesley Mahler title */
body.home .topo-title .name,
body.front-page .topo-title .name {
  font-size: clamp(1.45rem, 2vw, 2.25rem);
  letter-spacing: 0.035em;
  font-weight: 400;
  color: var(--dark);
}

/* Wesley Mahler link */
body.home .topo-title .name a,
body.front-page .topo-title .name a {
  color: var(--dark) !important;
  text-decoration: none !important;
  pointer-events: auto !important;
  cursor: pointer;
}

body.home .topo-title .name a:hover,
body.front-page .topo-title .name a:hover {
  color: var(--moss) !important;
  text-decoration: none !important;
}

/* Subtitle */
body.home .topo-title .subtitle,
body.front-page .topo-title .subtitle {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  opacity: 0.72;
  font-style: italic;
  color: var(--dark);
}

/* Pin layer */
body.home .topo-pins,
body.front-page .topo-pins {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 80 !important;
  pointer-events: none !important;
}

/* Individual pins */
body.home .topo-pin,
body.front-page .topo-pin {
  --pin-color: #da9365;
  --label-left: 24px;
  --label-top: -19px;
  --arrow-top: 19px;

  position: fixed !important;
  display: block !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
  transform: none !important;
  color: var(--dark) !important;
  text-decoration: none !important;
  cursor: pointer;
  z-index: 90 !important;
  pointer-events: auto !important;
}

/* Pin dots */
body.home .pin-dot,
body.front-page .pin-dot {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  border-radius: 50% !important;
  transform: translate(-50%, -50%) !important;
  background: var(--pin-color) !important;
  border: 3px solid var(--dark) !important;
  box-shadow: 0 0 0 6px rgba(218, 147, 101, 0.18) !important;
  z-index: 4 !important;
  transition: transform 0.2s ease;
}

/* Pin labels */
body.home .pin-label,
body.front-page .pin-label {
  position: absolute !important;
  left: var(--label-left) !important;
  top: var(--label-top) !important;
  width: 250px !important;
  box-sizing: border-box !important;
  padding: 0.42rem 0.62rem 0.48rem;
  background: rgba(246, 235, 216, 0.96) !important;
  color: var(--dark) !important;
  border: 1px solid rgba(49, 42, 32, 0.45);
  border-left: 5px solid var(--pin-color) !important;
  box-shadow: 4px 5px 0 rgba(49, 42, 32, 0.12);
  backdrop-filter: blur(3px);
  white-space: normal !important;
  line-height: 1.2;
  pointer-events: none;
  z-index: 3 !important;

  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

/* Small diamond pointer */
body.home .pin-label::before,
body.front-page .pin-label::before {
  content: "";
  position: absolute;
  top: var(--arrow-top);
  width: 12px;
  height: 12px;
  background: rgba(246, 235, 216, 0.96);
  transform: translateY(-60%) rotate(45deg);
  z-index: -1;
  border: 1px solid rgba(49, 42, 32, 0.28);
}

/* Label on right side of dot */
body.home .topo-pin.label-right .pin-label,
body.front-page .topo-pin.label-right .pin-label {
  text-align: right !important;
  align-items: flex-end !important;
  padding-left: 1.05rem !important;
  padding-right: 0.62rem !important;
}

body.home .topo-pin.label-right .pin-label::before,
body.front-page .topo-pin.label-right .pin-label::before {
  left: -7px;
}

/* Label on left side of dot */
body.home .topo-pin.label-left .pin-label,
body.front-page .topo-pin.label-left .pin-label {
  text-align: left !important;
  align-items: flex-start !important;
  padding-left: 0.62rem !important;
  padding-right: 1.05rem !important;
  border-left: 1px solid rgba(49, 42, 32, 0.45) !important;
  border-right: 5px solid var(--pin-color) !important;
}

body.home .topo-pin.label-left .pin-label::before,
body.front-page .topo-pin.label-left .pin-label::before {
  right: -7px;
  left: auto;
}

/* Pin label title */
body.home .pin-label strong,
body.front-page .pin-label strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  max-width: 100%;
}

/* Pin label subtitle */
body.home .pin-label em,
body.front-page .pin-label em {
  display: block;
  max-width: 220px;
  margin-top: 0.25rem;
  font-size: 0.76rem;
  line-height: 1.35;
  font-style: italic;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-3px);
  transition: opacity 0.25s ease, max-height 0.25s ease, transform 0.25s ease;
}

body.home .topo-pin.label-right .pin-label em,
body.front-page .topo-pin.label-right .pin-label em {
  margin-left: auto !important;
  margin-right: 0 !important;
}

body.home .topo-pin.label-left .pin-label em,
body.front-page .topo-pin.label-left .pin-label em {
  margin-left: 0 !important;
  margin-right: auto !important;
}

/* Hover effects */
body.home .topo-pin:hover .pin-dot,
body.front-page .topo-pin:hover .pin-dot {
  transform: translate(-50%, -50%) scale(1.18) !important;
}

body.home .topo-pin:hover .pin-label em,
body.front-page .topo-pin:hover .pin-label em {
  opacity: 0.68;
  max-height: 3.5rem;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 700px) {
  body.home .topo-title,
  body.front-page .topo-title {
    left: 6vw !important;
    top: 4.5vh !important;
    max-width: 82vw;
  }

  body.home .topo-title .name,
  body.front-page .topo-title .name {
    font-size: 1.35rem;
  }

  body.home .topo-title .subtitle,
  body.front-page .topo-title .subtitle {
    max-width: 230px;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  body.home .pin-dot,
  body.front-page .pin-dot {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    border-width: 2px !important;
  }

  body.home .pin-label,
  body.front-page .pin-label {
    width: 165px !important;
    padding-top: 0.34rem !important;
    padding-bottom: 0.34rem !important;
  }

  body.home .topo-pin.label-right .pin-label,
  body.front-page .topo-pin.label-right .pin-label {
    padding-left: 0.88rem !important;
    padding-right: 0.48rem !important;
  }

  body.home .topo-pin.label-left .pin-label,
  body.front-page .topo-pin.label-left .pin-label {
    padding-left: 0.48rem !important;
    padding-right: 0.88rem !important;
  }

  body.home .pin-label strong,
  body.front-page .pin-label strong {
    font-size: 0.62rem !important;
    letter-spacing: 0.11em !important;
  }

  body.home .pin-label em,
  body.front-page .pin-label em {
    display: none !important;
  }
}