/* simam-filmbox: a film, opened big, over the page it was on.
 *
 * Junaid, 13 Nov 2026: "the videos are kind of small. We want them to be
 * able to kind of see the videos full screen ... maybe not a complete full
 * screen video, but just it pops up into like a modal ... because it's kind
 * of like they click on it and it says book a demo, then it brings them to
 * like a sign up page. Like they might want to see what that looks like up
 * close, even if it's a demo."
 *
 * So: watch it first, then the button. The button comes with it into the
 * box rather than replacing the chance to look.
 */

/* ---- the opener sitting on the film --------------------------------- */
.fb-host { position: relative; }

.fb-open {
  position: absolute;
  right: .6rem;
  bottom: .6rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  padding: .42rem .7rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  letter-spacing: .01em;
  background: rgba(14, 14, 16, .72);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  cursor: pointer;
  opacity: .9;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: opacity .15s ease, background .15s ease, transform .15s ease;
}
.fb-open svg { width: 13px; height: 13px; flex: none; }
.fb-host:hover .fb-open,
.fb-open:focus-visible { opacity: 1; background: rgba(14, 14, 16, .9); }
.fb-open:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* A touch screen has no hover, so it never fades in: it is simply there. */
@media (hover: none) { .fb-open { opacity: 1; } }

/* ---- the box -------------------------------------------------------- */

/* THIS RULE IS THE WHOLE BOX WORKING. `hidden` is a UA rule of exactly
 * `[hidden] { display: none }`, and a class that sets `display` beats it
 * on specificity. Without this, .fb-back keeps `display: flex` while
 * hidden: it is invisible, because opacity is 0, and it still covers the
 * whole viewport and swallows every click on the page underneath. The
 * same trap catches .fb-cta, which is hidden when a film has no
 * destination to offer and was drawing an empty white pill.
 * Found on a phone-width screenshot, not in the open/close test, because
 * the test asked the element whether it was hidden and it said yes.
 */
.fb-back[hidden],
.fb-cta[hidden],
.fb-cap[hidden] { display: none; }

.fb-back {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(.75rem, 3vw, 2.5rem);
  background: rgba(8, 8, 10, .92);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .18s ease;
}
.fb-back[data-open] { opacity: 1; }

.fb-box {
  position: relative;
  width: min(1400px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transform: translateY(8px);
  transition: transform .18s ease;
}
.fb-back[data-open] .fb-box { transform: none; }

.fb-box video {
  display: block;
  width: 100%;
  height: auto;
  /* The film is the point, so it gets the room. Capped so a tall clip on a
     short laptop still leaves the caption and the button on screen. */
  max-height: calc(100vh - 11rem);
  object-fit: contain;
  background: #0b0b0d;
  border-radius: 8px;
}

.fb-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .8rem 1.2rem;
}
.fb-cap {
  margin: 0;
  max-width: 78ch;
  font-size: .9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .72);
}
.fb-cta {
  flex: none;
  display: inline-block;
  padding: .66rem 1.15rem;
  font-size: .92rem;
  font-weight: 650;
  line-height: 1;
  color: #10100f;
  text-decoration: none;
  background: #fff;
  border-radius: 999px;
}
.fb-cta:hover { background: #ececec; }
.fb-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.fb-x {
  position: absolute;
  top: -2.4rem;
  right: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.35rem;
  line-height: 1;
  color: rgba(255, 255, 255, .8);
  background: none;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.fb-x:hover { color: #fff; }
.fb-x:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 600px) {
  .fb-x { top: auto; bottom: -2.2rem; right: 50%; transform: translateX(50%); }
}

/* The page behind must not scroll while the box is open, and must not jump
   when the scrollbar goes: the width it leaves is paid back as padding. */
html.fb-locked body { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .fb-back, .fb-box, .fb-open { transition: none; }
  .fb-box { transform: none; }
}
