/* PREMES film hotspots (system.html). Small dots on the phone screens of the
   app film (film.css) and the card each one opens. Loaded after film.css. */

/* The hidden screens are stacked over the visible one (opacity 0). Let taps
   fall through them, so only the dots take pointer input; a press anywhere
   else still reaches .pf-hold and turns the phone. */
.pf .ps { pointer-events: none; }
.pf .pv-total { position: relative; }

/* the dot: a 30px tap target around a 10px point */
.fh-dot {
  position: absolute; z-index: 25; width: 30px; height: 30px; margin: -15px 0 0 -15px; padding: 0;
  border: 0; border-radius: 50%; background: none; font: inherit; color: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: pan-y;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
/* "inherit", not "visible": film.js hides the whole face while the back of
   the phone is towards the viewer, and the dots must go with it. */
.fh-dot.is-on { visibility: inherit; opacity: 1; pointer-events: auto; transition: opacity .4s ease .3s, visibility 0s; }
.fh-dot::before, .fh-dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; }
.fh-dot::after { background: rgba(244, 244, 241, .94); box-shadow: 0 0 0 1px rgba(0, 0, 0, .28), 0 1px 3px rgba(0, 0, 0, .45); transition: transform .16s ease; }
.fh-dot::before { border: 1px solid rgba(244, 244, 241, .5); opacity: 0; animation: fh-pulse 2.4s cubic-bezier(.25, .6, .3, 1) infinite; }
.fh-dot:hover::after, .fh-dot.is-open::after { transform: scale(1.2); }
.fh-dot.is-open::before { animation: none; opacity: 0; }
.fh-dot:focus { outline: none; }
.fh-dot:focus-visible { outline: 2px solid rgba(244, 244, 241, .9); outline-offset: -4px; }
@keyframes fh-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.4); opacity: 0; } }

/* where each dot sits (em = the phone screen's own type scale) */
.fh-family { left: 3.75em; top: 70%; }            /* the face in the "Jeremy is home" island */
.fh-arm { left: calc(100% - 1.5em); top: 50%; }   /* the armed status card */
.fh-live { left: 80%; top: 27%; }                 /* the Front Door feed (hosted on .pf-screen) */
.fh-vpn { left: calc(50% + 5.3em); top: .8em; }   /* "Protected" */
.fh-brokers { left: calc(100% - 1.2em); top: 0; } /* the 0 / 611 counter */

/* the card: a fixed layer outside the 3D phone, so it is never skewed */
.fh-card {
  position: fixed; z-index: 1000; left: 0; top: 0; box-sizing: border-box;
  width: min(300px, calc(100vw - 32px)); padding: 16px 44px 16px 18px; border-radius: 14px;
  background: #141416; border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .85);
  color: #a9a9ad; font: 400 14px/1.5 Inter, system-ui, -apple-system, sans-serif; text-align: left; letter-spacing: 0;
  opacity: 0; transform: scale(.98); transform-origin: var(--fh-ox, 50%) var(--fh-oy, 100%);
  transition: opacity .15s ease, transform .15s ease;
}
.fh-card[hidden] { display: none; }
.fh-card.in { opacity: 1; transform: none; }
.fh-card:focus { outline: none; }
.fh-card:focus-visible { outline: 1px solid rgba(244, 244, 241, .45); outline-offset: 2px; }
.fh-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 5px; }
.fh-card .fh-title { margin: 0; max-width: none; font: 600 15.5px/1.3 "Inter Tight", Inter, sans-serif; letter-spacing: -.005em; color: #ececea; }
.fh-tag { font: 600 10px/1 Inter, sans-serif; letter-spacing: .09em; text-transform: uppercase; padding: 4px 7px 3px; border-radius: 99px;
  color: #6fd4ad; border: 1px solid rgba(111, 212, 173, .32); }
.fh-tag[hidden] { display: none; }
.fh-text { margin: 0; color: #a9a9ad; }
.fh-more { display: inline-block; margin-top: 10px; font: 500 14px/1.2 Inter, sans-serif; color: var(--fh-accent, #6fd4ad); text-decoration: none; }
.fh-more:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.fh-more:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; border-radius: 3px; }
.fh-x { position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: transparent; color: #8a8a8f; cursor: pointer; transition: background .15s, color .15s; }
.fh-x:hover { background: rgba(255, 255, 255, .07); color: #d6d6d3; }
.fh-x:focus-visible { outline: 1px solid rgba(244, 244, 241, .6); outline-offset: 0; }
.fh-x svg { width: 12px; height: 12px; }
.fh-arrow { position: absolute; left: 50%; width: 10px; height: 10px; margin-left: -5px; background: #141416; border: 1px solid rgba(255, 255, 255, .09); transform: rotate(45deg); }
.fh-card[data-side="above"] .fh-arrow { bottom: -6px; border-top: 0; border-left: 0; }
.fh-card[data-side="below"] .fh-arrow { top: -6px; border-bottom: 0; border-right: 0; }
.fh-card[data-side="over"] .fh-arrow { display: none; }

@media (prefers-reduced-motion: reduce) {
  .fh-dot::before { animation: none; opacity: .4; transform: scale(1.8); }
  .fh-dot, .fh-dot.is-on, .fh-card { transition: none; }
  .fh-card { transform: none; }
}
