/* Literata and IBM Plex Mono, served from this site (SIL Open Font License, see fonts/). */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/front/fonts/IBMPlexMono-normal-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/front/fonts/IBMPlexMono-normal-500.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url(/front/fonts/Literata-italic-300-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Literata';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/front/fonts/Literata-normal-300-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
 * Life Books, the front page.
 *
 * Paper, ink and Literata, as in the books, with IBM Plex Mono for labels, dates and codes. In the
 * brand, teal means this week and oxide means the church year, so neither is used to decorate.
 * A focus ring is ink on paper and paper on ink, for the same reason.
 * The page is paper only and runs no script.
 */

:root {
  --paper: #FBFAF7;
  --sheet: #FFFEFB;
  --stripe: #F4EEE3;
  --ink: #1C1B19;
  --soft: #4A463F;
  --muted: #7A746B;
  --grid: #D2CEC7;
  --cell: #C9C4BA;
  --faint: #E8E4DC;
  --teal: #1F4E5F;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --page: 76rem;
  --gutter: clamp(1rem, 5vw, 3.5rem);
  --section: clamp(5rem, 11vw, 10rem);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (min-width: 48rem) {
  body { font-size: 1.125rem; }
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
figure { margin: 0; }

.page {
  width: min(100% - 2 * var(--gutter), var(--page));
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* ---------------------------------------------------------------- labels */

.eyebrow, .label, .key, .specs, .anatomy, .source,
.sections a, figcaption.page {
  font-family: var(--mono);
  font-size: .75rem;
  line-height: 1.5;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--soft);
}

.eyebrow { margin: 0 0 1.25rem; }

/* ---------------------------------------------------------------- the masthead */

.masthead { padding: clamp(1rem, 2.5vw, 1.75rem) 0; }

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}
/* 32 pixels is the brand's floor for the seven by ten mark: below it the columns run together. */
.brand img { width: 32px; height: auto; }
.brand span {
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.01em;
  line-height: 1;
}

.sections { display: none; gap: 2.25rem; }
.sections a { text-decoration: none; letter-spacing: .12em; }
.sections a:hover { color: var(--ink); text-decoration: underline; }

@media (min-width: 64rem) {
  .sections { display: flex; margin-left: auto; margin-right: 1rem; }
}

.signin {
  display: inline-flex;
  align-items: center;
  padding: .6rem 1.25rem .65rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.signin:hover { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------------------------- the opening */

.hero { padding: clamp(2.5rem, 6.5vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem); }

.hero h1 {
  font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  max-width: 20ch;
}

.hero-row {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  margin-top: clamp(1.75rem, 4vw, 3.25rem);
}

@media (min-width: 64rem) {
  .hero-row {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: start;
  }
  .hero-grid { padding-top: .55rem; }
}

.lede {
  max-width: 34rem;
  font-size: clamp(1.15rem, 1.02rem + .5vw, 1.4rem);
  line-height: 1.55;
  color: var(--soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .85rem 1.6rem .9rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s, color .2s, border-color .2s;
}
.button:hover { background: var(--soft); border-color: var(--soft); }

.onward {
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--grid);
  padding-bottom: .15rem;
}
.onward::after { content: "\2193" / ""; margin-left: .35em; }
.onward:hover { border-bottom-color: var(--ink); }

.lede-more {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--soft);
}

.member {
  margin-top: 1.5rem;
  font-size: .95rem;
  color: var(--soft);
}

.weeks { width: 100%; height: auto; }

.key {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  margin-top: 1.1rem;
  letter-spacing: .1em;
}
.key span { display: inline-flex; align-items: center; gap: .55rem; }
.key span::before {
  content: "";
  width: .7rem;
  height: .7rem;
  border-radius: 1px;
}
.key-lived::before { background: var(--ink); }
.key-now::before { border: 2px solid var(--teal); }
.key-open::before { border: 1px solid var(--cell); }

/* ---------------------------------------------------------------- the shelf */

.band img {
  width: 100%;
  max-width: 123rem;
  margin-inline: auto;
  height: clamp(17rem, 52vw, 46rem);
  object-fit: cover;
  object-position: 50% 42%;
}

figcaption.page {
  margin-top: .9rem;
  letter-spacing: .1em;
}

/* ---------------------------------------------------------------- sections */

.parts, .rhythm, .reasons, .privacy { padding: var(--section) 0; }

.section-head { max-width: 40rem; }
.section-head h2, .faith h2, .invite h2 {
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -.02em;
}
.intro {
  margin-top: 1.25rem;
  font-size: clamp(1.12rem, 1.02rem + .4vw, 1.3rem);
  line-height: 1.55;
  color: var(--soft);
}

/* the parts */

.cards {
  display: grid;
  gap: clamp(3.5rem, 6vw, 4rem) clamp(1.5rem, 3vw, 2.75rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}

@media (min-width: 64rem) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* On a tablet each part sits beside its picture rather than under a picture the width of the page. */
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .card {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    column-gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
  }
  .card > img, .card > .code-card { grid-column: 1; grid-row: 1 / span 6; }
  .card > :not(img):not(.code-card) { grid-column: 2; }
  .card .label { margin-top: 0; }
}

.card > img, .code-card {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 3px;
}
.card .label { margin-top: 1.6rem; }
.card h3 {
  margin-top: .5rem;
  font-size: clamp(1.5rem, 1.3rem + .6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -.01em;
}
.card h3 + p { margin-top: .9rem; }
.card p + p { margin-top: .8rem; }
.card p:not(.label) { color: var(--soft); }

.specs {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  border-top: 1px solid var(--faint);
  letter-spacing: .08em;
}
.specs li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--faint);
}

/* the page code, drawn: the foot of a printed page, with its code and its square */

.code-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--stripe);
  container-type: inline-size;
}
/* The drawing takes what the labels leave, so a label that wraps lifts the page rather than
   running under it. */
.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.sheet {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 12%;
  bottom: 8%;
  background: var(--sheet);
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(28, 27, 25, .08), 0 18px 40px -22px rgba(28, 27, 25, .35);
  transform: rotate(-2deg);
}
.sheet .rule {
  position: absolute;
  left: 9%;
  right: 9%;
  height: 1px;
  background: var(--faint);
}
.sheet .rule:nth-child(1) { top: 16%; }
.sheet .rule:nth-child(2) { top: 30%; }
.sheet .rule:nth-child(3) { top: 44%; }
.sheet .rule:nth-child(4) { top: 58%; }
.corner {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 9%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .9rem;
}
.code {
  font-family: var(--mono);
  font-size: clamp(.78rem, .62rem + .55vw, 1rem);
  letter-spacing: .12em;
  line-height: 1;
  color: var(--ink);
}
.qr { width: 23%; min-width: 44px; height: auto; }

.anatomy {
  flex: none;
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: 0 7% 5.5%;
  font-size: .75rem;
  letter-spacing: .06em;
  line-height: 1.35;
}
.anatomy span { display: grid; gap: .15rem; }
.anatomy b { font-weight: 500; color: var(--ink); letter-spacing: .12em; }

/* ---------------------------------------------------------------- inside the book */

.inside {
  padding: clamp(5rem, 10vw, 9rem) 0;
  background: var(--stripe);
}

.contents {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 0;
  display: grid;
  gap: 0 clamp(2rem, 5vw, 4rem);
}

@media (min-width: 48rem) {
  .contents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.contents > div {
  padding: 1.1rem 0 1.2rem;
  border-top: 1px solid var(--grid);
  color: var(--soft);
}
.contents dd { margin: 0; }
.contents .label {
  display: block;
  margin-bottom: .35rem;
  color: var(--ink);
}

/* ---------------------------------------------------------------- the rhythm */

.rhythm-grid { display: grid; gap: clamp(3rem, 6vw, 4rem); }

@media (min-width: 64rem) {
  .rhythm-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
  .rhythm-head { position: sticky; top: 2.5rem; }
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(3.25rem, 6vw, 5rem);
}

.step img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 3px;
}
.step-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .75rem;
  margin-top: 1.4rem;
  max-width: 36rem;
}
.step h3 {
  font-size: clamp(1.45rem, 1.25rem + .6vw, 1.8rem);
  line-height: 1.2;
}
.step p { color: var(--soft); }

/* ---------------------------------------------------------------- the reasons */

.reasons { background: var(--paper); border-top: 1px solid var(--faint); }

.reasons-grid { display: grid; gap: clamp(3rem, 6vw, 4rem); }

/* The heading and the notes come first in the page, so a narrow screen and a screen reader meet
   the section's title before its picture. A wide screen puts the picture in the left column. */
@media (min-width: 64rem) {
  .reasons-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
  .reasons-photo { grid-column: 1; grid-row: 1; position: sticky; top: 2.5rem; }
  .reasons-text { grid-column: 2; grid-row: 1; }
}

.reasons-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
}

@media (min-width: 40rem) and (max-width: 63.99rem) {
  .reasons-photo img { aspect-ratio: 3 / 2; object-position: 50% 62%; }
}

.notes {
  display: grid;
  gap: 2.5rem 2.5rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}

@media (min-width: 40rem) {
  .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.note {
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
}
.note h3 {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
}
.note h3 + p {
  margin-top: .85rem;
  font-size: 1.15rem;
  line-height: 1.5;
}
.note p + p:not(.source) { margin-top: .6rem; }
.source {
  margin-top: 1rem;
  font-size: .75rem;
  letter-spacing: .08em;
  line-height: 1.6;
}

/* ---------------------------------------------------------------- faith */

.faith {
  padding: var(--section) 0;
  background: var(--stripe);
}

.faith-grid { display: grid; gap: clamp(3rem, 6vw, 4.5rem); align-items: start; }

@media (min-width: 64rem) {
  .faith-grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 6rem; }
  .faith-text { position: sticky; top: 2.5rem; }
}

.faith-text h2 + p { margin-top: 1.5rem; }
.faith-text p { max-width: 36rem; color: var(--soft); }
.faith-text p + p { margin-top: 1rem; }

.editions {
  padding: clamp(2rem, 5vw, 3rem);
  background: var(--sheet);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(28, 27, 25, .06), 0 28px 60px -36px rgba(28, 27, 25, .4);
}
.edition { margin-top: 1.5rem; }
.edition + .edition { margin-top: 2.25rem; }
.edition h3 {
  font-size: clamp(1.45rem, 1.25rem + .6vw, 1.8rem);
  line-height: 1.2;
}
.edition ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  border-top: 1px solid var(--faint);
}
.edition li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--faint);
  color: var(--soft);
}
.edition i { font-style: italic; }
.nowrap { white-space: nowrap; }
.ask { margin-top: 1rem; }
.ask a { font-weight: 500; }

/* ---------------------------------------------------------------- privacy */

.privacy { border-top: 1px solid var(--faint); }

.privacy-grid { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); }

@media (min-width: 64rem) {
  .privacy-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }
}

.assurances {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--faint);
}

.assurances li {
  position: relative;
  padding: 1.15rem 0 1.15rem 2rem;
  border-bottom: 1px solid var(--faint);
}
/* A week square for a bullet: the board's own mark, filled because each one is kept. */
.assurances li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.62rem;
  width: .6rem;
  height: .6rem;
  border-radius: 1px;
  background: var(--ink);
}

.more { margin-top: 1.75rem; }
.more a { font-weight: 500; }

/* ---------------------------------------------------------------- invitations */

.invite {
  padding: var(--section) 0;
  background: var(--ink);
  color: var(--paper);
}
.invite :focus-visible { outline-color: var(--paper); }
.invite .eyebrow { color: #C4BEB3; }
.invite .intro { color: #DDD8CF; max-width: 30rem; }
.invite-note { margin-top: 1rem; max-width: 30rem; color: #DDD8CF; }

.invite-grid { display: grid; gap: clamp(3rem, 6vw, 4rem); }

@media (min-width: 64rem) {
  .invite-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 6rem; align-items: start; }
}

.invite-main .button { margin-top: 2.25rem; }
.button-paper {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
  max-width: 100%;
  overflow-wrap: normal;
}
.button-paper:hover { background: var(--stripe); border-color: var(--stripe); }

.invite-side { display: grid; gap: 2.25rem; }
.invite-block {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(251, 250, 247, .28);
}
.invite-block h3 {
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #C4BEB3;
}
.invite-block p { margin-top: .7rem; color: #DDD8CF; }
.invite-block a { color: var(--paper); font-weight: 500; }

/* ---------------------------------------------------------------- the colophon */

.colophon {
  padding: clamp(3.5rem, 7vw, 5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  background: var(--paper);
}

.colophon-grid {
  display: grid;
  gap: 2.25rem;
}

@media (min-width: 64rem) {
  .colophon-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    column-gap: 4rem;
  }
  .notices { grid-column: 1 / -1; }
}

.maker { margin-top: 1.1rem; }
.maker a { font-weight: 500; }

.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.75rem;
  align-content: start;
}
@media (min-width: 64rem) {
  .colophon-links { justify-content: flex-end; }
}
.colophon-links a { text-decoration: none; }
.colophon-links a:hover { text-decoration: underline; }

.notices {
  padding-top: 1.5rem;
  border-top: 1px solid var(--faint);
  display: grid;
  gap: .35rem;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--soft);
}

/* ---------------------------------------------------------------- high contrast */

/* Forced colors drop backgrounds, so the filled squares are painted in the text color. */
@media (forced-colors: active) {
  .key-lived::before, .assurances li::before { background: CanvasText; }
}

/* One timeline for the whole family */
.timeline-sec { padding: 4rem 0; }
.timeline-row { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 52rem) { .timeline-row { grid-template-columns: 1fr 1fr; } }
.timeline-text p { margin: 0 0 1rem; max-width: 34rem; }
.timeline-art { margin: 0; }
.timeline-art svg { width: 100%; height: auto; display: block; }
