:root {
  --forest: #284E12;
  --electric-green: #00FF00;
  --paper: #F4F5EF;
  --document-width: 816px;
  --document-toolbar-height: 2.75rem;
  --mono: "Sometype Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--forest);
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--paper);
  font-family: var(--mono);
}

button,
a {
  font: inherit;
}

.experience,
.screen {
  width: 100%;
  height: 100%;
  height: 100dvh;
}

.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--forest);
}

.screen[hidden] {
  display: none;
}

/* Landing screen */

.landing-screen {
  opacity: 1;
  transition: opacity 300ms ease;
}

.landing-screen.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.landing-copy {
  position: absolute;
  top: 28.6%;
  left: 50%;
  width: min(92vw, 1260px);
  text-align: center;
  transform: translateX(-50%);
}

.landing-copy h1 {
  margin: 0;
  color: var(--electric-green);
  font-size: clamp(1.5rem, 2.75vw, 3.25rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.landing-copy p {
  margin: clamp(2rem, 4vw, 3.4rem) 0 0;
  color: var(--paper);
  font-size: clamp(0.85rem, 1.2vw, 1.45rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: 0.005em;
}

.enter-button {
  position: absolute;
  top: 66.6%;
  left: 50%;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  color: var(--paper);
  background: transparent;
  font-size: clamp(0.9rem, 1.3vw, 1.4rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: 0.005em;
  text-decoration: none;
  transform: translateX(-50%);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
}

.enter-button:hover,
.enter-button:focus-visible {
  color: var(--electric-green);
  outline: none;
}

.enter-button:focus-visible {
  outline: 2px solid var(--electric-green);
  outline-offset: 8px;
}

/* Loading screen */

.loading-screen {
  opacity: 0;
  transition: opacity 300ms ease;
}

.loading-screen.is-visible {
  opacity: 1;
}

.loading-screen.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.loading-fallback-link {
  position: absolute;
  z-index: 1;
  top: 1rem;
  right: 1rem;
  color: var(--paper);
  font-size: clamp(0.65rem, 0.75vw, 0.78rem);
  font-style: italic;
  opacity: 0;
  text-underline-offset: 0.2em;
  animation: reveal-loading-fallback 1ms linear 8s forwards;
}

.loading-fallback-link:hover,
.loading-fallback-link:focus-visible {
  color: var(--electric-green);
}

@keyframes reveal-loading-fallback {
  to {
    opacity: 1;
  }
}

.loading-screen p {
  position: absolute;
  top: 9.1%;
  left: 50%;
  margin: 0;
  border-bottom: 1px solid currentColor;
  color: var(--paper);
  font-size: clamp(0.78rem, 1vw, 1rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.13;
  letter-spacing: 0.005em;
  white-space: nowrap;
  transform: translateX(-50%);
}

.ascii-loader {
  position: absolute;
  top: 24.7%;
  left: 50%;
  display: grid;
  color: rgba(244, 245, 239, 0.72);
  font-size: clamp(0.72rem, 1.05vw, 0.95rem);
  font-style: normal;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: pre;
  transform: translateX(-50%);
}

.ascii-loader span {
  display: block;
}

/* Embedded document */

.document-screen {
  overflow: hidden;
}

.document-toolbar {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--document-toolbar-height);
  padding: 0 1rem;
  background: var(--forest);
}

.document-source-link {
  color: var(--paper);
  font-size: clamp(0.7rem, 0.8vw, 0.82rem);
  font-style: italic;
  line-height: 1.2;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 150ms ease;
}

.document-source-link:hover,
.document-source-link:focus-visible {
  color: var(--electric-green);
}

.document-source-link:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

.pdf-scroll {
  position: absolute;
  top: var(--document-toolbar-height);
  right: 0;
  bottom: 0;
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--forest);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.pdf-scroll::-webkit-scrollbar {
  display: none;
}

.pdf-scroll:focus {
  outline: none;
}

.pdf-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 100%;
  gap: clamp(18px, 2.5vw, 32px);
  background: var(--forest);
}

.pdf-page {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  max-width: var(--document-width);
  background: var(--forest);
}

.pdf-page-canvas {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--forest);
}

.pdf-link {
  position: absolute;
  z-index: 1;
  display: block;
  overflow: hidden;
  color: transparent;
  text-indent: -9999px;
}

.pdf-link:hover,
.pdf-link:focus-visible {
  outline: 2px solid var(--electric-green);
  outline-offset: 2px;
  background: rgba(0, 255, 0, 0.08);
}

.noscript-message {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  left: 20px;
  margin: 0 auto;
  max-width: 40rem;
  padding: 16px;
  color: var(--paper);
  background: var(--forest);
  text-align: center;
}

.noscript-message a {
  color: inherit;
}

@media (max-width: 760px) {
  .landing-copy {
    top: 25%;
    width: 88vw;
  }

  .landing-copy h1 {
    font-size: clamp(1.5rem, 6.3vw, 2.5rem);
    line-height: 1.12;
    white-space: normal;
  }

  .landing-copy p {
    margin-top: 2rem;
    font-size: clamp(0.85rem, 3.6vw, 1.15rem);
  }

  .enter-button {
    top: 70%;
    font-size: clamp(0.9rem, 3.8vw, 1.15rem);
  }

  .loading-screen p {
    top: 11%;
    font-size: clamp(0.75rem, 3vw, 0.9rem);
  }

  .ascii-loader {
    top: 26%;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-screen,
  .loading-screen {
    transition-duration: 0ms;
  }
}
