/* =========================
   video.css (FULL FILE)
   Social-style video tiles
   ========================= */

/* --- Intro --- */
.video-intro{
  margin-top: 4px;
  margin-bottom: 10px;
}

.video-intro p{
  margin: 0;
}

/* --- Section blocks --- */
.video-block{
  padding-top: 4px;
  padding-bottom: 4px;
}

.video-title{
  margin-top: 0;
  margin-bottom: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* =========================================================
   TILE SYSTEM (Social-style, self-contained for video page)
   ========================================================= */

.tile-grid{
  display: grid;
  gap: 16px;
  margin-top: 10px;
}

.tile-grid--vid2{
  grid-template-columns: 1fr 1fr;
}

.tile-card{
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.tile-box{
  position: relative;
  width: 100%;
  cursor: pointer;
  background: #101114;
  overflow: hidden;
}

.tile-box:before{
  content:"";
  display: block;
  padding-top: 56.25%; /* 16:9 */
}

.tile-box--hero:before{
  padding-top: 56.25%;
}

.tile-box--static{
  cursor: default;
}

.tile-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}

/* Play overlay */
.tile-play{
  position: absolute;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

.tile-play:before{
  content:"";
  position: absolute;
  left: 52%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 18px solid rgba(255,255,255,0.92);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
}

/* Optional: YouTube play marker variant (same shape, just a touch stronger) */
.tile-play--yt{
  background: rgba(0,0,0,0.62);
}

.video-modal:hover .tile-play{
  background: rgba(0,0,0,0.68);
}

/* Captions */
.tile-cap{
  padding: 12px 14px 14px;
}

.tile-cap-title{
  margin: 0 0 6px 0;
  letter-spacing: 0.04em;
}

.tile-cap-meta{
  opacity: 0.85;
  font-size: 0.95em;
}

/* Small pill option (for YouTube buttons under tiles) */
.pill--small{
  display: inline-block;
  margin-top: 10px;
  font-size: 0.9em;
  padding: 10px 14px;
}

/* Hero tile spacing */
.tile-card--hero{
  margin-top: 6px;
}

/* --- Bottom button wrapper (layout only) --- */
.video-back{
  width: 100%;
  clear: both;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 6px;
}

.video-back .portfolio-link{
  float: none;
  display: inline-block;
  margin: 10px auto 0;
}

/* =========================================================
   VIDEO MODAL (matches Social behaviour + ug.js hooks)
   ========================================================= */
.vid-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
}

.vid-modal.is-open{
  display: block;
}

.vid-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}

.vid-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1100px, 92vw);
  transform: translate(-50%, -50%);
  border-radius: 16px;
  overflow: hidden;
  background: #101114;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.vid-modal__close{
  position: absolute;
  right: 10px;
  top: 10px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255,255,255,0.10);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  text-align: center;
}

.vid-modal__close:hover{
  background: rgba(255,255,255,0.18);
}

.vid-modal__frame{
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.vid-modal__frame iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vid-modal__cap{
  padding: 10px 14px 12px;
  font-size: 0.95em;
  opacity: 0.9;
}

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 860px){
  .tile-grid--vid2{
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Video tile cleanup — fix black corners
   ========================================= */

.tile-card{
  border-radius: 18px;
  overflow: hidden;               /* clips everything cleanly */
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
}

/* Tile box no longer needs shadow or radius */
.tile-box{
  box-shadow: none;
}

/* Image fills the clipped card */
.tile-img{
  border-radius: 0;
}

.vid-modal__cap{
  color: #f2f2f2;
  opacity: 0.9;
}
/* =========================================
   Video modal close button stacking fix
   ========================================= */

.vid-modal__close{
  z-index: 10;
  position: absolute;
}

.vid-modal__frame{
  position: relative;
  z-index: 1;
}
