:root {
  --bg: #dcdbd6;
  --ink: #000000;
  --blue: #012f8d;
  --quiet: #8f8d88;
  --display: "League Spartan", system-ui, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--blue); color: var(--bg); }
:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; }

/* header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px var(--gutter);
  pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.logo { position: relative; display: block; width: clamp(104px, 11vw, 150px); line-height: 0; }
.logo img { width: 100%; height: auto; transition: opacity 200ms ease; }
.logo .logo-blue { position: absolute; inset: 0; opacity: 0; }
.logo:hover .logo-blue, .logo.tapped .logo-blue { opacity: 1; }
.logo:hover .logo-black, .logo.tapped .logo-black { opacity: 0; }

.site-nav { display: flex; gap: 0.5em; font-size: 13px; letter-spacing: 0.02em; }
.site-nav .dot { color: var(--quiet); }
.site-nav a { transition: color 200ms ease; }
.site-nav a:hover, .site-nav a.active, .site-nav a.tapped { color: var(--blue); }

/* page shell */
#app { min-height: 100vh; }
.view { opacity: 0; transition: opacity 500ms ease; }
.view.in { opacity: 1; }
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 160px var(--gutter) 120px;
}
.page-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 72px;
}

/* home: randomizer */
.home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--gutter) 80px;
  text-align: center;
  transition: opacity 900ms ease;
}
.home.out { opacity: 0; }
.randomizer { width: 100%; max-width: 1100px; }
.prompt { font-size: 14px; margin: 0 0 36px; color: var(--ink); }
.sentence {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin: 0 auto;
  max-width: 22em;
}
.slot {
  display: inline-block;
  vertical-align: top;
  height: 1.3em;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  transition: width 500ms var(--ease);
}
.slot.landed { display: inline; height: auto; overflow: visible; white-space: normal; border: 0; }
.slot.landed .final { border-bottom: 1px solid currentColor; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.reel { display: block; will-change: transform; }
.reel span { display: block; height: 1.3em; line-height: 1.3em; text-align: left; }
.rig-input {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  padding: 0;
  width: 11em;
  max-width: 100%;
  outline: none;
}
.rig-input::placeholder { color: var(--quiet); }

.after { min-height: 56px; margin-top: 24px; }
.response, .odds { margin: 0; opacity: 0; transition: opacity 600ms ease; }
.response { font-size: 16px; }
.odds { font-size: 12px; color: var(--quiet); margin-top: 6px; }
.response.show, .odds.show { opacity: 1; }

.actions { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.btn {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 400;
  padding: 12px 26px;
  border: 1px solid var(--ink);
  transition: color 200ms ease, border-color 200ms ease;
}
.btn:hover, .btn.tapped { color: var(--blue); border-color: var(--blue); }
.btn[disabled] { opacity: 0.4; cursor: default; }
.quiet-link { font-size: 12px; color: var(--quiet); transition: color 200ms ease; }
.quiet-link:hover, .quiet-link.tapped { color: var(--blue); }

/* word wall */
.wall {
  min-height: 100vh;
  padding: 130px var(--gutter) 120px;
  font-size: clamp(17px, 2.1vw, 30px);
  line-height: 1.95;
  font-weight: 400;
  color: var(--quiet);
}
.wall .w {
  display: inline;
  white-space: nowrap;
  margin-right: 1.4em;
  cursor: pointer;
  opacity: 0;
  animation: wordIn 900ms ease forwards;
  transition: color 200ms ease;
}
.wall .w:hover, .wall .w.lit, .wall .w:focus-visible { color: var(--blue); outline: none; }
@keyframes wordIn { to { opacity: 1; } }
.pick-one {
  position: fixed;
  right: var(--gutter);
  bottom: 22px;
  font-size: 11px;
  color: var(--ink);
  margin: 0;
  opacity: 0;
  animation: wordIn 900ms ease 2.4s forwards;
}

/* about: timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 1px solid var(--ink); }
.stop {
  position: relative;
  margin: 0 0 88px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms ease, transform 900ms var(--ease);
}
.stop.in { opacity: 1; transform: none; }
.stop::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.stop-head { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.15; }
.stop-year { display: block; font-size: 14px; letter-spacing: 0.04em; margin-bottom: 8px; }
.stop-heading { display: block; font-size: clamp(26px, 3.2vw, 36px); letter-spacing: -0.01em; }
.stop-role { font-size: 13px; color: var(--quiet); margin: 8px 0 0; }
.stop-body p { margin: 16px 0 0; max-width: 34em; }
.stop.now .stop-body p { font-family: var(--display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.25; margin-top: 10px; }
.names { margin: 18px 0 0; font-size: 13px; color: var(--quiet); }
.names .n { cursor: default; transition: color 200ms ease; }
.names .n:hover, .names .n.on { color: var(--blue); }

/* writing */
.posts { list-style: none; margin: 0; padding: 0; }
.post { margin: 0 0 52px; }
.post a { display: block; }
.post-title, .post-meta { text-transform: lowercase; }
.post-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  transition: color 200ms ease;
}
.post a:hover .post-title, .post a.tapped .post-title { color: var(--blue); }
.post-meta { margin: 8px 0 0; font-size: 14px; color: var(--quiet); }
.post-meta .date { margin-right: 0.8em; }
.loading { color: var(--quiet); font-size: 14px; }
.subscribe { display: inline-block; margin-top: 24px; font-size: 15px; border-bottom: 1px solid currentColor; transition: color 200ms ease; }
.subscribe:hover, .subscribe.tapped { color: var(--blue); }

/* contact */
.intro { font-size: 17px; margin: -40px 0 48px; }
.form { display: grid; gap: 30px; }
.field { display: grid; gap: 8px; }
.field label { font-size: 12px; color: var(--quiet); letter-spacing: 0.02em; }
.field input, .field textarea {
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 6px 0 10px;
  outline: none;
  transition: border-color 200ms ease;
  width: 100%;
}
.field textarea {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.3;
  min-height: 7em;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--blue); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; margin-top: 8px; }
.form-error { font-size: 13px; color: var(--quiet); margin: 0; }
.done { font-family: var(--display); font-size: clamp(36px, 5vw, 60px); margin: 0; }

@media (max-width: 640px) {
  .site-header { padding: 20px 16px; }
  .page { padding: 120px 16px 96px; }
  .home { padding: 100px 16px 64px; }
  .page-title { margin-bottom: 52px; }
  .intro { margin-top: -28px; }
  .wall { padding: 100px 16px 96px; line-height: 2.1; }
  .wall .w { margin-right: 1.2em; }
  .stop { margin-bottom: 72px; }
  .timeline { padding-left: 22px; }
  .stop::before { left: -26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-delay: 0ms !important; }
}
