/*
 * Video hub and video detail pages.
 *
 * Built on the site's own v2 tokens (assets/css/site-v2.css), so the hub reads
 * as part of the site rather than a microsite bolted onto it. Loaded async like
 * the other page stylesheets; the one thing that cannot wait for it is the
 * player's aspect ratio, which is set inline on the wrapper so the page reserves
 * the space before any CSS or media arrives.
 */

/* ------------------------------------------------------------------ */
/* Hero                                                               */
/* ------------------------------------------------------------------ */

.vh-hero {
  position: relative;
  padding: 64px 0 52px;
  background:
    radial-gradient(900px 520px at 12% -20%, rgba(28, 104, 232, 0.16) 0%, rgba(28, 104, 232, 0) 62%),
    linear-gradient(180deg, #f6f9fd 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line, #dfe7f2);
}

.vh-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: center;
}

.vh-eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand, #1c68e8);
  margin: 0 0 14px;
}

.vh-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink, #10213f);
  margin: 0 0 18px;
}

.vh-hero-lead {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft, #465572);
  margin: 0 0 26px;
  max-width: 52ch;
}

.vh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.vh-hero-note {
  margin: 16px 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft, #465572);
}

/* ------------------------------------------------------------------ */
/* Player                                                             */
/* ------------------------------------------------------------------ */

.vh-player {
  position: relative;
  width: 100%;
  /* aspect-ratio is also set inline, so the box is reserved before CSS lands */
  aspect-ratio: 16 / 9;
  background: #06142c;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(16, 42, 86, 0.22), 0 2px 8px rgba(16, 42, 86, 0.08);
}

.vh-video {
  display: block;
  width: 100%;
  height: 100%;
  /* Letterbox rather than crop: a screen recording must never lose an edge. */
  object-fit: contain;
  background: #06142c;
}

.vh-video-fallback {
  padding: 24px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.55;
}

.vh-video-fallback a {
  color: #9cc4ff;
}

/* ------------------------------------------------------------------ */
/* Browse controls                                                    */
/* ------------------------------------------------------------------ */

.vh-browse {
  padding: 44px 0 8px;
}

.vh-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.vh-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 380px;
}

.vh-search input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ink, #10213f);
  background: #fff;
  border: 1px solid var(--line, #dfe7f2);
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(16, 42, 86, 0.04);
}

.vh-search input:focus {
  outline: 2px solid var(--brand, #1c68e8);
  outline-offset: 1px;
  border-color: var(--brand, #1c68e8);
}

.vh-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8a9ab4;
  pointer-events: none;
}

.vh-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vh-filter {
  appearance: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft, #465572);
  background: #fff;
  border: 1px solid var(--line, #dfe7f2);
  border-radius: 999px;
  padding: 8px 15px;
  cursor: pointer;
}

.vh-filter:hover {
  border-color: #bcd0ea;
  color: var(--ink, #10213f);
}

.vh-filter[aria-pressed='true'] {
  background: var(--brand, #1c68e8);
  border-color: var(--brand, #1c68e8);
  color: #fff;
}

.vh-filter:focus-visible {
  outline: 2px solid var(--brand, #1c68e8);
  outline-offset: 2px;
}

.vh-count {
  font-size: 0.9375rem;
  color: var(--ink-soft, #465572);
  margin: 0 0 20px;
}

.vh-empty {
  padding: 40px 0 56px;
  color: var(--ink-soft, #465572);
}

/* ------------------------------------------------------------------ */
/* Cards                                                              */
/* ------------------------------------------------------------------ */

.vh-section {
  padding: 10px 0 18px;
}

.vh-section-head {
  margin: 26px 0 18px;
}

.vh-section-head h2 {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink, #10213f);
  margin: 0 0 6px;
}

.vh-section-head p {
  margin: 0;
  color: var(--ink-soft, #465572);
  font-size: 0.9375rem;
}

.vh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: 26px;
  margin: 0 0 34px;
  padding: 0;
  list-style: none;
}

.vh-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #dfe7f2);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.vh-card:hover {
  border-color: #c6d8f2;
  box-shadow: 0 16px 38px rgba(16, 42, 86, 0.12);
  transform: translateY(-2px);
}

.vh-card[hidden] {
  display: none;
}

.vh-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: #0a2247;
  overflow: hidden;
}

.vh-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vh-card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--brand-dark, #104cad);
  box-shadow: 0 6px 20px rgba(4, 16, 38, 0.36);
  transition: transform 0.18s ease;
}

.vh-card:hover .vh-card-play {
  transform: translate(-50%, -50%) scale(1.07);
}

.vh-card-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(6, 20, 44, 0.86);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.vh-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px 20px;
}

.vh-card-category {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand, #1c68e8);
}

.vh-card-title {
  margin: 0 0 10px;
  font-size: 1.0625rem;
  line-height: 1.32;
  letter-spacing: -0.005em;
}

.vh-card-title a {
  color: var(--ink, #10213f);
  text-decoration: none;
}

.vh-card-title a:hover {
  color: var(--brand-dark, #104cad);
  text-decoration: underline;
}

.vh-card-summary {
  margin: 0 0 16px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-soft, #465572);
}

.vh-card-cta {
  margin: auto 0 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.vh-card-cta a {
  color: var(--brand-dark, #104cad);
  text-decoration: none;
}

.vh-card-cta a:hover {
  text-decoration: underline;
}

.vh-arrow {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.18s ease;
}

.vh-card:hover .vh-arrow {
  transform: translateX(3px);
}

/* ------------------------------------------------------------------ */
/* Detail page                                                        */
/* ------------------------------------------------------------------ */

.vh-detail {
  padding: 34px 0 60px;
}

.vh-breadcrumb {
  font-size: 0.875rem;
  color: var(--ink-soft, #465572);
  margin: 0 0 20px;
}

.vh-breadcrumb a {
  color: var(--brand-dark, #104cad);
  text-decoration: none;
}

.vh-breadcrumb a:hover {
  text-decoration: underline;
}

.vh-detail h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  line-height: 1.14;
  letter-spacing: -0.018em;
  color: var(--ink, #10213f);
  margin: 0 0 14px;
  max-width: 30ch;
}

.vh-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin: 0 0 20px;
  font-size: 0.875rem;
  color: var(--ink-soft, #465572);
}

.vh-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--brand-soft, #edf4ff);
  color: var(--brand-dark, #104cad);
  font-weight: 600;
  font-size: 0.8125rem;
}

.vh-detail-intro {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft, #465572);
  margin: 0 0 26px;
  max-width: 68ch;
}

.vh-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
}

.vh-detail-body > * + * {
  margin-top: 34px;
}

.vh-detail-body h2 {
  font-size: 1.375rem;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--ink, #10213f);
  margin: 0 0 12px;
}

.vh-detail-body p {
  font-size: 1rem;
  line-height: 1.68;
  color: var(--ink-soft, #465572);
  margin: 0 0 12px;
  max-width: 72ch;
}

.vh-learn {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.vh-learn li {
  position: relative;
  padding-left: 30px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink, #10213f);
}

.vh-learn li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint, #13a684);
}

.vh-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.vh-features a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line, #dfe7f2);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-dark, #104cad);
  text-decoration: none;
  background: #fff;
}

.vh-features a:hover {
  border-color: #bcd0ea;
  background: var(--brand-soft, #edf4ff);
}

/* Transcript: collapsed by default so it never dominates the page, but it is
   real text in the document, so it is indexable and searchable when closed. */
.vh-transcript {
  border: 1px solid var(--line, #dfe7f2);
  border-radius: 12px;
  background: #fbfcfe;
  padding: 0;
}

.vh-transcript > summary {
  cursor: pointer;
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink, #10213f);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vh-transcript > summary::-webkit-details-marker {
  display: none;
}

.vh-transcript > summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--brand, #1c68e8);
  line-height: 1;
}

.vh-transcript[open] > summary::after {
  content: '\2212';
}

.vh-transcript > summary:focus-visible {
  outline: 2px solid var(--brand, #1c68e8);
  outline-offset: -2px;
  border-radius: 12px;
}

.vh-transcript-body {
  padding: 4px 20px 20px;
  max-height: 420px;
  overflow-y: auto;
}

.vh-transcript-body p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--ink-soft, #465572);
  margin: 0 0 14px;
  max-width: 74ch;
}

/* ------------------------------------------------------------------ */
/* Related + CTA                                                      */
/* ------------------------------------------------------------------ */

.vh-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.vh-cta-band {
  margin: 48px 0 0;
  padding: 36px 34px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0d2b58 0%, #143b78 58%, #10305f 100%);
  color: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
}

.vh-cta-band h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: #fff;
}

.vh-cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 56ch;
}

.vh-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The "See it in action" block that feature pages render lives in its own
   stylesheet, assets/css/video-inline.css: it never appears on the hub or a
   detail page, and a feature page should not pay for this whole file to show
   one walkthrough. */

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */

@media (max-width: 980px) {
  .vh-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .vh-cta-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .vh-hero {
    padding: 40px 0 34px;
  }

  .vh-controls {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .vh-search {
    max-width: none;
  }

  /* The filter row scrolls sideways inside itself rather than pushing the
     document, which is the one thing a narrow viewport must never do. Hence
     min-width:0 here and nowrap above: a wrapping column sizes its width to
     this row's content, which stretched the search box to 916px in a 362px
     container. */
  .vh-filters {
    flex-wrap: nowrap;
    overflow-x: auto;

    min-width: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin: 0 -4px;
    padding-left: 4px;
    padding-right: 4px;
  }

  .vh-filters::-webkit-scrollbar {
    display: none;
  }

  .vh-filter {
    flex: 0 0 auto;
  }

  .vh-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .vh-player {
    border-radius: 10px;
  }

  .vh-cta-band {
    padding: 26px 22px;
  }

  .vh-transcript-body {
    max-height: 320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vh-card,
  .vh-card-play,
  .vh-arrow {
    transition: none;
  }

  .vh-card:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------------ */
/* Narrow screens: the player must be able to shrink                  */
/* ------------------------------------------------------------------ */

/*
 * WebKit's native media controls carry an intrinsic minimum width, and on a
 * 320px phone that is what pushed the page 9px wider than the viewport (found
 * by the real-browser matrix on an emulated iPhone SE -- it only shows where
 * WebKit actually has a media backend, which a Linux checkout does not). The
 * player, the video and every box between them and the page are allowed to
 * shrink below their content, and nothing in the column may exceed it.
 */
.vh-player,
.vh-video,
.vh-hero-grid > *,
.vh-detail-layout > *,
.vh-detail-body > *,
.vh-inline > * {
  min-width: 0;
  max-width: 100%;
}

.vh-video {
  /* A video is replaced content: without this it keeps its intrinsic width. */
  width: 100%;
  height: 100%;
}

/* Authored copy carries file paths, SKUs and URLs -- tokens with no space in
 * them. At a phone width one is easily wider than its column and cannot break,
 * so it pushes the document sideways (the matrix caught a detail page at 329px
 * in a 320px viewport). Headings are listed because they are set large. */
.vh-detail h1, .vh-detail-intro, .vh-detail-meta, .vh-detail-body,
.vh-hero h1, .vh-hero p, .vh-section-head h2, .vh-section-head p,
.vh-card h3, .vh-card-summary, .vh-transcript,
.vh-video-fallback, .vh-inline p {
  overflow-wrap: break-word;
}
