/* The gyroscope rings: three hairline rings nested like a gimbal on warm paper. They spin and come to rest facing
   you; the name of the maker lands in the middle. The script sets --size (the outer ring, in pixels). */
:root {
  --paper: #f3f0e8;    /* the page */
  --ink: #141414;      /* the rings and the name */
  --accent: #e8431f;   /* the one tick at the top of the inner ring, once everything rests */
  --soft: #8d887e;     /* the small lines of type */
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Archivo Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.stage {
  position: fixed;
  inset: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* the scene is a point in the middle of the page, with the perspective on it */
.scene {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 0;
  height: 0;
  perspective: calc(var(--size, 500px) * 2.6);
  perspective-origin: 0 0;
}

.gimbal,
.ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

/* every ring is drawn centred on its point; the outer one is --size wide, the others smaller */
.ring__face {
  position: absolute;
  overflow: visible;
  backface-visibility: visible;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
}

.ring__face .mark {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0;
}

/* the name, set on the width and weight axes of Archivo; the script moves each letter */
.name {
  position: absolute;
  left: 50%;
  top: 47%;
  margin: 0;
  display: flex;
  translate: -50% -56%;
  font-size: calc(var(--size, 500px) * 0.13);
  font-weight: 400;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.name span {
  display: block;
  opacity: 0;
  font-variation-settings: 'wght' var(--w, 200), 'wdth' var(--d, 125);
}

.under {
  position: absolute;
  left: 50%;
  top: calc(47% + var(--size, 500px) * 0.075);
  margin: 0;
  translate: -50% 0;
  padding-left: 0.32em;
  font-size: max(9px, calc(var(--size, 500px) * 0.021));
  font-weight: 460;
  font-variation-settings: 'wdth' 118;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--soft);
  opacity: 0;
}

/* the one control: a quiet line of type at the bottom; on hover the word widens */
.again {
  position: absolute;
  left: 50%;
  bottom: max(18px, 3.2vh);
  translate: -50% 0;
  padding: 10px 16px;
  border: 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 11px;
  font-weight: 460;
  font-variation-settings: 'wdth' 108;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: font-variation-settings 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s ease;
}

.again:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) {
  .again:hover {
    color: var(--ink);
    font-variation-settings: 'wdth' 125;
  }
}
