/* Auctora Press. Tokens per DESIGN_PLAN.md section 2 and 3.
   Fonts load from Google Fonts for staging. Self host woff2 subsets before launch. */

:root {
  --ink: #17171c;
  --paper: #fafaf8;
  --shelf: #eceae4;
  --rule: #d2cfc7;
  --press: #22375a;
  --signal: #2f5dd0;

  --serif: Literata, Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, Arial, sans-serif;

  --page: 1200px;
  --measure: 34rem;
  --gap: clamp(1.25rem, 3vw, 2rem);
  --band: clamp(3rem, 7vw, 5.5rem);

  --fs-display: clamp(2.5rem, 1.4rem + 4.6vw, 4.125rem);
  --fs-h1: clamp(2rem, 1.5rem + 2vw, 2.875rem);
  --fs-h2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --fs-h3: clamp(1.1875rem, 1.13rem + 0.28vw, 1.375rem);
  --fs-body: clamp(1.0625rem, 1.04rem + 0.12vw, 1.125rem);
  --fs-meta: clamp(0.875rem, 0.86rem + 0.08vw, 0.9375rem);
}

*, *::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: var(--fs-body);
  line-height: 1.6;
  font-synthesis-weight: none;
}

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

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration-color: var(--press); text-underline-offset: 4px; }
a:hover { color: var(--signal); text-decoration-color: var(--signal); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 1px;
}

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--press); color: var(--paper);
  padding: 0.75rem 1rem; z-index: 100; font-family: var(--sans);
}
.skip:focus { left: 0; }

.wrap { width: min(100% - 2.5rem, var(--page)); margin-inline: auto; }
.prose { max-width: var(--measure); }
/* When .prose sits on the same element as .wrap, the wrap must keep the page
   width and gutter, and the measure applies to each child instead. Otherwise
   margin-inline:auto centers the narrow column and it falls out of alignment
   with every other section on the page. */
.wrap.prose { max-width: none; }
.wrap.prose > * { max-width: var(--measure); }
.meta { font-family: var(--sans); font-size: var(--fs-meta); color: #4a4a52; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Preview banner, only while launchReady is false */
.preview-banner {
  background: var(--press); color: var(--paper);
  font-family: var(--sans); font-size: 0.8125rem;
  text-align: center; padding: 0.5rem 1rem;
}

/* Header */
.site-header { border-bottom: 1px solid var(--press); background: var(--paper); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1rem 0;
}
.wordmark { display: flex; align-items: baseline; gap: 0.5rem; text-decoration: none; }
.wordmark .mark {
  font-family: var(--serif); font-weight: 600; font-size: 1.375rem;
  color: var(--press); letter-spacing: -0.02em;
}
.wordmark .sub {
  font-family: var(--sans); font-size: 0.75rem; color: #56565e;
}

.menu-toggle {
  font-family: var(--sans); font-size: var(--fs-meta);
  background: none; border: 1px solid var(--rule); border-radius: 2px;
  padding: 0.4rem 0.7rem; cursor: pointer; color: inherit;
}
#primary-nav ul {
  list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0;
  font-family: var(--sans); font-size: var(--fs-meta);
}
#primary-nav a { text-decoration: none; }
#primary-nav a:hover, #primary-nav a[aria-current="page"] {
  text-decoration: underline; text-decoration-thickness: 2px;
}

@media (max-width: 860px) {
  #primary-nav {
    display: none; width: 100%; order: 3; padding-bottom: 0.5rem;
  }
  #primary-nav.is-open { display: block; }
  #primary-nav ul { flex-direction: column; gap: 0.85rem; }
  .site-header .wrap { flex-wrap: wrap; }
}
@media (min-width: 861px) { .menu-toggle { display: none; } }

/* Bands */
.band { padding-block: var(--band); }
.band + .band { padding-top: 0; }
.band-shelf { background: var(--shelf); padding-block: var(--band); }
.band-shelf + .band { padding-top: var(--band); }
.band-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.75rem;
}
.band-head h2 { margin: 0; }
.band-head a { font-family: var(--sans); font-size: var(--fs-meta); }

/* Buttons. No arrows, no shadows. */
.btn {
  display: inline-block; font-family: var(--sans); font-size: var(--fs-meta);
  font-weight: 500; padding: 0.7rem 1.15rem; border-radius: 2px;
  text-decoration: none; border: 1px solid var(--press);
  background: var(--press); color: var(--paper); cursor: pointer;
  transition: background-color 120ms linear, border-color 120ms linear;
}
.btn:hover { background: var(--signal); border-color: var(--signal); color: var(--paper); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: transparent; color: var(--signal); border-color: var(--signal); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--band); }
.hero h1 { font-size: var(--fs-display); max-width: 18ch; margin-bottom: 1rem; }
.hero p.lede { max-width: var(--measure); font-size: 1.125rem; }
.hero .btn-row { margin-top: 1.75rem; }

/* Placeholder panels for assets that do not exist yet */
.slot {
  border: 1px dashed var(--rule); background: var(--shelf);
  display: grid; place-items: center; text-align: center;
  font-family: var(--sans); font-size: var(--fs-meta); color: #56565e;
  padding: 2rem 1.5rem; border-radius: 2px; margin-top: 2.5rem;
}
.slot-tall { min-height: 22rem; }

/* Two doors */
.doors { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 720px) { .doors { grid-template-columns: 1fr 1fr; } }
.door {
  background: var(--paper); border: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: 2px;
}
.door h3 { font-size: var(--fs-h2); }
.door .meta { margin-bottom: 1.25rem; }

/* Book grids */
.grid {
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(2, 1fr); list-style: none; margin: 0; padding: 0;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .grid-6 { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 980px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.book-card a { text-decoration: none; display: block; }
.book-card a:hover .book-card-title { color: var(--signal); text-decoration: underline; }
.cover {
  border: 1px solid var(--rule); background: var(--shelf);
  aspect-ratio: 2 / 3; width: 100%; object-fit: contain; border-radius: 2px;
}
.cover-slot {
  display: grid; place-items: center; text-align: center; padding: 0.75rem;
  font-family: var(--sans); font-size: 0.75rem; color: #56565e;
}
/* Keep covers at a believable book size whatever the column count. */
.book-card .cover { max-width: 240px; }
.book-card-title {
  font-family: var(--serif); font-weight: 600; font-size: 1rem;
  line-height: 1.3; margin: 0.65rem 0 0.15rem;
}
.book-card .meta { font-size: 0.8125rem; }

/* Book detail */
.book-head { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 800px) { .book-head { grid-template-columns: 300px 1fr; gap: 3rem; } }
.book-head h1 { margin-bottom: 0.25rem; }
.book-subtitle {
  font-family: var(--serif); font-size: 1.1875rem; font-weight: 400;
  color: #3a3a42; margin: 0 0 1.25rem; max-width: 40ch;
}
.badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 1.25rem; padding: 0; list-style: none; }
.badge {
  font-family: var(--sans); font-size: 0.8125rem; padding: 0.3rem 0.6rem;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--paper);
}
.buy-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; }
.retailer-slot { margin-top: 1rem; }

.book-body { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 860px) { .book-body { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem; } }
.specs { border-top: 1px solid var(--rule); margin: 0; font-family: var(--sans); font-size: var(--fs-meta); }
.specs div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 1rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--rule);
}
.specs dt { color: #56565e; margin: 0; }
.specs dd { margin: 0; }

.inside-list { padding-left: 1.15rem; margin: 0 0 1em; }
.inside-list li { margin-bottom: 0.4em; }

/* Breadcrumbs */
.crumbs { font-family: var(--sans); font-size: var(--fs-meta); padding-top: 1.25rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; color: #8a8a92; margin-right: 0.5rem; }

/* Filters on the catalog page */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; padding: 0; list-style: none; }
.filters a {
  font-family: var(--sans); font-size: var(--fs-meta); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 2px; padding: 0.45rem 0.85rem;
  display: inline-block;
}
.filters a[aria-current="true"] { background: var(--press); color: var(--paper); border-color: var(--press); }

/* Email capture */
.capture { display: grid; gap: var(--gap); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 800px) { .capture { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 3rem; } }
.signup { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.signup input[type="email"] {
  font-family: var(--sans); font-size: var(--fs-meta); padding: 0.7rem 0.85rem;
  border: 1px solid var(--rule); border-radius: 2px; background: var(--paper);
  color: var(--ink); flex: 1 1 16rem; min-width: 0;
}
.signup input:disabled, .signup button:disabled { opacity: 0.55; cursor: not-allowed; }
.form-note { font-family: var(--sans); font-size: 0.8125rem; color: #56565e; margin-top: 0.75rem; }

/* Tables in prose */
.table-scroll { overflow-x: auto; }

/* Footer */
.site-footer { background: var(--press); color: var(--paper); padding-block: var(--band) 2.5rem; margin-top: var(--band); }
.site-footer a { color: var(--paper); text-decoration-color: rgba(250, 250, 248, 0.5); }
.site-footer a:hover { color: var(--paper); text-decoration-color: var(--paper); }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .footer-cols { grid-template-columns: repeat(4, 1fr); } }
.footer-cols h2 { font-family: var(--sans); font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.85rem; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); font-size: var(--fs-meta); }
.footer-cols li { margin-bottom: 0.5rem; }
.footer-base {
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(250, 250, 248, 0.25);
  font-family: var(--sans); font-size: 0.8125rem;
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: space-between;
}
.footer-base ul { list-style: none; display: flex; flex-wrap: wrap; gap: 1.25rem; margin: 0; padding: 0; }

.pending {
  font-family: var(--sans); font-size: 0.8125rem;
  border: 1px dashed currentColor; border-radius: 2px; padding: 0.15rem 0.4rem;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* Imprint mark. Inherits colour, so one file serves header and footer. */
.mark-svg { width: 1.9rem; height: auto; flex: none; color: var(--press); }
.wordmark { gap: 0.6rem; align-items: center; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1.1; }
.wordmark-text .sub { font-family: var(--sans); font-size: 0.7rem; color: #56565e; }
.footer-mark { flex: none; margin: 0 1rem 0 0; }
.footer-mark .mark-svg { width: 2.2rem; color: var(--paper); opacity: 0.9; }
.site-footer .footer-base { align-items: center; }

/* Hero shelf of real covers. */
.shelf {
  display: flex; gap: clamp(0.6rem, 2vw, 1.1rem); list-style: none;
  margin: 2.75rem 0 0; padding: 0; overflow-x: auto; scrollbar-width: thin;
  padding-bottom: 0.5rem;
}
.shelf li { flex: 0 0 auto; }
.shelf img {
  width: clamp(112px, 17vw, 178px); height: auto; aspect-ratio: 2 / 3;
  object-fit: contain; border: 1px solid var(--rule); border-radius: 2px;
  background: var(--shelf);
}
.shelf a:focus-visible img { outline: 2px solid var(--signal); outline-offset: 2px; }

/* Covers are real images now, so the slot styling only applies where one is missing. */
.cover-detail { width: 100%; max-width: 300px; height: auto; aspect-ratio: 2 / 3; object-fit: contain; }

/* Author monogram. No portrait is invented for a pen name. */
.monogram {
  font-family: var(--serif); font-weight: 600; font-size: 4.5rem; line-height: 1;
  color: var(--press); background: var(--shelf); border: 1px solid var(--rule);
  border-radius: 2px; aspect-ratio: 1 / 1; display: grid; place-items: center;
  margin: 0 0 0.75rem; max-width: 240px; letter-spacing: 0.02em;
}

/* People write to the press instead of filling in a form. No email platform is
   connected, so nothing on this site collects an address. */
.ask-note {
  font-family: var(--sans); font-size: 0.9375rem; line-height: 1.55;
  color: #3a3a42; background: var(--shelf); border-left: 3px solid var(--press);
  padding: 1rem 1.15rem; margin: 1.5rem 0 0; max-width: var(--measure);
}
.ask-note a { color: var(--press); }

/* The contact address is the first thing a buyer or a reviewer looks for. */
.contact-lead { font-size: 1.1875rem; margin-bottom: 0.4rem; }
.contact-lead a { font-family: var(--sans); font-weight: 500; }
