@font-face {
  font-family: "EB Garamond SC";
  src: url("fonts/ebgaramond-smcp-2.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: #ffffff;
  color: #000000;
  font-family: "EB Garamond SC", "EB Garamond", "Times New Roman", Times, serif;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

main {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem 2rem;
}

h1 {
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1;
  font-weight: normal;
  font-size: clamp(2rem, 9vw, 6rem);
  letter-spacing: 0.08em;
  text-indent: 0.08em;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
}

.cta {
  position: relative;
  margin-top: 2.75rem;
  height: 3.25rem;
  width: min(20rem, 78vw);
}

.cta > .cta-word,
.cta > form,
.cta > .cta-done {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 250ms ease, visibility 0s linear 250ms;
}

.cta[data-state="rest"] > .cta-word,
.cta[data-state="open"] > form,
.cta[data-state="done"] > .cta-done {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.cta-word,
.cta-done {
  font-family: inherit;
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1;
  font-size: 1.0625rem;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  line-height: 1.4;
}

.cta-word {
  background: none;
  border: none;
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, 0.28);
  text-underline-offset: 0.45em;
  cursor: pointer;
  transition: color 200ms ease, text-decoration-color 200ms ease;
}

.cta-word:hover {
  color: #000;
  text-decoration-color: #000;
}

.cta-word:focus-visible {
  color: #000;
  text-decoration-color: #000;
  text-decoration-thickness: 2px;
  outline: none;
}

.cta-done {
  color: #000;
}

.cta > form {
  position: absolute;
}

.field {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
  font-family: inherit;
  font-size: 1.125rem;
  text-align: center;
  color: #000;
  padding: 0.15rem 1.6rem 0.4rem;
  transition: border-color 200ms ease;
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.field:focus {
  outline: none;
  border-bottom-color: #000;
}

.field::placeholder {
  color: rgba(0, 0, 0, 0.35);
  letter-spacing: 0.02em;
}

form.pending .field {
  color: rgba(0, 0, 0, 0.4);
}

.go {
  position: absolute;
  right: 0;
  top: 0.05rem;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.25rem;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.55);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, color 200ms ease;
}

form.filled .go {
  opacity: 1;
  pointer-events: auto;
}

.go:hover,
.go:focus-visible {
  color: #000;
  outline: none;
}

form.pending .go {
  pointer-events: none;
  opacity: 0.3;
}

.cta-err {
  position: absolute;
  inset: 2.55rem 0 auto 0;
  text-align: center;
  font-variant-caps: small-caps;
  font-feature-settings: "smcp" 1;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-indent: 0.25em;
  color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 200ms ease;
}

.cta-err.show {
  opacity: 1;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cta.boot > * {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .cta > .cta-word,
  .cta > form,
  .cta > .cta-done,
  .cta-err,
  .cta-word,
  .go,
  .field {
    transition: none;
  }
}
