@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/LibreBaskerville-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/LibreBaskerville-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #161616;
  --paper: #e9e9e9;
  --quiet: rgba(22, 22, 22, 0.55);
  --font: Baskerville, "Libre Baskerville", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --size: clamp(1.2rem, 2.05vw + 0.55rem, 2.85rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("../images/creampaper.png");
  background-repeat: repeat;
  font-family: var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-finale {
  background: #000;
  background-image: none;
  color: #fff;
}

body.is-finale .finale {
  color: #fff;
}

body.is-finale .site-footer {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0));
}

body.is-finale .site-footer a,
body.is-finale .site-footer button {
  color: rgba(255, 255, 255, 0.62);
}

body.is-finale .site-footer a:hover,
body.is-finale .site-footer button:hover,
body.is-finale .site-footer a:focus-visible,
body.is-finale .site-footer button:focus-visible {
  color: #fff;
}

body.is-finale .site-footer a:focus-visible,
body.is-finale .site-footer button:focus-visible {
  outline-color: #fff;
}

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.stage {
  flex: 1;
  position: relative;
  padding: max(4.25rem, 9vh) clamp(1.25rem, 6vw, 6.5rem) 5.5rem;
}

.copy,
.finale {
  width: min(72rem, 100%);
  font-size: var(--size);
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: 0.012em;
  -webkit-text-stroke: 0.2px currentColor;
}

.copy {
  width: fit-content;
  max-width: 100%;
  transition: opacity 1.15s ease;
}

.copy.cut {
  transition: none;
}

.copy.is-out {
  opacity: 0;
}

.line,
.tag {
  margin: 0;
  min-height: 1.48em;
}

.line + .line,
.tag + .tag {
  margin-top: 0.42em;
}

.line.right,
.tag.right {
  text-align: right;
}

.line.ghost {
  opacity: 0;
  width: 0 !important;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 1.15s ease;
}

.caret {
  display: inline-block;
  width: 0.045em;
  height: 0.82em;
  margin-left: 0.08em;
  background: currentColor;
  vertical-align: -0.06em;
  opacity: 0;
}

.line.active .caret,
.tag.active .caret {
  opacity: 1;
  animation: blink 1.05s steps(1, end) infinite;
}

.line.typing .caret,
.tag.typing .caret {
  animation: none;
  opacity: 1;
}

@keyframes blink {
  0%,
  45% { opacity: 1; }
  50%,
  100% { opacity: 0; }
}

.finale {
  display: none;
  flex-direction: column;
  align-items: center;
  width: min(100%, 58rem);
  margin-inline: auto;
  opacity: 0;
}

.finale.on {
  display: flex;
}

.finale.in {
  animation: rise 1.6s ease forwards;
}

@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mark {
  position: relative;
  width: 100%;
}

.logo {
  display: block;
  width: min(100%, 52rem);
  height: auto;
  margin: 0 auto;
}

.beside {
  margin-top: 0.85em;
  text-align: center;
}

.finale .tag {
  min-height: 0;
  line-height: 1.18;
}

.beside .tag + .tag {
  margin-top: 0.06em;
}

.tag1 {
  font-size: 0.92em;
}

.tag2 {
  font-size: 1.08em;
}

.tag3 {
  margin-top: 1.05em;
  text-align: center;
  font-size: 0.94em;
}

.noscript-end {
  width: min(40rem, 100%);
}

.noscript-end .logo {
  width: min(100%, 28rem);
  height: auto;
  margin-bottom: 0.75rem;
}

.noscript-end p {
  margin: 0.35em 0;
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  padding: 0.65rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  font-family: var(--font);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: linear-gradient(to top, rgba(233, 233, 233, 0.92), rgba(233, 233, 233, 0));
}

.site-footer a,
.site-footer button {
  color: var(--quiet);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.35rem 0.15rem;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.site-footer a:hover,
.site-footer button:hover,
.site-footer a:focus-visible,
.site-footer button:focus-visible {
  color: var(--ink);
}

.site-footer a:focus-visible,
.site-footer button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* Privacy page */
.sheet {
  flex: 1;
  width: min(40rem, 100%);
  margin: 0 auto;
  padding: max(3.5rem, 8vh) clamp(1.25rem, 5vw, 2rem) 6rem;
}

.sheet h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.sheet .kicker {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  color: var(--quiet);
}

.sheet p {
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  line-height: 1.6;
  margin: 0 0 1.1rem;
}

.sheet a {
  color: inherit;
}

.back {
  display: inline-block;
  margin-top: 1.5rem;
  letter-spacing: 0.03em;
  text-decoration: none;
  border-bottom: 1px solid rgba(22, 22, 22, 0.35);
  padding-bottom: 0.1rem;
}

.back:hover,
.back:focus-visible {
  border-bottom-color: var(--ink);
}

@media (min-width: 821px) {
  .line,
  .tag1,
  .tag2 {
    white-space: nowrap;
  }
}

@media (max-width: 820px) {
  .logo {
    width: min(100%, 36rem);
  }

  .beside {
    margin-top: 0.55em;
  }

  .tag1 {
    font-size: 0.7em;
  }

  .tag2 {
    font-size: 0.84em;
  }

  .tag3 {
    font-size: 0.78em;
    margin-top: 0.65em;
  }
}

@media (max-width: 480px) {
  :root {
    --size: clamp(1.12rem, 4.6vw, 1.35rem);
  }

  .stage {
    padding-top: max(3.25rem, 7vh);
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .line + .line {
    margin-top: 0.55em;
  }

  .beside {
    margin-top: 0.4em;
  }

  .tag1 {
    font-size: 0.64em;
  }

  .tag2 {
    font-size: 0.76em;
  }

  .tag3 {
    font-size: 0.72em;
    margin-top: 0.4em;
  }
}

@media (min-width: 821px) and (max-width: 1180px) {
  :root {
    --size: clamp(1.28rem, 2.15vw, 1.85rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .copy,
  .line.ghost,
  .finale.in {
    transition: none;
    animation: none;
  }

  .caret {
    display: none;
  }
}
