/* External modem on the desk left of the monitor, in its shadow. Only the
   lights glow. Wide landscape screens only, like the tikkenteller. */
.modem { display: none; }
@media (min-width: 1150px) and (orientation: landscape) {
  .modem {
    --u: min(1.4px, (50vw - min(500px, 37vw) - 30px) / 120);
    display: block; position: fixed; z-index: 1; bottom: 8vh;
    right: calc(50% + min(500px, 37vw) + 10 * var(--u));
    width: calc(112 * var(--u)); height: calc(34 * var(--u));
    font: 700 max(5.5px, calc(4.2 * var(--u)))/1 Helvetica, Arial, sans-serif; letter-spacing: .04em;
  }
  /* Top of the case, seen slightly from above */
  .modem::before {
    content: ''; position: absolute; left: calc(3 * var(--u)); right: calc(3 * var(--u));
    bottom: 100%; height: calc(9 * var(--u));
    background: linear-gradient(#26251f, #34332c);
    clip-path: polygon(4% 0, 96% 0, 100% 100%, 0 100%);
  }
  .modem .face {
    position: absolute; inset: 0; border-radius: calc(2 * var(--u)) calc(2 * var(--u)) calc(4 * var(--u)) calc(4 * var(--u));
    background: linear-gradient(100deg, #1c1b17, #2e2d27 35%, #24231e 80%, #141410);
    --shade: inset 0 1px 0 rgba(255, 255, 255, .06), 0 calc(6 * var(--u)) calc(12 * var(--u)) rgba(0, 0, 0, .7);
    box-shadow: inset calc(-6 * var(--u)) 0 calc(8 * var(--u)) calc(-5 * var(--u)) color-mix(in srgb, var(--glow) 30%, transparent),
      var(--shade);
  }
  .poweroff .modem .face { box-shadow: var(--shade); }
  .modem .name {
    position: absolute; left: calc(7 * var(--u)); top: calc(6 * var(--u));
    color: #5c5b53; letter-spacing: .1em;
  }
  .modem .lights {
    position: absolute; left: calc(6 * var(--u)); right: calc(6 * var(--u)); bottom: calc(6 * var(--u));
    display: flex; justify-content: space-between;
    padding: calc(3 * var(--u)) calc(3 * var(--u)) calc(2.5 * var(--u));
    border-radius: calc(1.5 * var(--u)); background: #0b0b09; box-shadow: inset 0 1px 2px #000;
  }
  .modem .lights span { display: flex; flex-direction: column; align-items: center; gap: calc(2.5 * var(--u)); color: #5c5b53; }
  .modem i {
    display: block; width: calc(5 * var(--u)); height: calc(3 * var(--u)); border-radius: 1px;
    background: #2a0c0a; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .6);
  }
  .modem i.on { background: #ff3b2f; box-shadow: 0 0 calc(4 * var(--u)) #ff3b2f, 0 0 calc(10 * var(--u)) rgba(255, 59, 47, .45); }
}
