/* The walkable world: station scroll, backdrop, doors, the procession and its walk cycle. Loaded after style.css. */
#leaf.world-leaf { padding: 0; }
.station2, .travel { position: relative; height: 100%; }

/* the scroll across the top of a station */
.scroll { position: absolute; top: 0; left: 0; right: 0; height: 216px; display: grid; grid-template-columns: 1fr 200px; gap: 24px; padding: 14px 26px 0 30px; }
.head-line { display: flex; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--vermilion); padding-bottom: 4px; margin-bottom: 8px; }
.head-line .numeral { font-family: var(--serif); font-weight: 600; font-size: 28px; color: var(--vermilion); }
.head-line h1 { font-size: 34px; }
.head-line .where { margin-left: auto; font-size: 16px; color: var(--umber); }
.scroll .scene { display: flow-root; font-size: 17.5px; line-height: 1.36; margin-bottom: 6px; }
.scroll .scene.initial::first-letter { font-size: 48px; padding: 4px 8px 0 0; }
.guide-line { font-size: 16.5px; line-height: 1.32; margin: 0; }
.guide-line .who { color: var(--umber); }
.guide-line .words { font-style: italic; color: var(--vermilion); }
.guide-line .cite { font-size: 14px; }
.scroll .help-note { margin: 4px 0 0; font-size: 15px; }
.hud { font-size: 16.5px; line-height: 1.45; border-left: 2px solid var(--gold); padding-left: 16px; align-self: start; margin-top: 4px; }
.hud b { font-family: var(--gothic); font-weight: 500; font-size: 19px; color: var(--vermilion); }
.hud .call { width: 100%; margin: 8px 0 6px; font-size: 18px; padding: 7px 10px; }
.hud .controls { font-size: 16px; color: var(--umber); font-style: italic; line-height: 1.3; }

.world { position: absolute; left: 0; right: 0; bottom: 0; height: 430px; overflow: hidden; border-top: 3px solid var(--gold); }
.backdrop { position: absolute; inset: 0; width: 100%; height: 100%; }

.plaque {
  position: absolute; width: 220px; padding: 7px 10px 8px 32px; z-index: 2; cursor: pointer;
  background: var(--vellum); border: 2px solid var(--gold); box-shadow: 0 3px 8px rgba(0,0,0,.35);
  font-size: 15.5px; line-height: 1.25; color: var(--ink);
}
.plaque .num { position: absolute; left: 9px; top: 4px; font-family: var(--gothic); font-size: 22px; color: var(--vermilion); }
.plaque.near { border-color: var(--vermilion); box-shadow: 0 0 0 3px rgba(241,215,124,.9), 0 3px 10px rgba(0,0,0,.4); }
.plaque.sealed { background: var(--vellum-shade); color: var(--umber); border-color: var(--umber); text-decoration: line-through; text-decoration-color: var(--vermilion); cursor: default; }

.door2 { position: absolute; width: 112px; height: 168px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 500px; z-index: 1; overflow: hidden; }
.door2 .glow, .door2 .leafwood { position: absolute; inset: 0; clip-path: path('M0 168 V60 C0 26 30 6 56 0 C82 6 112 26 112 60 V168 Z'); }
.door2 .glow { background: radial-gradient(ellipse at 50% 75%, #fffbe6, var(--gold-hi) 40%, var(--gold) 80%); }
.door2 .leafwood {
  transform-origin: 0 50%; transition: transform .6s ease-in;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 2px, transparent 2px 22px), linear-gradient(180deg, #7a4f2a, #4b2c14);
}
.door2 .leafwood::after { content: ''; position: absolute; right: 14px; top: 92px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-hi); }
.door2.open .leafwood { transform: rotateY(-82deg); }
.door2.sealed { cursor: default; }
.door2.sealed .leafwood::before {
  content: ''; position: absolute; left: 32px; top: 64px; width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #d9473d, #8e1610 70%); box-shadow: 0 2px 4px rgba(0,0,0,.5);
}
.buddy-in-door { position: absolute; left: 10px; bottom: 0; width: 92px; height: 168px; animation: pop .6s cubic-bezier(.2,1.5,.4,1) both; }
.buddy-in-door .fig { width: 100%; height: 100%; }

.trap { position: absolute; top: 368px; width: 124px; height: 0; z-index: 2; border-radius: 50% / 40%;
  background: radial-gradient(ellipse at 50% 40%, #000 55%, #2a1a0e); transition: height .25s ease-out; }
.trap.open { height: 58px; }

/* the procession: the player stands at the party's origin; Christ, his arm, and the brothers sit around it */
.party { position: absolute; left: 0; bottom: 58px; width: 0; height: 0; transform-origin: 0 0; z-index: 3; }
.slot { position: absolute; bottom: 0; }
.slot .fig { display: block; width: 100%; height: 100%; overflow: visible; }
.slot.player { left: -43px; width: 86px; height: 158px; z-index: 2; transition: transform 1.1s cubic-bezier(.55,0,.9,.4), opacity 1.1s; }
.slot.christ { width: 94px; height: 172px; z-index: 1; }
.slot.christ-arm { width: 94px; height: 172px; z-index: 3; transition: opacity .3s; }
.slot.friar { width: 64px; height: 118px; z-index: 0; }
.slot.friar.joining { animation: join-in 1.6s ease-out both; }
@keyframes join-in { from { transform: translateX(-260px); opacity: 0; } to { transform: none; opacity: 1; } }
.party.falling .player { transform: translateY(330px) rotate(28deg); opacity: 0; }
.party.falling .christ-arm { opacity: 0; }
.party.entering .slot { transition: opacity .9s, transform .9s; opacity: 0; transform: translateY(-8px) scale(.92); }

/* the walk cycle */
.fig .arm, .fig .foot, .fig .robe { transform-box: fill-box; }
.fig .arm { transform-origin: 50% 0; }
.fig .robe { transform-origin: 50% 0; }
.walking .fig { animation: bob .26s ease-in-out infinite alternate; }
.walking .fig .arm-f { animation: swing-f .52s ease-in-out infinite alternate; }
.walking .fig .arm-b { animation: swing-b .52s ease-in-out infinite alternate; }
.walking .fig .foot-a { animation: step-a .52s ease-in-out infinite alternate; }
.walking .fig .foot-b { animation: step-b .52s ease-in-out infinite alternate; }
.walking .fig .robe { animation: sway .52s ease-in-out infinite alternate; }
.walking .slot.friar:nth-child(2n) .fig, .walking .slot.friar:nth-child(2n) .fig * { animation-delay: -.26s; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-3px); } }
@keyframes swing-f { from { transform: rotate(20deg); } to { transform: rotate(-20deg); } }
@keyframes swing-b { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes step-a { from { transform: translateX(-8px); } to { transform: translateX(8px); } }
@keyframes step-b { from { transform: translateX(8px); } to { transform: translateX(-8px); } }
@keyframes sway { from { transform: skewX(2.5deg); } to { transform: skewX(-2.5deg); } }

/* a brief hint over the world, and the glow on a door Christ has just sealed */
.hint { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 6; padding: 8px 18px; font-size: 20px; font-style: italic;
  background: var(--vellum); border: 2px solid var(--gold); box-shadow: 0 3px 10px rgba(0,0,0,.4); animation: hint 1.8s ease-out both; pointer-events: none; }
@keyframes hint { 0% { opacity: 0; } 12%, 75% { opacity: 1; } 100% { opacity: 0; } }
.pulse { animation: seal-glow 1.2s ease-out 1; }
@keyframes seal-glow { 0%, 100% { filter: none; } 30% { filter: drop-shadow(0 0 14px var(--gold-hi)) brightness(1.35); } }
.pit-caption { margin-top: 10px; text-align: center; max-width: 300px; }

/* the pass card over the world */
.pass-card { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 660px; z-index: 6;
  background: var(--vellum); border: 3px solid var(--gold); box-shadow: 0 0 0 5px var(--lapis-deep), 0 14px 30px rgba(0,0,0,.45);
  padding: 18px 26px 20px; animation: card-in .5s ease-out both; }
.pass-card.with-art { width: 940px; display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center; }
.pass-card .pass-art { margin: 0; }
.pass-card .pass-art img { width: 300px; max-height: 330px; object-fit: cover; object-position: 0 60%; display: block; border: 3px solid var(--gold); }
.pass-card h2 { font-family: var(--gothic); font-size: 34px; color: var(--vermilion); margin-bottom: 6px; }
.pass-card .gloss { font-size: 19px; line-height: 1.42; margin: 6px 0 4px; }
.pass-card .gloss.initial::first-letter { font-size: 50px; }
.pass-card .joiners { font-style: italic; color: var(--umber); font-size: 17px; margin: 8px 0; }
.pass-card .btn { margin-top: 10px; }
@keyframes card-in { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* travel between stations */
.travel .world { overflow: visible; }
.travel .backdrop { overflow: hidden; }
.travel .far { animation: pan 18s linear infinite; }
.travel .near { animation: pan 9s linear infinite; }
@keyframes pan { to { transform: translateX(-1206px); } }
.banner { position: absolute; left: 50%; top: -190px; transform: translateX(-50%); text-align: center; width: 900px; }
.banner .numeral { display: block; font-family: var(--serif); font-weight: 600; font-size: 30px; color: var(--vermilion); }
.banner .t { display: block; font-family: var(--gothic); font-size: 64px; line-height: 1.05; color: var(--ink); }
.banner .w { display: block; font-size: 22px; font-style: italic; color: var(--umber); margin-top: 6px; }
.travel .skip { position: absolute; right: 18px; bottom: 10px; margin: 0; font-size: 16px; font-style: italic; color: #f3ead2; text-shadow: 0 1px 3px #000, 0 0 6px #000; z-index: 4; }

/* select: drawn figures in the cards */
.card { grid-template-columns: 74px 1fr; position: relative; min-height: 158px; }
.card-fig { width: 74px; height: 136px; display: block; }
.card-fig .fig { width: 100%; height: 100%; display: block; overflow: visible; }
.card-key { position: absolute; right: 8px; top: 6px; font-family: var(--gothic); color: var(--vermilion); font-size: 18px; }

.guide-party { position: relative; height: 178px; margin: 6px 0 10px; }
.guide-party .party { bottom: 0; }

.gate-walkers { position: absolute; left: 120px; bottom: 26px; display: flex; gap: 6px; align-items: flex-end; z-index: 1; animation: into-light 2s ease-out 1.2s both; }
.gate-walkers .gw { display: block; width: 100px; height: 183px; }
.gate-walkers .gw.buddy { width: 108px; height: 198px; }
.gate-walkers .fig { width: 100%; height: 100%; display: block; overflow: visible; }

.ending { position: relative; height: 100%; }
.ending-party { position: absolute; left: 0; bottom: -6px; width: 400px; height: 180px; transform: scale(.75); transform-origin: 0 100%; }
.ending-party .party { bottom: 0; }
