/* ==========================================================================
   OFFICE: the detective's office around the corkboard.
   Wallpapered walls, side-wall art, brass picture light, venetian-blind light,
   dust, the wooden desk surface with props, and the fade in from the rooftop.
   Art is drawn by js/office.js; stickers by js/stickers.js / css/stickers.css.
   ========================================================================== */

/* ---------- entrance -> office: the rooftop fades to black, then the room lights up ---------- */
.top-fade { position: absolute !important; left: 0; right: 0; top: 0; height: 280px; z-index: 6; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,.55) 22%, rgba(0,0,0,.28) 55%, transparent 100%); }

.office { position: relative; padding: 76px 0 90px; }
.office > .container { position: relative; z-index: 3; }

/* ---------- walls ---------- */
.wallpaper { position: absolute !important; inset: 0; z-index: 0; pointer-events: none; background:
    radial-gradient(ellipse 60% 46% at 50% 38%, rgba(255,205,130,.2), transparent 70%),
    radial-gradient(circle 160px at 12% 30%, rgba(80,50,20,.35), transparent 70%),
    radial-gradient(circle 120px at 88% 64%, rgba(60,40,15,.3), transparent 70%),
    radial-gradient(ellipse 120% 100% at 50% 40%, transparent 55%, rgba(0,0,0,.7) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Crect width='80' height='40' fill='%2314282c'/%3E%3Cg fill='%2314282c' stroke='%23c9a24a' stroke-opacity='.3' stroke-width='1.4'%3E%3Cg id='a'%3E%3Ccircle cx='0' cy='0' r='40'/%3E%3Ccircle cx='0' cy='0' r='30'/%3E%3Ccircle cx='0' cy='0' r='20'/%3E%3Ccircle cx='0' cy='0' r='10'/%3E%3C/g%3E%3Cuse href='%23a' x='80'/%3E%3Cuse href='%23a' x='40' y='20'/%3E%3Cuse href='%23a' y='40'/%3E%3Cuse href='%23a' x='80' y='40'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 80px 40px; }
.wallpaper::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22px; background: linear-gradient(180deg, #a8794a, #5a3a20 60%, #2a1a0c); border-bottom: 4px solid #000; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
.wallpaper::after { content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background: radial-gradient(ellipse 12% 8% at 20% 18%, #1a0d04, transparent), radial-gradient(ellipse 9% 12% at 82% 40%, #1a0d04, transparent), repeating-linear-gradient(90deg, transparent 0 3px, rgba(0,0,0,.18) 3px 4px); }

/* venetian-blind light stripes + coloured neon wash from the street window */
.blinds-light { position: absolute !important; inset: 0; z-index: 4; pointer-events: none; mix-blend-mode: screen; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.55) 40%, transparent 85%); mask-image: linear-gradient(90deg, #000 0, rgba(0,0,0,.55) 40%, transparent 85%); }
/* the stripes slide by MOVING a taller sheet (a transform costs nothing); animating background-position repainted the whole wall every frame */
.blinds-light::before { content: ""; position: absolute; left: 0; right: 0; top: -330px; bottom: 0;
  background: repeating-linear-gradient(166deg, transparent 0 52px, rgba(160,200,255,.085) 52px 80px);
  animation: blindshift 50s linear infinite; will-change: transform; }
@keyframes blindshift { to { transform: translateY(329.8px); } }
.neon-wash { position: absolute !important; inset: 0; z-index: 4; pointer-events: none; mix-blend-mode: screen; }
/* two colour sheets that cross-fade (opacity only). It used to animate filter: hue-rotate, which repaints the whole wall every frame */
.neon-wash::before, .neon-wash::after { content: ""; position: absolute; inset: 0; animation: washcol 9s ease-in-out infinite alternate; }
.neon-wash::before { background: radial-gradient(ellipse 440px 560px at 0% 24%, rgba(255,77,122,.22), transparent 72%), radial-gradient(ellipse 300px 400px at 100% 70%, rgba(63,160,255,.14), transparent 72%); }
.neon-wash::after { background: radial-gradient(ellipse 440px 560px at 0% 24%, rgba(0,147,183,.22), transparent 72%), radial-gradient(ellipse 300px 400px at 100% 70%, rgba(164,155,10,.14), transparent 72%); animation-name: washcol2; }
@keyframes washcol { from { opacity: .9; } to { opacity: 0; } }
@keyframes washcol2 { from { opacity: 0; } to { opacity: .6; } }
.dust { position: absolute !important; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.dust i { position: absolute; border-radius: 50%; background: #ffe9b8; opacity: 0; animation: dustf linear infinite; }
@keyframes dustf { 0% { opacity: 0; transform: translate(0, 0); } 20%, 75% { opacity: .55; } 100% { opacity: 0; transform: translate(46px, -90px); } }

/* ---------- side-wall columns (only when there is room) ---------- */
.wall { position: absolute !important; top: 54px; bottom: 110px; z-index: 2; display: none; flex-direction: column; justify-content: space-between; align-items: center; gap: 18px;
  width: calc((100% - 1120px) / 2 - 30px); pointer-events: none; }
.wall-l { left: 16px; } .wall-r { right: 16px; }
@media (min-width: 1500px) { .wall { display: flex; } .office { min-height: 1220px; } }
.wall .art { display: block; width: 100%; height: auto; filter: drop-shadow(6px 9px 0 rgba(0,0,0,.5)); overflow: visible; }
.art-window { max-width: 290px; } .art-clock { max-width: 150px; } .art-coat { max-width: 210px; }
.art-frame { max-width: 270px; rotate: -2deg; } .art-wanted { max-width: 210px; rotate: 2.5deg; } .art-cal { max-width: 160px; rotate: -3deg; } .art-shelf { max-width: 270px; }
.wall .stk-wrap { pointer-events: auto; }
.wall-slot { display: grid; place-items: center; min-height: 120px; width: 100%; }
.plaque { display: grid; justify-items: center; padding: 8px 22px 10px; margin-top: 6px; background: #0a0b12; border: 4px solid #b8892f; outline: 2px solid #000; box-shadow: 6px 8px 0 rgba(0,0,0,.5), inset 0 0 0 2px #1a1c2a; text-align: center; }
.plaque b { font: 34px/1 var(--font-display); color: #e8c66a; text-shadow: 0 0 8px rgba(232,198,106,.5); }
.plaque span { font: 15px var(--font-display); letter-spacing: .32em; color: #e8c66a; }
.plaque i { margin-top: 4px; font: 14px var(--font-marker); font-style: normal; color: #b8b2a0; }

/* reveal: wall pieces fade up after the lamp comes on */
.wall > *, .props .art { opacity: 0; }
.lit .wall > *, .lit .props .art { animation: wallIn .9s ease-out forwards; }
.lit .wall > :nth-child(1) { animation-delay: .5s; } .lit .wall > :nth-child(2) { animation-delay: .7s; } .lit .wall > :nth-child(3) { animation-delay: .9s; }
.lit .wall > :nth-child(4) { animation-delay: 1.1s; } .lit .wall > :nth-child(5) { animation-delay: 1.3s; } .lit .wall > :nth-child(6) { animation-delay: 1.5s; } .lit .wall > :nth-child(7) { animation-delay: 1.7s; }
.lit .props .art { animation-delay: 1.2s; }
@keyframes wallIn { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }

/* art animation */
.o-rain { animation: orain .8s linear infinite; }
@keyframes orain { from { transform: translate(8px, -24px); } to { transform: translate(0, 0); } }
.o-neon-pink { animation: oflick 7s linear infinite; }
.o-neon-blue { animation: oflick 11s linear infinite reverse; }
@keyframes oflick { 0%, 100% { opacity: 1; } 62% { opacity: 1; } 63% { opacity: .35; } 65% { opacity: 1; } 67% { opacity: .55; } 69% { opacity: 1; } }
.o-swing { animation: oswing 6.5s ease-in-out infinite alternate; }
.o-swing2 { animation-duration: 8s; animation-delay: -2s; }
@keyframes oswing { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.o-dial { animation: odial 3.2s ease-in-out infinite alternate; }
@keyframes odial { from { fill: #ffb347; } to { fill: #7a4a14; } }
.o-steam path, .o-smoke path { animation: osteam 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.o-steam path:nth-child(2), .o-smoke path:nth-child(2) { animation-delay: -1.4s; } .o-steam path:nth-child(3) { animation-delay: -2.8s; }
@keyframes osteam { 0%, 100% { transform: translateY(0) scaleX(1); opacity: .35; } 50% { transform: translateY(-6px) scaleX(1.25); opacity: .7; } }
.o-ember { animation: oember 2.6s ease-in-out infinite; }
@keyframes oember { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.o-cone { animation: ocone 6s ease-in-out infinite alternate; }
.o-bulb { animation: ocone 6s ease-in-out infinite alternate; }
@keyframes ocone { from { opacity: .85; } to { opacity: 1; } }

/* ---------- the corkboard: wooden frame, real cork, brass screws, picture light, ledge ---------- */
.board-wrap { position: relative; margin-top: 60px; padding: 20px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 2px, transparent 2px 7px), linear-gradient(180deg, #8a5c34, #5a3a20 45%, #3a2415);
  box-shadow: 0 0 0 3px #000, inset 3px 3px 0 rgba(255,220,160,.28), inset -3px -3px 0 rgba(0,0,0,.45), 0 24px 40px rgba(0,0,0,.6), 0 4px 0 3px #000; }
.board-wrap .board { border: 0; outline: 0; padding: 26px 30px 26px; min-height: 420px;
  background: url("../assets/cork.svg") 0 0 / 320px 320px, var(--cork);
  box-shadow: inset 0 0 0 3px #000, inset 0 0 90px rgba(0,0,0,.65), inset 0 12px 30px rgba(0,0,0,.35); }
.board-wrap .board::before { opacity: .22; }
.screw { position: absolute; z-index: 4; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f1d58a, #8a6a22 60%, #3a2a0a); box-shadow: 0 0 0 1.5px #000, 1px 2px 0 1.5px rgba(0,0,0,.45); }
.screw::after { content: ""; position: absolute; left: 2px; right: 2px; top: 6px; height: 2px; background: #2a1a0a; rotate: 35deg; }
.screw.tl { left: 3px; top: 3px; } .screw.tr { right: 3px; top: 3px; } .screw.bl { left: 3px; bottom: 3px; } .screw.br { right: 3px; bottom: 3px; }

.picture-light { position: absolute; left: 50%; top: -58px; width: min(520px, 70%); translate: -50% 0; z-index: 7; pointer-events: none; filter: drop-shadow(0 8px 0 rgba(0,0,0,.45)); }
.light-cone { position: absolute; left: 50%; top: -8px; z-index: 5; width: 86%; height: 90%; translate: -50% 0; pointer-events: none; mix-blend-mode: screen;
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, rgba(255,226,160,.34), rgba(255,226,160,.05) 80%, transparent); animation: ocone 7s ease-in-out infinite alternate; }

.ledge { position: relative; z-index: 3; height: 24px; margin: 6px -14px 0; background: repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 2px, transparent 2px 7px), linear-gradient(180deg, #8a5c34, #4a2f18); box-shadow: 0 0 0 3px #000, 0 12px 20px rgba(0,0,0,.55), inset 0 3px 0 rgba(255,220,160,.3); }
.ledge-items { position: absolute; right: 28px; bottom: calc(100% + 2px); width: 370px; height: auto; overflow: visible; }
.board-more { margin-top: 36px; }

/* magnifying-glass cursor over case files */
.polaroid { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'%3E%3Ccircle cx='14' cy='14' r='10' fill='%23ffe9b8' fill-opacity='.25' stroke='%23000' stroke-width='5'/%3E%3Ccircle cx='14' cy='14' r='10' fill='none' stroke='%23e0a23a' stroke-width='2.5'/%3E%3Cpath d='M21 21l12 12' stroke='%23000' stroke-width='7' stroke-linecap='round'/%3E%3Cpath d='M21 21l12 12' stroke='%235a3a20' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") 14 14, pointer; }

/* ---------- the wooden desk surface ---------- */
.desk-surface { position: relative; padding: 70px 0 0; z-index: 3;
  background: radial-gradient(ellipse 50% 60% at 82% 0%, rgba(255,210,140,.22), transparent 70%), repeating-linear-gradient(90deg, rgba(0,0,0,.14) 0 2px, transparent 2px 11px), linear-gradient(180deg, #5e3c22, #3a2415 55%, #1a0f09); }
.desk-surface::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px; border-top: 4px solid #000; background: linear-gradient(180deg, #a8794a, #6a4526 40%, #2e1c0e); box-shadow: 0 -24px 36px rgba(0,0,0,.65), inset 0 3px 0 rgba(255,220,160,.35); }
.desk-surface > .container { position: relative; z-index: 2; }
.desk-surface .archive { margin-top: 20px; }
.props { position: absolute; top: 56px; z-index: 1; display: none; width: calc((100% - 1120px) / 2 - 30px); pointer-events: none; }
.props-l { left: 20px; } .props-r { right: 20px; }
@media (min-width: 1500px) { .props { display: block; } }
.props .art { width: 100%; max-width: 300px; height: auto; overflow: visible; filter: drop-shadow(6px 9px 0 rgba(0,0,0,.5)); }
.props-r .art { margin-left: auto; }

/* ---------- smaller screens ---------- */
@media (max-width: 900px) {
  .picture-light, .light-cone, .screw, .ledge-items { display: none; }
  .board-wrap { margin-top: 24px; padding: 12px; }
  .board-wrap .board { padding: 20px 14px 20px; }
  .office { padding-top: 56px; }
  .blinds-light, .neon-wash { opacity: .6; }
}
@media (max-width: 640px) { .ledge { display: none; } }
@media (prefers-reduced-motion: reduce) { .wall > *, .props .art { opacity: 1; } .blinds-light::before, .neon-wash::before, .neon-wash::after, .dust { animation: none; } .neon-wash::after { opacity: 0; } .dust { display: none; } }
