/* The pieces: posts made the way the Studio makes them, for a fictitious brand, Café Aurora: real footage
   (assets/media/aurora/) with the brand's type and motion on top.
   Each piece is a fixed-size stage (the post's own pixels) scaled to its box by assets/js/pieces.js. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/assets/fonts/fraunces-latin.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 300 800; font-display: swap; src: url(/assets/fonts/fraunces-italic-latin.woff2) format("woff2"); }

.piece { --cream: #f4ebe0; --cream-2: #eadbc8; --espresso: #24140c; --roast: #4a2715; --caramel: #c27a34; --gold: #e8b46a;
  position: relative; overflow: hidden; container-type: inline-size; background: #0b0705; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.piece .stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; transform: scale(var(--s, 1)); font-family: var(--font); color: #fff; }
.piece--reel, .piece--story { aspect-ratio: 9 / 16; }
.piece--reel .stage, .piece--story .stage { width: 360px; height: 640px; }
.piece--carousel { aspect-ratio: 360 / 620; background: #000; }
.piece--carousel .stage { width: 360px; height: 620px; }
.piece--doc { aspect-ratio: 360 / 600; background: #1b1f23; }
.piece--doc .stage { width: 360px; height: 600px; }
.piece--brand { aspect-ratio: 360 / 530; background: var(--cream); }
.piece--brand .stage { width: 360px; height: 530px; }
.piece video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #0b0705; }
/* a photo filling its box, drifting slowly while its slide is on (Ken Burns) */
.ph { position: absolute; inset: 0; background: #2a170d center / cover no-repeat; }

/* the brand */
.au-logo { display: inline-flex; align-items: center; gap: 7px; font: 600 15px/1 "Fraunces", serif; letter-spacing: -0.01em; }
.au-logo svg { width: 22px; height: 22px; flex: none; }
.au-ava { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: radial-gradient(circle at 50% 70%, #e8b46a, #c27a34 55%, #4a2715); box-shadow: 0 0 0 2px #0b0705, 0 0 0 3.5px #e1306c; }
.au-ava svg { width: 20px; height: 20px; }

/* ---- Instagram chrome ---- */
.ig-top { position: absolute; top: 0; left: 0; right: 0; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 3; font: 700 17px/1 var(--font); }
.ig-top i { font-size: 18px; }
.ig-rail { position: absolute; right: 10px; bottom: 120px; z-index: 3; display: grid; gap: 18px; justify-items: center; font: 600 11px/1.2 var(--font); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); }
.ig-rail span { display: grid; justify-items: center; gap: 4px; }
.ig-rail i { font-size: 22px; }
.ig-rail .like.on i { color: #ff3040; animation: like-pop 0.5s ease; }
@keyframes like-pop { 40% { transform: scale(1.35); } }
.ig-bottom { position: absolute; left: 0; right: 60px; bottom: 0; z-index: 3; padding: 0 14px 18px; display: grid; gap: 9px; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55); }
.ig-who { display: flex; align-items: center; gap: 9px; font: 700 13px/1 var(--font); }
.ig-who .follow { font-weight: 600; font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.75); padding: 5px 9px; border-radius: 7px; }
.ig-caption { font: 400 12.5px/1.35 var(--font); }
.ig-music { display: flex; align-items: center; gap: 7px; font: 500 11.5px/1 var(--font); overflow: hidden; white-space: nowrap; }
.ig-music b { font-weight: 500; display: inline-block; animation: ticker 9s linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ig-shade { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.12) 18%, transparent 30%, transparent 58%, rgba(0, 0, 0, 0.72)), radial-gradient(90% 34% at 25% 34%, rgba(12, 6, 3, 0.62), transparent 75%); }

/* ---- the Reels: kinetic captions over the canvas ---- */
.kin { position: absolute; left: 22px; right: 70px; top: 128px; z-index: 3; display: grid; gap: 4px; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55); }
.kin p { margin: 0; overflow: hidden; }
.kin p span { display: block; transform: translateY(105%); transition: transform 0.7s cubic-bezier(.2, .8, .2, 1); }
.kin.on-1 .l1 span, .kin.on-2 .l2 span, .kin.on-3 .l3 span { transform: none; }
.kin .l1 { font: 600 40px/1 "Fraunces", serif; letter-spacing: -0.03em; }
.kin .l1 em { font-style: italic; font-weight: 400; color: var(--gold); }
.kin .l2 { font: 600 16px/1.25 var(--font); letter-spacing: 0.02em; color: #f3dcc0; }
.kin .l3 { margin-top: 8px; }
.kin .sticker { display: inline-flex; align-items: center; gap: 8px; background: var(--cream); color: var(--espresso); font: 700 13px/1 var(--font); padding: 10px 13px; border-radius: 10px; transform: rotate(-3deg); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6); }
.kin .tag-off { display: inline-block; font: 700 11px/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

/* ---- the carousel post ---- */
.igp-head { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #000; font: 600 13px/1.2 var(--font); }
.igp-head small { display: block; font-weight: 400; font-size: 11.5px; color: #a8a8a8; }
.igp-head .more { margin-left: auto; color: #fff; }
.igp-media { position: relative; width: 360px; height: 450px; overflow: hidden; background: var(--cream); }
.igp-track { display: flex; height: 100%; transition: transform 0.75s cubic-bezier(.65, 0, .25, 1); }
.igp-count { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(0, 0, 0, 0.6); color: #fff; font: 600 11.5px/1 var(--font); padding: 6px 9px; border-radius: 12px; }
.slide { flex: 0 0 360px; height: 450px; position: relative; padding: 30px 28px; color: var(--espresso); background: var(--cream); overflow: hidden; }
.slide .kicker { font: 700 10.5px/1 var(--font); letter-spacing: 0.22em; text-transform: uppercase; color: var(--caramel); }
.slide h4 { margin: 14px 0 0; font: 600 37px/0.98 "Fraunces", serif; letter-spacing: -0.035em; color: var(--espresso); }
.slide h4 em { font-style: italic; font-weight: 400; color: var(--caramel); }
.slide .specs { position: absolute; left: 28px; right: 28px; bottom: 24px; display: flex; justify-content: space-between; border-top: 1px solid rgba(36, 20, 12, 0.2); padding-top: 12px; font: 600 11px/1.3 var(--font); color: var(--roast); }
.slide .specs span { display: grid; gap: 2px; }
.slide .specs small { font-weight: 500; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(36, 20, 12, 0.55); }
.slide .ph { transform: scale(1.12); transition: transform 7s cubic-bezier(.2, .6, .3, 1); }
.slide.is-on .ph { transform: scale(1); }
.slide--step { padding: 0; }
.slide--step .ph { inset: 0 0 auto; height: 262px; }
.slide--step .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(20, 10, 5, 0.55)); }
.slide--step .num { position: absolute; left: 22px; bottom: 14px; z-index: 1; font: 300 64px/0.8 "Fraunces", serif; color: var(--cream); letter-spacing: -0.04em; }
.slide--step h4 { position: absolute; left: 28px; right: 28px; top: 278px; margin: 0; font-size: 34px; }
.slide--cover { background: var(--espresso); color: var(--cream); }
.slide--cover .ph::after, .slide--cta .ph::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 5, 0.82), rgba(20, 10, 5, 0.2) 48%, rgba(20, 10, 5, 0.7)); }
.slide--cover > :not(.ph), .slide--cta > :not(.ph) { position: relative; z-index: 1; }
.slide--cover .kicker { color: var(--gold); }
.slide--cover h4 { color: var(--cream); }
.slide--cover h4 em { color: var(--gold); }
.slide--cover .swipe { position: absolute; left: 28px; bottom: 26px; font: 600 11px/1 var(--font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream); display: flex; gap: 8px; align-items: center; }
.slide--cover .swipe i { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }
.slide--cover .au-logo { position: absolute; right: 26px; bottom: 22px; color: var(--cream); }
.slide--cta { background: var(--espresso); color: var(--cream); display: grid; place-content: center; text-align: center; gap: 14px; }
.slide--cta .ph::after { background: radial-gradient(70% 60% at 50% 50%, rgba(20, 10, 5, 0.78), rgba(20, 10, 5, 0.45)); }
.slide--cta h4 { color: var(--cream); font-size: 46px; }
.slide--cta p { margin: 0; font: 500 14px/1.4 var(--font); color: #e3c9a8; }
.slide--cta .au-logo { justify-self: center; color: var(--cream); margin-top: 18px; }
.igp-actions { display: flex; align-items: center; gap: 16px; padding: 12px 14px 8px; font-size: 21px; background: #000; color: #fff; position: relative; }
.igp-actions .sp { flex: 1; }
.igp-dots { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); display: flex; gap: 4px; }
.igp-dots i { width: 6px; height: 6px; border-radius: 50%; background: #555; transition: background 0.3s; }
.igp-dots i.on { background: #0095f6; }
.igp-text { padding: 0 14px; font: 400 12.5px/1.45 var(--font); color: #f5f5f5; background: #000; }
.igp-text b { font-weight: 600; }
.igp-text small { display: block; color: #a8a8a8; margin-top: 6px; font-size: 11px; }

/* ---- the Stories with a poll ---- */
.st-bars { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 4; display: flex; gap: 4px; }
.st-bars i { flex: 1; height: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); overflow: hidden; }
.st-bars i b { display: block; height: 100%; width: 0; background: #fff; }
.st-bars i.done b { width: 100%; }
.st-bars i.run b { animation: st-fill var(--len, 7s) linear forwards; }
@keyframes st-fill { to { width: 100%; } }
.st-head { position: absolute; top: 22px; left: 12px; right: 12px; z-index: 4; display: flex; align-items: center; gap: 9px; font: 600 13px/1 var(--font); }
.st-head small { color: rgba(255, 255, 255, 0.75); font-weight: 400; }
.st-head .x { margin-left: auto; font-size: 18px; }
.st-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 26%, transparent 60%, rgba(0, 0, 0, 0.6)); }
.st-poll { position: absolute; left: 40px; right: 40px; top: 418px; z-index: 4; background: #fff; border-radius: 14px; padding: 16px 14px 14px; color: #111; box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6); transform: rotate(-2deg); }
.st-poll h5 { margin: 0 0 12px; font: 700 15px/1.25 var(--font); text-align: center; color: #111; }
.st-opt { position: relative; height: 40px; border-radius: 10px; background: #f0f0f0; overflow: hidden; margin-top: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font: 700 14px/1 var(--font); }
.st-opt .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #c27a34, #e8b46a); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.st-opt.b .fill { background: #d9d9d9; }
.st-opt span { position: relative; z-index: 1; }
.st-opt .pct { opacity: 0; transition: opacity 0.4s 0.6s; }
.st-poll.voted .st-opt.a .fill { width: 64%; }
.st-poll.voted .st-opt.b .fill { width: 36%; }
.st-poll.voted .pct { opacity: 1; }
.st-tap { position: absolute; z-index: 5; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.95); opacity: 0; pointer-events: none; }
.st-tap.go { animation: tap 0.7s ease-out; }
@keyframes tap { 0% { opacity: 1; transform: scale(0.4); } 100% { opacity: 0; transform: scale(1.6); } }
.st-type { position: absolute; left: 22px; right: 22px; top: 84px; z-index: 4; font: 600 26px/1.05 "Fraunces", serif; letter-spacing: -0.02em; text-align: center; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5); }
.st-type em { font-style: italic; font-weight: 400; color: var(--gold); }
.st-reply { position: absolute; left: 12px; right: 12px; bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 10px; }
.st-reply span { flex: 1; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 22px; padding: 11px 14px; font: 400 12.5px/1 var(--font); color: rgba(255, 255, 255, 0.85); }
.st-reply i { font-size: 20px; }

/* ---- the LinkedIn document post ---- */
.li-card { position: absolute; inset: 0; background: #1b1f23; color: rgba(255, 255, 255, 0.9); }
.li-head { display: flex; gap: 9px; padding: 12px 14px 8px; align-items: center; }
.li-head .au-ava { width: 40px; height: 40px; border-radius: 4px; box-shadow: none; }
.li-head .au-ava svg { width: 26px; height: 26px; }
.li-head b { display: block; font: 600 13.5px/1.25 var(--font); color: #fff; }
.li-head small { display: block; font: 400 11px/1.35 var(--font); color: rgba(255, 255, 255, 0.6); }
.li-head .fol { margin-left: auto; color: #71b7fb; font: 600 13px var(--font); }
.li-text { padding: 2px 14px 10px; font: 400 12.5px/1.45 var(--font); }
.li-text b { font-weight: 600; color: #fff; }
.li-doc { position: relative; margin: 0 0; height: 400px; background: #0f1214; overflow: hidden; perspective: 900px; }
.li-track { position: absolute; top: 12px; bottom: 12px; left: 46px; display: flex; gap: 14px; transition: transform 0.8s cubic-bezier(.65, 0, .25, 1); }
.li-page { flex: 0 0 268px; height: 100%; box-shadow: 0 16px 30px -10px rgba(0, 0, 0, 0.7); padding: 22px 20px; display: grid; align-content: space-between; gap: 10px; }
.li-page { background-size: cover; background-position: center; }
.li-page.p1 { background-color: var(--espresso); color: var(--cream); }
.li-page.p2 { background: var(--cream); color: var(--espresso); }
.li-page.p3 { background-color: var(--espresso); color: var(--cream); }
.li-page .k { font: 700 9.5px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.75; }
.li-page h5 { margin: 0; font: 600 27px/1.02 "Fraunces", serif; letter-spacing: -0.03em; }
.li-page h5 em { font-style: italic; font-weight: 400; color: var(--gold); }
.li-page.p3 h5 { font-size: 24px; font-style: italic; font-weight: 400; align-self: end; }
.li-page.p3 .k { color: var(--gold); }
.li-page .li-foot { display: flex; justify-content: space-between; align-items: center; font: 600 10px/1 var(--font); opacity: 0.8; }
.li-chart { display: flex; align-items: flex-end; gap: 10px; height: 150px; border-bottom: 1px solid rgba(36, 20, 12, 0.25); }
.li-chart span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; font: 700 10px/1 var(--font); color: var(--roast); }
.li-chart b { width: 100%; height: var(--h); flex: none; background: var(--roast); transform-origin: bottom; transform: scaleY(0); transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.li-chart span:last-child b { background: var(--caramel); }
.li-page.p2.show .li-chart b { transform: scaleY(1); }
.li-page.p2.show .li-chart span:nth-child(2) b { transition-delay: 0.12s; } .li-page.p2.show .li-chart span:nth-child(3) b { transition-delay: 0.24s; } .li-page.p2.show .li-chart span:nth-child(4) b { transition-delay: 0.36s; }
.li-counter { position: absolute; right: 52px; bottom: 18px; z-index: 3; background: rgba(0, 0, 0, 0.65); color: #fff; font: 600 11px/1 var(--font); padding: 5px 8px; border-radius: 3px; }
.li-arrow { position: absolute; top: 50%; right: 8px; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); display: grid; place-items: center; font-size: 12px; z-index: 3; }
.li-react { display: flex; justify-content: space-between; padding: 10px 14px; font: 400 11.5px/1 var(--font); color: rgba(255, 255, 255, 0.6); }
.li-react .r { display: flex; align-items: center; gap: 5px; }
.li-react .r i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; font-size: 8px; color: #fff; }

/* ---- the brand's identity board ---- */
.br { position: absolute; inset: 0; padding: 24px; color: var(--espresso); display: grid; gap: 16px; align-content: start; background: radial-gradient(90% 60% at 100% 0%, #efd9bd, var(--cream) 60%); }
.br .k { font: 700 9.5px/1 var(--font); letter-spacing: 0.22em; text-transform: uppercase; color: var(--caramel); }
.br-logo { display: flex; align-items: center; gap: 12px; font: 600 34px/1 "Fraunces", serif; letter-spacing: -0.03em; }
.br-logo svg { width: 46px; height: 46px; }
.br-sw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.br-sw span { display: grid; gap: 6px; font: 600 9.5px/1 var(--font); color: var(--roast); }
.br-sw span i { height: 54px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(36, 20, 12, 0.12); transform-origin: bottom; animation: sw-in 0.8s cubic-bezier(.2, .8, .2, 1) both; }
.br-sw span:nth-child(2) i { animation-delay: 0.12s; } .br-sw span:nth-child(3) i { animation-delay: 0.24s; } .br-sw span:nth-child(4) i { animation-delay: 0.36s; }
@keyframes sw-in { from { transform: scaleY(0); } }
.br-type { display: flex; align-items: baseline; gap: 16px; border-top: 1px solid rgba(36, 20, 12, 0.15); padding-top: 14px; }
.br-type b { font: 600 52px/0.9 "Fraunces", serif; letter-spacing: -0.04em; }
.br-type b em { font-style: italic; font-weight: 400; color: var(--caramel); }
.br-type small { display: grid; gap: 4px; font: 500 11px/1.3 var(--font); color: var(--roast); }
.br-ph { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: -6px; }
.br-ph i { aspect-ratio: 1; background: center / cover no-repeat; animation: sw-in 0.8s cubic-bezier(.2, .8, .2, 1) both; transform-origin: bottom; }
.br-ph i:nth-child(2) { animation-delay: 0.12s; } .br-ph i:nth-child(3) { animation-delay: 0.24s; }
.br-tone { display: flex; flex-wrap: wrap; gap: 6px; }
.br-tone span { font: 600 10.5px/1 var(--font); padding: 7px 9px; border: 1px solid rgba(36, 20, 12, 0.25); }
.br-tone span.no { color: #9b2c2c; border-color: rgba(155, 44, 44, 0.35); text-decoration: line-through; }

/* the gallery: the pieces floating in 3D (scroll turns the stage) */
.gallery { position: relative; padding: clamp(80px, calc(10vw / var(--zoom, 1)), 140px) 0 clamp(60px, calc(8vw / var(--zoom, 1)), 110px); overflow: hidden; }
.gallery__stage { position: relative; height: clamp(520px, calc(62vw / var(--zoom, 1)), 760px); perspective: 1800px; margin-top: 30px; }
.gallery__rig { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(calc(8deg - var(--p, 1) * 8deg)) rotateY(calc((1 - var(--p, 1)) * 18deg)); transition: transform 0.12s linear; }
.gallery__item { position: absolute; top: 50%; left: 50%; transform-style: preserve-3d; transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z)) rotateY(var(--ry)); }
.gallery__float { animation: floaty var(--fd, 7s) ease-in-out infinite alternate; }
@keyframes floaty { from { transform: translateY(-10px); } to { transform: translateY(12px); } }
.gallery__item .piece { width: var(--w); }
.gallery__item figcaption { margin-top: 16px; display: grid; gap: 6px; text-align: center; }
.gallery__item figcaption b { font: 600 11px/1 var(--font); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); }
.gallery__item figcaption span { font-size: 12.5px; color: var(--faint); }
.gallery__glow { position: absolute; inset: 15% 10%; background: radial-gradient(50% 50% at 50% 50%, rgba(194, 122, 52, 0.28), transparent 70%); filter: blur(40px); pointer-events: none; }
@media (max-width: 900px) {
  .gallery__stage { height: auto; perspective: none; display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px var(--gutter) 30px; margin: 30px calc(-1 * var(--gutter)) 0; scrollbar-width: none; }
  .gallery__stage::-webkit-scrollbar { display: none; }
  .gallery__rig { position: static; display: contents; transform: none; }
  .gallery__item { position: static; transform: none; flex: 0 0 auto; scroll-snap-align: center; }
  .gallery__item .piece { width: min(calc(72vw / var(--zoom, 1)), 300px); }
  .gallery__glow { display: none; }
}
@media (prefers-reduced-motion: reduce) { .gallery__float { animation-duration: 14s; } .slide .ph { transition-duration: 12s; } }
