/* Video grid — the browsable clip gallery. Notes: docs/component-video-grid-notes.md */

.video-grid-section{background:#faf9f6;padding:4rem 1.5rem 6rem}
.video-grid-inner{max-width:1100px;margin:0 auto}
.video-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:2.5rem}
.video-grid-card{display:flex;flex-direction:column}
.video-grid-card-embed{position:relative;width:100%;aspect-ratio:16/9;background:#000;overflow:hidden;border:1px solid rgba(0,0,0,.08)}
.video-grid-card-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.video-grid-card-meta-title{font-family:var(--display);font-size:clamp(1.1rem,1.8vw,1.4rem);font-weight:500;letter-spacing:.03em;text-transform:uppercase;color:var(--charcoal);margin:1.2rem 0 .4rem}

.video-grid-card-meta-sub{font-family:var(--body);font-size:.95rem;line-height:1.6;color:#777}

@media(max-width:768px){.video-grid-section{padding:3rem 1.2rem 4rem}}

/* ── --catalog ── The browsable catalog: tabs and poster cards, one flat grid.
   Contract: .video-grid-section.video-grid-section--catalog > .video-grid-inner >
   .video-grid-tabs + .video-grid.video-grid--catalog > .video-grid-card--link.
   Behaviour: assets/js/components/video-grid.js
   The base declares the cream surface and the variant does not restate it: the
   catalog renders on the page surface like every other section.
   Doubled-class selectors are deliberate: the variant must win the
   equal-specificity contest with the base independently of file order. */

.video-grid-section.video-grid-section--catalog{padding:4.5rem 2.5rem 6rem}
.video-grid-section--catalog .video-grid-inner{max-width:1400px}
.video-grid-heading{font-family:var(--display);font-size:clamp(1.8rem,4vw,3rem);font-weight:500;letter-spacing:.03em;text-transform:uppercase;line-height:1.1;color:#2A2A2A;margin:0 0 1.8rem}
.video-grid-heading .gold{color:var(--gold-dark)}

/* ── Category tabs ── The row sits on a hairline the active tab overlaps, so
   the gold bar reads as a selected edge rather than a floating underline. The
   fade edge is switched on only when the row scrolls. */
.video-grid-tabs{display:flex;gap:25px;margin:0 0 2rem;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;border-bottom:1px solid rgba(0,0,0,.09)}
.video-grid-tabs::-webkit-scrollbar{display:none}
.video-grid-tabs--overflow{-webkit-mask-image:linear-gradient(to right,#000 90%,transparent 100%);mask-image:linear-gradient(to right,#000 90%,transparent 100%)}
.video-grid-tab{font-family:var(--body);font-size:.8125rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#6b6b6b;border-bottom:2px solid transparent;padding:8px 0;margin-bottom:-1px;white-space:nowrap;transition:color .2s ease,border-color .2s ease}
.video-grid-tab:hover{color:#2A2A2A}
/* Selected is carried by contrast AND the bar, not by the gold alone: gold-dark
   on cream is an accent, not a legible text colour. */
.video-grid-tab[aria-current="true"]{color:#2A2A2A;border-bottom-color:var(--gold-dark)}

/* ── Grid ── One flat grid of the whole catalog. 4 / 3 / 2 / 1, 20px gap. */
.video-grid.video-grid--catalog{grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}

/* ── Card ── The whole card is one link to the watch page; nothing plays in
   place. The still carries the same hairline frame the cream base gives its
   embed, and the card itself is the page surface. */
.video-grid-card.video-grid-card--link{display:block;position:relative;min-width:0;color:#2A2A2A;transition:transform .2s ease}
.video-grid-card--link:hover{transform:scale(1.02)}
/* Dark focus ring for the light surface, as elsewhere on cream. */
.video-grid-card--link:focus-visible{outline:3px solid #0a0a0a;outline-offset:3px}
.video-grid-card--link[hidden]{display:none}
.video-grid-card-poster{position:relative;display:block;aspect-ratio:16/9;overflow:hidden;border:1px solid rgba(0,0,0,.08);border-radius:4px;background:#1a1a1a}
.video-grid-card-poster img{display:block;width:100%;height:100%;object-fit:cover}
.video-grid-card-placeholder{position:absolute;inset:0;background:linear-gradient(135deg,#1a1a1a 0%,var(--charcoal) 100%)}
.video-grid-card-badge-duration{position:absolute;bottom:4px;right:4px;z-index:2;pointer-events:none;background:rgba(0,0,0,.8);color:#fff;font-family:var(--body);font-size:.75rem;font-weight:600;line-height:1;padding:3px 6px;border-radius:0 0 4px 0}
/* Flush left with the still: there is no card background to inset from. */
.video-grid-card-meta{display:flex;flex-direction:column;gap:4px;padding:10px 0 0}
.video-grid-card--link .video-grid-card-meta-title{font-family:var(--body);font-size:.875rem;font-weight:500;letter-spacing:0;text-transform:none;color:#2A2A2A;line-height:1.3;margin:0;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* #6b6b6b, not #777: #777 measures 4.25:1 on cream and misses AA. */
.video-grid-card-meta-category{font-family:var(--body);font-size:.75rem;letter-spacing:.05em;text-transform:uppercase;color:#6b6b6b}

@media(prefers-reduced-motion:reduce){
  .video-grid-card--link{transition:none}
  .video-grid-card--link:hover{transform:none}
}

@media(max-width:1024px){.video-grid.video-grid--catalog{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:768px){
  .video-grid-section.video-grid-section--catalog{padding:3.5rem 1.5rem 4.5rem}
  .video-grid.video-grid--catalog{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:480px){
  .video-grid-section.video-grid-section--catalog{padding:3rem 1.15rem 4rem}
  .video-grid.video-grid--catalog{grid-template-columns:1fr}
}
