/* BUILD17-VIDEO-FILMSTRIP-001 -- compact video card + filmstrip navigator (prototype).
   Reuses main-build14.css tokens (--ink, --ink-soft, --line, --surface, --brand,
   --radius) and the existing .feature-video-frame / .feature-video-note styles. */

/* ---------- compact descriptive card (Home, Enterprise) ---------- */
.video-card{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:minmax(200px,300px) 1fr;gap:24px;align-items:center;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:18px}
.video-card-media{position:relative;display:block;border-radius:10px;overflow:hidden;background:#0b1115;aspect-ratio:16/9}
.video-card-media img{display:block;width:100%;height:100%;object-fit:cover}
.video-card-duration{position:absolute;right:8px;bottom:8px;background:rgba(5,12,18,.82);color:#fff;font-size:.74rem;font-weight:700;padding:2px 6px;border-radius:5px;font-variant-numeric:tabular-nums}
.video-card-body h2{margin:.2rem 0 .4rem;font-size:clamp(1.15rem,2vw,1.45rem)}
.video-card-body h2 a{color:inherit;text-decoration:none}
.video-card-body h2 a:hover{text-decoration:underline}
.video-card-body p{margin:0;color:var(--ink-soft)}
.video-card .feature-video-actions{margin-top:12px}
.video-card .feature-video-note{display:block;margin-top:8px;font-size:.84rem}
/* Card with an on-demand inline player (Enterprise walkthrough): artwork, no YouTube poster. */
button.video-card-media{width:100%;padding:0;border:0;cursor:pointer;font:inherit}
.video-card-art{position:absolute;inset:0;background:radial-gradient(120% 90% at 85% 15%,rgba(46,160,150,.45),transparent 60%),linear-gradient(135deg,#0b1115 0%,#10272b 55%,#0e3a3a 100%)}
.video-card-art::after{content:'';position:absolute;left:12%;right:12%;bottom:22%;height:2px;background:linear-gradient(90deg,transparent,rgba(160,230,220,.7),transparent)}
.video-card-playmark{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:52px;height:36px;border-radius:10px;background:rgba(10,20,28,.82);display:grid;place-items:center}
.video-card-playmark::before{content:'';border-left:14px solid #fff;border-top:9px solid transparent;border-bottom:9px solid transparent;margin-left:3px}
button.video-card-media:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.video-card-player{grid-column:1/-1;margin:4px 0 0}
.video-card-player[hidden]{display:none}
@media(max-width:760px){
  .video-card{grid-template-columns:128px 1fr;gap:10px 12px;padding:12px;align-items:start}
  .video-card-body{display:contents}
  .video-card-heading{grid-column:2;grid-row:1}
  .video-card-heading .eyebrow{font-size:.64rem;letter-spacing:.1em}
  .video-card-heading h2{font-size:1.02rem;margin:.15rem 0 0}
  .video-card-body p,.video-card .feature-video-actions,.video-card .feature-video-note{grid-column:1/-1}
  .video-card-body p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:.9rem}
  .video-card .feature-video-actions{margin-top:2px}
  .video-card .feature-video-note{margin-top:0;font-size:.78rem}
}

/* ---------- dedicated viewing page ---------- */
.vf{position:relative;max-width:1120px;margin:0 auto}
.vf .feature-video-frame{margin:0}
.vf-mount,.vf-mount iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
/* MEDIA-CONSOLIDATION-011: a self-hosted source plays in a <video> that takes the mount's place. */
.vf .vf-video{position:absolute;inset:0;width:100%;height:100%;border:0;background:#0b1115;object-fit:contain}
/* Player on demand: the frame ships [hidden] and only appears once a player is requested. */
.vf .feature-video-frame[hidden]{display:none}

.vf-controls{display:flex;gap:8px;justify-content:flex-end;margin:10px 0 0}
.vf-controls[hidden]{display:none}
.vf-ctl{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;font-size:.84rem;font-weight:700;cursor:pointer}
.vf-ctl:hover{border-color:var(--brand);color:var(--brand)}
.vf-ctl:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.vf-ctl span{font-size:1rem;line-height:1}
.vf-strip-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 8px}
.vf-strip-head h2,.vf-strip-head h3{font-size:1rem;margin:0}
.vf-strip-head small{color:var(--ink-soft);font-weight:600;margin-left:8px}
.vf-nav{display:flex;gap:6px}
.vf-nav button{border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:9px;width:36px;height:32px;font-size:1.1rem;line-height:1;cursor:pointer}
.vf-nav button:disabled{opacity:.35;cursor:default}
.vf-nav button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.vf:not(.vf-js) .vf-nav{display:none}
.vf-head-actions{display:flex;align-items:center;gap:10px}
.vf-play{white-space:nowrap}
.vf:not(.vf-js) .vf-play{display:none}

/* The strip: ~4.5 visible on desktop, ~2.3 on phones, so the next slide always peeks in. */
.vf-strip{overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;overscroll-behavior-x:contain;touch-action:pan-x pan-y;scrollbar-width:thin;padding:4px 2px 10px;-webkit-overflow-scrolling:touch}
.vf-strip.is-dragging{scroll-snap-type:none;cursor:grabbing}
.vf-track{list-style:none;margin:0;padding:0;display:flex;gap:10px}
.vf-track li{flex:0 0 calc((100% - 4 * 10px) / 4.5);scroll-snap-align:start;min-width:0}
@media(max-width:900px){.vf-track li{flex-basis:calc((100% - 3 * 10px) / 3.3)}}
@media(max-width:600px){.vf-track li{flex-basis:calc((100% - 2 * 10px) / 2.3)}}

.vf-thumb{display:block;text-decoration:none;color:var(--ink);border-radius:10px;padding:4px;border:2px solid transparent;-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}
.vf-thumb-img{position:relative;display:block;border-radius:7px;overflow:hidden;background:#0b1115;aspect-ratio:16/9}
.vf-thumb img{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-drag:none;pointer-events:none}
.vf-time{position:absolute;left:6px;bottom:6px;background:rgba(5,12,18,.85);color:#fff;font-size:.72rem;font-weight:700;padding:1px 5px;border-radius:4px;font-variant-numeric:tabular-nums}
.vf-caption{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.78rem;line-height:1.3;margin-top:5px;color:var(--ink-soft)}
.vf-thumb:hover{border-color:var(--line)}
.vf-thumb:focus-visible{outline:none;border-color:var(--brand);box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--brand)}
.vf-thumb.is-active{border-color:var(--brand);background:var(--surface-2)}
.vf-thumb.is-active .vf-caption{color:var(--ink);font-weight:700}
/* Site-hosted (reference-only) filmstrips: a selected scene is marked, distinct from the playing scene. */
.vf-thumb.is-selected{border-color:var(--brand);border-style:dashed}
.vf-thumb.is-selected .vf-caption{color:var(--ink);font-weight:700}
.vf-js .vf-strip:not(.is-dragging) .vf-thumb{cursor:pointer}

/* Enlarged inspection preview: one shared element, no animation beyond a quick fade. */
.vf-preview{position:absolute;z-index:30;width:min(480px,46vw);pointer-events:none;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:0 14px 36px rgba(5,16,24,.28);opacity:0;transition:opacity .1s linear}
.vf-preview.is-open{opacity:1}
.vf-preview.is-hold{width:min(94vw,560px)}
.vf-preview img{display:block;width:100%;aspect-ratio:16/9;border-radius:8px;background:#0b1115}
/* The <img> width/height attributes must not fix the preview height; aspect-ratio decides it (16:9 here, 16:10 on .vf--16x10). */
.vf-preview img{height:auto}
.vf-preview-meta{display:flex;gap:8px;align-items:baseline;padding:6px 4px 2px;font-size:.84rem;line-height:1.3}
.vf-preview-meta b{font-variant-numeric:tabular-nums;color:var(--brand)}
@media(prefers-reduced-motion:reduce){.vf-preview{transition:none}}

.vf-hint{font-size:.84rem;color:var(--ink-soft);margin:4px 0 0}
.vf-proto-note{font-size:.8rem;color:var(--ink-soft);margin:6px 0 0}
.vf-sr{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* 16:10 sources (Enterprise Showcase, 1440x900): keep the native aspect ratio in strip, preview and card. */
.vf--16x10 .vf-thumb-img,.vf--16x10 .vf-preview img{aspect-ratio:16/10}
/* 16:10 masters (Enterprise Showcase, 1440x900) also play in a 16:10 frame -- no side bars. 16:9 filmstrips are unaffected. */
.vf--16x10 .feature-video-frame{aspect-ratio:16/10}
.video-card-media--16x10{aspect-ratio:16/10}
/* A card that carries its own filmstrip (Enterprise Showcase on /enterprise/): text above, component full width. */
.video-card.video-card--filmstrip{display:block}
.video-card--filmstrip .video-card-body{display:block}
.video-card--filmstrip .vf{margin-top:6px}
.video-card--filmstrip .vf-strip-head{margin-top:12px}
.video-card--filmstrip > .feature-video-actions{margin-top:10px}
/* The filmstrip card shows its full description, and its strip header wraps on narrow screens so Play / ‹ › stay reachable. */
.video-card--filmstrip .video-card-body p{display:block;-webkit-line-clamp:unset;overflow:visible}
@media(max-width:640px){.video-card--filmstrip .vf-strip-head{flex-wrap:wrap;row-gap:8px}}
/* MEDIA-CONSOLIDATION-011: the same wrap on the dedicated media pages, so Play / ‹ › never push a 375px page sideways. */
@media(max-width:640px){.vf-strip-head{flex-wrap:wrap;row-gap:8px}.vf-head-actions{flex-wrap:wrap}}
/* MEDIA-CONSOLIDATION-011: the Media page lists every video as the same compact card, grouped, newest first. */
.media-library .media-group-title{max-width:1120px;margin:0 auto 12px;font-size:1.05rem;letter-spacing:.01em}
.media-library + .media-library{padding-top:0}
.media-card-list{display:grid;gap:16px}
