:root {
  --paper: #f5f2ea;
  --ink: #141414;
  --muted: #6f6a60;
  --line: #d8d0c1;
  --accent: #3a2416;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
  line-height: 1.55;
}

body.prompt-open main {
  filter: blur(1px);
}

main {
  width: min(920px, calc(100% - 32px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 24px 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(22px, 4vh, 40px);
}

header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
  color: var(--muted);
}

.footer-quote {
  text-align: right;
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.tooltip-trigger,
.nav-button {
  position: relative;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ctext x='4' y='24' font-size='24' font-family='serif' fill='%233a2416'%3E%F0%90%A4%92%3C/text%3E%3C/svg%3E") 4 24, auto;
}

.tooltip-trigger::after {
  content: "𐤒";
  position: absolute;
  top: -18px;
  right: -14px;
  color: var(--accent);
  font-family: "Noto Sans Phoenician", "Segoe UI Historic", "Courier New", monospace;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.mark {
  color: var(--ink);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tooltip {
  position: fixed;
  top: 64px;
  right: max(16px, calc((100vw - 920px) / 2));
  z-index: 10;
  width: min(300px, calc(100% - 32px));
  padding: 14px 16px;
  border: 1px solid #ece7dc;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 30px rgb(20 20 20 / 10%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.tooltip-left {
  right: auto;
  left: max(16px, calc((100vw - 920px) / 2));
}

.tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  align-self: center;
  display: grid;
  gap: 22px;
}

.view {
  display: none;
}

.view.is-active {
  display: grid;
}

.manifesto {
  align-self: center;
  gap: 26px;
  max-width: 820px;
}

.manifesto h1 {
  max-width: 760px;
}

.manifesto-text {
  display: grid;
  gap: 18px;
  max-width: 760px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.manifesto-text.manifesto-typewriter {
  display: block;
}

.manifesto-typewriter-text {
  white-space: pre-wrap;
}

.manifesto-text .manifesto-typewriter-text {
  display: inline;
}

.manifesto-cursor {
  vertical-align: -.14em;
}

.typewriter-cursor.is-hidden {
  display: none;
}

.manifesto-text template {
  display: none;
}

.manifesto-text p {
  margin: 0;
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.65;
}

h1 {
  max-width: 100%;
  margin: 0;
  min-height: 1em;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: .88em;
  margin-left: .12em;
  background: var(--ink);
  vertical-align: -.08em;
  animation: blink 900ms steps(1) infinite;
}

.title-dot {
  font-weight: 300;
  opacity: .72;
}

.word-swap {
  display: inline-grid;
  width: 9ch;
  overflow: hidden;
  vertical-align: bottom;
}

.word-swap span {
  grid-area: 1 / 1;
  transition: transform 620ms cubic-bezier(.2, .8, .2, 1);
}

.word-swap.is-resetting span {
  transition: none;
}

.word-swap .word-new {
  transform: translateY(-115%);
}

.word-swap.is-swapped .word-old {
  transform: translateY(115%);
}

.word-swap.is-swapped .word-new {
  transform: translateY(0);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.statement {
  max-width: 690px;
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.45;
}

.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.meta div {
  min-height: 84px;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.meta div:last-child {
  border-right: 0;
}

.label {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.value {
  color: var(--ink);
  font-size: 14px;
}

.accent {
  color: var(--accent);
}

.interest-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(10 8 6 / 72%);
}

.interest-modal {
  position: relative;
  width: min(700px, 100%);
  border: 1px solid #ece7dc;
  background: var(--paper);
  box-shadow: 0 32px 90px rgb(0 0 0 / 38%);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 34px;
  align-items: center;
}

.interest-brand {
  display: grid;
  justify-items: center;
  gap: 10px;
  align-self: center;
  padding: 18px 12px;
}

.interest-logo {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  border: 1px solid #ece7dc;
  background: var(--paper);
}

.interest-logo-mark {
  color: var(--accent);
  font-family: "Noto Sans Phoenician", "Segoe UI Historic", serif;
  font-size: 58px;
  line-height: 1;
}

.interest-brand-name {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .08em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
}

.interest-modal h2 {
  margin: 0;
  max-width: 470px;
  font-size: clamp(20px, 2.7vw, 26px);
  line-height: 1.12;
  font-weight: 400;
}

.interest-modal p {
  margin: 10px 0 0;
  color: #2b2b2b;
  font-size: 12px;
}

.interest-form {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.interest-field {
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid #dfd7c9;
  background: #fbf8ef;
}

.interest-field input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 9px 12px;
  color: var(--ink);
  font: 14px "Courier New", Courier, monospace;
  outline: none;
}

.interest-field input::placeholder {
  color: #928b7f;
}

.interest-field button {
  min-width: 64px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid #dfd7c9;
  background: var(--accent);
  color: var(--paper);
  font: 14px "Courier New", Courier, monospace;
  cursor: pointer;
}

.interest-field button:disabled {
  cursor: wait;
  opacity: .72;
}

.interest-fine {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.interest-status {
  min-height: 0;
  margin-top: 0;
  color: var(--accent);
  font-size: 13px;
}

.interest-status:not(:empty) {
  min-height: 1.5em;
  margin-top: 6px;
}

.interest-skip {
  position: absolute;
  top: 14px;
  right: 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 11px "Courier New", Courier, monospace;
  text-decoration: underline;
  cursor: pointer;
}

.interest-frame {
  display: none;
}

@media (max-width: 720px) {
  main {
    gap: 28px;
    padding: 20px 0;
  }

  header,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-quote {
    text-align: left;
  }

  .meta {
    grid-template-columns: 1fr;
  }

  .meta div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .meta div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .interest-modal {
    grid-template-columns: 1fr;
  }
}
