/* ==========================================================================
   PLACEHOLDER for the hero video/GIF.
   The Sport Box device — a CSS 3D box with a working "LED" screen.
   Sized by its container width; everything inside uses cqw units.
   Swap for a real product video/render later — the slots stay the same.
   ========================================================================== */

.device-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
}

.device {
  --depth: 1.8cqw;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  container-type: inline-size;
  transform-style: preserve-3d;
}

/* hero pose: standing on the desk, leaning back a little, turned towards the text */
.device--hero { transform: rotateX(4deg) rotateY(24deg); }

/* ---------- faces ---------- */

.device__face {
  position: absolute;
  inset: 0;
  border-radius: 0.7cqw;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.device__face--front {
  transform: translateZ(var(--depth));
  /* thin matte black frame, like the real Race Display */
  background: linear-gradient(160deg, #1c1c1c 0%, #0d0d0d 40%, #060606 100%);
  box-shadow:
    inset 0 0 0 0.12cqw rgba(255, 255, 255, 0.09),
    inset 0 0.2cqw 0 rgba(255, 255, 255, 0.1);
}

.device__face--back {
  display: grid;
  place-items: center;
  transform: rotateY(180deg) translateZ(var(--depth));
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 0.5cqw, transparent 0.5cqw 1.4cqw) center 70% / 40% 8% no-repeat,
    linear-gradient(150deg, #262626 0%, #111 45%, #090909 100%);
  box-shadow: inset 0 0 0 0.15cqw rgba(255, 255, 255, 0.08);
}

.device__brand {
  font-family: var(--font-display);
  font-size: 7cqw;
  letter-spacing: 0.06em;
  color: #2c2c2c;
  text-shadow: 0 0.15cqw 0 rgba(255, 255, 255, 0.06);
}

/* sides give it real thickness while spinning */
.device__side {
  position: absolute;
  background: linear-gradient(90deg, #0b0b0b, #1d1d1d 50%, #0b0b0b);
}

.device__side--l,
.device__side--r {
  top: 0.7cqw;
  bottom: 0.7cqw;
  left: 50%;
  width: calc(var(--depth) * 2);
  margin-left: calc(var(--depth) * -1);
}

.device__side--l { transform: translateX(-50cqw) rotateY(-90deg); }
.device__side--r { transform: translateX(50cqw) rotateY(90deg); }

.device__side--t,
.device__side--b {
  left: 0.7cqw;
  right: 0.7cqw;
  top: 50%;
  height: calc(var(--depth) * 2);
  margin-top: calc(var(--depth) * -1);
  background: linear-gradient(180deg, #0b0b0b, #1d1d1d 50%, #0b0b0b);
}

.device__side--t { transform: translateY(-25cqw) rotateX(90deg); }
.device__side--b { transform: translateY(25cqw) rotateX(-90deg); }

/* ---------- LED screen ---------- */

.device__screen {
  position: absolute;
  inset: 1.1cqw;                         /* almost edge-to-edge LEDs */
  overflow: hidden;
  border-radius: 0.3cqw;
  /* unlit LEDs: dull grey dots on a black mask, same grid as the mask in ::after */
  background:
    radial-gradient(circle, #2b2b2b 0 0.24cqw, transparent 0.3cqw) 0 0 / 0.72cqw 0.72cqw,
    #000;
  color: #fff;
  font-family: "Silkscreen", var(--font-mono);   /* blocky pixel font, like the real screen */
  font-weight: 700;
  text-transform: uppercase;
}

/* dot-matrix mask: turns any text into LEDs */
.device__screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle, transparent 0 0.24cqw, #000 0.34cqw) 0 0 / 0.72cqw 0.72cqw;
  pointer-events: none;
}

/* glass reflection */
.device__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, transparent 38%);
  pointer-events: none;
}

.s {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 4.5cqw 5.5cqw;
  opacity: 0;
  transition: opacity 0.3s steps(3);
}

.s.is-active { opacity: 1; }

.s__top,
.s__bottom {
  display: flex;
  justify-content: space-between;
  font-size: 4.6cqw;
  line-height: 1;
  letter-spacing: 0.02em;
}

.s__top { color: rgba(255, 255, 255, 0.8); }

.s__bottom {
  justify-content: center;
  color: var(--c-accent);
  text-shadow: 0 0 1.2cqw rgba(212, 255, 0, 0.7);
}

.s__score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4cqw;
  line-height: 1;
}

.s__team {
  font-size: 5.6cqw;
  color: var(--team, #fff);
  text-shadow: 0 0 1.4cqw var(--team, #fff);
}

.s__num {
  font-size: 10cqw;
  text-shadow: 0 0 1.6cqw rgba(255, 255, 255, 0.6);
}

.s__dash {
  font-size: 5cqw;
  color: rgba(255, 255, 255, 0.4);
}

.s__big {
  display: grid;
  place-items: center;
  font-size: 17cqw;
  line-height: 1;
  color: var(--c-accent);
  text-shadow: 0 0 2cqw rgba(212, 255, 0, 0.8);
}

.s.is-active .s__big { animation: led-blink 0.5s steps(1) 3; }

@keyframes led-blink {
  50% { opacity: 0.15; }
}
