/* "Made for your work" cards: a moving picture (work-demo.js), the name, one line. Used by index.html and a.html. */
.work-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.work-card { padding: 0; overflow: hidden; border-radius: 16px; background: var(--panel); border: 0; }
.work-card .work-body { padding: 14px 16px 18px; }
.work-card h3 { font-size: 16px; margin: 0 0 6px; }
.work-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.wt { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #17171d; container-type: inline-size; }
.wt svg { display: block; width: 100%; height: 100%; }
@media (max-width: 1060px) and (min-width: 701px) { .work-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .work-grid { gap: 12px; } .work-card .work-body { padding: 10px 12px 14px; } .work-card h3 { font-size: 14.5px; } .work-card p { font-size: 13px; } }

/* CSS-drawn scenes pause until the card plays (.on) */
.wt * { animation-play-state: paused !important; }
.wt.on * { animation-play-state: running !important; }

/* 3D: a cube with a UV checker turning over a grid floor */
.wt-3d { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 20%, #2b3140, #121419); perspective: 420px; overflow: hidden; container-type: inline-size; }
.wt-floor { position: absolute; left: -30%; right: -30%; top: 62%; height: 80%; transform: rotateX(72deg); transform-origin: top;
  background-image: linear-gradient(#7c8aa6 1px, transparent 1px), linear-gradient(90deg, #7c8aa6 1px, transparent 1px); background-size: 22px 22px; opacity: .35; }
.wt-cube { position: absolute; left: 50%; top: 44%; width: 30cqw; height: 30cqw; --h: 15cqw; transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(-22deg) rotateY(35deg); animation: wt-spin 7s linear infinite; }
.wt-f { position: absolute; inset: 0; border: 1.5px solid #9fd3ff;
  background: repeating-conic-gradient(#e8e8ee 0 25%, #3d6df2 0 50%) 0 0 / 25% 25%; opacity: .92; }
.wt-f.wt-top, .wt-f.wt-bottom { background: repeating-conic-gradient(#e8e8ee 0 25%, #f2733d 0 50%) 0 0 / 25% 25%; }
.wt-front { transform: translateZ(var(--h)); }
.wt-back { transform: rotateY(180deg) translateZ(var(--h)); }
.wt-right { transform: rotateY(90deg) translateZ(var(--h)); }
.wt-left { transform: rotateY(-90deg) translateZ(var(--h)); }
.wt-top { transform: rotateX(90deg) translateZ(var(--h)); }
.wt-bottom { transform: rotateX(-90deg) translateZ(var(--h)); }
.wt-tag { position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 5px; background: rgba(0, 0, 0, .5); color: #fff; font: 600 11px/1.5 -apple-system, system-ui, sans-serif; }
@keyframes wt-spin { from { transform: translate(-50%, -50%) rotateX(-22deg) rotateY(35deg); } to { transform: translate(-50%, -50%) rotateX(-22deg) rotateY(395deg); } }

/* Graphic designer: a variable font sweeping its weight on a print page */
.wt-paper { position: absolute; inset: 0; }
.wt-paper svg { position: absolute; inset: 0; }
.wt-aa { position: absolute; left: 0; right: 0; top: 22%; text-align: center; color: #16161a; font: 300 30cqw/1 -apple-system, "SF Pro Display", system-ui, sans-serif; letter-spacing: -0.02em; animation: wt-wght 3.2s ease-in-out infinite alternate; }
.wt-axis { position: absolute; left: 24%; right: 24%; top: 69%; height: 3px; border-radius: 3px; background: #d9d6ce; }
.wt-axis i { position: absolute; top: -4px; left: 0; width: 11px; height: 11px; margin-left: -5px; border-radius: 50%; background: #e5484d; animation: wt-knob 3.2s ease-in-out infinite alternate; }
@keyframes wt-wght { from { font-weight: 100; } to { font-weight: 900; } }
@keyframes wt-knob { from { left: 0; } to { left: 100%; } }
/* the still frame: a middle weight with its knob in the middle */
.wt-aa, .wt-axis i { animation-delay: -1.6s; }

@media (prefers-reduced-motion: reduce) { .wt * { animation: none !important; } }
