/* Both loops share one crop, so revealing Foxy keeps the scene in place. */
.home-background {
  --reveal-x: 74vw;
  --reveal-y: 42vh;
  --reveal-radius: 0px;
  --scene-position: center;
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none;
  background: var(--night);
}

.home-background__layer,
.home-background__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-background__layer {
  background-size: cover;
  background-position: var(--scene-position);
}

.home-background__layer--foxy {
  background-image: url("assets/video/home/foxy-poster.webp");
}

.home-background__layer--marcos {
  z-index: 1;
  background-image: url("assets/video/home/marcos-poster.webp");
  -webkit-mask-image: radial-gradient(circle at var(--reveal-x) var(--reveal-y), transparent 0, transparent calc(var(--reveal-radius) * 0.55), rgba(0, 0, 0, 0.4) calc(var(--reveal-radius) * 0.78), #000 var(--reveal-radius));
  mask-image: radial-gradient(circle at var(--reveal-x) var(--reveal-y), transparent 0, transparent calc(var(--reveal-radius) * 0.55), rgba(0, 0, 0, 0.4) calc(var(--reveal-radius) * 0.78), #000 var(--reveal-radius));
}

.home-background__video {
  object-fit: cover;
  object-position: var(--scene-position);
}

/* The image owns the scene; the quiet left and lower edges belong to the copy. */
.home-background::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    linear-gradient(to right, rgba(18, 9, 9, 0.96), rgba(18, 9, 9, 0.9) 32%, rgba(18, 9, 9, 0.68) 46%, rgba(18, 9, 9, 0.22) 60%, rgba(18, 9, 9, 0.06) 72%),
    linear-gradient(to top, rgba(18, 9, 9, 0.85), transparent 38%);
}

/* Retain the thermal door feedback over the videos without covering them. */
body.has-home-video .thermal {
  opacity: 0.24;
  mix-blend-mode: screen;
  pointer-events: none;
}

body.has-home-video .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.home-background-hint {
  color: var(--ink-soft);
  font: 400 0.75rem/1.4 var(--font-display);
  letter-spacing: 0;
}

@media (max-width: 820px) {
  .home-background {
    --scene-position: 76% center;
  }

  .home-background::after {
    background:
      linear-gradient(to right, rgba(18, 9, 9, 0.97), rgba(18, 9, 9, 0.9) 48%, rgba(18, 9, 9, 0.65)),
      linear-gradient(to top, rgba(18, 9, 9, 0.9), transparent 65%);
  }

  body.has-home-video .spot-readout {
    display: none;
  }

  .home-background-hint {
    max-width: 22ch;
    text-align: right;
  }
}

