/* ==========================================================================
   Showreel Iklan (/showreel) — measured from ziebrb.com/showreel at 1440px
   ========================================================================== */

/* ---------- Hero: JobStreet ad as a muted background video ------------- */
.sr-hero {
  position: relative;
  height: calc(100vh - 90px);
  min-height: 420px;
  max-height: 1000px;
  overflow: hidden;
  background: #000;
}

.sr-hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sr-hero__video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* 16:9 iframe scaled to always cover the hero, like background-size: cover */
.sr-hero__video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, calc((100vh - 90px) * 16 / 9));
  height: max(100%, calc(100vw * 9 / 16));
  border: 0;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 800ms ease;
}

.sr-hero__video.is-playing iframe {
  opacity: 1;
}

/* ---------- Ads: dark "screening room" section, the two most-watched ads
   featured large, the rest in a grid of three ---------------------------- */
.sr-work {
  padding-block: 80px 88px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(35, 145, 213, 0.28), transparent 70%),
    linear-gradient(180deg, var(--zb-navy) 0%, var(--zb-navy-deep) 100%);
  color: var(--color-white);
}

.sr-wrap {
  width: min(var(--container-wide), 100% - 48px);
  margin-inline: auto;
}

.sr-work__head {
  max-width: 640px;
  margin-bottom: 40px;
}

.sr-work__eyebrow {
  font-family: var(--font-montserrat);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--zb-sky);
}

.sr-work__title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 2.2rem + 2.4vw, 4rem);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.sr-work__title span {
  color: var(--zb-yellow);
}

.sr-work__lede {
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.78);
}

.sr-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 28px 24px;
}

.sr-card {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sr-card--featured {
  grid-column: span 3;
}

.sr-card .yt,
.sr-card__missing {
  border-radius: 14px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.8);
}

.sr-card__body {
  padding: 14px 2px 0;
}

.sr-card__name {
  font-family: var(--font-montserrat);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.15;
  letter-spacing: 0;
  color: var(--color-white);
}

.sr-card--featured .sr-card__name {
  font-size: 1.75rem;
}

.sr-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 8px;
}

.sr-card__role {
  font-family: var(--font-montserrat);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.sr-card__views {
  padding: 5px 10px 4px;
  border-radius: 999px;
  background: var(--zb-yellow);
  font-family: var(--font-montserrat);
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
  color: var(--zb-navy);
}

/* BSI: the original's video (dayHX2oNUCQ) no longer exists on YouTube */
.sr-card__missing {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  aspect-ratio: 16 / 9;
  background: var(--color-white);
  text-align: center;
}

.sr-card__missing img {
  width: min(150px, 45%);
}

.sr-card__missing p {
  padding-inline: 16px;
  font-size: 13px;
  color: var(--zb-text);
}

/* ---------- Instagram reels (realme) ------------------------------------ */
.sr-reels {
  overflow-x: clip;
  padding-block: 72px;
  background: var(--color-white) url("../images/deco-pill-yellow.webp") no-repeat 100% 54% / 49% auto;
}

.sr-reels__grid {
  display: grid;
  /* Instagram embeds refuse to render narrower than 326px */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 23px;
  width: min(var(--container-wide), 100% - 48px);
  margin-inline: auto;
  align-items: start;
  justify-items: center;
}

.sr-reels__grid > * {
  width: 100%;
  max-width: 540px;
}

/* ---------- Tablet & phone ---------------------------------------------- */
@media (max-width: 1024px) {
  .sr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sr-card,
  .sr-card--featured {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  /* the pill would sit behind the stacked embeds */
  .sr-reels {
    background-image: none;
  }
}

@media (max-width: 767px) {
  .sr-hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .sr-work {
    padding-block: var(--m-section);
  }

  .sr-work__head {
    margin-bottom: 24px;
  }

  .sr-work__title {
    font-size: var(--m-title-display);
  }

  .sr-work__lede {
    font-size: var(--m-small);
  }

  /* all eight in one .zb-swipe row */
  .sr-grid {
    --swipe-item: min(80%, 300px);
  }

  .sr-card .yt,
  .sr-card__missing {
    border-radius: 12px;
  }

  .sr-card__name,
  .sr-card--featured .sr-card__name {
    font-size: 1.125rem;
  }

  .sr-card__role,
  .sr-card__views {
    font-size: 11px;
  }

  /* Instagram won't render an embed narrower than 326px */
  .sr-reels__grid {
    --swipe-item: 326px;
  }

  .sr-reels {
    padding-block: var(--m-section);
  }
}

/* Instagram won't render an embed narrower than 326px: on very small phones
   let the column span the screen and clip the few extra pixels here instead
   of letting the whole page scroll sideways */
@media (max-width: 374px) {
  .sr-reels__grid {
    width: 100%;
  }
}
