:root {
  --paper: #f4eee6;
  --sand: #e7dccf;
  --clay: #8c7764;
  --ink: #2c2824;
  --muted: #6b5e52;
  --line: rgba(140, 119, 100, 0.28);
  --danger: #8c4d3f;
  --header: 4rem;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Figtree", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.075rem;
  line-height: 1.75;
}

body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  opacity: 0.35;
  background-image: radial-gradient(rgba(90, 68, 48, 0.07) 0.55px, transparent 0.55px);
  background-size: 3px 3px;
}

::selection {
  background: #e4d3c0;
  color: var(--ink);
}

a {
  color: inherit;
}

.shell {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.reading-mark {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 1px;
  background: var(--sand);
}

.reading-mark span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
}

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
  z-index: 60;
  background: var(--paper);
  padding: 0.5rem 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header);
  background: rgba(244, 238, 230, 0.84);
  backdrop-filter: blur(8px);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-inner a:first-child {
  font-family: var(--serif);
  font-size: 1.125rem;
  text-decoration: none;
}

.header-write {
  font-family: var(--serif);
  font-style: italic;
  color: var(--clay);
  text-decoration: none;
}

.header-write:hover {
  color: var(--ink);
}

.hero {
  height: calc(100svh - var(--header));
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
}

.hero h1 {
  max-width: 38rem;
  margin: 1.4rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.2rem, 6vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.hero h1 .honorific {
  display: block;
  margin-bottom: 0.35em;
  font-size: 0.28em;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.lede {
  max-width: 36rem;
  margin: 2.2rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  line-height: 1.35;
}

.reveal {
  animation: rise 0.9s ease both;
}

.lede.reveal {
  animation-delay: 160ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.prose-block {
  display: grid;
  gap: 4rem;
  padding-block: 4.5rem;
}

.passage {
  display: grid;
  grid-template-columns: minmax(0, 38rem) minmax(8.5rem, 13rem);
  column-gap: 3.25rem;
  align-items: start;
}

.passage p {
  margin: 0 0 1.4rem;
}

.passage h2 {
  margin: 0 0 1.6rem;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.1;
}

.note {
  margin: 0.35rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--clay);
}

.aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5rem;
}

.stem {
  width: 5rem;
  height: 10rem;
  color: rgba(140, 119, 100, 0.8);
}

.pause {
  background: rgba(231, 220, 207, 0.7);
  padding-block: 6.5rem;
}

.pause p {
  max-width: 38rem;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  line-height: 1.2;
}

.framed {
  border-block: 1px solid var(--line);
}

.quiet {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.write {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 36rem);
  gap: 5rem;
  padding-block: 5.5rem;
  scroll-margin-top: 5rem;
}

.write h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.1rem);
  line-height: 1.1;
}

.write > div > p:first-of-type {
  margin-top: 1.5rem;
}

.field {
  margin-bottom: 1.75rem;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}

.hint {
  font-size: 0.75rem;
  color: var(--clay);
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid rgba(140, 119, 100, 0.4);
  background: transparent;
  color: var(--ink);
  font: inherit;
  border-radius: 0;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

input::placeholder {
  color: rgba(140, 119, 100, 0.7);
  font-family: var(--serif);
  font-style: italic;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-bottom-color: var(--danger);
}

.error {
  margin: 0.4rem 0 0;
  color: var(--danger);
  font-size: 0.9rem;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.4rem;
}

button {
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  padding: 0.75rem 1.4rem;
  cursor: pointer;
}

button:hover {
  background: #4a433c;
}

.submit-row .quiet {
  max-width: 16rem;
  margin: 0;
}

.sent {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.sent-title {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2rem;
  line-height: 1.25;
}

.sent a,
address a {
  text-underline-offset: 0.25rem;
}

#note-reset {
  margin-top: 1.2rem;
  padding: 0;
  background: transparent;
  color: var(--ink);
}

footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 2.5rem;
  padding-block: 3.5rem;
}

.footer-name {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.9rem;
}

.footer-inner .quiet {
  margin: 0.15rem 0;
}

address {
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (max-width: 860px) {
  .passage,
  .write,
  .footer-inner,
  .submit-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .note {
    order: -1;
  }

  .aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .pause {
    padding-block: 4.5rem;
  }

  .prose-block,
  .write {
    gap: 3rem;
    padding-block: 3.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    animation: none;
  }
}