/* Second Post — one sheet of paper. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-roman.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courierprime-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courierprime-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/fonts/courierprime-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bone: #ebe4d3;
  --manila: #ded4bd;
  --ink: #171310;
  --faded: #655b50;
  --wax: #7d1d1d;
  --rule: #b7ab93;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "Courier Prime", "Courier New", Courier, monospace;
  --measure: 34rem;
  --gutter: clamp(1.25rem, 6vw, 6rem);
}

* { box-sizing: border-box; }

html {
  background: var(--bone);
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 100%;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 400;
}

/* paper grain and a tired edge */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.28;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.3 0 0 0 0 0.22 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 55%, rgba(60,40,20,0.14) 100%);
}

.sheet {
  position: relative;
  z-index: 1;
  max-width: 68rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 5rem) var(--gutter) clamp(3rem, 8vh, 6rem);
}

h1, h2 {
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 2rem + 5.2vw, 6.4rem);
  line-height: 0.98;
  max-width: 16ch;
  margin-top: 1.5rem;
  font-variation-settings: "opsz" 144;
}

h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem);
  line-height: 1.1;
  max-width: 20ch;
  margin-bottom: 1.25rem;
  font-variation-settings: "opsz" 72;
}

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--wax); }

.file {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--faded);
  letter-spacing: 0.01em;
  max-width: none;
}

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

/* hero */

.hero { position: relative; }

.stamp {
  position: absolute;
  right: 0;
  top: 0;
  transform: rotate(-7deg);
  border: 2px solid var(--wax);
  color: var(--wax);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.5rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  opacity: 0.82;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -0.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.stamp span:nth-child(2) { font-weight: 400; }

@media (max-width: 40rem) {
  .stamp { position: static; display: inline-flex; margin-top: 1.5rem; transform: rotate(-4deg); }
}

/* sections */

section { margin-top: clamp(3.5rem, 9vh, 7rem); }

.what .lede {
  font-size: clamp(1.25rem, 1.1rem + 0.9vw, 1.75rem);
  line-height: 1.35;
  max-width: 30ch;
  margin-left: auto;
  margin-right: 0;
  font-variation-settings: "opsz" 30;
}
@media (max-width: 48rem) {
  .what .lede { margin-left: 0; max-width: var(--measure); }
}

/* the ledger: dates in the margin, beats on the line */

.ledger dl, .tiers dl { margin: 1.5rem 0 0; padding: 0; }
.ledger dl > div, .tiers dl > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px dashed var(--rule);
  align-items: baseline;
}
.ledger dl > div:last-child, .tiers dl > div:last-child { border-bottom: 1px dashed var(--rule); }
.ledger dt, .tiers dt {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--faded);
  padding-top: 0.25rem;
}
.tiers dt { color: var(--ink); font-size: 1rem; font-weight: 700; }
.ledger dd, .tiers dd { margin: 0; max-width: var(--measure); }

.ledger dl > div:last-child dd { font-variation-settings: "opsz" 20; }

@media (max-width: 40rem) {
  .ledger dl > div, .tiers dl > div { grid-template-columns: 1fr; gap: 0.25rem 0; }
}

/* tiers */

.tiers dl > div { grid-template-columns: 6.5rem 1fr auto; }
.tiers .price {
  font-family: var(--mono);
  font-size: 0.9rem;
  white-space: nowrap;
  color: var(--wax);
  grid-column: 3;
}
@media (max-width: 48rem) {
  .tiers dl > div { grid-template-columns: 6.5rem 1fr; }
  .tiers .price { grid-column: 2; margin-top: 0.4rem; }
}
@media (max-width: 40rem) {
  .tiers dl > div { grid-template-columns: 1fr; }
  .tiers .price { grid-column: 1; }
}
.tiers .note { margin-top: 1.5rem; color: var(--faded); font-style: italic; }

/* consent */

.consent { max-width: 40rem; }
.consent p + p { margin-top: -0.25em; }

/* the book */

.book p {
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  line-height: 1.4;
  max-width: 32ch;
  margin-left: auto;
  margin-right: 0;
  font-variation-settings: "opsz" 30;
}
@media (max-width: 48rem) { .book p { margin-left: 0; } }

/* the form */

.write form { max-width: 34rem; }
.field {
  display: flex;
  align-items: stretch;
  border-bottom: 1.5px solid var(--ink);
  margin: 1.5rem 0 1rem;
}
.field input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  padding: 0.6rem 0;
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--ink);
  outline: none;
}
.field input::placeholder { color: var(--rule); }
.field input[aria-invalid="true"] { color: var(--wax); }
.field input:focus-visible { box-shadow: 0 2px 0 0 var(--wax); }
.field button {
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--bone);
  border: 0;
  border-radius: 1px;
  padding: 0.65rem 1.1rem;
  margin: 0.2rem 0 0.4rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}
.field button:hover { background: var(--wax); }
.field button:focus-visible { outline: 2px solid var(--wax); outline-offset: 2px; }
.field button:disabled { opacity: 0.6; cursor: wait; }

.promise { font-style: italic; }
.privacy { font-family: var(--mono); font-size: 0.78rem; color: var(--faded); max-width: 38rem; }

.confirm { max-width: 34rem; margin-top: 1.5rem; }
.confirm-title {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.8rem);
  line-height: 1.05;
  margin-bottom: 0.5rem;
  font-variation-settings: "opsz" 72;
}
.confirm-line { font-style: italic; }

/* footer */

footer { margin-top: clamp(4rem, 12vh, 8rem); border-top: 1px solid var(--rule); padding-top: 1.5rem; }
footer p { max-width: none; }
.cipher {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--rule);
  letter-spacing: 0.12em;
  margin: 1.25rem 0;
  user-select: all;
}

@media (prefers-reduced-motion: no-preference) {
  .field button { transition: background-color 120ms linear; }
}

/* the plain pages: no-script confirmation, and the house ledger */

.plain .plain-state, .ops {
  position: relative; z-index: 1;
}
.plain-state {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 12vh, 8rem) var(--gutter);
}
.plain-state h1 { font-size: clamp(2.2rem, 1.8rem + 3vw, 4.5rem); margin: 1rem 0 0.75rem; }

.ops { font-size: 1.0625rem; }
.ops-head, .ops main { max-width: 56rem; margin: 0 auto; padding: 0 var(--gutter); }
.ops-head { padding-top: 2rem; }
.ops-head nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.5rem 0 1rem; font-family: var(--mono); font-size: 0.9rem; }
.ops-head nav a[aria-current="page"] { color: var(--wax); text-decoration-thickness: 2px; }
.ops-head .live { font-family: var(--mono); font-size: 0.8rem; color: var(--faded); max-width: none; }
.ops main { padding-bottom: 6rem; }
.ops .doc { margin-top: 2.5rem; }
.ops h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.4rem); margin: 0 0 1rem; max-width: none; }
.ops h2 { font-size: clamp(1.4rem, 1.2rem + 1vw, 2rem); margin: 2.25rem 0 0.75rem; max-width: none; }
.ops h3 { font-size: 1.15rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.ops h4 { font-size: 1rem; font-weight: 700; margin: 1.25rem 0 0.4rem; }
.ops p, .ops li { max-width: 40rem; }
.ops ul, .ops ol { padding-left: 1.4rem; }
.ops li { margin: 0.25rem 0; }
.ops .tick { font-family: var(--mono); color: var(--faded); }
.ops table { border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 0.9rem; display: block; overflow-x: auto; max-width: 100%; }
.ops th, .ops td { text-align: left; padding: 0.4rem 0.75rem 0.4rem 0; border-bottom: 1px dashed var(--rule); vertical-align: top; }
.ops th { font-family: var(--mono); font-weight: 700; font-size: 0.8rem; color: var(--faded); }
.ops td:first-child { white-space: nowrap; }
.ops code, .ops pre { font-family: var(--mono); font-size: 0.86em; }
.ops pre { background: var(--manila); padding: 0.9rem 1rem; overflow-x: auto; border-radius: 1px; }
.ops blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 2px solid var(--wax); color: var(--faded); }
.ops hr { border: 0; border-top: 1px dashed var(--rule); margin: 2rem 0; }
.ops hr.doc-break { border-top: 1px solid var(--ink); margin: 4rem 0 1rem; }
