/*
 * Black Zine Fair: the neutral pages (home, archive, merch, FAQ, apply, links).
 * Same paper as sojourners4justice.press, inverted: brown paper, cream ink.
 * The year pages (2026.html, /readingroom/, /detroit/, the tee pages) keep their own styles.
 *
 * Inside the page, rules and boxes are thin solid lines; only the paper itself is drawn with dashes.
 *
 * Sections: 1 fonts and colors · 2 the paper · 3 letterhead · 4 page content
 *           5 cards (archive, merch) · 6 links page · 7 footer · 8 phones and Simple reading
 */

/* 1. fonts and colors ------------------------------------------------------ */
@font-face { font-family: "Hershey"; src: url("/paper/Hershey-Noailles-Futura-Simplex-Regular.woff2") format("woff2"), url("/paper/Hershey-Noailles-Futura-Simplex-Regular.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Hershey Bold"; src: url("/paper/Hershey-Noailles-Futura-Simplex-Bold.woff2") format("woff2"), url("/paper/Hershey-Noailles-Futura-Simplex-Bold.woff") format("woff"); font-display: swap; }
@font-face { font-family: "Hershey Times Bold"; src: url("/paper/Hershey-Noailles-Times-Simplex-Bold.woff2") format("woff2"), url("/paper/Hershey-Noailles-Times-Simplex-Bold.woff") format("woff"); font-display: swap; }
@font-face { font-family: "NotCourierSans"; src: url("/paper/NotCourierSans.woff2") format("woff2"), url("/paper/NotCourierSans.woff") format("woff"); font-display: swap; }

:root {
  --paper: #7a4a3e;   /* brown paper (a shade deeper than SJP's ink, so cream text stays easy to read) */
  --ink: #f6ede3;     /* cream, SJP's paper color */
  --focus: #f2cdcf;
  /* the drawing is 65 characters by 50 lines (wide), 49 by 43 (medium), 33 by 39 (narrow);
     a NotCourierSans character is .6em wide, so the paper fits the window both ways */
  --cols: 39; --rows: 50;
  --paper-size: min(22px, calc((100vw - 3rem) / var(--cols)), calc((100dvh - 3rem) / var(--rows)));
}
* { box-sizing: border-box; }
html, body { background: var(--paper); }
body { margin: 0; color: var(--ink); font: clamp(16px, 1.45vw, 19px)/1.5 "Hershey", system-ui, sans-serif; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -100px; z-index: 10; background: var(--paper); padding: .5rem .75rem; }
.skip-link:focus { top: 12px; }
.ascii { margin: 0; font-family: "NotCourierSans", monospace; font-weight: 400; line-height: 1; letter-spacing: 0; white-space: pre; font-variant-ligatures: none; font-kerning: none; }

/* 2. the paper -------------------------------------------------------------- */
.desk { display: flex; justify-content: center; align-items: flex-start; min-height: 100dvh; padding: 1.5rem 1rem; }
.sheet { position: relative; width: max-content; transform: rotate(-.35deg); }
.ascii-frame { color: var(--ink); pointer-events: none; }
.ascii-frame .ascii { font-size: var(--paper-size); }
.ascii-medium, .ascii-narrow { display: none; }
.sheet-content {
  position: absolute; inset: 4.5% 8% 4% 7%;
  display: flex; flex-direction: column;
  overflow-y: auto; overscroll-behavior: contain;
  padding-right: .5rem;
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
  transform: rotate(.35deg);
}
@media (max-width: 1050px) { :root { --cols: 29.4; --rows: 43; } .ascii-wide { display: none; } .ascii-medium { display: block; } }

/* 3. letterhead ------------------------------------------------------------- */
.letterhead { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin: 0 0 2rem; }
.letterhead-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; font-size: .8rem; letter-spacing: .04em; }
.letterhead-nav a { text-decoration: none; }
.letterhead-nav a[aria-current="page"] { text-decoration: underline; }
.letterhead-logo { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-decoration: none; font-size: .8rem; }
.letterhead-logo .ascii-logo { font-size: .8rem; line-height: .95; }

/* 4. page content ----------------------------------------------------------- */
main { flex: 1 0 auto; }
h1, h2 { font-family: "Hershey Times Bold", serif; font-weight: 400; line-height: 1.2; }
h1 { font-size: 1.55rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
p { margin: 0 0 1rem; }
.lede, .intro p { font-size: 1.1em; }
.next-fair { border: 1px solid var(--ink); padding: .6rem .9rem; display: inline-block; }
.home-poster { margin: 2rem 0; }
.home-poster img { width: min(100%, 26rem); }
.home-poster figcaption { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .6rem; font-size: .9em; }
.home-poster .all-fairs { margin-left: auto; }
.press { margin-top: 2.5rem; }
.quote { margin: 0 0 1.75rem; padding-top: 1rem; border-top: 1px solid var(--ink); }
.quote blockquote { margin: 0; }
.quote p { margin: 0 0 .5rem; }
.quote figcaption { display: flex; gap: 1rem; font-size: .85em; }
.faq-item h2 { font-size: 1.35rem; margin-top: 2.25rem; }
.agreements { margin: 0; padding-left: 1.4rem; }
.agreements li { margin-bottom: .9rem; }
.agreements strong { font-family: "Hershey Bold", sans-serif; font-weight: 400; }
.button { display: inline-block; border: 1px solid var(--ink); padding: .5rem 1rem; text-decoration: none; }
.button:hover { background: var(--ink); color: var(--paper); }

/* 5. cards (archive, merch) ------------------------------------------------- */
.cards { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 1.75rem 1.25rem; }
.card a { display: flex; flex-direction: column; gap: .35rem; text-decoration: none; }
.card-image { display: block; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--ink); padding: .4rem; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-title { font-family: "Hershey Bold", sans-serif; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.card a:hover .card-title { text-decoration: none; }
.card-meta { font-size: .85em; }

/* 6. links page ------------------------------------------------------------- */
.links-section { text-align: center; margin: 0 auto 1.5rem; max-width: 26rem; }
.links-section h2 { margin: 0 0 .5rem; }
.links-section ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.links-section li { border-bottom: 1px solid var(--ink); }
.links-section a { display: flex; flex-direction: column; padding: .6rem 0; text-decoration: none; }
.links-sub { font-size: .8em; }
.links-section a:hover .links-title { text-decoration: underline; }
.links-empty { padding: .6rem 0; font-size: .85em; }

/* 7. footer ----------------------------------------------------------------- */
.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem; margin-top: 2.5rem; padding-top: .75rem; font-size: .75rem; }
.site-footer-contact { position: relative; justify-self: start; }
.site-footer-contact summary { list-style: none; cursor: pointer; }
.site-footer-contact summary::-webkit-details-marker { display: none; }
.site-footer-links { position: absolute; bottom: calc(100% + .5rem); left: 0; display: flex; flex-direction: column; gap: .3rem; padding: .6rem .8rem; background: var(--paper); border: 1px solid var(--ink); white-space: nowrap; }
.site-footer-links a::after { content: " ↗"; }
.site-footer-sjp { text-decoration: none; }
.reading-toggle { justify-self: end; }

/* 8. phones and Simple reading ---------------------------------------------- */
/* Simple reading (and every phone): no drawn paper, one plain dashed sheet that grows with its content. */
@media (max-width: 700px) {
  .desk { padding: .75rem; }
  .sheet { width: 100%; transform: none; border: 1px dashed var(--ink); }
  .ascii-frame { display: none; }
  .sheet-content { position: static; overflow: visible; padding: 1.25rem 1rem; transform: none; min-height: calc(100dvh - 1.5rem); }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer-sjp { grid-column: 1 / -1; grid-row: 1; justify-self: center; }
  .reading-toggle { display: none; }
}
html.reading-mode .desk { padding: 1.5rem 1rem; }
html.reading-mode .sheet { width: min(100%, 44rem); transform: none; border: 1px dashed var(--ink); }
html.reading-mode .ascii-frame { display: none; }
html.reading-mode .sheet-content { position: static; overflow: visible; padding: 2rem 2.25rem; transform: none; min-height: calc(100dvh - 3rem); }
