:root {
  --paper: #f7f0e3;
  --ink: #241d16;
  --dim: #a2937c;
  --red: #c0182c;
  --gold: #e0a11d;
  --dark: #141010;
  --step: 112px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  padding: 2rem 1rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-items: center;
  background: var(--paper);
  color: var(--ink);
  font:
    400 20px/1.5 ui-rounded,
    'SF Pro Rounded',
    'Hiragino Maru Gothic ProN',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  text-align: center;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.say {
  align-self: end;
  padding-bottom: 2.8rem;
  display: grid;
  gap: 0.6rem;
  justify-items: center;
}
.mid {
  display: grid;
  justify-items: center;
  width: 100%;
}
.foot {
  align-self: start;
  padding-top: 2.8rem;
  display: grid;
  gap: 1.1rem;
  justify-items: center;
}

p {
  margin: 0;
  font-size: 1.2rem;
  text-wrap: balance;
  max-width: 24rem;
}
p.small {
  font-size: 0.95rem;
  color: var(--dim);
}
em {
  font-style: normal;
  border-bottom: 2px solid var(--red);
}

.trail {
  position: relative;
  width: 100vw;
  height: 132px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.strip {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  transform: translate(calc(-1 * var(--i) * var(--step) - var(--step) / 2), -50%);
}
.strip::before {
  content: '';
  position: absolute;
  left: -60vw;
  right: -60vw;
  top: 50%;
  border-top: 3px dotted #dbcbac;
}

.c {
  position: relative;
  flex: 0 0 var(--step);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  font-size: 34px;
  line-height: 1;
  text-decoration: none;
  color: inherit;
  opacity: 0.3;
  filter: grayscale(0.7);
  transition: transform 0.18s ease;
}
.c .g {
  display: block;
}

.c:nth-child(2n) {
  margin-top: -14px;
}
.c:nth-child(3n) {
  margin-top: 12px;
}
.c:nth-child(5n) {
  margin-top: -6px;
}

.c.e {
  opacity: 0.14;
  filter: grayscale(1);
  font-size: 26px;
}

.c.next {
  opacity: 1;
  filter: none;
  font-size: 44px;
  margin-top: 0;
}
.c.next .g {
  animation: bob 2.6s ease-in-out infinite;
}
.c.next:hover,
.c.next:focus-visible {
  transform: translateY(-7px) scale(1.12);
  outline: none;
}
@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
  }
  50% {
    transform: translateY(-9px) rotate(7deg);
  }
}

.next ~ .c {
  opacity: 0.55;
  font-size: 31px;
}
.next ~ .c ~ .c {
  opacity: 0.4;
  font-size: 28px;
}
.next ~ .c ~ .c ~ .c {
  opacity: 0.28;
  font-size: 25px;
}
.next ~ .c ~ .c ~ .c ~ .c {
  opacity: 0.18;
  font-size: 22px;
}

.c b {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.35rem;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  color: var(--red);
  border-bottom: 2px solid var(--red);
  padding-bottom: 1px;
}

.c.hole {
  filter: none;
  opacity: 1;
}
.c.hole .g {
  width: 78px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(60% 70% at 50% 25%, #2c211b, #0f0b09 72%);
  opacity: 0.5;
}

nav a {
  color: var(--dim);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 2px solid #e0d3ba;
  padding-bottom: 1px;
  transition: color 0.15s;
}
nav a::before {
  content: '→ ';
  color: #e0d3ba;
}
nav a:hover,
nav a:focus-visible {
  color: var(--ink);
  outline: none;
}

nav.big a {
  font-size: 1.08rem;
  color: var(--ink);
  border-bottom-color: var(--red);
}
nav.big a::before {
  color: var(--red);
}
nav.big a:hover {
  color: var(--red);
}

body.void {
  background: #000;
}
nav.tiny {
  margin: -1rem;
}
nav.tiny a {
  display: inline-block;
  white-space: nowrap;
  font-size: 9px;
  line-height: 1;
  color: #2e2e2e;
  border: 0;
  letter-spacing: 0.04em;
  padding: 1rem;
}
nav.tiny a::before {
  content: none;
}
nav.tiny a:hover,
nav.tiny a:focus-visible {
  color: #6b6b6b;
}

body.dark {
  background: var(--dark);
  color: #eadfcb;
}
body.dark em {
  border-bottom-color: var(--gold);
}
body.dark p.small {
  color: #8b8171;
}
body.dark nav a {
  color: #8b8171;
  border-bottom-color: #39312a;
}
body.dark nav a::before {
  color: #39312a;
}
body.dark nav a:hover {
  color: #eadfcb;
}
body.dark nav.big a {
  color: #eadfcb;
  border-bottom-color: var(--gold);
}
body.dark nav.big a::before {
  color: var(--gold);
}
body.dark nav.big a:hover {
  color: var(--gold);
}

.pit {
  width: min(16rem, 64vw);
  height: 6.5rem;
  border-radius: 50%;
  background: radial-gradient(60% 70% at 50% 22%, #2c211b, #0b0807 70%);
}
.sky {
  width: min(16rem, 64vw);
  height: 5rem;
  border-radius: 50%;
  background: radial-gradient(60% 80% at 50% 62%, #8fa9b4, #1c1714 74%);
}
.big {
  font-size: clamp(3rem, 15vw, 4.4rem);
  line-height: 1;
  animation: bob 3.4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
