/* The page and the clock: one full-bleed WebGL stage. The controls around it are in ui.css. */
@font-face {
  font-family: "Martian Mono";
  src: url("../vendor/fonts/martian-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --void: #020604;
  --acid: #7cff4f;
  --acid-rgb: 124, 255, 79;
  --ink: rgba(196, 255, 176, 0.78);
  --dim: rgba(196, 255, 176, 0.48);
  --line: rgba(var(--acid-rgb), 0.18);
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--void);
  color: var(--ink);
  overflow: hidden;
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}

/* The page never zooms. The clock takes every touch for the particles, so a page pinched or double-tapped
   bigger (from a control) would leave nowhere to pinch back out. Scrolling inside a card still works:
   pans are allowed, only zooming isn't. */
html { touch-action: pan-x pan-y; }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
  background: var(--void);
}
/* when the pointer rests, the clock has the screen to itself */
body.idle #stage, body.stream #stage { cursor: none; }

/* no WebGL: the time as plain text */
.plain-time { display: none; }
body.plain #stage { display: none; }
body.plain .plain-time, noscript .plain-time {
  position: fixed;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding-inline: 24px;
  text-align: center;
  color: var(--acid);
  font: 500 clamp(40px, 16vw, 200px)/1 var(--mono);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
noscript .plain-time { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.plain-why { display: none; }
body.plain .plain-why {
  display: block;
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 20px);
  left: 0;
  right: 0;
  margin: 0;
  padding-inline: 24px;
  text-align: center;
  color: var(--dim);
  font: 400 11px/1.6 var(--mono);
  letter-spacing: 0.04em;
}
