/* Content blocks shared by the prototypes: client bins, video thumbs, Ecumena card pile, feedback
   comments, tools, and the player / image viewer that grows out of the clicked thumbnail. */
.bin-head { display: grid; gap: 10px; margin-bottom: 22px; }
.bin-head h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(54px, 7vw, 104px); line-height: .9; color: var(--forest); margin: 0; }
.bin-head .tag { font: 600 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--sage); }
.bin-head p { margin: 0; font-weight: 600; font-size: clamp(18px, 1.7vw, 22px); max-width: 44ch; line-height: 1.4; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0 0 26px; }
.facts > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; align-content: start; }
.facts dt { font: 700 12px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--forest); }
.facts dd { margin: 0; font-size: 15px; line-height: 1.55; }
.facts .hit { background: var(--lime); border-color: var(--lime); color: var(--night); }
.facts .hit dt { color: var(--night); }
.facts .hit .big { font-family: var(--display); font-size: clamp(46px, 4vw, 60px); line-height: .9; display: block; }
.facts .say { background: var(--night); border-color: var(--night); color: #e3f3d3; }
.facts .say dt { color: var(--lime); }
.facts .say dd { font-size: 17px; font-weight: 600; }
.sub { font: 700 13px var(--body); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 28px 0 12px; display: flex; gap: 12px; align-items: center; }
.sub::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* video thumbs (posters) that open the player */
.vgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.vthumb { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--night); aspect-ratio: 9 / 16; box-shadow: 0 16px 34px -24px rgb(4 8 2 / .8); transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease); }
.vthumb.wide { aspect-ratio: 16 / 9; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.vthumb:hover img { transform: scale(1.05); }
.vthumb .lang { position: absolute; left: 8px; top: 8px; font: 700 11px var(--body); background: var(--lime); color: var(--night); border-radius: 6px; padding: 3px 7px; }
.vthumb .meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: end; gap: 6px; padding: 26px 10px 8px; background: linear-gradient(transparent, rgb(4 8 2 / .85)); color: #fff; font: 600 12px var(--body); text-align: left; }
.vthumb .meta .mono { font-size: 11px; color: var(--amber-1); }
.vthumb .pl { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgb(251 199 8 / .92); display: grid; place-items: center; color: var(--night); transform: scale(.8); opacity: 0; transition: opacity .2s ease, transform .3s var(--ease); }
.vthumb .pl svg { width: 22px; height: 22px; margin-left: 3px; }
.vthumb:hover .pl, .vthumb:focus-visible .pl { opacity: 1; transform: none; }
.wl-vids { grid-template-columns: 1fr 1fr 2.2fr; align-items: end; }

/* covers: 3D tilt toward the pointer (transitions.dev "3D tilt"), set by JS through --rx/--ry */
.covers { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 2px 14px; scrollbar-width: thin; }
.cover { flex: none; width: clamp(170px, 19vw, 240px); aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; scroll-snap-align: start; background: var(--night); transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .35s var(--ease), box-shadow .35s var(--ease); box-shadow: 0 14px 30px -22px rgb(4 8 2 / .8); }
.cover:hover { box-shadow: 0 24px 40px -22px rgb(4 8 2 / .9); }
.cover img { width: 100%; height: 100%; object-fit: cover; }

/* Ecumena posts: start as a messy pile, deal out into the grid when the bin opens (card stack) */
.pile { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pile .cover { width: 100%; transition: transform .9s var(--ease); }
.pile.piled .cover { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); }
.pile .cover:nth-child(n) { transition-delay: calc(var(--k) * 35ms); }

/* own carousels: endless strip with a slow "breath" */
.strip { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); padding-block: 6px 16px; }
.strip .rail { display: flex; gap: 16px; width: max-content; animation: run 70s linear infinite; }
.strip:hover .rail { animation-play-state: paused; }
.strip .slide { flex: none; width: clamp(190px, 19vw, 260px); aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--night); }
.strip .slide img { width: 100%; height: 100%; object-fit: cover; animation: breathe 5.5s ease-in-out infinite; }
.strip .slide:nth-child(3n+1) img { animation-delay: -1.8s; }
.strip .slide:nth-child(3n+2) img { animation-delay: -3.6s; }
@keyframes run { to { transform: translateX(-50%); } }
@keyframes breathe { 50% { transform: scale(1.03) translateY(-.6%); } }

/* feedback as review comments pinned to the timeline (like a client review tool) */
.comments { display: grid; gap: 12px; }
.cmt { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cmt .av { grid-row: span 3; width: 40px; height: 40px; border-radius: 50%; background: var(--forest); color: var(--lime); display: grid; place-items: center; font: 700 14px var(--body); }
.cmt .who { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cmt .who b { color: var(--ink); }
.cmt .who .mono { font-size: 11px; background: var(--amber-1); color: var(--amber-ink); border-radius: 5px; padding: 1px 6px; }
.cmt p { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.45; }
.cmt button { justify-self: start; border: 0; background: none; padding: 0; color: var(--forest); font: 600 13px var(--body); text-decoration: underline; cursor: pointer; }
.cmt-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tool { display: grid; justify-items: center; gap: 4px; padding: 12px 8px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); text-align: center; transition: transform .2s var(--ease), border-color .2s ease; }
.tool:hover { transform: translateY(-3px); border-color: var(--lime); }
.tool img { width: 64px; height: 64px; object-fit: contain; }
.tool b { font-size: 13px; color: var(--forest); }
.tool span { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* viewer: grows out of the clicked thumbnail (FLIP), video or image */
.viewer { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px)); }
.viewer[hidden] { display: none; }
.viewer .bd { position: absolute; inset: 0; background: rgb(4 8 2 / .9); opacity: 0; transition: opacity .35s ease; }
.viewer.open .bd { opacity: 1; }
.viewer .box { position: relative; max-height: 88vh; max-width: min(92vw, 1100px); border-radius: 14px; overflow: hidden; background: #000; transform-origin: top left; box-shadow: 0 40px 80px -30px #000; }
.viewer .box video, .viewer .box img { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.viewer .x { position: absolute; top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 10px; border: 0; background: rgb(255 255 255 / .12); color: #fff; font-size: 24px; cursor: pointer; }
.viewer .cap { position: absolute; left: 16px; bottom: max(14px, env(safe-area-inset-bottom, 0px)); z-index: 2; color: #e3f3d3; font: 600 13px var(--body); }

@media (max-width: 900px) {
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pile { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .wl-vids { grid-template-columns: 1fr 1fr; }
  .wl-vids .vthumb.wide { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .strip .rail { animation-duration: 120s; }
  .strip .slide img { animation: none; }
  .pile .cover { transition-duration: .5s; }
}
