/* The word with the day's shadow: one word on warm paper, its long flat shadow drawn in hairline hatching, a thin
   arc for the sky and one vermilion sun. The word is set in Anybody, a variable sans with a very wide width axis
   (50 to 150) and a weight axis (100 to 900): low sun, wide and light letters; high sun, narrow and heavy ones. */
:root {
  --paper: #f3f0e8;              /* the page */
  --ink: #141414;                /* the word and the hatching */
  --grey: #8d887e;               /* the small texts */
  --rule: rgba(20, 20, 20, 0.2); /* the arc of the sky and the ground */
  --tick: rgba(20, 20, 20, 0.34); /* the hour ticks */
  --accent: #ff4a1c;             /* the sun */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Anybody Variable', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  --pad: clamp(16px, 4.6vw, 64px);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100svh;
  min-height: 420px;
  padding: clamp(18px, 3.2vw, 38px) var(--pad) clamp(16px, 2.8vw, 32px);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  outline: none;
}

/* ---------------------------------------------------------------- the top line */
.top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 14px;
  letter-spacing: 0.005em;
}

.top p {
  margin: 0;
}

.time {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.time__digits {
  font-weight: 620;
  font-stretch: 92%;
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.time__phase {
  display: inline-block;
  overflow: hidden;
  padding: 0 2px;
  margin: 0 -2px;
  vertical-align: bottom;
  line-height: 1.25;
}

.time__word {
  display: inline-block;
  color: var(--grey);
  font-weight: 430;
}

.top__note {
  color: var(--grey);
  text-align: right;
}

.stage:focus-visible .arc {
  stroke: var(--ink);
}

/* ---------------------------------------------------------------- the scene */
.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.arc,
.ground {
  fill: none;
  stroke: var(--rule);
  stroke-width: 1;
}

.ticks line {
  stroke: var(--tick);
  stroke-width: 1;
}

.ticks line.is-noon {
  stroke: var(--ink);
}

.shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.horizon {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--base, 60%);
  overflow: hidden;
  pointer-events: none;
}

.word {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--word-top, 40%);
  font-size: var(--size, 160px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  color: var(--ink);
  font-kerning: normal;
}

.word__l {
  display: inline-block;
  will-change: transform;
}

.word__base {
  display: inline-block;
  width: 0;
  height: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sun circle {
  fill: var(--paper);
  stroke: var(--accent);
  stroke-width: 2;
}

/* ---------------------------------------------------------------- the hint */
.hint {
  position: relative;
  z-index: 1;
  grid-row: 3;
  justify-self: center;
  margin: 0;
  font-size: 13px;
  color: var(--grey);
  letter-spacing: 0.01em;
}

@media (max-width: 560px) {
  .top {
    font-size: 12.5px;
  }

  .time__digits {
    font-size: 13.5px;
  }

  .hint {
    font-size: 12px;
  }
}
