/* Esplora: the palazzo at the blue hour. Night glass panels, cream type, bronze accents. */
:root {
  --night: #0d1422;
  --glass: rgba(13, 20, 34, 0.62);
  --glass-strong: rgba(13, 20, 34, 0.86);
  --line: rgba(232, 220, 198, 0.18);
  --cream: #efe6d4;
  --cream-soft: rgba(239, 230, 212, 0.72);
  --bronze: #d9a866;
  --warm: #ffcf8a;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "IBM Plex Sans Condensed", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gutter: clamp(14px, 2.4vw, 28px);
}
html, body { margin: 0; height: 100%; background: var(--night); overflow: hidden; color: var(--cream); font-family: var(--sans); }
#stage { display: block; width: 100vw; height: 100dvh; touch-action: none; cursor: grab; }
#stage:active { cursor: grabbing; }
/* the photograph of the spot: over the 3D, under the labels; the pointer goes through it */
body.is-clean > :not(#stage) { display: none !important; }
.spot { position: fixed; inset: 0; width: 100vw; height: 100dvh; object-fit: cover; pointer-events: none; z-index: 1; }
.lit { position: fixed; inset: 0; width: 100vw; height: 100dvh; pointer-events: none; z-index: 2; mix-blend-mode: screen; overflow: visible; }
.lit__halo { fill: #ff8a2a; opacity: .7; filter: url(#lit-blur); }
.lit__pane { fill: #ff9a3c; opacity: .5; }
.is-pointing #stage { cursor: pointer; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.fade { position: fixed; inset: 0; background: #05080f; opacity: 0; pointer-events: none; transition: opacity .35s ease; z-index: 4; }
.fade.is-on { opacity: 1; }

/* top bar */
.top { position: fixed; inset: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: var(--gutter); pointer-events: none; z-index: 5; }
.top > * { pointer-events: auto; }
.top::before { content: ""; position: absolute; inset: 0 0 -30px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(5, 8, 15, 0.55), rgba(5, 8, 15, 0)); }
.top__back { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--glass-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font-size: 13px; letter-spacing: .04em; cursor: pointer; }
.top__back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.top__brand { grid-column: 2; display: grid; justify-items: center; text-decoration: none; color: var(--cream); }
.top__brand { text-shadow: 0 1px 12px rgba(5, 8, 15, 0.75), 0 0 2px rgba(5, 8, 15, 0.6); }
.top__mark { font-family: var(--serif); font-size: 21px; font-weight: 500; letter-spacing: .02em; line-height: 1; }
.top__sub { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--cream-soft); margin-top: 4px; }
.top__book { grid-column: 3; justify-self: end; padding: 10px 16px; border: 1px solid var(--bronze); border-radius: 999px;
  background: var(--glass-strong); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--cream); font-size: 13px; letter-spacing: .04em; cursor: pointer; }
.top__book:hover, .unit__book:hover { background: var(--bronze); color: #1b1408; }
.top__back:focus-visible, .top__book:focus-visible { outline: 1px solid var(--cream); outline-offset: 3px; }

/* the picker */
.picker, .unit { position: fixed; right: var(--gutter); top: 50%; transform: translateY(-50%); width: 300px; z-index: 3;
  padding: 18px 18px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: opacity .4s, transform .4s; }
.is-moving .picker, .is-moving .unit { opacity: 0; pointer-events: none; }
.picker__title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 28px; line-height: 1.05; }
.picker__hint { margin: 6px 0 14px; font-size: 12.5px; color: var(--cream-soft); }
.picker__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.card { width: 100%; text-align: left; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(239, 230, 212, 0.04); cursor: pointer;
  transition: background .2s, border-color .2s; }
.card:hover, .card.is-lit, .card:focus-visible { background: rgba(255, 207, 138, 0.12); border-color: rgba(255, 207, 138, 0.55); outline: none; }
.card__name { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.1; }
.card__area { align-self: center; font-family: var(--mono); font-size: 12px; color: var(--warm); }
.card__meta { grid-column: 1 / -1; font-size: 12px; color: var(--cream-soft); }
.card__state { grid-column: 1 / -1; margin-top: 3px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--bronze); }
.card--soon .card__state { color: var(--cream-soft); }
/* the two views of the palazzo: on the cards; on a phone, floating just above them */
.views { display: flex; gap: 2px; margin: 0 0 12px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(239, 230, 212, 0.04); }
.views button { flex: 1; padding: 6px 10px; border: 0; border-radius: 999px; background: none; color: var(--cream-soft);
  font-size: 12.5px; letter-spacing: .04em; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.views button:hover { color: var(--cream); }
.views button[aria-pressed="true"] { background: rgba(255, 207, 138, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 207, 138, 0.5); color: var(--warm); cursor: default; }
.views button:focus-visible { outline: 1px solid var(--cream); outline-offset: 2px; }

/* an apartment still to be furnished */
.unit__floor, .caption__unit { font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze); }
.unit__name { margin: 4px 0 2px; font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.02; }
.unit__meta { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; color: var(--warm); }
.unit__text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--cream-soft); }
.unit__book { padding: 10px 16px; border: 1px solid var(--bronze); border-radius: 999px; background: rgba(217, 168, 102, 0.16); cursor: pointer; }

/* labels on the scene */
.tags { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.tip { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 2px;
  padding: 8px 12px; border-radius: 10px; background: var(--glass-strong); border: 1px solid rgba(255, 207, 138, 0.45); white-space: nowrap; }
.tip__name { font-family: var(--serif); font-size: 19px; font-weight: 500; }
.tip__meta { font-size: 11.5px; color: var(--cream-soft); }
.door { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; gap: 5px; justify-items: center; transition: opacity .25s; }
.door.is-left { transform: translate(0, -50%); justify-items: start; }
.door.is-right { transform: translate(-100%, -50%); justify-items: end; }
.door.is-left button::before { content: "‹"; width: auto; height: auto; background: none; box-shadow: none; color: var(--warm); font-size: 18px; line-height: 0.8; }
.door.is-right button::before { display: none; }
.door.is-right button::after { content: "›"; color: var(--warm); font-size: 18px; line-height: 0.8; }
.door button { pointer-events: auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px 7px 9px; border-radius: 999px;
  border: 1px solid rgba(239, 230, 212, 0.4); background: rgba(13, 20, 34, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 13px; letter-spacing: .02em; white-space: nowrap; cursor: pointer; }
.door button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--warm); box-shadow: 0 0 10px var(--warm); }
.door button:hover, .door button:focus-visible { background: rgba(255, 207, 138, 0.22); border-color: var(--warm); outline: none; }
.is-moving .tags .door { opacity: 0; }

/* the credit of the map the city round the palazzo is drawn from: only under the street view */
.credit { position: fixed; left: var(--gutter); bottom: 10px; z-index: 2; margin: 0; font-size: 10.5px;
  color: var(--cream-soft); opacity: .65; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.credit a { color: inherit; }
body:not(.is-palazzo) .credit, .is-moving .credit { display: none; }

/* inside: caption and plan */
.caption { position: fixed; left: var(--gutter); bottom: var(--gutter); max-width: min(420px, 60vw); z-index: 3;
  padding: 14px 16px; border-radius: 12px; background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line); transition: opacity .35s; }
.caption__title { margin: 4px 0 6px; font-family: var(--serif); font-weight: 500; font-size: 30px; line-height: 1.02; }
.caption__text { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--cream-soft); }
.is-moving .caption { opacity: .35; }
.plan { position: fixed; right: var(--gutter); bottom: var(--gutter); z-index: 3; padding: 10px; border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); }
.plan svg { display: block; width: 128px; height: auto; }
.plan .r { fill: rgba(239, 230, 212, 0.06); stroke: rgba(239, 230, 212, 0.35); stroke-width: .06; }
.plan .r.is-visit { fill: rgba(239, 230, 212, 0.14); cursor: pointer; }
.plan .r.is-visit:hover { fill: rgba(255, 207, 138, 0.35); }
.plan .r.is-here { fill: rgba(255, 207, 138, 0.62); stroke: var(--warm); }
.plan .street { font: 0.62px var(--sans); fill: var(--cream-soft); letter-spacing: .08px; }
.plan .me { fill: var(--cream); }
.plan .cone { fill: rgba(239, 230, 212, 0.28); }
.hint { position: fixed; left: 50%; bottom: calc(var(--gutter) + 6px); transform: translateX(-50%); margin: 0; z-index: 3;
  padding: 8px 14px; border-radius: 999px; background: var(--glass); font-size: 12.5px; color: var(--cream-soft); transition: opacity .6s; }
.hint.is-gone { opacity: 0; }

/* the booking form */
.book { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: var(--gutter); background: rgba(5, 8, 15, 0.55); }
.book__card { position: relative; width: min(420px, 100%); box-sizing: border-box; padding: 26px 26px 22px; border-radius: 16px;
  background: #f3efe6; color: #1d1b18; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); max-height: calc(100dvh - 2 * var(--gutter)); overflow-y: auto; }
.book__close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #1d1b18; font-size: 26px; line-height: 1; cursor: pointer; }
.book__n { font-family: var(--mono); font-size: 11px; color: #9a6a2c; letter-spacing: .06em; }
.book__title { margin: 4px 0 8px; font-family: var(--serif); font-weight: 500; font-size: 32px; line-height: 1.02; }
.book__text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: rgba(29, 27, 24, 0.82); }
.book__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.book__field { display: block; margin-bottom: 12px; }
.book__field span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: rgba(29, 27, 24, 0.6); }
.book__field input { width: 100%; box-sizing: border-box; padding: 6px 0; border: 0; border-bottom: 1px solid rgba(29, 27, 24, 0.3);
  background: transparent; font: 15px var(--sans); color: #1d1b18; outline: none; border-radius: 0; }
.book__field input:focus { border-bottom-color: #1d1b18; }
.book__field input[aria-invalid="true"] { border-bottom-color: #9a3a26; }
.book__field:has([aria-invalid="true"]) span { color: #9a3a26; }
.book__check { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 16px; font-size: 12px; line-height: 1.45; color: rgba(29, 27, 24, 0.7); cursor: pointer; }
.book__check input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: #1d1b18; }
.book__check input[aria-invalid="true"] { outline: 1px solid #9a3a26; outline-offset: 2px; }
.book__check a, .book__fail a, .book__done a { color: #1d1b18; }
.book__send { width: 100%; padding: 12px; border: 1px solid #1d1b18; border-radius: 999px; background: #1d1b18; color: #f3efe6; font-size: 14px; letter-spacing: .04em; cursor: pointer; }
.book__send:hover { background: transparent; color: #1d1b18; }
.is-sending .book__send { opacity: .55; pointer-events: none; }
.book__error, .book__fail { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: #9a3a26; }
.book__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.book__done:focus { outline: none; }
.book__done .book__text { margin: 0; }

.loader { position: fixed; inset: 0; z-index: 9; display: grid; place-items: center; background: var(--night); color: #e8dcc6;
  font: 400 15px/1.4 var(--sans); letter-spacing: .04em; transition: opacity .8s; }
.loader.is-done { opacity: 0; pointer-events: none; }
.hud { position: fixed; left: 8px; bottom: 8px; margin: 0; padding: 6px 8px; background: rgba(0, 0, 0, .6); color: #9f9;
  font: 11px/1.3 ui-monospace, monospace; z-index: 9; }

/* phones: the cards one under the other along the bottom, the caption above the plan */
@media (max-width: 760px) {
  .top { grid-template-columns: auto 1fr auto; gap: 10px; }
  .top__brand { justify-items: start; grid-column: 2; }
  .top__back + .top__brand { justify-items: center; }
  .top__mark { font-size: 17px; }
  .top__sub { font-size: 8.5px; }
  .top__book { padding: 8px 12px; font-size: 12px; }
  .top__back { padding: 8px 10px 8px 8px; }
  .top__back span { display: none; }
  .picker, .unit { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; border-radius: 16px 16px 0 0; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); }
  .unit { padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom)); }
  .picker__title { font-size: 20px; padding: 0 var(--gutter); }
  .picker__hint { display: none; }
  .picker__list { margin-top: 8px; gap: 6px; padding: 0 var(--gutter); }
  .views { position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 0; margin: 0; background: var(--glass-strong); }
  .views button { flex: none; padding: 7px 13px; }
  .card { gap: 1px 10px; padding: 7px 11px 8px; border-radius: 9px; }
  .card__name { font-size: 18px; }
  .card__area { font-size: 11px; }
  .card__meta { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .card__state { display: none; }
  .card--soon .card__state { display: block; margin-top: 1px; }
  .unit__name { font-size: 26px; }
  .caption { left: var(--gutter); right: calc(var(--gutter) + 104px); bottom: var(--gutter); max-width: none; padding: 11px 13px; }
  .caption__title { font-size: 22px; }
  .caption__text { font-size: 12.5px; }
  .plan { padding: 7px; }
  .credit { top: calc(74px + env(safe-area-inset-top)); bottom: auto; font-size: 9.5px; }
  .hint { top: calc(var(--gutter) + 52px); bottom: auto; }
  .plan svg { width: 82px; }
  .book__card { padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; width: 100%; }
  .book__title { font-size: 26px; }
  .book__field input { font-size: 16px; }
  .book { align-items: end; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .fade, .picker, .unit, .caption, .hint { transition: none; } }
