/* Photos stretched by the scroll: warm paper, a column of photos drawn on a fixed canvas under the words, and one
   variable typeface (Anybody: width 50 to 150, weight 100 to 900) that stretches with the speed too. */
:root {
  --paper: #f3f0e8;    /* the page, and the colour the trails fade into */
  --ink: #141414;      /* the words */
  --muted: #8d887e;    /* the small print */
  --accent: #e2432a;   /* the shutter speed in the corner */
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Anybody Variable', 'Anybody', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* the canvas sits under everything; the page above it is transparent */
.film {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 24px 32px;
  pointer-events: none;
}

.top p {
  margin: 0;
}

.mark {
  font-size: 15px;
  font-variation-settings: 'wght' 640, 'wdth' 92;
  letter-spacing: -0.005em;
}

/* the shutter speed stays in the corner while the page runs, on a scrap of paper */
.shutter {
  position: fixed;
  right: 24px;
  bottom: 22px;
  padding: 7px 10px 6px;
  background: var(--paper);
  font-size: 12px;
  color: var(--muted);
  font-variation-settings: 'wght' 420, 'wdth' 100;
  font-variant-numeric: tabular-nums;
}

.shutter__v {
  display: inline-block;
  min-width: 5.2em;
  text-align: right;
  color: var(--accent);
  font-variation-settings: 'wght' 560, 'wdth' 100;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 48px;
}

.intro {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 10vh;
}

.title {
  margin: 0;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-weight: normal;
  font-variation-settings: 'wght' 720, 'wdth' var(--w, 100);
  white-space: nowrap;
}

.dek {
  max-width: 30ch;
  margin: 22px 0 0;
  font-size: 17px;
  line-height: 1.4;
  color: var(--muted);
  font-variation-settings: 'wght' 420, 'wdth' 100;
}

.roll {
  display: flex;
  flex-direction: column;
  gap: 22vh;
  padding-bottom: 24vh;
}

/* every photo is a slot the script fills on the canvas; the caption sits beside it, at its foot */
.shot {
  position: relative;
  margin: 0;
}

.shot--a {
  width: 46%;
  margin-left: 8%;
}

.shot--b {
  width: 66%;
  margin-left: auto;
}

.shot--c {
  width: 40%;
  margin-left: 42%;
}

.shot__slot {
  width: 100%;
}

.shot__cap {
  position: absolute;
  bottom: 0;
  left: calc(100% + 28px);
  width: 210px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shot--b .shot__cap {
  left: auto;
  right: calc(100% + 28px);
  align-items: flex-end;
  text-align: right;
}

/* the title of a photo: its width follows the speed, like the trail */
.shot__t {
  font-size: 19px;
  line-height: 1.1;
  white-space: nowrap;
  font-variation-settings: 'wght' 600, 'wdth' var(--w, 100);
}

.shot__m {
  font-size: 12px;
  color: var(--muted);
  font-variation-settings: 'wght' 420, 'wdth' 100;
  white-space: nowrap;
}

.end {
  margin: 0;
  padding: 0 0 22vh;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  font-variation-settings: 'wght' 420, 'wdth' 100;
}

@media (max-width: 760px) {
  .top {
    padding: 20px;
  }

  .mark {
    font-size: 14px;
  }

  .shutter {
    right: 14px;
    bottom: 14px;
  }

  .page {
    padding: 0 20px;
  }

  .intro {
    min-height: 66vh;
  }

  .dek {
    font-size: 15px;
  }

  .roll {
    gap: 16vh;
  }

  .shot--a,
  .shot--b,
  .shot--c {
    width: 84%;
    margin-left: 0;
  }

  .shot--b,
  .shot--c {
    margin-left: 16%;
  }

  .shot--b {
    width: 100%;
    margin-left: 0;
  }

  .shot__cap,
  .shot--b .shot__cap {
    position: static;
    width: auto;
    margin-top: 12px;
    align-items: flex-start;
    text-align: left;
  }

  .shot__t {
    font-size: 17px;
  }
}
