/* The clock dial menu: a minimal navigation piece. A warm white page, a menu set on the face of a clock at the
   bottom of the screen, two hairline hands and one vermilion pin. The script places the words on an ellipse and
   draws the ticks; the CSS only sets colours and type. */
:root {
  --paper: #f6f3ec;   /* the page */
  --ink: #161412;     /* the words and the hands */
  --muted: #8f897e;   /* the small captions */
  --line: rgba(22, 20, 18, 0.42); /* the hands and the ticks */
  --accent: #d2432a;  /* the pin and the tick in front */
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Fraunces Variable', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.top {
  position: absolute;
  top: clamp(14px, 3.2vh, 32px);
  left: clamp(16px, 3vw, 40px);
  right: clamp(16px, 3vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: clamp(11px, 1.1vw, 14px);
  letter-spacing: 0.02em;
}

.brand {
  font-style: italic;
  font-variation-settings: 'wght' 520, 'opsz' 24;
  font-size: 1.25em;
}

.what {
  color: var(--muted);
  font-variation-settings: 'wght' 360, 'opsz' 12;
}

.dial {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.rim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.rim line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.rim .horizon {
  stroke: rgba(22, 20, 18, 0.12);
}

.rim .front {
  stroke: var(--accent);
}

.items {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
}

.item {
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.item button {
  display: grid;
  border: 0;
  padding: 0.2em 0.3em;
  margin: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 0.9;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.item button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
}

/* the category label and the page label sit on top of each other in the same cell */
.item .cat,
.item .page {
  grid-area: 1 / 1;
  justify-self: center;
}

.item .page {
  opacity: 0;
}

.clock {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hand,
.pin {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 999px;
}

.hand {
  height: 1px;
  background: var(--line);
  transform-origin: 0 50%;
}

.pin {
  background: var(--accent);
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(14px, 4vh, 40px);
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.02em;
  font-variation-settings: 'wght' 360, 'opsz' 12;
}
