/* The main page as a sneak-peek tour of the Maanor while it is still being renovated (html class "tour").
   Thumbsy (in a hard hat) meets you at the Maanor Directory, then the lift takes you down to the Cooking Studio (Thumpkin)
   and to the lobby (Thumbeloo). Characters talk in a game-style dialog box. Root class: .tour (never .story). */

/* ---------- hero: a "pardon our dust" sign by the steps and caution tape across one window ---------- */
.tour .manor .reno-sign{position:absolute;z-index:7;right:-3%;bottom:3%;display:flex;flex-direction:column;align-items:center;padding:6px 9px 7px;transform:rotate(5deg);
  background:#FFFCF1;border:2px solid #53448F;border-radius:6px;box-shadow:0 3px 0 rgba(0,0,0,.2),inset 0 0 0 3px #FECA6E;font-size:clamp(9px,1.1cqw + 4px,13px);line-height:1.2;color:#53448F;text-align:center;pointer-events:none}
.tour .manor .reno-sign b{font-weight:800;color:#F05B31}
.tour .manor .reno-sign::after{content:"";position:absolute;left:50%;top:100%;width:3px;height:14px;margin-left:-1.5px;background:#53448F}
/* caution tape across the bottom-left window: sized by the window itself, so it never runs past the frame */
.tour .win .reno-tape{position:absolute;z-index:6;left:1%;right:5%;top:52%;height:13%;transform:rotate(-14deg);pointer-events:none;
  background:repeating-linear-gradient(-45deg,#FECA6E 0 7px,#231F20 7px 14px);border-radius:2px;box-shadow:0 2px 0 rgba(0,0,0,.2);opacity:.92}
.lobby.walking .reno-sign,.lobby.walking .reno-tape{opacity:0;transition:opacity .3s}

/* ---------- Maanor Directory: floors under renovation; Thumbsy stands in front of the board ---------- */
.tour .directory-list a{pointer-events:auto;cursor:pointer}
.tour .directory-list a[data-locked] strong{opacity:.82}
.tour .directory-list a[data-locked]>span{padding-right:118px}
.tour .directory-list a[data-locked]>span::after{content:"🚧 Renovating";position:absolute;right:10px;top:50%;transform:translateY(-50%) rotate(-3deg);font-size:11px;font-weight:800;color:#231F20;
  padding:4px 9px;border-radius:4px;white-space:nowrap;background:repeating-linear-gradient(-45deg,#FECA6E 0 8px,#FFE39A 8px 16px);box-shadow:0 0 0 2px #231F20}
html[lang=id].tour .directory-list a[data-locked]>span::after{content:"🚧 Renovasi"}
.tour .directory-list a:not([data-locked])>span{padding-right:84px;box-shadow:inset 0 0 0 2px #A9781C,0 0 0 3px rgba(255,255,255,.55),0 0 18px 4px rgba(254,202,110,.55)}
.tour .directory-list a:not([data-locked])>span::after{content:"Open ✨";position:absolute;right:10px;top:50%;transform:translateY(-50%);font-size:11px;font-weight:800;color:#fff;background:var(--orange);border-radius:999px;padding:4px 10px;white-space:nowrap}
html[lang=id].tour .directory-list a:not([data-locked])>span::after{content:"Buka ✨"}
@media (max-width:760px){
  .tour .directory-list a[data-locked]>span{padding-right:44px}
  .tour .directory-list a[data-locked]>span::after,html[lang=id].tour .directory-list a[data-locked]>span::after{content:"🚧";font-size:15px;padding:2px 5px}
}
.tour .tour-line{margin:6px auto 0;max-width:30em;font-weight:700;font-size:clamp(13px,1.4vw,15px);color:#FECA6E;line-height:1.35;text-wrap:balance}
.tour .elev-buttons button[data-locked]{opacity:.7;cursor:pointer}

/* Thumbsy walks in from the side, talks, then walks off toward the lift */
/* feet on the floor: a little below the gold line at the top of the wooden floor (150px tall on desktop, 80px on phones) */
.tour-guide{position:absolute;z-index:3;left:max(2%,calc(50% - 440px));bottom:calc(var(--guide-b,128px) - 6px);height:min(46vh,340px);aspect-ratio:520/690;pointer-events:none;
  transform:translateX(-140%);opacity:0;transition:transform 1.3s cubic-bezier(.3,.7,.3,1),opacity .4s}
.tour-guide.in{transform:none;opacity:1;animation:guideBob .32s ease-in-out 4}
.tour-guide.out{transform:translateX(-140%);opacity:0;transition-duration:1s}
@keyframes guideBob{50%{translate:0 -8px;rotate:-2deg}}
.tour-guide img{position:absolute;inset:0;width:100%;height:100%}
/* the greeting hand keeps waving hello */
.tour-guide .tg-hand{transform-origin:20.2% 34.1%;animation:guideWave 2.2s ease-in-out infinite}
@keyframes guideWave{0%,55%,100%{transform:rotate(0)}10%{transform:rotate(-14deg)}22%{transform:rotate(12deg)}34%{transform:rotate(-10deg)}45%{transform:rotate(6deg)}}
@media (prefers-reduced-motion:reduce){.tour-guide .tg-hand{animation:none}}
@media (max-width:760px){.tour-guide{--guide-b:70px;left:-4%;height:min(34vh,230px)}}

/* ---------- game-style dialog box ---------- */
.dialog{position:fixed;z-index:95;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));width:min(560px,calc(100vw - 24px));display:flex;align-items:center;gap:14px;
  padding:18px 34px 16px 14px;background:#FFFCF1;color:var(--purple-d);border:4px solid var(--purple);border-radius:20px;box-shadow:0 7px 0 rgba(46,37,88,.25);
  cursor:pointer;opacity:0;transform:translate(-50%,24px) scale(.94);transition:opacity .2s,transform .35s var(--ease-pop);-webkit-tap-highlight-color:transparent}
.dialog.show{opacity:1;transform:translate(-50%,0) scale(1)}
.dlg-face{width:68px;height:68px;flex:none;border-radius:16px;object-fit:cover;object-position:50% 12%;background:var(--yellow);box-shadow:0 0 0 3px #fff,0 0 0 5px var(--purple)}
.dialog[data-who=thumpkin] .dlg-face{background:#F8B2B4;object-position:50% 8%}
.dialog[data-who=thumbeloo] .dlg-face{background:#5EBDA7;object-position:50% 8%}
.dlg-body{flex:1;min-width:0}
/* the speaker's name sits on the box's top edge, like a game dialog */
.dlg-name{position:absolute;left:14px;top:-15px;font-family:var(--mono);font-size:12px;line-height:1;letter-spacing:.06em;text-transform:uppercase;color:#fff;background:var(--purple);border-radius:999px;padding:6px 12px;box-shadow:0 0 0 3px #FFFCF1}
.dialog[data-who=thumpkin] .dlg-name{background:var(--orange)}
.dialog[data-who=thumbeloo] .dlg-name{background:#3E9C87}
.dlg-text{margin:0;font-weight:700;font-size:16px;line-height:1.4;min-height:2.8em;display:flex;align-items:center;text-wrap:pretty}
.dlg-next{position:absolute;right:12px;bottom:10px;color:var(--orange);font-size:16px;animation:dlgNext .8s ease-in-out infinite;opacity:0}
.dialog.done .dlg-next{opacity:1}
@keyframes dlgNext{50%{transform:translateX(3px)}}
@media (max-width:760px){
  .dialog{bottom:calc(72px + env(safe-area-inset-bottom));gap:12px;padding:16px 28px 13px 12px;border-radius:18px}
  .dlg-face{width:54px;height:54px;border-radius:13px}
  .dlg-text{font-size:14.5px;line-height:1.38}
}

/* ---------- the lift ride between stops ---------- */
.elev-doors.riding{animation:liftShake .18s linear infinite}
@keyframes liftShake{25%{transform:translateY(1px)}75%{transform:translateY(-1px)}}

/* ---------- the lobby with Thumbeloo (replaces the game banner) ---------- */
.lobby-stop{position:relative;padding:72px calc(var(--elev) + 24px) 0;background:var(--teal);color:var(--purple-d);overflow:hidden}   /* Bellhop Rush keeps its teal */
.ls-scene{position:relative;max-width:1000px;margin:0 auto;min-height:min(78svh,620px);display:grid;grid-template-columns:1.1fr .9fr;align-items:end;gap:24px}
.ls-line{position:absolute;left:50%;bottom:58px;width:min(1100px,140%);transform:translateX(-50%);opacity:.45;pointer-events:none}
.ls-copy{position:relative;z-index:2;align-self:center;padding-bottom:40px}
.ls-copy h2{color:var(--yellow);text-shadow:0 3px 0 rgba(83,68,143,.35);font-size:clamp(36px,5vw,60px);margin:6px 0 10px}
.ls-copy p{color:var(--purple-d);font-weight:500;font-size:clamp(16px,1.4vw,19px);max-width:30em}
.ls-desk{position:absolute;z-index:1;left:-100vw;right:-100vw;bottom:0;height:64px;background:linear-gradient(#E7C98F,#C99A55);border-top:6px solid #FFE3A6;border-radius:0;   /* the lobby floor runs edge to edge */box-shadow:inset 0 -10px 0 rgba(0,0,0,.08)}
.ls-bell{position:absolute;z-index:2;right:38%;bottom:56px;font-size:34px;line-height:1}
.ls-bellhop{position:relative;z-index:2;justify-self:center;height:min(56svh,440px);width:auto;margin-bottom:22px;transform-origin:50% 100%;animation:lsHop 2.6s ease-in-out infinite}
@keyframes lsHop{0%,100%{transform:translateY(0) rotate(0)}50%{transform:translateY(-8px) rotate(-2deg)}}
@media (max-width:760px){
  .lobby-stop{padding:56px 16px 0}
  .ls-scene{grid-template-columns:1fr;text-align:center;min-height:auto}
  .ls-copy{padding-bottom:0}.ls-copy p{margin-inline:auto}.ls-copy .cta-row{justify-content:center}
  .ls-bellhop{height:min(36svh,260px)}
  .ls-line{width:180%}
}
@media (prefers-reduced-motion:reduce){.ls-bellhop,.tour-guide.in{animation:none}}
.ls-copy .eyebrow{color:var(--purple-d);opacity:.8}

/* the tour already has Thumbsy as the guide: no floating concierge chat button for now */
.tour .concierge{display:none!important}

/* ---------- the Cooking Studio feels like a kitchen: tiled wall, line-art kitchen either side, a wooden counter ---------- */
.tour #kitchen{overflow:hidden;padding-bottom:120px;background-color:var(--room-soft);
  background-image:linear-gradient(rgba(240,91,49,.09) 2px,transparent 2px),linear-gradient(90deg,rgba(240,91,49,.09) 2px,transparent 2px);background-size:46px 46px;background-position:center top}
.tour #kitchen .floor-inner{position:relative;z-index:1}
.kt-scene{position:absolute;inset:0;z-index:0;pointer-events:none}
.kt-line{position:absolute;bottom:66px;width:min(420px,27vw);aspect-ratio:720/537;background:#E3907A;opacity:.85;
  -webkit-mask:url(../assets/photos/kitchen-line.webp) center/contain no-repeat;mask:url(../assets/photos/kitchen-line.webp) center/contain no-repeat}
.kt-line.l{left:max(1%,calc(50% - 700px))}
.kt-line.r{right:max(calc(var(--elev) + 1%),calc(50% - 700px));transform:scaleX(-1)}
.kt-counter{position:absolute;left:0;right:0;bottom:0;height:72px;background:linear-gradient(#E7C98F,#C99A55);border-top:6px solid #FFE3A6;box-shadow:inset 0 -10px 0 rgba(0,0,0,.08)}
@media (max-width:1000px){.kt-line{opacity:.45}}
@media (max-width:760px){
  .tour #kitchen{padding-bottom:70px;background-size:34px 34px;
    background-image:linear-gradient(rgba(240,91,49,.16) 2px,transparent 2px),linear-gradient(90deg,rgba(240,91,49,.16) 2px,transparent 2px)}
  .kt-line{display:none}.kt-counter{height:40px}
}

/* the directory title is the builders' note (longer than "Maanor Directory"), so a little smaller */
.tour .directory-head h2{font-size:clamp(20px,2.4vw,30px);line-height:1.2;max-width:20em;margin-inline:auto;text-wrap:balance}

/* ---------- renovation dust in the Maanor Directory: grey puffs around Thumbsy as he walks in ---------- */
.dust-puff{position:absolute;z-index:4;width:var(--s,60px);height:var(--s,60px);margin:calc(var(--s,60px) / -2) 0 0 calc(var(--s,60px) / -2);border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(226,210,184,.95) 0,rgba(214,196,170,.7) 35%,rgba(214,196,170,0) 70%);animation:dustPuff var(--t,1.6s) ease-out forwards}
@keyframes dustPuff{from{transform:translate(0,0) scale(.25);opacity:.95}60%{opacity:.6}to{transform:translate(var(--dx),var(--dy)) scale(1.7);opacity:0}}
@media (prefers-reduced-motion:reduce){.dust-puff{display:none}}
