/* PORCH — full-size temple plan viewer, with an invitation into The Ascent.
   Opened from the plan on The Porch page (desktop plate and phone walk).
   Without JS the plan is still a plain link to the full-size image. */

.ppv{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(4,10,14,.9);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .38s cubic-bezier(.33,0,.2,1);
  font-family: 'Karla', system-ui, sans-serif;
  color: #F4EFE3;
  -webkit-tap-highlight-color: transparent;
}
.ppv.is-open{ opacity: 1; }
.ppv[hidden]{ display: none; }

.ppv-stage{
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(56px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
}
.ppv-plate{
  position: relative;
  display: inline-block;
  line-height: 0;
  background: #f4f0e6;
  padding: 10px;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
  transform: translateY(10px) scale(.985);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
  cursor: zoom-in;
}
.ppv.is-open .ppv-plate{ transform: none; }
.ppv-plate img{
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 52px);
  max-height: calc(100vh - 92px);
  max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
/* Tap / click to read the small labels up close; scroll to pan. */
.ppv.is-zoomed .ppv-stage{ align-items: flex-start; justify-content: flex-start; }
.ppv.is-zoomed .ppv-plate{ cursor: zoom-out; margin: auto; }
.ppv.is-zoomed .ppv-plate img{
  max-width: none;
  max-height: none;
  width: min(1024px, 205vw);
}

/* The glowing point on Solomon's Portico — straight into the colonnade scene. */
.ppv-point{
  position: absolute;
  left: 82.8%;
  top: 62.7%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}
.ppv-point::before,
.ppv-point::after{
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  border-radius: 50%;
  transform: translate(-50%,-50%);
}
.ppv-point::before{
  width: 12px; height: 12px;
  background: #ffd796;
  box-shadow: 0 0 0 2px rgba(20,48,58,.85), 0 0 14px 4px rgba(236,168,70,.75);
}
.ppv-point::after{
  width: 12px; height: 12px;
  border: 2px solid rgba(236,168,70,.9);
  animation: ppvPulse 2.4s cubic-bezier(.2,.6,.3,1) infinite;
}
.ppv-point:focus-visible{ outline: 2px solid #e6bb79; outline-offset: 2px; border-radius: 50%; }
.ppv-point span{
  position: absolute;
  left: 50%; bottom: calc(100% - 4px);
  transform: translateX(-50%);
  white-space: nowrap;
  line-height: 1.2;
  font-size: 12px;
  letter-spacing: .04em;
  padding: 5px 9px;
  border-radius: 3px;
  background: #14303a;
  color: #f4e3c0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.ppv-point:hover span,
.ppv-point:focus-visible span{ opacity: 1; }
@keyframes ppvPulse{
  0%{ width: 12px; height: 12px; opacity: .95; }
  100%{ width: 40px; height: 40px; opacity: 0; }
}

.ppv-close{
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 14px;
  z-index: 3;
  width: 44px; height: 44px;
  border: 1px solid rgba(244,239,227,.28);
  border-radius: 50%;
  background: rgba(10,20,26,.7);
  color: #F4EFE3;
  font: 400 24px/1 'Karla', system-ui, sans-serif;
  cursor: pointer;
}
.ppv-close:hover{ border-color: rgba(230,187,121,.7); }
.ppv-close:focus-visible{ outline: 2px solid #e6bb79; outline-offset: 2px; }
.ppv-hint{
  position: absolute;
  top: calc(24px + env(safe-area-inset-top));
  left: 18px;
  z-index: 3;
  margin: 0;
  font-size: .75rem;
  letter-spacing: .08em;
  color: rgba(244,239,227,.55);
}

/* ---- The notification: an invitation into the walk -------------------- */
.ppv-note{
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(420px, calc(100vw - 28px));
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding: 16px 18px 16px 16px;
  border: 1px solid rgba(230,187,121,.42);
  border-radius: 6px;
  background: linear-gradient(170deg, rgba(20,38,48,.97), rgba(10,22,30,.97));
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.3);
  transform: translate(-50%, 24px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .45s ease;
  pointer-events: none;
}
.ppv-note.is-in{ transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.ppv-note-mark{
  grid-row: 1 / span 3;
  position: relative;
  width: 40px; height: 40px;
  margin-top: 2px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236,168,70,.35) 0%, rgba(236,168,70,0) 70%);
}
.ppv-note-mark::before{
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: #ffd796;
  box-shadow: 0 0 12px 4px rgba(236,168,70,.7);
}
.ppv-note-eyebrow{
  margin: 0;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #e6bb79;
}
.ppv-note-title{
  margin: 0;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.32rem;
  line-height: 1.15;
  color: #F4EFE3;
}
.ppv-note-text{
  margin: 2px 0 0;
  font-size: .86rem;
  line-height: 1.5;
  color: #C2D0D4;
}
.ppv-note-actions{
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 10px;
}
.ppv-go{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 3px;
  background: #e8a23b;
  color: #10202a;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
}
.ppv-go:hover{ background: #f4b95c; color: #10202a; }
.ppv-go:focus-visible{ outline: 2px solid #F4EFE3; outline-offset: 2px; }
.ppv-later{
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: none;
  color: rgba(244,239,227,.62);
  font: inherit;
  font-size: .82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.ppv-later:hover{ color: #F4EFE3; }

/* Wider screens: the invitation sits beside the plan, not over it. */
@media (min-width: 1100px){
  .ppv-note{
    left: auto;
    right: 28px;
    bottom: 28px;
    transform: translate(0, 24px);
  }
  .ppv-note.is-in{ transform: none; }
}
/* Once the visitor has seen the invitation, it tucks away to a small chip. */
.ppv-chip{
  position: absolute;
  z-index: 4;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px 0 12px;
  border: 1px solid rgba(230,187,121,.5);
  border-radius: 999px;
  background: rgba(14,30,38,.94);
  color: #f4e3c0;
  font-size: .8rem;
  letter-spacing: .04em;
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}
.ppv-chip::before{
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ffd796;
  box-shadow: 0 0 8px 3px rgba(236,168,70,.6);
}
.ppv-chip.is-in{ opacity: 1; transform: none; pointer-events: auto; }
.ppv-chip:hover{ color: #fff; border-color: #e6bb79; }

/* the walk (phone) plan is now tappable too */
.pwalk-plan{ cursor: zoom-in; }
.pwalk-tap{
  display: block;
  margin-top: 8px;
  font-size: .78rem;
  letter-spacing: .04em;
  color: #F4C97A;
}

@media (prefers-reduced-motion: reduce){
  .ppv, .ppv-plate, .ppv-note, .ppv-chip{ transition: none; }
  .ppv-point::after{ animation: none; opacity: 0; }
}

/* The plate's caption hint: shown at every width now (was phones only). */
.riverlight [data-page="the-porch"] .plan-tap{
  display: block;
  margin-top: 8px;
  font-family: 'Karla', system-ui, sans-serif;
  font-style: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--porch-amber-soft, #f1d4a0);
}
