/* Lastic.fit landing: black lines on white. The canvas fills the viewport behind the text. */
:root {
  --bg: #F3EBE1;
  --ink: #231A15;
  --ink-soft: #6B5B50;
  --gutter: 16px;
  --font-mark: "Barlow Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Source Sans 3", "Source Sans Pro", "Segoe UI", Frutiger, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --size-mark: clamp(30px, 3vw, 44px);
  --size-line: clamp(18px, 1.5vw, 23px);
  --size-small: 16px;
  --fade: 1.2s;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
}
body {
  font-family: var(--font-text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

#c {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 0;
  cursor: crosshair;
  touch-action: none;
}

/* text sits over the canvas but lets the pointer through to it */
.top, .foot {
  position: fixed;
  z-index: 1;
  pointer-events: none;
}

/* top row: the wordmark left, the hint right on the same baseline */
.top {
  top: max(var(--gutter), env(safe-area-inset-top));
  left: max(var(--gutter), env(safe-area-inset-left));
  right: max(var(--gutter), env(safe-area-inset-right));
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gutter);
}

.mark {
  flex: none;
  margin: 0;
  font: 500 var(--size-mark)/1 var(--font-mark);
  letter-spacing: 0.01em;
}

.hint {
  min-width: 0;
  margin: 0;
  font-size: var(--size-small);
  line-height: 1.3;
  color: var(--ink-soft);
  text-align: right;
  text-wrap: balance;
  opacity: 0;
  transition: opacity var(--fade) ease;
}
.hint.on { opacity: 1; }

/* two rows: the line over "Coming soon."; the readout at the right, on the bottom row */
.foot {
  left: max(var(--gutter), env(safe-area-inset-left));
  right: max(var(--gutter), env(safe-area-inset-right));
  bottom: max(var(--gutter), env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--gutter);
  align-items: end;
}
.say { display: contents; }
.say p { margin: 0; }
.line {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--size-line);
  line-height: 1.3;
}
.soon {
  grid-column: 1;
  grid-row: 2;
  margin-top: 2px;
  font-size: var(--size-small);
  line-height: 1.3;
  color: var(--ink-soft);
}

.meter {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font: 400 var(--size-small)/1.3 var(--font-mono);
  color: var(--ink-soft);
  white-space: nowrap;
}
.again {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fade) ease, visibility 0s linear var(--fade);
}
.again.on {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--fade) ease;
}
.again:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* phone: the line takes the full width; "scan again" sits left of the readout */
@media (max-width: 600px) {
  .line { grid-column: 1 / -1; }
  .meter {
    grid-row: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint, .again, .again.on { transition: none; }
}
/* the hint is off on the FootScan site; the scan percentage stays */
#hint { display: none !important; }
@media (prefers-color-scheme: dark) { :root { --bg: #171311; --ink: #F3EBE1; --ink-soft: #B5A595; } }
