/* index.html — one landing for every pack; cards are iframes of the coded pieces, scaled to fit */

.wl-section { margin: 0 0 56px; }
.wl-section__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--ws-line); }
.wl-section__title { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.015em; }
.wl-section__lede { flex-basis: 100%; margin: 0; color: var(--ws-muted); font-size: 14px; max-width: 64ch; }

/* no content-visibility here: its paint containment clips the track to the row's box, so the
   scroll lost its bleed to the viewport edge and cards were cut at the column edges */
.wl-row { margin: 0 0 26px; content-visibility: visible; contain: none; }
.wl-row .ws-row__title { font-size: 15px; font-weight: 500; }

.wl-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.wl-grid--web { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

.wl-card { color: inherit; text-decoration: none; }
.wl-card .ws-card__title { margin: 0; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.wl-note { margin: 3px 0 0; font-size: 12px; color: var(--ws-muted); line-height: 1.35; }

.wl-thumb { aspect-ratio: 9 / 16; position: relative; overflow: hidden; border-radius: 12px; }
.wl-thumb--web { aspect-ratio: 1440 / 1300; }
.wl-thumb--land { aspect-ratio: 9 / 16; }
.wl-thumb--phone { aspect-ratio: 390 / 844; }
.wl-thumb--desktop { aspect-ratio: 16 / 10; }
.wl-thumb--img { background: #111; }
.wl-thumb--img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wl-card--ref .wl-thumb { aspect-ratio: 4 / 5; }

.wl-frame {
  position: absolute; left: 50%; top: 50%;
  border: 0; display: block; pointer-events: none;
  transform-origin: center center;
  background: transparent;
}

.wl-more { display: inline-block; margin-top: 14px; font-size: 14px; color: var(--ws-muted); text-decoration: none; }
.wl-more:hover { color: var(--ws-fg); }

.wl-protos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 18px; }
.wl-proto { padding: 16px 18px; border-radius: 14px; background: color-mix(in srgb, #fff 4%, transparent); border-top: 2px solid var(--accent, var(--ws-line)); }
.wl-proto__title { margin: 0 0 8px; font-size: 15px; font-weight: 500; }
.wl-proto__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wl-proto__list a { color: var(--ws-muted); text-decoration: none; font-size: 13px; }
.wl-proto__list a:hover { color: var(--ws-fg); }

.ws-filter-group[data-filter="section"] { order: 0; }

@media (max-width: 767px) {
  .wl-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .wl-grid--web { grid-template-columns: 1fr; }
  .wl-section__title { font-size: 19px; }
}

/* UI strip: phones and desktops side by side */
.wl-ui { margin-bottom: 4px; }
.wl-ui .ws-card { width: clamp(150px, 17vw, 220px); }
.wl-ui .ws-card.wl-card--desktop { width: clamp(300px, 34vw, 440px); }
@media (max-width: 767px) { .wl-ui .ws-card { width: 42vw; } .wl-ui .ws-card.wl-card--desktop { width: 84vw; } }

/* minimal chrome: the shots are the page */
.wl-header { gap: 10px; margin-bottom: 14px; }
.wl-title { font-size: 22px; margin: 0; }
.wl-section__head { border-bottom: 0; padding-bottom: 0; margin-bottom: 12px; }
.wl-section__title { font-size: 14px; font-weight: 500; color: var(--ws-muted); text-decoration: none; }
a.wl-section__title:hover { color: var(--ws-fg); }
.wl-section { margin-bottom: 40px; }
.wl-select { appearance: none; -webkit-appearance: none; padding-right: 26px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23fff' stroke-opacity='.6' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; }
.wl-card .ws-card__title { font-size: 12px; color: var(--ws-muted); }
.wl-card:hover .ws-card__title { color: var(--ws-fg); }
.wl-note { font-size: 11px; }
.wl-thumb { content-visibility: auto; }

/* horizontal cards (shots 1440×1080) in the stack rows */
.wl-row .ws-row__track .wl-card:has(.wl-thumb--land) { width: clamp(180px, 17vw, 250px); }
@media (max-width: 767px) { .wl-row .ws-row__track .wl-card:has(.wl-thumb--land) { width: 52vw; } }

/* ▶ on cards whose scene has video: nothing streams until it is pressed */
.wl-thumb { position: relative; }
.wl-play { position: absolute; left: 10px; bottom: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 50%;
  border: 0; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: #0a0a0a; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.wl-play svg { width: 18px; height: 18px; fill: currentColor; }
.wl-play .wl-play__off, .wl-play[aria-pressed="true"] .wl-play__on { display: none; }
.wl-play[aria-pressed="true"] .wl-play__off { display: inline; }

/* the live frame fades in over the card's poster once it has loaded */
.wl-frame { opacity: 0; transition: opacity .6s ease; }
.wl-frame.is-in { opacity: 1; }
.wl-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.wl-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.wl-dl { color: var(--ws-muted, #8a8a8a); font-size: 14px; text-decoration: none; white-space: nowrap; }
.wl-dl:hover { color: var(--ws-fg, #fff); }
.wl-code { font: 500 11px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .04em; opacity: .55; margin-right: 7px; vertical-align: 1px; }
.wl-ref { width: 92px; font-variant-numeric: tabular-nums; }
.wl-ref::placeholder { color: var(--ws-muted, #8a8a8a); }

/* work-motion-test.html: what the version changes, and the meter pinned over the nav */
.wl-test-note { margin: 10px 0 0; max-width: 60ch; }
a.ws-chip { text-decoration: none; }
.wl-hud {
  position: fixed; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  padding: 8px 12px; border-radius: 10px; background: rgba(10, 10, 12, .86); color: #b8f5c4;
  font: 500 12px/1.35 ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums;
  pointer-events: none; text-align: center;
}
.wl-hud.is-bad { color: #ffb4a8; }
