/* The voyage stage: the first screen, and the scroll playback that runs in it.
   Tokens come from styles.css. The strip along its bottom is in strip.css. */
@font-face {
  font-family: "Barlow Condensed";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/BarlowCondensed-SemiBold.woff2") format("woff2");
}

:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Without script, and for a visitor who prefers reduced motion, the stage is
   one screen high and shows the finished voyage. Only a page that is playing
   (script has set .is-playing) is tall and sticky. */
.stage {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  min-height: calc(100svh - var(--bar));
  padding: 28px var(--gutter) 0;
  overflow: hidden;
}

.is-playing {
  position: relative;
  height: 600svh;
}

.is-playing .stage {
  position: sticky;
  top: var(--bar);
  height: calc(100svh - var(--bar));
}

/* The page is about to play: hold back what the script will redraw, so a visitor
   never sees the finished counters jump to zero. If the script never arrives,
   they appear after two seconds. */
.will-play .meta p,
.will-play .counters,
.will-play .caption,
.will-play .strip {
  visibility: hidden;
  animation: show-anyway 0s linear 2s forwards;
}

@keyframes show-anyway {
  to {
    visibility: visible;
  }
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}

.meta p {
  font-size: 14px;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px 64px;
  align-self: center;
}

.pitch .lede {
  margin: 20px 0 28px;
}

/* Counters: three flat digit windows, in Barlow Condensed. */
.counters {
  display: grid;
  gap: 20px;
}

.counter {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  gap: 0 16px;
}

.counter dt {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 18px;
  color: var(--muted);
}

.counter dd {
  position: relative;
}

.counter small {
  font-size: 13px;
  line-height: 18px;
  color: var(--faint);
}

.digits {
  display: flex;
  gap: 3px;
  font-family: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  font-size: clamp(36px, 4.4vw, 64px);
  font-weight: 600;
  line-height: 1;
}

.digits i {
  display: block;
  width: 0.62em;
  padding: 0.12em 0;
  border-top: 1px solid var(--seam-strong);
  border-bottom: 1px solid var(--seam-strong);
  background: var(--pane);
  color: var(--accent-text);
  font-style: normal;
  text-align: center;
}

.digits i.dot {
  width: 0.25em;
  border-color: transparent;
  background: none;
  color: var(--muted);
}

.digits i.lead {
  color: #3a3f47;
}

.caption {
  min-height: 64px;
  max-width: 58ch;
  margin-bottom: 4px;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pitch .lede {
    margin: 8px 0 16px;
  }

  .stage {
    gap: 12px;
    padding-top: 12px;
  }

  .counters {
    grid-template-columns: repeat(3, auto);
    justify-content: start;
    gap: 12px 16px;
  }

  .counter {
    grid-template-columns: 1fr;
  }

  .counter dt,
  .counter small {
    font-size: 11px;
    line-height: 14px;
  }

  .counter dt {
    margin-bottom: 4px;
  }

  .digits {
    gap: 2px;
    font-size: 26px;
  }

  .caption {
    min-height: 70px;
    margin-bottom: 0;
    font-size: 16px;
  }
}

/* A short window (a laptop, or a phone with its browser bars showing): the same
   stage, tighter, so the caption and the strip still fit under the counters. */
@media (max-height: 800px) {
  .stage {
    gap: 8px;
    padding-top: 16px;
  }

  .pitch h1 {
    font-size: clamp(30px, 3.4vw, 46px);
  }

  .pitch .lede {
    margin: 12px 0 16px;
    font-size: 16px;
    line-height: 24px;
  }

  .digits {
    font-size: clamp(30px, 3.6vw, 46px);
  }

  .counters {
    gap: 10px;
  }

  .caption {
    min-height: 56px;
    font-size: 18px;
  }
}

@media (max-height: 800px) and (max-width: 900px) {
  .pitch h1 {
    font-size: 26px;
  }

  .caption {
    min-height: 66px;
    font-size: 15px;
    line-height: 1.35;
  }
}

/* A small, short phone: drop the notes under the counters and strip. The same
   facts are in the table below and in the text alternatives. */
@media (max-height: 760px) and (max-width: 900px) {
  .counter small,
  .strip .note {
    display: none;
  }

  .stage {
    gap: 6px;
  }

  .pitch .lede {
    margin: 6px 0 10px;
    font-size: 14px;
    line-height: 20px;
  }
}
