/* The Walk (Owner, 2026-11-22). src/walk.js drives it by adding state classes to .walk. */
.walk { position: absolute; inset: 0; z-index: 300; overflow: clip; background: #0b1120; color: var(--color-ink, #F1E3C2); font-family: var(--font-body); -webkit-user-select: none; user-select: none; }
.walk > * { position: absolute; pointer-events: none; }   /* nothing catches a tap unless it's that beat's turn */
.walk .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.walk button { border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer; }

/* 0. the front page: HR BAR, Society & Public House, the seal */
.w-front { inset: 0; pointer-events: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--color-paper, #1F2B45); transition: opacity 1s ease; z-index: 9; }
.w-front .wordmark { font-family: var(--font-display); font-size: 34px; letter-spacing: .22em; }
.w-hand { margin: 0 0 30px; font-style: italic; font-size: 22px; }
.w-seal { position: relative; width: 84px; height: 84px; }
.w-seal.broken .wl, .w-rec-seal.stamped .wl { animation: w-crackl .9s ease-in forwards; }
.w-seal.broken .wr { animation: w-crackr .9s ease-in forwards; }
@keyframes w-crackl { 20% { transform: translate(-3px, 0) rotate(-3deg); } 100% { transform: translate(-26px, 44px) rotate(-34deg); opacity: 0; } }
@keyframes w-crackr { 20% { transform: translate(3px, 0) rotate(3deg); } 100% { transform: translate(24px, 52px) rotate(28deg); opacity: 0; } }
.at-hills .w-front { opacity: 0; pointer-events: none; }

/* 1. the hills */
.w-hills { inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease, filter 1.4s ease; }
.at-hills .w-hills { opacity: 1; }
.at-scroll .w-hills { filter: brightness(.42); }
.at-mull2 .w-hills { opacity: 0; }

/* 2. the scroll: its dark surface drops out over the hills (lighten), the parchment stays */
.w-sbox { top: 0; left: 50%; height: 100%; aspect-ratio: 540 / 960; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .6s ease, transform .5s cubic-bezier(.6, 0, .9, .4); }
.w-scroll-v { mix-blend-mode: lighten; object-fit: cover; }
.at-scroll .w-sbox { opacity: 1; }
.at-scroll .w-scroll { pointer-events: auto; }
.snapped .w-sbox { transform: translate(-50%, -120%); transition-delay: .25s; }
.w-sheet { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #3a2312; padding: 0 2%; }
.w-words { margin: 0; font-size: 14px; line-height: 1.38; }
.w-words span { opacity: 0; display: inline-block; }
.writing .w-words span { animation: w-ink .9s ease forwards; }
@keyframes w-ink { from { opacity: 0; filter: blur(3px); } to { opacity: 1; filter: blur(0); } }
.w-by, .w-motto { margin: 6px 0 0; opacity: 0; transition: opacity .9s ease; }
.w-by { font-family: 'Pinyon Script', cursive; font-size: 19px; }
.w-motto { font-family: var(--font-display); font-size: 9px; letter-spacing: .18em; }
.signed-by .w-by, .signed-by .w-motto { opacity: 1; }
.w-oath { margin: 12px 0 0; font-size: 11.5px; line-height: 1.35; font-style: italic; opacity: 0; }
.oath .w-oath { animation: w-evap 2s ease forwards; }
@keyframes w-evap { from { opacity: 0; filter: blur(7px); letter-spacing: .12em; } to { opacity: 1; filter: blur(0); letter-spacing: 0; } }
.w-sign { position: relative; width: 82%; height: 34px; margin-top: 10px; border-bottom: 1px solid #3a2312 !important; opacity: 0; pointer-events: none; transition: opacity .8s ease; }
.can-sign .w-sign { opacity: 1; pointer-events: auto; animation: w-beckon 1.8s ease-in-out infinite; }
.signed .w-sign { animation: none; pointer-events: none; }
@keyframes w-beckon { 50% { border-bottom-color: rgba(58, 35, 18, .35); } }
.w-no { position: absolute; left: 0; right: 0; bottom: 2px; font-family: 'Pinyon Script', cursive; font-size: 24px; color: #2b1a0e; clip-path: inset(0 100% 0 0); }
.signed .w-no { transition: clip-path 1.1s cubic-bezier(.5, .1, .4, 1); clip-path: inset(0 0 0 0); }
.snap .w-sheet { opacity: 0; transition: opacity .15s ease; }

/* 3. a different spot on Mull, and the turn. JS sets --x0 (looking at Mull) and --x1 (the doors). */
.w-pan { top: 0; left: 0; height: 100%; display: flex; opacity: 0; transform: translateX(var(--x0, 0)); transition: opacity 1s ease; will-change: transform; }
.w-pan img { height: 100%; width: auto; display: block; }
.at-mull2 .w-pan { opacity: 1; }
.turning .w-pan { transform: translateX(var(--x1, 0)); transition: opacity 1s ease, transform 1.25s cubic-bezier(.6, 0, .3, 1); animation: w-blur 1.25s ease; }
@keyframes w-blur { 40%, 60% { filter: blur(7px); } }
.opening .w-pan { transform: translateX(var(--x1, 0)) scale(1.9); transform-origin: var(--ox, 50%) 63%; transition: transform 2.6s cubic-bezier(.4, 0, .2, 1); }

/* 4. the drop box, wavering in the wind */
.w-box { right: 5%; bottom: 9%; width: 21%; opacity: 0; pointer-events: none; transform-origin: 50% 100%; transition: opacity .8s ease; }
.w-box img { width: 100%; display: block; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.box-on .w-box { opacity: 1; pointer-events: auto; animation: w-sway 2.6s ease-in-out infinite; }
.pocket .w-box { pointer-events: none; }
@keyframes w-sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.9deg); } }
.w-rolled { left: 50%; bottom: -20%; width: 10%; opacity: 0; }
.pocket .w-rolled { animation: w-pocket 1.05s cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes w-pocket { 0% { opacity: 1; transform: translate(-50%, 0) rotate(0); } 60% { opacity: 1; transform: translate(95%, -340%) rotate(-70deg) scale(.8); } 100% { opacity: 0; transform: translate(160%, -390%) rotate(-90deg) scale(.45); } }
.w-keys { left: 46%; bottom: 7%; width: 15%; opacity: 0; pointer-events: none; touch-action: none; transform: translateY(-140%); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .55)); }
.keys-down .w-keys { animation: w-plot .55s cubic-bezier(.5, 0, 1, .6) forwards; }
@keyframes w-plot { 0% { opacity: 1; transform: translateY(-140%); } 80% { opacity: 1; transform: translateY(4%); } 90% { transform: translateY(-3%); } 100% { opacity: 1; transform: none; } }
.can-drag .w-keys { pointer-events: auto; cursor: grab; }
.w-keys.held { cursor: grabbing; transition: none; scale: 1.08; }

/* 5. the lock: hold... tap... tap... */
.w-lock { inset: 0; opacity: 0; pointer-events: none; transition: opacity .5s ease; overflow: hidden; }
.w-lock img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 22%; transform: scale(1.25); transform-origin: 30% 22%; transition: transform 1.4s ease; }
.at-lock .w-lock { opacity: 1; pointer-events: auto; }
.at-lock .w-lock img { transform: scale(1.6); }
.w-lock.tapped img { animation: w-tap .18s ease; }
@keyframes w-tap { 40% { translate: 2px 1px; } 70% { translate: -1px -1px; } }
.w-lock.turning img { transform: scale(1.7) rotate(-6deg); transition: transform 1.4s cubic-bezier(.5, 0, .3, 1); }

/* 6. the doors open: amber light from the seam consumes the screen */
.w-amber { inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 63%, #fff3d6 0, #df8a31 18%, rgba(223, 138, 49, .7) 34%, rgba(223, 138, 49, 0) 60%); transform: scale(.15); transform-origin: 50% 63%; }
.opening .w-amber { opacity: 1; transform: scale(1.2); transition: transform 2.4s cubic-bezier(.6, 0, .4, 1), opacity .8s ease; }
.amber .w-amber { background: #f2b56a; transform: scale(1); opacity: 1; transition: background 1s ease; }
.at-pub .w-amber { opacity: 0; transition: opacity 1.8s ease; }

/* 7. the pub, the file with the card clipped on */
.w-pub { inset: 0; opacity: 0; overflow: hidden; }
.w-pub img { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.85); transform: scale(1.08); }
.at-pub .w-pub { opacity: 1; }
.w-file { left: 50%; bottom: 8%; width: 76%; opacity: 0; pointer-events: none; transform: translate(-50%, 140%) rotate(-3deg); transition: transform 1s cubic-bezier(.2, .8, .3, 1), opacity .4s ease; }
.file-on .w-file { opacity: 1; pointer-events: auto; transform: translate(-50%, 0) rotate(-3deg); }
.w-folder { position: relative; aspect-ratio: 1.38; border-radius: 4px 14px 6px 6px; background: linear-gradient(170deg, #e9d6ae, #d3b886); box-shadow: 0 14px 26px rgba(0, 0, 0, .55); }
.w-folder::before { content: ""; position: absolute; left: 6%; top: -9%; width: 34%; height: 12%; border-radius: 6px 6px 0 0; background: #e2cda1; }
.w-tie { position: absolute; right: 9%; top: 44%; width: 14px; height: 14px; border-radius: 50%; background: #b8955d; box-shadow: inset 0 0 0 3px #9c7a45; }
.w-tie::after { content: ""; position: absolute; left: 6px; top: 12px; width: 1px; height: 60px; background: #7a2d1c; transform: rotate(12deg); transform-origin: top; }
.w-card { position: absolute; left: 12%; top: 16%; width: 64%; aspect-ratio: 1.6; background: #f8f1e1 !important; color: #1f2b45; box-shadow: 0 4px 10px rgba(0, 0, 0, .35); transform: rotate(4deg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; animation: w-card 2.2s ease-in-out 1.2s infinite; }
@keyframes w-card { 50% { box-shadow: 0 4px 18px rgba(242, 181, 106, .75); } }
.w-clip { position: absolute; top: -10px; left: 14%; width: 12px; height: 34px; border: 2px solid #9aa0a6; border-radius: 6px; }
.w-card .w-crest { width: 34px; }
.w-card-no { font-family: var(--font-display); font-size: 11px; letter-spacing: .14em; }

/* 8. the Record card, Sam, the seal */
.w-record { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .8s ease; background: rgba(15, 20, 34, .55); }
.at-record .w-record { opacity: 1; pointer-events: auto; }
.at-record .w-file { opacity: 0; transition: opacity .5s ease; }
.w-rec-card { position: relative; width: 100%; aspect-ratio: 1.45; background: #f8f1e1; color: #1f2b45; border-radius: 4px; box-shadow: 0 16px 30px rgba(0, 0, 0, .5); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; animation: w-grow .7s cubic-bezier(.2, .8, .3, 1); }
@keyframes w-grow { from { transform: scale(.45) rotate(4deg); opacity: 0; } }
.w-rec-card .w-crest { width: 52px; }
.w-rec-name input { width: 70%; min-width: 200px; text-align: center; border: 0; border-bottom: 1px solid #1f2b45; background: transparent; font: 600 20px var(--font-display); color: #1f2b45; letter-spacing: .08em; padding: 4px; outline: none; }
.w-rec-seal { position: absolute !important; right: 6%; bottom: -26px; width: 72px; height: 72px; opacity: .45; transition: opacity .4s ease; }
.w-rec-seal:not([disabled]) { opacity: 1; }
.w-rec-seal.stamped { animation: w-stamp .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes w-stamp { from { transform: scale(1.8); } }
.w-rec-seal.stamped .wl, .w-rec-seal.stamped .wr { animation: none; }
.w-sam { width: 100%; }
.done { opacity: 0; transition: opacity 1.1s ease; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .walk *, .walk { animation-duration: .01s !important; transition-duration: .15s !important; }
}

/* The app's older .sc-seal rule (styles.css) pins every seal to top-centre; The Walk places its own. */
.walk .w-seal { position: relative !important; left: auto; top: auto; transform: none; margin: 0 auto; }
.walk .w-rec-seal { left: auto; top: auto; transform: none; }
.walk .w-rec-seal.stamped { transform: none; }
/* Once the hills are up, the front page (and its seal, which styles.css forces to take taps) lets go of every tap. */
.at-hills .w-front, .at-hills .w-front * { pointer-events: none !important; }
.walk .w-seal { align-self: center; margin: 0; translate: none; }
.walk .w-rec-seal { right: 4%; bottom: -40px; }
/* The Walk's own beckon: a gentle pulse, without the older animation's built-in translate(-50%,-50%). */
.walk .sc-seal.beckon { animation: w-beckon-seal 1.6s ease-in-out infinite; }
@keyframes w-beckon-seal { 50% { transform: scale(1.07); filter: drop-shadow(0 4px 12px rgba(230, 0, 126, .55)); } }
