:root {
  color-scheme: light dark;
  --leather: #6e2b26;
  --leather-deep: #4f1d19;
  --band: #1c1716;
  --gold: #d6a13a;
  --tan: #e8dcc4;
  --paper: #fbf6ec;
  --page-edge: #efe5d2;
  --ink: #2e2622;
  --ink-soft: #5c4e46;
  --link: #8c3324;
  --rule: #ddcdb0;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Charter, Georgia, serif;
  --measure: 36rem;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --leather: #5c231f;
    --leather-deep: #3e1613;
    --paper: #1d1513;
    --page-edge: #281d1a;
    --ink: #ebdfca;
    --ink-soft: #bcab94;
    --link: #e2b45e;
    --rule: #43332d;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

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

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

h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }
p, ul, ol { margin: 0 0 1rem; }

/* The leather cover. The inset frame and the elastic band come from the app icon. */
.cover {
  position: relative;
  background-color: var(--leather);
  background-image:
    radial-gradient(circle at 22% 18%, rgb(255 255 255 / 0.09), transparent 55%),
    radial-gradient(rgb(0 0 0 / 0.16) 0.8px, transparent 1.3px);
  background-size: auto, 5px 5px;
  color: var(--tan);
  border-bottom: 6px solid var(--leather-deep);
}

.cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid rgb(0 0 0 / 0.24);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.07), inset 0 1px 0 rgb(255 255 255 / 0.07);
  pointer-events: none;
}

.cover::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: -6px;
  right: clamp(1.5rem, 9vw, 7rem);
  width: clamp(14px, 2vw, 24px);
  background: linear-gradient(90deg, #000 0, var(--band) 30%, #2a2322 70%, #000 100%);
  pointer-events: none;
}

.cover-inner {
  position: relative;
  max-width: 64rem;
  margin: 0 auto;
  padding: 4.5rem calc(var(--gutter) + 2.5rem) 5rem calc(var(--gutter) + 1rem);
}

.wordmark {
  margin: 0 0 1.25rem;
  font-size: clamp(3.4rem, 13vw, 6.5rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 -1px 0 rgb(0 0 0 / 0.45), 0 1px 0 rgb(255 255 255 / 0.12);
}

.lede {
  max-width: 28rem;
  font-size: clamp(1.25rem, 4.2vw, 1.55rem);
  line-height: 1.45;
  margin-bottom: 1.5rem;
}

.availability { margin: 0; color: rgb(232 220 196 / 0.82); font-size: 1.05rem; }

/* Gold ribbon hanging out of the cover's bottom edge. */
.ribbon {
  position: absolute;
  left: calc(var(--gutter) + 1rem);
  bottom: -3.4rem;
  width: 1.6rem;
  height: 3.4rem;
  background: linear-gradient(90deg, #b8862c, var(--gold) 45%, #e7bb5f 60%, #c2902f);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}

.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 5rem var(--gutter) 2rem;
}

.section { margin-bottom: 4.5rem; }

.promises {
  display: grid;
  gap: 2rem;
}

.promise {
  border-top: 2px solid var(--gold);
  padding-top: 1rem;
  max-width: var(--measure);
}

.promise p { color: var(--ink-soft); margin: 0; }

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shots figure { margin: 0; }

.shots img {
  border-radius: 10px;
  border: 1px solid var(--rule);
  box-shadow: 0 1px 0 var(--page-edge), 0 10px 24px -14px rgb(46 20 16 / 0.45);
}

.shots figcaption {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.plain { max-width: var(--measure); }

/* Header strip on the inner pages: the notebook's spine. */
.spine {
  position: relative;
  background-color: var(--leather);
  background-image: radial-gradient(rgb(0 0 0 / 0.16) 0.8px, transparent 1.3px);
  background-size: 5px 5px;
  border-bottom: 4px solid var(--leather-deep);
}

.spine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: -4px;
  right: clamp(1.5rem, 9vw, 7rem);
  width: 14px;
  background: linear-gradient(90deg, #000 0, var(--band) 30%, #2a2322 70%, #000 100%);
}

.spine-inner {
  max-width: 64rem;
  margin: 0 auto;
  padding: 1rem calc(var(--gutter) + 2.5rem) 1rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.home {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 600;
  text-decoration: none;
  margin-right: auto;
}

.home img { width: 36px; height: 36px; border-radius: 8px; }

.spine nav { display: flex; gap: 1.25rem; }
.spine nav a { color: var(--tan); }
.spine nav a[aria-current="page"] { text-decoration: none; color: var(--gold); }

.doc {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 3rem var(--gutter) 2rem;
  line-height: 1.65;
}

.doc h1 { font-size: clamp(2rem, 7vw, 2.6rem); margin: 0 0 0.5rem; }
.doc h2 { font-size: 1.35rem; margin: 2.5rem 0 0.6rem; }
.doc .meta { color: var(--ink-soft); margin-bottom: 2rem; }
.doc li { margin-bottom: 0.4rem; }
.doc ol, .doc ul { padding-left: 1.4rem; }

.footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 3rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.footer p { margin: 0; }

@media (min-width: 46rem) {
  .promises { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
  .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
  .cover-inner { padding-top: 6.5rem; padding-bottom: 7rem; }
}
