/* My Catholic Reads -- the parish lending library.
   Pressboard red owns whole fields, white card stock carries the reading, oak closes the page,
   and one date-stamp violet marks every link and control. */

@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-roman.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/assets/fonts/courier-prime-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("/assets/fonts/courier-prime-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --red: #a8201a;          /* pressboard guide card */
  --red-deep: #7e1712;     /* the drawer's lip, in shadow */
  --red-ink: #8f1b16;      /* red text on white */
  --on-red: #fde6e2;       /* secondary text on red, tinted from it */
  --stock: #ffffff;        /* index card */
  --ground: #eceef1;       /* steel cabinet */
  --ground-2: #e2e5ea;
  --rule-red: #d23b2e;     /* the card's header line */
  --rule-blue: #c6d5ec;    /* the card's ruling */
  --ink: #1b1d22;
  --ink-2: #4a4f59;
  --violet: #5a2d91;       /* date-stamp ink: links and controls, nothing else */
  --violet-deep: #431f6e;
  --steel: #c3c8cf;
  --oak: #3f2a1d;
  --on-oak: #eadfd6;
  --line: 1.75rem;         /* one ruled line on the card */
  --serif: "Literata", "Iowan Old Style", Georgia, serif;
  --typed: "Courier Prime", "Courier New", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--violet) var(--ground-2); }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--serif); font-optical-sizing: auto;
  font-size: clamp(1.0625rem, .98rem + .35vw, 1.1875rem); line-height: 1.65;
  caret-color: var(--violet);
  font-variant-numeric: oldstyle-nums proportional-nums;
}
::selection { background: var(--violet); color: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--violet-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.12; text-wrap: balance; font-weight: 600; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(100% - 2.5rem, 78rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: #fff; padding: .5rem 1rem; z-index: 10; font-family: var(--typed); }
.skip:focus { left: 1rem; }

/* Typed things: card fields, labels, tags. */
.cc-head, .cc-meta, .cc-tracings, .cc-label, .tag, .crumbs, .label, .drawer nav, .btn, .strip-by, .box-note .tag,
.slip-stamp, .slip-fine, .see-also, .goods-note, .guides a, figcaption {
  font-family: var(--typed);
}

/* ---- The drawer front: every page's header -------------------------------------------------------------------- */
.drawer { background: var(--red); color: #fff; }
.drawer-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1rem; }
.label {
  display: inline-flex; position: relative; padding: .3rem; margin: 0;
  background: var(--steel); border: 1px solid #9aa1ab;
  border-radius: 3px; text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
}
.label span {
  display: block; background: var(--stock); color: var(--ink); padding: .28rem .9rem .22rem;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .95rem; line-height: 1.2;
}
.label:hover { color: var(--ink); }
.label:hover span { background: #f6f8fb; }
.drawer nav ul { display: flex; gap: .25rem 1.5rem; flex-wrap: wrap; }
.drawer nav a { color: #fff; text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem; padding: .35rem 0; border-bottom: 2px solid transparent; }
.drawer nav a:hover, .drawer nav a[aria-current="page"] { border-bottom-color: #fff; color: #fff; }
.drawer :focus-visible, .hero :focus-visible { outline-color: #fff; }

/* Inner pages: the drawer continues as a band the page's card is pulled up over. */
.band { background: var(--red); color: #fff; padding: .4rem 0 2.5rem; }
.band .lede { color: var(--on-red); margin: 0; }
.band-pulled { padding-bottom: 5rem; }
.pulled { margin-top: -4rem; position: relative; }

/* ---- Home: the drawer pulled open ---------------------------------------------------------------------------- */
.hero { background: var(--red); color: #fff; position: relative; padding-top: clamp(2rem, 1rem + 4vw, 4.5rem); }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 3rem 4rem; align-items: end; }
.hero-copy { padding-bottom: clamp(3.5rem, 2rem + 4vw, 6rem); }
.hero h1 {
  font-size: clamp(2.6rem, 1.4rem + 4.2vw, 5.25rem); font-variation-settings: "opsz" 72; font-weight: 600;
  letter-spacing: -.025em; line-height: 1.0; margin-bottom: 1.5rem; max-width: 12ch;
}
.hero-copy p { color: var(--on-red); max-width: 34rem; font-size: 1.12em; }
.hero-card { position: relative; z-index: 1; margin-bottom: -1px; }
.hero-card .catcard { --behind: var(--red-deep); padding-bottom: calc(4.25rem + var(--line) * 2); box-shadow: 0 -10px 30px -16px rgba(0,0,0,.45), 0 2px 6px rgba(0,0,0,.2); }
.lip {
  position: relative; z-index: 2; height: 4.25rem; margin-top: -4.25rem;
  background: linear-gradient(180deg, var(--red-deep), #6b130f);
  box-shadow: 0 -6px 14px -6px rgba(0,0,0,.45);
}
.lip::after { /* the drawer pull */
  content: ""; position: absolute; left: 50%; top: 1.05rem; width: 7.5rem; height: 1.6rem; translate: -50% 0;
  border-radius: 0 0 4rem 4rem; background: var(--steel); border: 1px solid #9aa1ab; border-top: 0;
  box-shadow: 0 3px 6px rgba(0,0,0,.4);
}

/* Subject guides standing up out of the drawer. */
.guides { background: var(--ground); border-bottom: 2px solid var(--red); }
.guides ul { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: 1.75rem; }
.guides a {
  display: block; background: var(--stock); color: var(--ink); text-decoration: none;
  padding: .55rem 1.05rem .5rem; border-radius: 6px 6px 0 0; font-size: .9rem; letter-spacing: .04em;
  border-top: 3px solid var(--red); box-shadow: 0 -2px 6px -3px rgba(27,29,34,.25);
  transition: translate .35s var(--ease), background-color .2s;
}
.guides a:hover { translate: 0 -3px; background: #fff; color: var(--violet); }

/* ---- Layout with the margin ---------------------------------------------------------------------------------- */
.with-margin { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 3rem 4rem; padding-block: 3rem 5rem; align-items: start; }
.pulled.with-margin { padding-top: 0; }
.main-col { min-width: 0; }
.sect + .sect { margin-top: 4rem; }
.sect > h2, .more h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-variation-settings: "opsz" 48; letter-spacing: -.01em;
  margin-bottom: 1.5rem; padding-bottom: .5rem; border-bottom: 2px solid var(--red);
}
.page-title { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.5rem); font-variation-settings: "opsz" 72; letter-spacing: -.02em;
  color: #fff; margin: .9rem 0 .75rem; max-width: 22ch; }
.lede { font-size: 1.15em; color: var(--ink-2); max-width: 40rem; }
.crumbs { font-size: .85rem; color: var(--on-red); letter-spacing: .02em; padding-top: .1rem; }
.crumbs a { color: #fff; }
.crumbs a:hover { color: #fff; }
.crumbs span[aria-current] { color: var(--on-red); }

/* ---- The catalogue card ---------------------------------------------------------------------------------------- */
.catcard {
  --behind: var(--ground);
  --pad: clamp(1.25rem, .8rem + 2vw, 2.5rem);
  position: relative; background-color: var(--stock); color: var(--ink);
  padding: 0 var(--pad) calc(var(--line) * 2);
  border-radius: 2px;
  /* Every text row is one ruled line tall, so the type sits on the card's own ruling. */
  background-image:
    linear-gradient(var(--rule-red), var(--rule-red)),
    repeating-linear-gradient(180deg, transparent 0 calc(var(--line) - 1px), var(--rule-blue) calc(var(--line) - 1px) var(--line));
  background-size: 100% 2px, 100% calc(100% - var(--line) * 2);
  background-position: 0 calc(var(--line) * 2 - 2px), 0 calc(var(--line) * 2);
  background-repeat: no-repeat;
  box-shadow: 0 1px 2px rgba(27,29,34,.12), 0 14px 32px -18px rgba(27,29,34,.4);
}
.catcard p { margin: 0; }
.cc-head { display: flex; gap: 1.5rem; align-items: flex-end; height: calc(var(--line) * 2); padding-bottom: .4rem; font-size: .9rem; letter-spacing: .02em; color: var(--ink-2); }
.cc-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-class { flex: none; font-weight: 700; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.cc-title { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); font-variation-settings: "opsz" 60; letter-spacing: -.015em; line-height: calc(var(--line) * 2); margin: 0; }
.cc-title em { font-style: italic; font-weight: 500; }
h1.cc-title { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); font-variation-settings: "opsz" 72; }
/* The title is typed across its lines: the card blanks the ruling behind it and keeps the rule under it. */
.cc-title { background: linear-gradient(var(--stock), var(--stock)) no-repeat 0 0 / 100% calc(100% - 1px); position: relative;
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
.catcard .cc-meta { font-size: .9rem; color: var(--ink-2); line-height: var(--line); margin-bottom: var(--line); }
.catcard .cc-dek { font-size: 1.06em; line-height: var(--line); max-width: 40rem; margin-bottom: var(--line); }
.catcard .cc-for { line-height: var(--line); max-width: 40rem; margin-bottom: var(--line); }
.cc-label {
  font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--red-ink); margin-right: .35rem;
}
.catcard .cc-label { line-height: 0; }   /* an inline label in another face must not stretch the ruled line */
.cc-tracings { font-size: .88rem; color: var(--ink-2); line-height: var(--line); }
.catcard .cc-act { margin-top: var(--line); }
.cc-hole { position: absolute; left: 50%; bottom: calc(var(--line) * .5); width: 1rem; height: 1rem; translate: -50% 0; border-radius: 50%;
  background: var(--behind); box-shadow: 0 1px 1px rgba(0,0,0,.25) inset; }
.hero-card .cc-hole { bottom: calc(4.25rem + var(--line) * .5); }
.review > .catcard { margin: 0 0 2.5rem; }

/* A drawer of cards: they rise when pulled. */
.drawer-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1.75rem; }
.catcard.pull { transition: translate .45s var(--ease), box-shadow .45s var(--ease); height: 100%; }
.catcard.pull .cc-title { font-size: clamp(1.45rem, 1.25rem + .6vw, 1.7rem); line-height: var(--line); padding-top: calc(var(--line) * .5); margin-bottom: calc(var(--line) * .5); }
.catcard.pull .cc-dek { font-size: 1em; }
.catcard.pull:hover, .catcard.pull:focus-within {
  translate: 0 -.6rem;
  box-shadow: 0 1px 2px rgba(27,29,34,.12), 0 26px 40px -20px rgba(27,29,34,.5);
}
.stretch { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; }
.catcard.pull:hover .stretch { color: var(--violet); }

/* ---- Buttons and link-kind tags ------------------------------------------------------------------------------- */
.btn {
  display: inline-block; background: var(--violet); color: #fff; text-decoration: none;
  font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; line-height: 1.2;
  padding: .85rem 1.25rem; border-radius: 3px; box-shadow: 0 2px 6px rgba(27,29,34,.22);
  transition: background-color .2s, translate .2s var(--ease);
}
.btn:hover { background: var(--violet-deep); color: #fff; translate: 0 -1px; }
.btn em { font-style: normal; }
.hero-more { font-family: var(--typed); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .9rem; }
.hero-more a { color: #fff; text-decoration-thickness: 2px; }
.hero-more a:hover { color: #fff; text-decoration-thickness: 3px; }
.tag {
  display: inline-block; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; line-height: 1.3;
  padding: .12rem .4rem; border: 1px solid currentColor; border-radius: 2px; vertical-align: .15em; white-space: nowrap;
}
.tag-amazon { color: var(--ink-2); }
.tag-etsy { color: var(--red-ink); }
.tag-free { color: var(--violet); }

/* ---- Reading ---------------------------------------------------------------------------------------------------- */
.prose { max-width: 40rem; }
.prose p { max-width: 68ch; }
.prose h2 { font-size: clamp(1.35rem, 1.15rem + .7vw, 1.65rem); font-variation-settings: "opsz" 36; margin: 2.4em 0 .6em; }
.pull-quote { margin: 2.25rem 0 2.5rem; padding-top: 1.1rem; position: relative; max-width: 36rem; }
.pull-quote::before { content: ""; position: absolute; top: 0; left: 0; width: 4rem; height: 3px; background: var(--rule-red); }
.pull-quote blockquote { margin: 0; }
.pull-quote p { font-style: italic; font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); line-height: 1.32; font-variation-settings: "opsz" 48;
  color: var(--red-ink); margin-bottom: .6rem; }
figcaption { font-size: .85rem; color: var(--ink-2); }

/* The slip at the end: who it is for, stamped. */
.slip {
  position: relative; max-width: 40rem; margin-top: 3rem; padding: 1.5rem clamp(1.25rem, .8rem + 2vw, 2rem) 1.25rem;
  background: var(--stock); border: 1px solid var(--rule-blue);
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--rule-blue) calc(25% - 1px) 25%);
  background-size: 100% .6rem; background-repeat: no-repeat;
}
.slip-stamp { margin: 0; font-size: .9rem; color: var(--ink); }
.slip-for { font-size: 1.12em; margin-top: .5rem; }
.slip-act { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.slip-fine { font-size: .85rem; color: var(--ink-2); margin: 0; }
.more { margin-top: 4rem; max-width: 40rem; }
.more li { padding: .55rem 0; border-bottom: 1px solid var(--rule-blue); }
.more li span { font-family: var(--typed); font-size: .85rem; color: var(--ink-2); margin-left: .4rem; }

/* Quick reviews and lists: strips of card stock. */
.strips { display: grid; gap: 1rem; }
.strip { background: var(--stock); padding: 1.15rem 1.5rem 1rem; border-top: 2px solid var(--rule-red); box-shadow: 0 1px 2px rgba(27,29,34,.1); }
.strip h2, .strip h3 { font-size: 1.35rem; font-variation-settings: "opsz" 36; margin-bottom: .2rem; }
.strip h2 em, .strip h3 em { font-weight: 500; }
.strip-by { font-size: .85rem; color: var(--ink-2); margin-bottom: .6rem; }
.strip p:last-child { margin-bottom: 0; }
.strip-act { font-size: .95em; }
.strips-lists .strip p { font-family: var(--typed); font-size: .85rem; color: var(--ink-2); }
.numbered { counter-reset: n; }
.numbered .strip { counter-increment: n; position: relative; padding-left: 4.25rem; }
.numbered .strip::before {
  content: counter(n); position: absolute; left: 1.4rem; top: 1rem; font-family: var(--typed); font-weight: 700;
  font-size: 1.4rem; color: var(--red-ink); font-variant-numeric: tabular-nums;
}
.see-also { margin-top: 1.5rem; font-size: .95rem; }

.epigraph { margin: 4.5rem 0 0; padding: 2.5rem 0 0; border-top: 2px solid var(--red); max-width: 40rem; }
.epigraph blockquote { margin: 0; }
.epigraph p { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.15rem); font-variation-settings: "opsz" 60; line-height: 1.3; font-style: italic; margin-bottom: .75rem; }

/* ---- The margin ------------------------------------------------------------------------------------------------ */
.margin { display: grid; gap: 1.5rem; }
.box { background: var(--stock); padding: 1.25rem 1.25rem 1.1rem; box-shadow: 0 1px 2px rgba(27,29,34,.1); border-top: 2px solid var(--rule-red); }
.box h2 { font-size: 1.2rem; font-variation-settings: "opsz" 30; margin-bottom: .5rem; }
.box-note { font-size: .9rem; line-height: 1.5; color: var(--ink-2); }
.box-fine { font-size: .8rem; color: var(--ink-2); margin: .9rem 0 0; }
.box-more { font-size: .92rem; margin: .9rem 0 0; }
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem .75rem; }
.shop a { display: block; text-decoration: none; color: var(--ink); font-size: .85rem; line-height: 1.3; }
.shop img { aspect-ratio: 340 / 270; object-fit: cover; width: 100%; margin-bottom: .35rem; background: var(--ground-2); transition: translate .35s var(--ease); }
.shop a:hover { color: var(--violet); }
.shop a:hover img { translate: 0 -3px; }
.shop span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kit { display: block; margin: .25rem 0 .75rem; }
.kit img { width: 100%; }
.goods li { padding: .45rem 0; border-bottom: 1px solid var(--rule-blue); line-height: 1.35; }
.goods li:last-child { border-bottom: 0; }
.goods-note { display: block; font-size: .78rem; color: var(--ink-2); }

/* ---- Oak --------------------------------------------------------------------------------------------------------- */
.oak { background: var(--oak); color: var(--on-oak); padding-block: 3rem 3.5rem; font-size: .95rem; }
.oak-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem 4rem; }
.oak a { color: #fff; }
.oak a:hover { color: #fff; }
.oak .label { margin-bottom: 1rem; }
.oak-links li { padding: .2rem 0; }
.oak-fine { grid-column: 1 / -1; font-size: .85rem; color: #cdbfb3; margin: 0; padding-top: 1.25rem; border-top: 1px solid rgba(234,223,214,.25); }
.oak :focus-visible { outline-color: #fff; }

/* ---- Narrow ------------------------------------------------------------------------------------------------------ */
@media (max-width: 62rem) {
  .with-margin { grid-template-columns: minmax(0, 1fr); }
  .hero-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .hero-copy { padding-bottom: 2.25rem; }
  .oak-row { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  .wrap { width: min(100% - 1.75rem, 78rem); }
  .drawer-row { padding-block: .8rem; gap: .6rem 1rem; }
  .label span { font-size: .82rem; padding-inline: .6rem; }
  .drawer nav ul { gap: .2rem 1.1rem; }
  .drawer nav a { font-size: .78rem; }
  .cc-head { gap: 1rem; font-size: .8rem; }
  .catcard { --pad: 1.1rem; }
  .shop { grid-template-columns: 1fr 1fr; }
  .hero-copy p:not(.hero-more), .hero-more { display: none; }   /* phone: label, headline, then the card */
  .hero { padding-top: .75rem; }          /* 2026-11-15: bring "Read the review" above the phone fold */
  .hero h1 { margin-bottom: .9rem; }
  .numbered .strip { padding-left: 3.4rem; }
  .numbered .strip::before { left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .catcard.pull:hover, .catcard.pull:focus-within, .guides a:hover, .shop a:hover img, .btn:hover { translate: none; }
}
