/* VXL first view (vxl_ja.html, vxl.html, vxl_en.html): one h1, the textless 4:5 loop and its still
   (DEV-20 VXL-HERO-VIDEO). Storyboard: docs/dev-20-jp/hero-video/storyboard.md, section 5 (plan A),
   section 9 (line frame) and section 10 (Korean and English). */
.vxl-hero--video > .hv-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "text" "media" "desc";
  gap: 24px;
  align-items: start;
}
.hv-text { grid-area: text; min-width: 0; }
.hv-media { grid-area: media; min-width: 0; width: 100%; max-width: 440px; margin: 0; }
.vxl-hero__lead.hv-desc { grid-area: desc; margin: 0; }

/* [copy | 440 px line frame]; the empty rows centre the copy against the frame. */
@media (min-width: 64em) {
  .vxl-hero--video > .hv-wrap {
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". media" "text media" "desc media" ". media";
    column-gap: 64px;
    row-gap: 0;
  }
  .vxl-hero__lead.hv-desc { margin-top: 24px; }
}

/* Line breaks: phrase spans, strict kinsoku, and a break anywhere only when a phrase alone is wider
   than the line (200 % text at 320 / 390). Never word-break: keep-all on the title or subtitle (Japanese
   overflows at 200 %); site.css gives the Korean page keep-all on h1-h3, p, li and dd only, and the
   Korean figcaption gets it below. */
.hv-kicker { margin: 0 0 8px; color: var(--vxl-accent); font: 500 var(--type-lead)/1.2 BarlowC, var(--ja); letter-spacing: .02em; }
.hv-title { margin: 0; color: var(--navy); font-size: var(--type-title); font-weight: 500; line-height: 1.35; letter-spacing: normal; line-break: strict; overflow-wrap: anywhere; }
.hv-sub { margin: 16px 0 0; color: var(--vxl-muted); font-size: var(--type-body); line-height: 1.8; line-break: strict; overflow-wrap: anywhere; }
@media (min-width: 37.5em) {
  .hv-sub { font-size: var(--type-lead); }
}
.hv-title .hv-line, .hv-sub .hv-line { display: block; }
.hv-title .type-phrase, .hv-sub .type-phrase { display: inline-block; max-width: 100%; }

/* Transparent line panel like the demos below (vxl.css .vxl-demo__stage): no fill, 1 px inner line, radius 16,
   padding 16 / 20 / 24 at the same px breakpoints (600 / 1024), so the padding still matches the demos at 200 % text.
   First row [表示例 ... play / pause] like .vxl-stage__head, the video 12 px below it,
   inset in the padding so its edge never meets the line or the corners. Nothing sits over the video. */
.hv-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "badge toggle" "video video";
  align-items: center;
  column-gap: 8px;
  row-gap: 12px;
  padding: 16px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--vxl-line);
}
@media (min-width: 600px) {
  .hv-frame { padding: 20px; }
}
@media (min-width: 1024px) {
  .hv-frame { padding: 24px; }
}
.hv-video { grid-area: video; display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 0; object-fit: cover; }

/* Same values as vxl.css .vxl-badge.vxl-badge--example (操作例 in the demos). */
.hv-badge {
  grid-area: badge; justify-self: start; display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 999px; background: #e3e5ec; color: #4b5563;
  font-size: var(--type-body); font-weight: 700; line-height: 1.6; white-space: nowrap;
}
.hv-media figcaption { padding-top: 8px; color: var(--vxl-muted); font-size: var(--type-body); line-height: 1.6; }
/* Korean caption breaks between words only, like the page's p text (site.css); a word wider than
   the line (200 % text) may still break so it never overflows. */
:lang(ko) .hv-media figcaption { word-break: keep-all; overflow-wrap: anywhere; }

/* Pause / play: 48 px, right end of the first row, the line of the demo .vxl-replay. */
.hv-toggle {
  grid-area: toggle; display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0; border: 1px solid var(--vxl-line); border-radius: 50%;
  background: #fff; color: #07004e; cursor: pointer;
}
.hv-toggle:hover { color: #4f44ff; }
.hv-toggle:focus-visible { outline: 3px solid #07004e; outline-offset: 3px; }
.hv-toggle::before {
  content: ""; width: 14px; height: 16px;
  background: linear-gradient(currentColor, currentColor) 0 0 / 5px 100% no-repeat, linear-gradient(currentColor, currentColor) 100% 0 / 5px 100% no-repeat;
}
.hv-media.is-paused .hv-toggle::before {
  width: 0; height: 0; margin-left: 4px; background: none;
  border-left: 14px solid currentColor; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
