/* The photo sorted by light: warm paper, one photo in the middle and a short caption under it, in a variable
   typeface (Instrument Sans, width 75 to 100 and weight 400 to 700). The photo is drawn chip by chip on a canvas. */
:root {
  --paper: #f3f0e8;    /* the page, and the thin gaps between the chips once they are sorted */
  --ink: #141414;      /* the caption and the word of the state the photo is in */
  --muted: #8f897e;    /* the word of the other state */
  --accent: #e2432a;   /* the hairline that sorts the columns */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans Variable', 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mark {
  position: absolute;
  top: 26px;
  left: 32px;
  margin: 0;
  font-size: 15px;
  font-weight: 640;
  font-variation-settings: 'wdth' 88;
  letter-spacing: -0.01em;
}

/* the script writes left, top, width and height */
.plate {
  position: absolute;
  margin: 0;
  visibility: hidden;
  cursor: pointer;
}

.plate.is-ready {
  visibility: visible;
}

.chips {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* the hairline that passes over the photo: a little longer than the photo, like a ruler laid across it */
.head {
  position: absolute;
  left: 0;
  top: -16px;
  width: 1px;
  height: calc(100% + 32px);
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.cap {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.cap__title {
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  white-space: nowrap;
  font-variation-settings: 'wght' 560, 'wdth' 92;
}

.cap__state {
  display: flex;
  gap: 14px;
  font-size: 13px;
  white-space: nowrap;
}

/* the two states: the script moves the weight and the width from one word to the other */
.cap__word {
  --g: 400;
  --w: 100;
  color: var(--muted);
  font-variation-settings: 'wght' var(--g), 'wdth' var(--w);
}

@media (max-width: 640px) {
  .mark {
    top: 20px;
    left: 20px;
    font-size: 14px;
  }

  .cap {
    margin-top: 14px;
    gap: 10px;
  }

  .cap__title {
    font-size: 19px;
  }

  .cap__state {
    gap: 10px;
    font-size: 12px;
  }
}
