/* A photographic gilded moulding, sliced so the carving retains its depth. */
:root{--carved-frame:url('assets/gilded-gallery-frame.png')}
.floating-photo{background:transparent;padding:17px;border:0;box-shadow:none;filter:drop-shadow(0 14px 12px #0008);isolation:isolate}
.floating-photo:after,.moment-image:after,.science-placeholder:after{content:'';position:absolute;inset:0;pointer-events:none;border:22px solid transparent;border-image-source:var(--carved-frame);border-image-slice:20%;border-image-width:1;border-image-repeat:round;z-index:2}
.floating-photo>span:first-child,.coffee-memory>span:first-child{height:100%;overflow:hidden;background:#302017}
.coffee-memory{height:175px;width:235px}
.coffee-memory .handwritten{position:absolute;left:25px;right:25px;top:calc(100% + 12px);padding:0;color:#dfc49e;text-shadow:0 2px 6px #000;font-size:15px}
.pastry-memory{width:165px;height:205px;left:213px;top:25px}
.moment-image{position:relative;border:0;padding:19px;background:#22160f;box-shadow:0 18px 25px #0006;overflow:visible;isolation:isolate}
.moment-image>.photo-svg{overflow:hidden;box-shadow:0 0 0 2px #967650}
.moment-image:after{border-width:24px;filter:brightness(.86) saturate(.74)}
.moment:nth-child(3n+2) .moment-image:after{filter:brightness(.9) saturate(.4)}
.moment-open:hover .moment-image{box-shadow:0 23px 35px #0009}
.moment-open:hover .photo-svg{transform:none}
.moment-caption{padding-top:20px}
.glitter-me{display:inline-block;position:relative;white-space:nowrap;margin-left:.12em;padding:0 .2em;font:italic 400 1.5em/1 var(--serif);text-transform:none;letter-spacing:0}
.glitter-letters{color:#ffe1a3;background:linear-gradient(110deg,#bd8839 5%,#ffe5a9 23%,#cda252 42%,#fff9dd 48%,#fff 51%,#e9b866 57%,#a57a3b 76%,#ffe6a6 95%);background-size:250% 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 0 4px #e7ba6155);animation:goldenWord 6s ease-in-out infinite}
.glitter-me i{position:absolute;pointer-events:none;width:9px;height:9px;background:#fff5d5;clip-path:polygon(50% 0,59% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%);filter:drop-shadow(0 0 4px #f8c76a);animation:goldenTwinkle 4.8s ease-in-out infinite;opacity:0}
.glitter-me i:nth-of-type(1){left:-4px;top:0;animation-delay:-.3s}.glitter-me i:nth-of-type(2){right:-4px;bottom:0;width:7px;height:7px;animation-delay:-2s}.glitter-me i:nth-of-type(3){right:4px;top:-6px;width:5px;height:5px;animation-delay:-3.6s}
.science-exhibit{max-width:1050px;margin:25px auto 120px;padding:0 9%;display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:45px;align-items:end}
.science-placeholder{position:relative;aspect-ratio:1.08;display:grid;place-items:center;padding:35px;background:radial-gradient(ellipse at 38% 30%,#4d392d,#231b19 80%);box-shadow:0 25px 50px #0006;transform:rotate(-1deg)}
.science-placeholder:after{border-width:35px;filter:saturate(.6) brightness(.8)}
.science-placeholder>span{font:italic 1.35rem var(--serif);color:#c9b194;letter-spacing:.02em}
.exhibit-plaque{padding:20px 22px;background:#d9cbb9;color:#382c26;box-shadow:1px 3px 7px #0005;margin-bottom:30px;position:relative}
.exhibit-plaque:before,.exhibit-plaque:after{content:'';position:absolute;top:9px;width:3px;height:3px;border-radius:50%;background:#867460;box-shadow:inset 0 1px 1px #34271b}.exhibit-plaque:before{left:9px}.exhibit-plaque:after{right:9px}
.exhibit-plaque a{font:400 1.18rem/1.3 var(--serif);display:block;transition:color .25s}.exhibit-plaque a:hover{color:#875b28}.exhibit-plaque p{font-size:.73rem;line-height:1.65;margin-top:12px;color:#675547}
@keyframes goldenWord{0%,15%{background-position:100% 0}65%,100%{background-position:-100% 0}}
@keyframes goldenTwinkle{0%,45%,100%{opacity:0;transform:scale(.3) rotate(0)}60%{opacity:1;transform:scale(1) rotate(25deg)}75%{opacity:.15;transform:scale(.5) rotate(50deg)}}
@media(max-width:1100px){.coffee-memory{width:190px;height:151px}.pastry-memory{left:167px;width:140px;height:180px}.science-exhibit{padding:0 8%}}
@media(max-width:700px){.floating-photo{padding:11px}.floating-photo:after{border-width:14px}.coffee-memory{width:135px;height:111px}.coffee-memory .handwritten{left:5px;right:5px;font-size:11px;top:calc(100% + 7px)}.pastry-memory{width:93px;height:121px;left:109px;top:-3px}.floating-memories{right:12%;bottom:8%}.moment-image{padding:11px}.moment-image:after{border-width:15px}.moment-caption{padding-top:15px}.science-exhibit{grid-template-columns:1fr;padding:0 10%;gap:22px;margin:25px auto 75px}.science-placeholder{width:100%;max-width:450px;margin:auto;aspect-ratio:1}.science-placeholder:after{border-width:27px}.science-placeholder>span{font-size:1.15rem}.exhibit-plaque{width:200px;justify-self:end;margin:0 0 0 0}.glitter-me{margin-left:0}}
@media(prefers-reduced-motion:reduce){.glitter-letters,.glitter-me i{animation:none}.glitter-me i{opacity:.5}.glitter-me i:nth-of-type(2),.glitter-me i:nth-of-type(3){opacity:0}}
/* The aperture preserves each photo's ratio; the moulding sits outside it. */
.moment-image{aspect-ratio:auto;padding:26px}
.moment-image>.photo-svg{height:auto;aspect-ratio:var(--photo-ratio)}
.moment-image:after{border-width:26px}
.moment-caption small{display:none}
.viewer-caption p:empty{display:none}
.floating-photo{padding:24px;height:auto}
.floating-photo:after{border-width:24px}
.floating-photo>span:first-child,.coffee-memory>span:first-child{height:auto;aspect-ratio:var(--photo-ratio)}
.floating-photo .photo-svg{aspect-ratio:var(--photo-ratio);height:auto}
.coffee-memory{width:235px}
.pastry-memory{left:260px;width:165px;top:18px}
.coffee-memory .handwritten{left:0;right:0;text-align:center;top:calc(100% + 10px)}
@media(min-width:701px) and (max-width:1100px){.coffee-memory{width:190px}.pastry-memory{left:218px;width:140px}.floating-photo{padding:20px}.floating-photo:after{border-width:20px}}
@media(max-width:700px){.floating-memories{width:245px;right:6%;height:145px;bottom:7%}.floating-photo{padding:14px}.floating-photo:after{border-width:14px}.coffee-memory{width:135px}.pastry-memory{left:154px;width:91px;top:0}.moment-image{padding:16px}.moment-image:after{border-width:16px}.coffee-memory .handwritten{font-size:11px}}
