/* The homepage sampler. Each section shares its binding with the next. */
.journal-home {
  --quilt-plum: #442644;
  --quilt-blue: #1d344a;
  --quilt-rose: #e6afb5;
  --quilt-honey: #e8bd75;
  --quilt-cream: #faf0dd;
  --quilt-ink: #30232c;
  --quilt-rule: #bcaa94;
  --reading-size: clamp(1.125rem, 1.05rem + .28vw, 1.25rem);
  --quilt-rail: clamp(.38rem, .75vw, .75rem);
  --quilt-pad: clamp(18px, 3.8vw, 3.35rem);
  --weave: url("/quilt-linen.webp");
  --sawtooth: conic-gradient(from 135deg at 50% 0%, #924f65 0 90deg, transparent 0) 0 0 / 4rem 2rem,
              conic-gradient(from -45deg at 50% 100%, #526a82 0 90deg, transparent 0) 2rem 0 / 4rem 2rem;
  --binding-print: repeating-linear-gradient(135deg, #51314f 0 .53rem, #efcb8b .53rem 1.06rem,
    #ad667b 1.06rem 1.59rem, #f3e2c3 1.59rem 2.12rem, #526e89 2.12rem 2.65rem);
}

.journal-home :is(.plate, .plate .mat),
#what-it-is .section-head::before, #what-it-is .cards::after, .journal-home .colophon::before {
  background-blend-mode: soft-light, normal, normal;
}

@media (prefers-color-scheme: dark) {
  .journal-home {
    --quilt-plum: #39213c;
    --quilt-blue: #233d53;
    --quilt-rose: #553644;
    --quilt-honey: #51402c;
    --quilt-cream: #342c32;
    --quilt-ink: #f8ede1;
    --quilt-rule: #7f6a68;
  }
}

.journal-home :is(#what-it-is, #the-year, #private, #waiting-list) {
  max-width: calc(var(--page) - 2 * var(--gutter));
  margin-inline: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
  padding: 0;
  border: 0;
  border-inline: var(--quilt-rail) solid var(--quilt-plum);
  background: var(--quilt-cream);
  color: var(--quilt-ink);
}

.journal-home :is(#what-it-is, #the-year, #private, #waiting-list) .section-head {
  position: relative;
  max-width: none;
  padding: var(--quilt-pad);
  padding-block: clamp(1.75rem, 3.3vw, 3rem);
}

.journal-home .section h2 {
  max-width: 28ch;
  font-size: clamp(2rem, 1.6rem + 1.4vw, 3rem);
  line-height: 1.17;
  letter-spacing: -.025em;
}

.journal-home .section {
  font-family: var(--sans);
  font-size: var(--reading-size);
  line-height: 1.62;
  overflow-wrap: break-word;
}

.journal-home :is(#what-it-is, #the-year, #private, #waiting-list) .section-lede {
  max-width: 49ch;
  color: inherit;
}

.journal-home #what-it-is {
  container: features / inline-size;
  border-top: var(--quilt-rail) solid var(--quilt-plum);
}

.journal-home #what-it-is::before { content: none; }

/* An eight-point star in the header and flying geese across the binding. */
.journal-home #what-it-is .section-head {
  padding-right: max(23%, 6rem);
  background-color: var(--quilt-cream);
}
#what-it-is .section-head::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 21%;
  border-left: 2px solid var(--quilt-plum);
  background: var(--weave), repeating-conic-gradient(#efcea1 0 25%, #f6dfb7 0 50%) 0 0 / 2.6rem 2.6rem;
}
#what-it-is .section-head::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 10.5%;
  width: clamp(3rem, 8.6vw, 7.2rem);
  aspect-ratio: 1;
  transform: translate(50%, -50%);
  background: url("/quilt-star.webp") center / cover;
}

.journal-home {
  /* In each 18px repeat a length of flax thread goes into the next piece.
     Every third stitch crosses back over the first to secure the join. */
  --flax-thread: transparent calc(50% - 2px), #71563e calc(50% - 1.5px),
    #f9e8c4 calc(50% - .5px), #f0d4a6 calc(50% + 1px), #896947 calc(50% + 1.6px),
    transparent calc(50% + 2px);
  --across-seam:
    linear-gradient(55deg, var(--flax-thread)) left center / 18px 12px repeat-x,
    linear-gradient(-55deg, var(--flax-thread)) left center / 54px 12px repeat-x,
    linear-gradient(to bottom, transparent 26%, #38233955 45%, #21192b99 52%, #fff1cf60 59%, transparent 76%);
  --down-seam:
    linear-gradient(145deg, var(--flax-thread)) center top / 12px 18px repeat-y,
    linear-gradient(35deg, var(--flax-thread)) center top / 12px 54px repeat-y,
    linear-gradient(to right, transparent 26%, #38233955 45%, #21192b99 52%, #fff1cf60 59%, transparent 76%);
}
#what-it-is .cards {
  margin: 0;
  gap: 0;
  grid-template-columns: minmax(0, 1fr);
  background: var(--quilt-plum);
}
#what-it-is .cards::after {
  content: "";
  grid-column: 1 / -1;
  height: 2rem;
  background: var(--weave), var(--sawtooth), var(--quilt-honey);
}
#what-it-is .card {
  display: flow-root;
  position: relative;
  padding: var(--quilt-pad);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#what-it-is .card::after,
#the-year .plate::before, #private .promises::before, #waiting-list .waitlist-card::before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: -6px;
  inset-inline: 0;
  height: 12px;
  background: var(--across-seam);
}
@container features (min-width: 44rem) {
  #what-it-is .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #what-it-is .card:nth-child(even)::before {
    content: "";
    position: absolute;
    z-index: 1;
    pointer-events: none;
    left: -6px;
    inset-block: 0;
    width: 12px;
    background: var(--down-seam);
  }
  #what-it-is .card:nth-child(4)::after {
    left: -6px;
    background: radial-gradient(ellipse 3.5px 2.5px at 6px 50%, #f8dfb2 45%, #87634d 80%, transparent) left center / 12px 12px no-repeat,
                var(--across-seam);
  }
}
@media print, (forced-colors: active) {
  #what-it-is .card::after, #what-it-is .card:nth-child(even)::before { display: none; }
  #what-it-is .cards .card { border-block-start: 1px solid currentColor; }
}
#what-it-is .card:nth-child(1) {
  --cloth: var(--quilt-blue);
  color: #fff5e4;
}
#what-it-is .card:nth-child(2) {
  --cloth: var(--quilt-rose);
  color: var(--quilt-ink);
}
#what-it-is .card:nth-child(3) {
  --cloth: var(--quilt-honey);
  color: var(--quilt-ink);
}
#what-it-is .card:nth-child(4) {
  --cloth: #463047;
  color: #fff5e4;
}
#what-it-is .card {
  /* Leave the weave visible beside the patch, with an even field under the text. */
  background-color: var(--cloth);
  background-image: linear-gradient(105deg, var(--cloth) 5%, color-mix(in srgb, var(--cloth) 96%, transparent) 58%, color-mix(in srgb, var(--cloth) 72%, transparent)), var(--weave);
  background-blend-mode: normal, soft-light;
}
#what-it-is .card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(.75rem, 2vw, 1.5rem);
}
#what-it-is .card h3 {
  font-size: clamp(1.55rem, 1.25rem + .85vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -.018em;
}
#what-it-is .card-patch {
  width: clamp(3.25rem, 5.2vw, 4.65rem);
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  float: none;
  border: .2rem solid #fff0d4;
  border-radius: 0;
  outline: 1px dashed #68485a;
  outline-offset: -.32rem;
}
#what-it-is .card p {
  margin-top: 1.1rem;
  max-width: 46ch;
  color: inherit;
}
@container features (max-width: 21rem) {
  .journal-home #what-it-is .section-head { padding-inline: var(--quilt-pad); }
  #what-it-is .section-head::before, #what-it-is .section-head::after { display: none; }
  #what-it-is .card-heading { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  #what-it-is .card-patch { grid-row: 1; width: clamp(35px, 12cqw, 3rem); }
}

/* The Write screen is mounted inside a border of half-square triangles. */
.journal-home #the-year {
  border-top: var(--quilt-rail) solid var(--quilt-plum);
}
#the-year .section-head {
  background-color: var(--quilt-cream);
  border-bottom: 1px dashed #907c77;
}
#the-year .year-layout {
  align-items: stretch;
  gap: 0;
  margin: 0;
}
#the-year .year-layout > *, #private > *, #waiting-list > * { min-width: 0; }
#the-year .plate, #private .promises, #waiting-list .waitlist-card { position: relative; }
#the-year .year-prose {
  padding: var(--quilt-pad);
  background-color: var(--quilt-cream);
}
#the-year .notes dt {
  border-color: var(--quilt-rule);
  font-size: 1.28em;
  line-height: 1.25;
}
#the-year .notes dd {
  margin: .42rem 0 1.35rem;
  color: inherit;
  max-width: 52ch;
}
#the-year .notes dd:last-child { margin-bottom: 0; }
#the-year .plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: none;
  padding: var(--quilt-pad);
  background: var(--weave), var(--quilt-rose);
}
#the-year .plate .mat {
  width: min(100%, 21.5rem);
  border: .24rem solid var(--quilt-plum);
  border-radius: 0;
  padding: .65rem;
  background: var(--weave), repeating-conic-gradient(from 45deg, #f0d197 0 25%, #476580 0 50%, #f7e7c9 0 75%, #a76272 0) 0 0 / 2.6rem 2.6rem;
  box-shadow: none;
  outline: none;
}
#the-year .writing-screen { display: block; width: 100%; height: auto; border: 2px solid var(--quilt-plum); }
#the-year .plate figcaption {
  max-width: 32ch;
  margin: 0;
  padding: .45rem .85rem;
  background: var(--quilt-rose);
  color: var(--quilt-ink);
  text-align: center;
  font-size: 1rem;
  line-height: 1.5;
}
#the-year .plate figcaption a { color: inherit; }

/* Two backing fabrics meet at a stitched center seam. */
.journal-home #private {
  gap: 0;
  background: var(--quilt-blue);
  border-top: var(--quilt-rail) solid var(--quilt-plum);
}
#private .section-head { color: #fff5e4; background-color: var(--quilt-blue); }
.journal-home #private .pledge {
  align-self: stretch;
  max-width: none;
  padding: .25rem var(--quilt-pad) var(--quilt-pad);
  margin: 0;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  color: #fff5e4;
}
#private .pledge figcaption { color: #ffddb2; }
#private .pledge blockquote p {
  max-width: 36ch;
  font-size: clamp(1.35rem, 1.15rem + .55vw, 1.65rem);
  font-family: var(--serif);
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0;
}
#private .pledge figcaption, #waiting-list .field label {
  text-transform: none;
  letter-spacing: .01em;
  font-size: 1rem;
}
#private .promises {
  max-width: none;
  margin: 0;
  padding: var(--quilt-pad);
  background: var(--quilt-cream);
}
#private .promises li { color: var(--quilt-ink); border-color: var(--quilt-rule); }
#private .promises a { color: inherit; }
#private .promises li::before { background: #a15c6f; }
#private .promises strong { display: block; margin-bottom: .35rem; line-height: 1.35; }

.journal-home #waiting-list {
  gap: 0;
  align-items: stretch;
  background: var(--quilt-honey);
  border-block: var(--quilt-rail) solid var(--quilt-plum);
}
#waiting-list .section-head { align-self: center; background-color: var(--quilt-honey); }
.journal-home #waiting-list .waitlist-card {
  max-width: none;
  margin: 0;
  padding: var(--quilt-pad);
  background: var(--mat);
  border: 0;
  border-radius: 0;
  color: var(--ink);
  outline: 0;
  box-shadow: none;
}
#waiting-list .note, #waiting-list .form-status { font-size: 1rem; }
#waiting-list .field .label { color: var(--ink); }
#waiting-list input::placeholder { opacity: 1; }
#waiting-list .btn { max-width: 100%; overflow-wrap: anywhere; }
.journal-home .section h2, .journal-home .section h3 { overflow-wrap: anywhere; }
.journal-home .section a { text-decoration-thickness: .09em; text-underline-offset: .18em; }
.journal-home .section a:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Keep the seam on the adjoining edges when a reader enlarges the text. */
.journal-home main { container: spread / inline-size; }
@container spread (max-width: 55.99rem) {
  #the-year .year-layout { grid-template-columns: minmax(0, 1fr); }
  .journal-home #private, .journal-home #waiting-list { display: block; }
}
@container spread (min-width: 56rem) {
  #the-year .plate::before, #private .promises::before, #waiting-list .waitlist-card::before {
    inset: 0 auto 0 -6px;
    width: 12px;
    height: auto;
    background: var(--down-seam);
  }
}
@media print, (forced-colors: active) {
  #the-year .plate::before, #private .promises::before, #waiting-list .waitlist-card::before { display: none; }
}

.journal-home .colophon {
  margin-top: clamp(2.5rem, 6vw, 5rem);
  border-bottom: .7rem solid var(--quilt-plum);
  background: var(--quilt-plum);
  color: #fff5e4;
}
.journal-home .colophon::before {
  height: .7rem;
  background: var(--weave), var(--binding-print);
}
.journal-home .colophon .wordmark { filter: brightness(0) invert(94%) sepia(11%); }
.journal-home .colophon :is(.label, .colophon-note, a) { color: #ffe5cc; }
.journal-home .colophon-links { border-top: 1px dashed #b08d9f; }
.journal-home .colophon a:focus-visible { outline-color: #ffdb97; }

@media (max-width: 47.99rem) {
  .journal-home :is(#what-it-is, #the-year, #private, #waiting-list) {
    margin-inline: clamp(.5rem, 2.8vw, 1.5rem);
    max-width: none;
  }
}
@media (prefers-contrast: more) {
  #what-it-is .cards .card, .journal-home .cover-copy { background-image: none; }
  .journal-home .section a { text-decoration-thickness: .14em; }
}
@media (forced-colors: active) {
  #what-it-is .card, #the-year .plate, #private .promises, #waiting-list .waitlist-card { outline-color: CanvasText; }
  .journal-home .colophon .wordmark { filter: none; background-color: white; }
}
@media print {
  .journal-home :is(#what-it-is, #the-year, #private) {
    display: block;
    margin: 0;
    border: 0;
    max-width: none;
  }
  .journal-home #waiting-list { display: none; }
  .journal-home :is(.section-head, .cards, .card, .plate, .plate .mat, .year-prose, .promises, #private, .colophon) {
    background: white !important;
  }
  .journal-home :is(#what-it-is, #the-year, #private, .colophon),
  .journal-home :is(#what-it-is, #the-year, #private, .colophon) * {
    color: black !important;
    outline: 0;
  }
  #what-it-is .section-head::before, #what-it-is .section-head::after, #what-it-is .cards::after,
  .journal-home .colophon::before { display: none; }
  .journal-home :is(.section .reveal, .colophon) { opacity: 1; transform: none; }
  .journal-home .colophon .wordmark { filter: none; }
}
