/* ==========================================================================
   Section: Production top — Figma 123:3330
   Breadcrumb strip, a 565px centred text block, then a full-width 16:9 video
   with a poster frame and a 70px play button.
   ========================================================================== */

.trustav-ptop {
  padding-block: 0 clamp(3rem, 6vw, 5.625rem);
}

.trustav-ptop__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 39px; /* Figma 123:3447 */
  width: min(565px, 100%);
  padding-block: 80px; /* Figma 123:3447 — 125px from the top, less the strip. */
  text-align: center;
}

.trustav-ptop__headline {
  display: flex;
  flex-direction: column;
  gap: 19px; /* Figma 123:3333 */
}

/* Figma 235:4239 — tracked uppercase accent label, as on the service hero. */
.trustav-ptop__eyebrow {
  margin: 0 0 18px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  line-height: var(--lh-tight);
  letter-spacing: 0.31em;
  text-transform: uppercase;
  color: var(--c-accent);
  white-space: nowrap; /* one line in Figma, wider than the 565px column */
}

@media (max-width: 768px) {
  .trustav-ptop__eyebrow {
    white-space: normal;
  }
}

.trustav-ptop__title {
  margin: 0;
  font-size: var(--fs-h1);
  color: var(--c-black);
}

.trustav-ptop__text {
  margin: 0;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  color: var(--c-neutral-1);
}

/* Figma 123:3426 keeps the four pills on one row, slightly wider than the
   565px text column — so the row may overflow the column but not wrap. */
.trustav-ptop__pills {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  max-width: calc(100vw - 2 * var(--gutter));
  align-items: center;
  justify-content: center;
  gap: 10px; /* Figma 123:3426 */
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Video --------------------------------------------------------------- */
.trustav-ptop__video {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1240 / 697; /* Figma 123:3327 */
  background-color: var(--c-neutral-4);
}

.trustav-ptop__poster {
  margin: 0;
  height: 100%;
}

.trustav-ptop__poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trustav-ptop__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  color: var(--c-accent);
  cursor: pointer;
}

.trustav-ptop__play-icon svg {
  display: block;
  width: 70px; /* Figma 123:3328 */
  height: 70px;
  transition: transform var(--dur) var(--ease);
}

.trustav-ptop__play:hover .trustav-ptop__play-icon svg,
.trustav-ptop__play:focus-visible .trustav-ptop__play-icon svg {
  transform: scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .trustav-ptop__play-icon svg {
    transition: none;
  }
}

/* The embed fades in over the poster once it has loaded — see main.js. */
.trustav-ptop__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.trustav-ptop__video[data-trustav-video-state="ready"] iframe {
  opacity: 1;
}

/* The play control goes as soon as it is pressed; the poster only once the
   embed is actually there to cover it. */
.trustav-ptop__video[data-trustav-video-state] .trustav-ptop__play {
  opacity: 0;
  pointer-events: none;
}

/* opacity < 1 makes the poster its own stacking layer, painted above the
   later iframe, so without this it silently swallowed every click on the
   player (pause, seek, fullscreen). */
.trustav-ptop__video[data-trustav-video-state="ready"] .trustav-ptop__poster {
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  .trustav-ptop__video iframe,
  .trustav-ptop__video[data-trustav-video-state="ready"] .trustav-ptop__poster {
    transition: none;
  }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 768px) {
  .trustav-ptop__head {
    gap: var(--space-xl);
    padding-block: var(--space-3xl);
  }

  .trustav-ptop__play-icon svg {
    width: 56px;
    height: 56px;
  }
}

/* After the base pills rule so it wins: phones let the pills wrap again. */
@media (max-width: 768px) {
  .trustav-ptop__pills {
    flex-wrap: wrap;
    width: auto;
  }
}
