@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("/fonts/ZenKakuGothicNew-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #fafbfc;
  color: #111;
  font: .75rem/1.5 "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN",
    "Yu Gothic", Meiryo, sans-serif;
}

.flyer {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template:
    ". previous ." 1.5em
    "date letter transition" 1fr
    ". next ." 1.5em
    / 1.5em minmax(0, 1fr) 1.5em;
  gap: 8px;
  place-items: center;
  padding: 16px;
  text-align: center;
}

.previous-name {
  grid-area: previous;
  margin: 0;
  font: inherit;
}

.edge {
  font-size: .625rem;
  writing-mode: vertical-rl;
  white-space: nowrap;
}

.transition {
  grid-area: transition;
}

.reopening {
  grid-area: date;
}

.letter {
  grid-area: letter;
  line-height: 2.4;
  text-wrap: balance;
}

.letter p {
  margin: 0;
}

.new-name {
  grid-area: next;
  font-size: .9375rem;
  padding-inline: 8px;
}

.page {
  margin-inline: auto;
  padding: 16px;
  text-align: center;
}

.page h1 {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (max-height: 400px) {
  .letter {
    line-height: 1.8;
  }
}

.previous-name,
.transition,
.new-name,
.reopening {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  animation: reveal-edge 440ms ease-out 300ms backwards;
}

.transition {
  animation-delay: 800ms;
}

.new-name {
  animation-delay: 1300ms;
}

.reopening {
  animation-delay: 1800ms;
}

@keyframes reveal-edge {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
