/* REGENTHUS UNIVERSAL MEDIA / VIDEO DESIGN SYSTEM
   Desktop + tablet + mobile. Content videos only; background autoplay videos are ignored by JS. */
:root{
  --reg-media-orange:#ff7a1a;
  --reg-media-orange-soft:#ffb15b;
  --reg-media-bg:#050505;
  --reg-media-line:rgba(255,122,26,.34);
  --reg-media-line-soft:rgba(255,255,255,.08);
  --reg-media-radius:16px;
  --reg-media-gap:clamp(16px,1.8vw,28px);
  --reg-media-shadow:0 18px 58px rgba(0,0,0,.42),0 0 26px rgba(255,122,26,.07);
}

video.reg-media-video{
  display:block !important;
  box-sizing:border-box !important;
  width:100% !important;
  height:auto !important;
  min-width:0 !important;
  min-height:0 !important;
  max-height:none !important;
  margin-inline:auto !important;
  object-fit:contain !important;
  object-position:center center !important;
  background:var(--reg-media-bg) !important;
  border:1px solid var(--reg-media-line) !important;
  border-radius:var(--reg-media-radius) !important;
  box-shadow:var(--reg-media-shadow) !important;
  overflow:hidden !important;
  transform:none !important;
}
video.reg-media-video.reg-video-landscape{max-width:1320px !important}
video.reg-media-video.reg-video-wide{max-width:1440px !important}
video.reg-media-video.reg-video-square{max-width:860px !important}
video.reg-media-video.reg-video-portrait{max-width:520px !important}

/* Card / archive hosts already provide a frame: one frame is more elegant than two. */
.reg-video-host.media-card,
.reg-video-host.video-card,
.reg-video-host[class*="video-card"]{
  background:linear-gradient(180deg,rgba(12,12,12,.96),rgba(5,5,5,.98)) !important;
  border:1px solid var(--reg-media-line) !important;
  border-radius:var(--reg-media-radius) !important;
  box-shadow:var(--reg-media-shadow) !important;
  overflow:hidden !important;
  align-self:start !important;
}
.reg-video-host.media-card > video.reg-media-video,
.reg-video-host.video-card > video.reg-media-video,
.reg-video-host[class*="video-card"] > video.reg-media-video,
.reg-video-host.media-card video.reg-media-video,
.reg-video-host.video-card video.reg-media-video{
  max-width:100% !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

/* FLOWLINE archive and analogous compact media previews: never crop the actual video. */
.reg-video-host.archive-visual,
.reg-video-host[class*="archive-visual"]{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:0 !important;
  height:auto !important;
  max-height:none !important;
  overflow:hidden !important;
  background:#000 !important;
}
.reg-video-host.archive-visual video.reg-media-video,
.reg-video-host[class*="archive-visual"] video.reg-media-video{
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  object-fit:contain !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
}

/* Generic content wrappers. */
.reg-video-host{
  min-width:0 !important;
  max-width:100% !important;
}
.reg-video-grid{
  align-items:start !important;
  gap:var(--reg-media-gap) !important;
}
.reg-video-grid.reg-video-only{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:var(--reg-media-gap) !important;
  width:100% !important;
}
.reg-video-grid.reg-video-only.reg-video-count-1{
  grid-template-columns:minmax(0,1fr) !important;
}
.reg-video-grid.reg-video-only.reg-video-count-1 > .reg-video-card{
  width:100% !important;
  max-width:1100px !important;
  justify-self:center !important;
}
.reg-video-grid.reg-video-only.reg-video-odd > .reg-video-card:last-child{
  grid-column:1/-1 !important;
  width:min(100%,900px) !important;
  justify-self:center !important;
}
.reg-video-grid > .reg-video-card{
  min-width:0 !important;
  align-self:start !important;
}

/* Portrait video inside a wide card should remain elegant, not be stretched into a billboard. */
.reg-video-card:has(video.reg-video-portrait) video.reg-media-video{
  width:min(100%,520px) !important;
  margin-inline:auto !important;
}
.reg-video-card:has(video.reg-video-square) video.reg-media-video{
  width:min(100%,860px) !important;
  margin-inline:auto !important;
}

/* Captions/details keep the same visual rhythm across sections. */
.reg-video-card .media-copy,
.reg-video-card .video-copy,
.reg-video-card figcaption{
  box-sizing:border-box !important;
  padding:clamp(13px,1.4vw,18px) clamp(14px,1.7vw,20px) !important;
}

@media(max-width:900px){
  :root{--reg-media-radius:14px;--reg-media-gap:18px}
  .reg-video-grid.reg-video-only{grid-template-columns:minmax(0,1fr) !important}
  .reg-video-grid.reg-video-only.reg-video-odd > .reg-video-card:last-child{grid-column:auto !important;width:100% !important}
  video.reg-media-video.reg-video-portrait{max-width:480px !important}
}

@media(max-width:760px){
  :root{--reg-media-radius:12px;--reg-media-gap:14px;--reg-media-shadow:0 12px 34px rgba(0,0,0,.38),0 0 18px rgba(255,122,26,.055)}
  video.reg-media-video,
  video.reg-media-video.reg-video-wide,
  video.reg-media-video.reg-video-landscape,
  video.reg-media-video.reg-video-square,
  video.reg-media-video.reg-video-portrait{
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    margin-inline:0 !important;
  }
  .reg-video-grid,
  .reg-video-grid.reg-video-only{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:14px !important;
    width:100% !important;
  }
  .reg-video-grid > .reg-video-card,
  .reg-video-grid.reg-video-only > .reg-video-card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    margin:0 !important;
    grid-column:auto !important;
    justify-self:stretch !important;
  }
  .reg-video-card:has(video.reg-video-portrait) video.reg-media-video,
  .reg-video-card:has(video.reg-video-square) video.reg-media-video{width:100% !important}
}

@media(prefers-reduced-motion:reduce){
  video.reg-media-video,.reg-video-card{transition:none !important;animation:none !important;transform:none !important}
}
