/* ==========================================================================
   KF Elements — Video Feature
   --------------------------------------------------------------------------
   Two orientations on one section class:
     .kfe-video.landscape  16:9 frame, white copy card overlapping below
     .kfe-video.portrait   9:16 frame beside the copy
   The lightbox (.kfe-lightbox) is created empty; video.js fills it on first
   open so nothing loads until the visitor asks.
   ========================================================================== */

/* ---------- shared frame ---------- */
.kfe .kfe-video .frame {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--kfe-primary-deep);
  cursor: pointer;
}
.kfe .kfe-video .poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.6s; z-index: 1;
}
.kfe .kfe-video .frame:hover .poster { transform: scale(1.04); }
.kfe .kfe-video .play {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 14, 28, 0.2); transition: background 0.4s;
}
.kfe .kfe-video .frame:hover .play { background: rgba(10, 14, 28, 0.34); }
.kfe .kfe-video .play b {
  width: 90px; height: 90px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s;
}
.kfe .kfe-video .frame:hover .play b { transform: scale(1.08); }
.kfe .kfe-video .play b::after {
  content: ""; margin-left: 6px;
  border-style: solid; border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent var(--kfe-primary);
}

/* ---------- landscape: overlapping copy card ---------- */
.kfe .kfe-video.landscape { padding-bottom: var(--kfe-section-pad); }
.kfe .kfe-video.landscape .stage { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 var(--kfe-gutter) 30px; }
.kfe .kfe-video.landscape .frame { aspect-ratio: 16 / 9; box-shadow: 0 30px 80px rgba(10, 14, 28, 0.22); }
.kfe .kfe-video.landscape .band {
  position: relative; z-index: 3;
  width: 88%; margin: -90px auto 0;
  background: var(--kfe-white); border: 1px solid var(--kfe-line); border-radius: 10px;
  padding: 40px 50px;
  box-shadow: 0 26px 64px rgba(10, 14, 28, 0.16);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end;
}
.kfe .kfe-video.landscape .band h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); margin: 0; max-width: 18ch; }
.kfe .kfe-video.landscape .band .lead {
  font-family: var(--kfe-font-heading); font-style: italic;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem); color: var(--kfe-accent);
  margin: 10px 0 0; font-weight: 400;
}
.kfe .kfe-video.landscape .band .pbody { color: var(--kfe-muted); font-size: 15px; }
.kfe .kfe-video.landscape .band .act { margin-top: 18px; }
/* the card is always white, even when the section behind it is dark */
.kfe .kfe-video.landscape.kfe-dark .band h2 { color: var(--kfe-primary); }
.kfe .kfe-video.landscape.kfe-dark .band .pbody { color: var(--kfe-muted); }

/* ---------- portrait: frame beside the copy ---------- */
.kfe .kfe-video.portrait .cols {
  display: grid; grid-template-columns: auto 1fr; gap: 6vw; align-items: center;
  max-width: 1120px; margin: 0 auto;
}
.kfe .kfe-video.portrait .frame {
  width: min(340px, 72vw); aspect-ratio: 9 / 16;
  border-radius: 12px; box-shadow: 0 30px 80px rgba(10, 14, 28, 0.28);
}
.kfe .kfe-video.portrait .play b { width: 74px; height: 74px; }
.kfe .kfe-video.portrait .play b::after { margin-left: 5px; border-width: 13px 0 13px 21px; }
.kfe .kfe-video.portrait .copy h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.2; max-width: 16ch; margin: 0; }
.kfe .kfe-video.portrait .copy .intro { color: var(--kfe-muted); font-size: 16.5px; margin-top: 18px; line-height: 1.75; max-width: 46ch; }
.kfe .kfe-video.portrait .copy .pbody { color: var(--kfe-muted); font-size: 15.5px; margin-top: 16px; }
.kfe .kfe-video.portrait .copy .act { margin-top: 28px; }
.kfe .kfe-video.portrait.kfe-dark .copy .intro,
.kfe .kfe-video.portrait.kfe-dark .copy .pbody { color: var(--kfe-on-dark); }

/* ---------- lightbox ---------- */
.kfe .kfe-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(8, 12, 26, 0.9);
  display: flex; align-items: center; justify-content: center;
  padding: 5vw;
  opacity: 0; pointer-events: none; transition: opacity 0.4s;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.kfe .kfe-lightbox.open { opacity: 1; pointer-events: auto; }
.kfe .kfe-lightbox .lb-inner {
  position: relative; width: 100%; max-width: 1100px; aspect-ratio: 16 / 9;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
  transform: scale(0.94); transition: transform 0.4s;
}
.kfe .kfe-lightbox.open .lb-inner { transform: scale(1); }
.kfe .kfe-video.portrait .kfe-lightbox .lb-inner {
  width: auto; height: min(88vh, 900px); aspect-ratio: 9 / 16; max-width: 94vw;
  border-radius: 10px; background: #000;
}
.kfe .kfe-lightbox .lb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.kfe .kfe-lightbox .lb-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }

.kfe .kfe-lightbox .lb-close { position: absolute; top: -46px; right: 0; width: 36px; height: 36px; cursor: pointer; background: none; border: 0; }
.kfe .kfe-lightbox .lb-close::before,
.kfe .kfe-lightbox .lb-close::after { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: #fff; }
.kfe .kfe-lightbox .lb-close::before { transform: rotate(45deg); }
.kfe .kfe-lightbox .lb-close::after { transform: rotate(-45deg); }

@media (max-width: 820px) {
  /* landscape inverts emphasis: video smaller, text band full width */
  .kfe .kfe-video.landscape .frame { width: 82%; margin: 0 auto; }
  .kfe .kfe-video.landscape .band { width: auto; margin: -40px 0 0; grid-template-columns: 1fr; gap: 18px; padding: 30px 26px; }
  .kfe .kfe-video.landscape .play b { width: 60px; height: 60px; }
  .kfe .kfe-video.landscape .play b::after { border-width: 11px 0 11px 18px; }

  /* portrait stacks: video on top, copy below */
  .kfe .kfe-video.portrait .cols { grid-template-columns: 1fr; gap: 36px; justify-items: center; }
  .kfe .kfe-video.portrait .frame { width: min(300px, 78vw); }
  .kfe .kfe-video.portrait .copy { width: 100%; }
  .kfe .kfe-video.portrait .copy h2,
  .kfe .kfe-video.portrait .copy .intro { max-width: none; }

  .kfe .kfe-lightbox .lb-close { top: -40px; }
}

/* ==========================================================================
   variant = box, variant = embed (w2.homepack.1, ADR-0005's dated section of
   2026-09-24)
   --------------------------------------------------------------------------
   ADDED RULES ONLY, each under `.variant-box` or `.variant-embed` — classes
   the `feature` variant never prints, so no saved Video Feature can match
   one. The head is centred over a player of a fixed width; a caption sits
   under it. Every colour and type size reads a `--kfe-*` token with today's
   value as its fallback; the play mark reads `--kfe-video-play-ink`, falling
   back to the pack's `--kfe-white`.
   ========================================================================== */
.kfe .kfe-video.variant-box > .kfe-wrap,
.kfe .kfe-video.variant-embed > .kfe-wrap {
  max-width: min(var(--kfe-video-box, 780px), 100%);
  text-align: var(--kfe-head-align, center);
}
.kfe .kfe-video.variant-embed > .kfe-wrap { max-width: min(var(--kfe-video-embed, 900px), 100%); }
.kfe .kfe-video.variant-box .head,
.kfe .kfe-video.variant-embed .head { margin-bottom: 26px; }
.kfe .kfe-video.variant-box .head h2,
.kfe .kfe-video.variant-embed .head h2 {
  font-size: var(--kfe-title-size, var(--kfe-h2-size, clamp(1.6rem, 3vw, 2.4rem)));
  line-height: 1.16;
}
.kfe .kfe-video.variant-box .kfe-label,
.kfe .kfe-video.variant-embed .kfe-label { margin-bottom: 10px; }

/* The box: the poster and the play button are ONE control. */
.kfe .kfe-video.variant-box .frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  border-radius: var(--kfe-radius-media, 16px);
  box-shadow: var(--kfe-shadow-card, 0 30px 80px -40px rgba(10, 14, 28, 0.35));
  font: inherit;
  color: inherit;
  text-decoration: none;
}
.kfe .kfe-video.variant-box .frame:focus-visible { outline: 2px solid var(--kfe-accent); outline-offset: 4px; }
.kfe .kfe-video.variant-box .play {
  align-items: flex-end;
  justify-content: flex-start;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent, var(--kfe-video-scrim, rgba(10, 14, 28, 0.28)));
}
.kfe .kfe-video.variant-box .frame:hover .play { background: linear-gradient(180deg, transparent, var(--kfe-video-scrim, rgba(10, 14, 28, 0.28))); }
.kfe .kfe-video.variant-box .play b {
  width: 58px;
  height: 58px;
  background: var(--kfe-video-play, var(--kfe-accent));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.kfe .kfe-video.variant-box .play b::after {
  margin-left: 5px;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--kfe-video-play-ink, var(--kfe-white));
}
/* Before consent, the box links out: a line of text over the poster says where. */
.kfe .kfe-video.variant-box .kfe-video-out {
  position: absolute;
  z-index: 3;
  inset-inline-end: 16px;
  bottom: 20px;
  padding: 6px 12px;
  border-radius: var(--kfe-btn-radius);
  background: var(--kfe-video-out-ground, rgba(255, 255, 255, 0.92));
  color: var(--kfe-primary);
  font-size: var(--kfe-video-out-size, 12px);
  font-weight: 600;
}
.kfe .kfe-video.variant-box .kfe-video-caption,
.kfe .kfe-video.variant-embed .kfe-video-caption {
  margin-top: 16px;
  font-size: var(--kfe-video-caption-size, 14px);
  color: var(--kfe-body, var(--kfe-muted));
}
.kfe .kfe-video.kfe-dark .kfe-video-caption { color: var(--kfe-on-dark); }

/* The embed: a 16:9 frame holding the player — or, before consent, the poster
   and one link out. */
.kfe .kfe-video .kfe-video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--kfe-radius-media, 14px);
  background: var(--kfe-primary-deep);
  box-shadow: var(--kfe-shadow-card, 0 30px 80px -40px rgba(10, 14, 28, 0.35));
}
.kfe .kfe-video .kfe-video-embed-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  display: block;
}
.kfe .kfe-video .kfe-video-embed-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--kfe-video-placeholder-ground, var(--kfe-surface-deep));
  box-shadow: var(--kfe-video-placeholder-shadow, none);
  border: var(--kfe-video-placeholder-border, 1px solid var(--kfe-line));
}
.kfe .kfe-video .kfe-video-embed-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}
.kfe .kfe-video .kfe-video-embed-placeholder .kfe-video-out {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--kfe-btn-radius);
  background: var(--kfe-white);
  color: var(--kfe-primary);
  font-size: var(--kfe-video-embed-out-size, 13px);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.kfe .kfe-video .kfe-video-embed-placeholder .kfe-video-out:hover { text-decoration: underline; }
