/* fx-proof: #scale, #research, #evidence, #stack, and the photo corners on the #design and #hood plates */

/* ---------- #research: enamel boards rise as the rickshaw arrives ---------- */
#mBoards .mb{transform:translateY(30px);opacity:0;transition:transform .4s var(--spring),opacity .3s var(--out)}
#mBoards .mb.up{transform:none;opacity:.74}
#mBoards .mb.cur{opacity:1}
#mBoards .mb.cur rect:first-of-type{stroke-width:4}

/* ---------- #evidence: a ledger sheet under a brass bulldog clip ---------- */
#evidence .ex-sheet{width:min(600px,44vw);padding:40px 28px 24px;transform-origin:left center;background-image:repeating-linear-gradient(0deg,rgba(111,29,17,0) 0 31px,rgba(111,29,17,.07) 31px 32px),linear-gradient(90deg,rgba(0,0,0,0) 0 22px,rgba(111,29,17,.22) 22px 23px,rgba(0,0,0,0) 23px)}
.ex-sheet::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,rgba(54,24,25,0) 50%,rgba(54,24,25,.28) 100%);opacity:0}
#exSheet .ex-clip{position:absolute;left:50%;top:-17px;width:72px;height:34px;margin-left:-36px;z-index:3;filter:drop-shadow(0 3px 2px rgba(10,2,1,.4))}
.ex-tabs{position:absolute;right:-36px;top:46px;display:flex;flex-direction:column;gap:5px;z-index:0}
.ex-tabs button{width:36px;height:40px;padding:0 0 0 4px;border:0;border-radius:0 7px 7px 0;background:#8A2A1A;color:#F9F0E4;font-family:var(--mono);font-size:15px;line-height:40px;text-align:center;cursor:pointer;box-shadow:inset 6px 0 6px -4px rgba(10,2,1,.45);transition:transform .25s var(--out),background .2s}
.ex-tabs button:hover{transform:translateX(4px)}
.ex-tabs button[aria-current]{background:#C9A24D;color:#24100F;transform:translateX(8px)}
.ex-tabs button:focus-visible{outline:2px solid var(--gold-3);outline-offset:2px}
.ex-ghost{color:#8C7A68;opacity:.2}
.ex-ghost [fill]:not([fill="none"]){fill:#8C7A68}
.ex-ghost [stroke]:not([stroke="none"]){stroke:#8C7A68}
.ex-sheet.turn{animation:exPage .46s var(--out)}
.ex-sheet.turn::after{animation:exCurl .46s var(--out)}
.ex-sheet.fade{animation:exFade .4s linear}
@keyframes exPage{0%{transform:perspective(1400px) rotateY(0)}45%{transform:perspective(1400px) rotateY(-14deg)}100%{transform:perspective(1400px) rotateY(0)}}
@keyframes exCurl{0%,100%{opacity:0}45%{opacity:1}}
@keyframes exFade{0%{opacity:.35}100%{opacity:1}}
@media (max-width:820px){
  #evidence .ex-sheet{width:100%;padding:36px 20px 18px;margin-bottom:46px}
  .ex-tabs{right:auto;top:auto;left:14px;bottom:-40px;flex-direction:row;gap:4px}
  .ex-tabs button{width:36px;height:40px;padding:4px 0 0;border-radius:0 0 7px 7px;line-height:36px;box-shadow:inset 0 6px 6px -4px rgba(10,2,1,.45)}
  .ex-tabs button:hover{transform:translateY(3px)}
  .ex-tabs button[aria-current]{transform:translateY(6px)}
}

/* ---------- #stack: the carrier at desktop, a small carrier on the slip on phones ---------- */
#stMini{display:none}
@media (max-width:820px){#stBig{display:none}#stMini{display:inline}#stCarrier text{display:none}#stJson{font-size:15px}#stLayer{font-size:16px}}

/* ---------- plates in #design and #hood: gold photo corners hold the print ---------- */
.plate.corners .pp{position:relative}
.plate.corners .pp::after{content:"";position:absolute;inset:10px;pointer-events:none;--c:#B8893A;
  background:linear-gradient(135deg,var(--c) 0 50%,transparent 50%) left top/26px 26px no-repeat,linear-gradient(225deg,var(--c) 0 50%,transparent 50%) right top/26px 26px no-repeat,
  linear-gradient(45deg,var(--c) 0 50%,transparent 50%) left bottom/26px 26px no-repeat,linear-gradient(315deg,var(--c) 0 50%,transparent 50%) right bottom/26px 26px no-repeat,
  linear-gradient(135deg,rgba(255,243,207,.55) 0 22%,transparent 22%) left top/26px 26px no-repeat;filter:drop-shadow(0 1px 1.5px rgba(10,2,1,.45))}

@media (prefers-reduced-motion: reduce){#mBoards .mb{transition:none}.ex-tabs button{transition:none}}
/* the map takes whatever height the tallest caption leaves, anchored to the bottom */
@media (min-width:821px){#research .cap h2{font-size:clamp(40px,4.4vw,66px)}#research .cap p{max-width:54ch}#research .cap .src{max-width:60ch}
  .metro-stage .viz{flex:1 1 0;min-height:200px;align-items:flex-end}.metro-stage .viz svg{height:100%;max-height:none}}
#stJson text{white-space:pre}

/* ---------- #scale: a velvet scrim behind the caption column only, fading out before the middle of the photo ---------- */
#scale .caps::before{content:"";position:absolute;z-index:-1;left:-84px;right:-80px;top:-120px;bottom:-60px;pointer-events:none;background:linear-gradient(90deg,rgba(36,16,15,.88) 0,rgba(36,16,15,.88) calc(100% - 150px),rgba(36,16,15,0));-webkit-mask-image:linear-gradient(180deg,transparent,#000 140px);mask-image:linear-gradient(180deg,transparent,#000 140px)}
/* phones: the photo slides left so the flag on the dome is out of frame, never under the caption or its scrim */
@media (max-width:820px){#scale .sc-photo{object-position:8% 30%}#scale .caps::before{left:-20px;right:-20px;top:-50px;bottom:-30px;background:rgba(36,16,15,.9);-webkit-mask-image:linear-gradient(180deg,transparent,#000 50px);mask-image:linear-gradient(180deg,transparent,#000 50px)}}
@media (max-width:360px){#evidence .ex-sheet{padding-left:12px;padding-right:12px}}
