/* Indubitable Press — shared styles
   Typeface: URW Gothic via self-hosted TeX Gyre Adventor (GUST e-foundry build,
   free to embed). Drop texgyreadventor-regular.woff2 and texgyreadventor-bold.woff2
   into /fonts/. Until then the stack falls back to Century Gothic / generic sans. */

@font-face {
  font-family: "TeX Gyre Adventor";
  src: url("fonts/texgyreadventor-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeX Gyre Adventor";
  src: url("fonts/texgyreadventor-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #fdfcfa;
  --ink: #1c1a18;
  --muted: #6f6a64;
  --oxblood: #6e2a2a;
  --oxblood-dark: #511d1d;
  --hairline: #e4ded6;
  --panel: #f7f3ee;
  --maxw: 62rem;
  --measure: 64ch;
  --gothic: "TeX Gyre Adventor", "Century Gothic", "URW Gothic L", "Avant Garde", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--gothic);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.0625rem;
  overflow-wrap: break-word; /* long URLs/emails never blow out the layout */
}

/* Layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

img { max-width: 100%; height: auto; } /* images (e.g. future covers) stay inside their box */

p { max-width: var(--measure); }
.lead { font-size: 1.15rem; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Links */
a { color: var(--oxblood); text-decoration: none; }
a:hover, a:focus { color: var(--oxblood-dark); text-decoration: underline; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--hairline); }
.site-header .wrap {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.95rem; color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark { width: auto; height: 1.5em; display: block; }
.brand picture { display: flex; }
.nav { display: flex; gap: 1.5rem; font-size: 0.9rem; letter-spacing: 0.04em; text-transform: uppercase; }
.nav a { color: var(--muted); }
.nav a:hover { color: var(--oxblood); }

/* Header adapts to the OS dark/light setting (header band only — the page body stays light) */
@media (prefers-color-scheme: dark) {
  .site-header { background: #1c1a18; border-bottom-color: #3a3632; }
  .brand, .brand:hover { color: #fdfcfa; }
  .nav a { color: #a8a099; font-weight: 700; }
  .nav a:hover { color: #e0b4ae; }

  .site-footer { background: #1c1a18; border-top-color: #3a3632; color: #a8a099; font-weight: 700; }
  .site-footer a { color: #a8a099; }
  .site-footer a:hover { color: #e0b4ae; }
}

/* Hero — typographic, dot-pattern motif */
.hero {
  text-align: center;
  padding: clamp(3.5rem, 10vw, 7rem) 1.5rem clamp(3rem, 8vw, 5.5rem);
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(110, 42, 42, 0.15) 1px, transparent 1.6px);
  background-size: 22px 22px;
}
.hero h1 {
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  font-size: clamp(1.8rem, 6vw, 3.25rem); margin: 0 0 0.75rem; line-height: 1.1;
}
.hero .tagline {
  color: var(--muted); font-size: clamp(1rem, 2.5vw, 1.2rem);
  max-width: 36ch; margin: 0 auto;
}
.accent-rule { width: 3rem; height: 3px; background: var(--oxblood); border: 0; margin: 1.5rem auto 0; }

/* Sections */
section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
section + section { border-top: 1px solid var(--hairline); }
.page-head {
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(110, 42, 42, 0.15) 1px, transparent 1.6px);
  background-size: 22px 22px;
}
.section-title {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem;
  color: var(--oxblood); margin: 0 0 1.25rem; font-weight: 700;
}
h1.page-title { font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 0.5rem; }
h2 { font-weight: 700; font-size: clamp(1.4rem, 3.5vw, 1.9rem); line-height: 1.2; margin: 0 0 0.75rem; }
h3 { font-weight: 700; font-size: 1.2rem; margin: 0 0 0.5rem; }
.stack > * + * { margin-top: 1rem; }

/* Catalog */
.catalog { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.book { border: 1px solid var(--hairline); padding: 1.5rem; }
.book-cover { width: 100%; height: auto; border: 1px solid transparent; margin-bottom: 1rem; display: block; }
/* Front-page teaser cards: each element links to the Books page, with its own
   hover cue. Cover is half size here; full-size covers stay on the Books page. */
.catalog--teaser .cover-link { display: block; max-width: 50%; }
.catalog--teaser .cover-link .cover-placeholder,
.catalog--teaser .cover-link .book-cover { transition: border-color 0.15s; }
.catalog--teaser .cover-link:hover .cover-placeholder,
.catalog--teaser .cover-link:hover .book-cover { border-color: var(--oxblood); }
.catalog--teaser h3 a,
.catalog--teaser p a { color: inherit; text-decoration: none; }
.catalog--teaser h3 a:hover,
.catalog--teaser p a:hover { color: var(--oxblood); text-decoration: none; }
.byline { font-size: 0.9rem; }
.book-list { margin: 0.75rem 0; padding-left: 1.2rem; }
.book-list li { margin-bottom: 0.3rem; }
.book .status {
  display: inline-block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--oxblood); border: 1px solid var(--oxblood); padding: 0.15rem 0.5rem; margin-bottom: 0.75rem;
}
.cover-placeholder {
  aspect-ratio: 2 / 3;
  background: #f3efe9 radial-gradient(circle, rgba(110, 42, 42, 0.15) 1px, transparent 1.6px);
  background-size: 18px 18px;
  border: 1px solid var(--hairline);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.8rem; text-align: center; padding: 1rem; margin-bottom: 1rem;
}

/* Pre-prints */
.preprints { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.preprint { border: 1px solid var(--hairline); padding: 1.25rem; }
.preprint .doi { font-size: 0.8rem; color: var(--muted); word-break: break-all; }

/* Forms */
form { max-width: 32rem; }
.field { margin-bottom: 1.1rem; }
label { display: block; font-size: 0.85rem; letter-spacing: 0.03em; margin-bottom: 0.35rem; }
input, textarea {
  width: 100%; font-family: inherit; font-size: 1rem; padding: 0.6rem 0.7rem;
  border: 1px solid var(--hairline); background: #fff; color: var(--ink); border-radius: 2px;
}
input:focus, textarea:focus { outline: 2px solid var(--oxblood); outline-offset: 0; border-color: var(--oxblood); }
textarea { min-height: 8rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot */
button, .btn {
  display: inline-block; font-family: inherit; font-size: 0.9rem; letter-spacing: 0.06em;
  text-transform: uppercase; font-weight: 700; color: #fff; background: var(--oxblood);
  border: 0; padding: 0.7rem 1.4rem; cursor: pointer; border-radius: 2px;
}
button:hover, .btn:hover { background: var(--oxblood-dark); text-decoration: none; color: #fff; }

/* Tinted panels (newsletter etc.) */
.panel { background: var(--panel); }
/* Newsletter signup (posts to Kit; ck.5.js handles inline submit + success) */
.newsletter-form { max-width: 34rem; }
.newsletter-fields { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.newsletter-form input { width: auto; flex: 1 1 14rem; }
.newsletter-form button { flex: 0 0 auto; }
.newsletter-form .formkit-alert { list-style: none; margin: 0 0 0.75rem; padding: 0; font-size: 0.9rem; }
.newsletter-form .formkit-alert:empty { display: none; }
.newsletter-form .formkit-alert-error { color: var(--oxblood); }
.newsletter-form .formkit-alert-success { color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* contact.php response page */
.notice { padding: clamp(3rem, 8vw, 5rem) 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap {
  padding-top: 2rem; padding-bottom: 2.5rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--oxblood); }

/* Small screens (phones) */
@media (max-width: 560px) {
  .wrap { padding: 0 1.15rem; }
  .hero h1 { letter-spacing: 0.06em; } /* wide tracking gets cramped on narrow screens */
  .nav { gap: 1.1rem; }
  .catalog, .preprints { gap: 1.25rem; }
}
