/* Work grid tiles (2026-11-25), loaded by index.html and home-v2.html after their own CSS.
   Our own play button, mute toggle and progress line in place of the browser's video controls,
   plus a quiet call-to-action tile that fills a group's last row. Built by workTile() in site.js. */

.work-media { position: relative; border-radius: 12px; overflow: hidden; isolation: isolate; }
.work-media video { display: block; }

.work-play {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: end start; padding: 0.7rem 0.7rem 1rem;
  border: 0; margin: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.work-play .work-btn {
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.94); color: #111;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.22);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}
.work-play svg { width: 0.95rem; height: 0.95rem; }
.work-play .i-play { margin-left: 3px; }
.work-play .i-pause { display: none; }
.is-playing .work-play .i-play { display: none; }
.is-playing .work-play .i-pause { display: block; }
.is-playing .work-play .work-btn { opacity: 0; transform: scale(0.9); }
.is-preview .work-play .work-btn { transform: scale(1.06); }
@media (hover: hover) and (pointer: fine) {
  .is-playing .work-play:hover .work-btn { opacity: 1; transform: scale(1); }
}
.is-playing .work-play:focus-visible .work-btn { opacity: 1; transform: scale(1); }
.work-play:focus-visible { outline: 2px solid #0071e3; outline-offset: -2px; border-radius: 12px; }

.work-sound {
  position: absolute; z-index: 2; right: 0.6rem; bottom: 1.05rem;
  width: 2.25rem; height: 2.25rem; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: none; place-items: center;
  background: rgba(17, 17, 17, 0.62); color: #fff;
}
.work-sound svg { width: 1rem; height: 1rem; }
.work-sound .i-off { display: none; }
.work-sound.is-muted .i-on { display: none; }
.work-sound.is-muted .i-off { display: block; }
.is-playing .work-sound { display: grid; }
.work-sound:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.work-bar {
  position: absolute; z-index: 2; left: 0.75rem; right: 0.75rem; bottom: 0.55rem; height: 2px;
  border-radius: 2px; background: rgba(255, 255, 255, 0.35); overflow: hidden;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.is-playing .work-bar, .is-preview .work-bar { opacity: 1; }
.work-bar i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* call-to-action tile in a group's last row (".work-item a" in the page CSS would make it a block) */
.work-item .work-cta {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.5rem;
  aspect-ratio: 9 / 16; padding: 1.1rem; border-radius: 12px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  outline: 1px solid color-mix(in srgb, currentColor 14%, transparent); outline-offset: -1px;
  color: inherit; text-decoration: none;
  transition: background-color 0.25s ease;
}
.work-item .work-cta strong { font-size: clamp(1.15rem, 1.6vw, 1.4rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.work-item .work-cta span { font-weight: 600; font-size: 0.95rem; text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; opacity: 0.8; }
@media (hover: hover) and (pointer: fine) { .work-item .work-cta:hover { background: color-mix(in srgb, currentColor 9%, transparent); } }
.work-cta:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }

@media (max-width: 600px) {
  .work-play { padding: 0.5rem 0.5rem 0.85rem; }
  .work-play .work-btn { width: 2.3rem; height: 2.3rem; }
  .work-play svg { width: 0.85rem; height: 0.85rem; }
  .work-sound { width: 2rem; height: 2rem; right: 0.45rem; bottom: 0.9rem; }
  .work-item .work-cta { padding: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .work-play .work-btn, .work-bar, .work-cta { transition: none; }
}
