:root {
  --paper: #fafaf8;
  --ink: #28251f;
  --soft: #777168;
  --copper: #8a5a31;
  --line: #dedad3;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: Newsreader, Georgia, serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

button, input {
  font: inherit;
}

button, a, input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

header {
  height: 90px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 21px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.wordmark {
  font-size: 20px;
  letter-spacing: -.018em;
  min-height: 44px;
  padding: 7px 0;
  white-space: nowrap;
}

.typed-word {
  white-space: nowrap;
}

.ending {
  display: inline-block;
}

.comma {
  color: var(--copper);
}

main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 25px 24px 35px;
  text-align: center;
}

.center {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

h1 {
  font-weight: 400;
  font-size: clamp(29px, 3.2vw, 42px);
  line-height: 1.4;
  letter-spacing: -.015em;
  margin: 0;
}

.first-line {
  display: block;
}

.reading-door {
  display: inline;
  position: relative;
  font-style: italic;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s;
}

.reading-door:hover, .reading-door:focus-visible {
  color: var(--copper);
}

.door-hint {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 10px);
  white-space: nowrap;
  font-size: 13px;
  letter-spacing: 0;
  font-style: normal;
  color: var(--soft);
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}

.reading-door:hover .door-hint, .reading-door:focus-visible .door-hint {
  opacity: 1;
}

.description {
  text-wrap: balance;
  font-size: 17px;
  line-height: 1.65;
  color: var(--soft);
  max-width: 610px;
  margin: 25px auto 0;
  font-weight: 400;
}

.subscription {
  width: min(100%, 350px);
  margin: 30px auto 0;
  font-size: 15px;
  color: var(--soft);
}

.signup-form {
  display: flex;
  align-items: baseline;
  gap: 16px;
  min-height: 48px;
  border-bottom: 1px solid #a49c91;
}

.signup-form:focus-within {
  border-color: var(--copper);
}

.signup-embed {
  min-height: 48px;
  border-bottom: 1px solid #a49c91;
}

.signup-form input, .signup-form button {
  min-height: 48px;
  padding: 12px 0;
  font-size: 16px;
  line-height: 1.5;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.signup-form input {
  flex: 1;
  min-width: 0;
  color: var(--ink);
}

.signup-form input::placeholder {
  color: var(--soft);
  opacity: 1;
}

.signup-form input:focus {
  outline: none;
}

.signup-form button {
  flex-shrink: 0;
  color: var(--copper);
}

.signup-form button:disabled {
  cursor: wait;
  opacity: .65;
}

.signup-status {
  font-size: 14px;
  line-height: 1.6;
  margin: 14px 0 0;
}

.signup-status:empty {
  display: none;
}

.reassurance, .signup-note {
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0 0;
}

.signup-note {
  margin-top: 4px;
}

footer {
  padding: 0 24px 25px;
  text-align: center;
  flex-shrink: 0;
}

footer nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
}

footer nav a:hover {
  color: var(--copper);
}

.dot {
  color: #c2bab0;
  font-size: 11px;
}

.from {
  font-style: italic;
  font-size: 14px;
  color: var(--soft);
  margin: 5px 0 0;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 5px;
}

dialog {
  width: min(720px, calc(100% - 32px));
  max-height: calc(100svh - 48px);
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  margin: auto;
  overscroll-behavior: contain;
}

dialog::backdrop {
  background: rgb(40 37 31 / .17);
}

.sheet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--paper);
  padding: 13px 22px;
  border-bottom: 1px solid var(--line);
  z-index: 2;
  font-size: 14px;
  color: var(--soft);
}

.close {
  min-width: 44px;
  min-height: 44px;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.sheet-body {
  padding: 35px 55px 48px;
}

.sheet-body h2 {
  font-weight: 400;
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 24px;
  letter-spacing: -.02em;
}

.sheet-body p {
  font-size: 18px;
  line-height: 1.7;
}

.sheet-body .eyebrow {
  font: 11px/1.7 Figtree, sans-serif;
  letter-spacing: .06em;
  color: var(--copper);
  margin: 0 0 20px;
}

.scripture {
  margin: 32px 0;
}

.scripture blockquote {
  font-size: 20px;
  font-style: italic;
  line-height: 1.55;
  margin: 0;
}

.scripture cite {
  display: block;
  font: 11px/1.6 Figtree, sans-serif;
  font-style: normal;
  color: var(--soft);
  margin-top: 17px;
}

.meditation p {
  margin: 0 0 20px;
}

.practice {
  border-block: 1px solid var(--line);
  margin: 35px 0;
  padding: 17px 0;
}

.practice .label {
  font: 11px/1.6 Figtree, sans-serif;
  color: var(--copper);
  letter-spacing: .06em;
}

.carry {
  font-style: italic;
}

.sheet-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--copper);
  text-decoration: underline;
  text-underline-offset: 5px;
}



/* The heading occupies its final space throughout the opening. Only its transform moves. */
h1 {
  transform-origin: center;
  transition: transform 1.2s cubic-bezier(.65, 0, .2, 1);
}

header, .description, .subscription, footer {
  transition: opacity .75s ease;
}

.subscription {
  transition-delay: .15s;
}

footer {
  transition-delay: .3s;
}

.intro header, .intro .description, .intro .subscription, .intro footer, .settling header, .settling .description, .settling .subscription, .settling footer {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.intro h1 {
  transform: translateY(var(--opening-y, 0px)) scale(var(--opening-scale, 1.14));
  transition: none;
}

.intro .ink-char {
  opacity: 0;
}

.intro .ink-char.visible {
  opacity: 1;
}

.intro .ending {
  opacity: 0;
  filter: blur(3px);
  transform: translateY(5px);
}

.intro .ending.visible {
  opacity: 1;
  filter: blur(0);
  transform: none;
  transition: opacity 1s ease, filter 1s ease, transform 1s ease;
}

.intro .door-hint {
  display: none;
}

.typing-cursor {
  position: fixed;
  z-index: 5;
  left: 0;
  top: 0;
  width: 1px;
  height: 36px;
  background: var(--ink);
  pointer-events: none;
  transition: opacity .3s ease;
}

.typing-cursor.resting {
  animation: cursor-breathe 1s ease-in-out infinite;
}

.typing-cursor[hidden] {
  display: none;
}

@keyframes cursor-breathe {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .22;
  }
}

@media(max-width:650px) {
  header {
    height: 80px;
    padding-top: 17px;
  }
  .wordmark {
    font-size: 18px;
  }
  main {
    padding: 35px 24px 50px;
  }
  h1 {
    font-size: clamp(27px, 6.4vw, 34px);
    line-height: 1.48;
    max-width: 450px;
    margin: auto;
  }
  .first-line {
    display: inline;
  }
  .description {
    text-wrap: balance;
    font-size: 16px;
    max-width: 305px;
    margin-top: 24px;
  }
  .subscription {
    width: min(100%, 300px);
    margin-top: 34px;
  }
  .sheet-body {
    padding: 27px 25px 36px;
  }
  .sheet-body h2 {
    font-size: 29px;
  }
  dialog {
    max-height: calc(100svh - 24px);
    width: calc(100% - 20px);
  }
  .sheet-top {
    padding: 8px 15px;
  }
  .door-hint {
    display: none;
  }
  footer {
    padding-bottom: 24px;
  }
}

@media(prefers-reduced-motion:reduce) {
  h1, .ending, header, .description, .subscription, footer {
    transition: none!important;
    transform: none!important;
    filter: none!important;
  }
  .intro .ink-char, .intro .ending, .intro header, .intro .description, .intro .subscription, .intro footer, .settling header, .settling .description, .settling .subscription, .settling footer {
    opacity: 1!important;
  }
  .typing-cursor {
    display: none!important;
  }
}
