/* ==========================================================================
   Platform Tour (video.php) — final handoff (final_howto.dc.html, 2026-10-30)
   The tour tile and the grid. The tiles below it are css/home-sections.css;
   the CTA tile is css/cta-band.css. Breakpoints as Home's.
   ========================================================================== */

/* ---------------------------------------------------------------- Grid --- */

.vid-grid {
  display: grid;
  gap: var(--ffb-bento-gap);
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "tour"
    "cap"
    "explore"
    "areas"
    "path"
    "cta"
    "logos"
    "accr";
}

@media (min-width: 700px) {
  .vid-grid {
    grid-auto-rows: minmax(130px, auto);
  }
}

@media (min-width: 900px) and (max-width: 1099px) {
  .vid-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "tour tour"
      "cap explore"
      "areas areas"
      "path path"
      "cta cta"
      "logos logos"
      "accr accr";
  }
}

@media (min-width: 1100px) {
  .vid-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(150px, auto);
    grid-template-areas:
      "tour tour tour tour tour tour tour tour tour tour tour tour"
      "cap cap cap cap cap cap explore explore explore explore explore explore"
      "areas areas areas areas areas areas areas areas path path path path"
      "areas areas areas areas areas areas areas areas path path path path"
      "logos logos logos logos logos logos logos logos logos logos logos logos"
      "accr accr accr accr accr accr accr accr accr accr accr accr"
      "cta cta cta cta cta cta cta cta cta cta cta cta";
  }
}

/* ---------------------------------------------------------------- Tour --- */
/* A white tile: copy beside the video card. Playing, the tile loses its
   padding and the card takes the whole row, square-cornered. */

.vid-tour {
  grid-area: tour;
  position: relative;
  container-type: inline-size;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  overflow: hidden;
  padding: clamp(24px, 3vw, 44px);
  border-radius: var(--ffb-r-bento);
  background: #ffffff;
  border: 1px solid var(--ffb-cap-tile-border);
  transition: padding 0.5s var(--ffb-ease-shrink);
}

/* Pinned to the first cell, so when the card takes the full row on play the
   copy ends up under it rather than being pushed down. */
.vid-tour__copy {
  grid-row: 1;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.vid-tour__eyebrow {
  margin-bottom: 14px;
  font-weight: 500;
  font-size: var(--ffb-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ffb-blue);
}

.vid-tour__title {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.08;
  color: var(--ffb-navy-deep);
}

.vid-tour__lead {
  max-width: 560px;
  margin-top: 18px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ffb-text-body-alt);
}

.vid-tour__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

/* As Home's hero button. */
.vid-tour__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: var(--ffb-r-pill);
  background: var(--ffb-green);
  font-family: var(--ffb-poppins);
  font-weight: 600;
  font-size: 16px;
  color: var(--ffb-green-ink);
  transition: background var(--ffb-t-ui) ease;
}

.vid-tour__cta:hover {
  background: var(--ffb-green-hover);
  color: var(--ffb-green-ink);
}

.vid-tour__cta svg {
  width: 18px;
  height: 18px;
}

/* ---------------------------------------------------------- Video card --- */

/* transform-origin 0 0: js/video.js animates the move between the half and
   full-width cells as translate + scale from the old box (FLIP). */
.vid-tour__card {
  --ffb-focus: var(--ffb-focus-on-dark);
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--ffb-r-area);
  background: var(--ffb-navy-deep);
  transform-origin: 0 0;
}

.vid-tour.is-playing {
  padding: 0;
}

/* The shared player, themed with the site's tokens. */
.vid-tour__player {
  --fvp-accent: var(--ffb-green);
  --fvp-accent-hover: var(--ffb-green-hover);
  --fvp-accent-ink: var(--ffb-green-ink);
  --fvp-bg: var(--ffb-navy-deep);
  --fvp-focus: var(--ffb-focus-on-dark);
  --fvp-font: var(--ffb-body);
  --fvp-ui-font: var(--ffb-jakarta);
  width: 100%;
  height: 100%;
}

.vid-tour__player > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A full screen of another shape would crop it. */
.vid-tour__player.fvp--fs > video {
  object-fit: contain;
}

/* Out of the layout too: where the tile is one column the hidden copy held
   the row taller than the card, so the tile was not 16:9. */
.vid-tour.is-playing .vid-tour__copy {
  position: absolute;
  opacity: 0;
  visibility: hidden;
}

/* Full row width, 16:9 tall unless that is taller than the window: then the
   card keeps its width and loses height, and the video letterboxes on navy
   (a 16:9 box capped by max-height shrank in width and left a white strip,
   Keith 2026-11-02). cqw is the tile's width, which the card fills once the
   tile has dropped its padding. */
.vid-tour.is-playing .vid-tour__card {
  grid-row: 1;
  grid-column: 1 / -1;
  aspect-ratio: auto;
  height: min(56.25cqw, calc(100dvh - 32px));
  border-radius: 0;
}

/* Capped to the screen's height while playing: letterboxed, not cropped. */
.vid-tour.is-playing .vid-tour__player > video {
  object-fit: contain;
}

/* Idle: the silent preview loop under the play button. */
.vid-tour__idle {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.vid-tour__preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.vid-tour__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 24px;
  border: 0;
  background: var(--ffb-video-scrim);
  cursor: pointer;
}

.vid-tour__pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: var(--ffb-r-pill);
  background: var(--ffb-green);
  font-family: var(--ffb-jakarta);
  font-weight: 700;
  font-size: 16px;
  color: var(--ffb-green-ink);
  transition: background var(--ffb-t-ui) ease, box-shadow 0.3s ease;
}

.vid-tour__play:hover .vid-tour__pill,
.vid-tour__play:focus-visible .vid-tour__pill {
  background: var(--ffb-green-hover);
  box-shadow: var(--ffb-glow-cta);
}

.vid-tour__pill .ffb-icon {
  width: 20px;
  height: 20px;
}

.vid-tour__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--ffb-r-pill);
  background: var(--ffb-video-close);
  color: #ffffff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background var(--ffb-t-fast) ease;
}

.vid-tour__close:hover {
  background: var(--ffb-video-close-hover);
}

.vid-tour__close .ffb-icon {
  width: 18px;
  height: 18px;
}
