:root {
  --bg: #111111;
  --bg-2: #1b1b1b;
  --ink: #f4f1ea;
  --muted: #b9b3a8;
  --line: #2c2c2c;
  --yellow: #f0c200;
  --pink: #e23b6c;
  --blue: #2f6fbe;
  --grey: #8d9094;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 0.95; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.8rem, 7vw, 5.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); text-transform: uppercase; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 0.85em; }

.bars { display: flex; height: 8px; }
.bars span { flex: 1; }
.bars span:nth-child(1) { background: var(--pink); }
.bars span:nth-child(2) { background: var(--grey); }
.bars span:nth-child(3) { background: var(--yellow); }
.bars span:nth-child(4) { background: var(--blue); }
.bars span:nth-child(5) { background: #d23a32; }

.site-header, .site-footer, .wrap { width: min(1120px, calc(100% - 2.2rem)); margin-inline: auto; }
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0;
}
.mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.92rem;
}
.mark img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 2px solid var(--yellow);
}
nav { display: flex; gap: 1.1rem; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; }
nav a { text-decoration: none; }
nav a[aria-current="page"] { color: var(--yellow); }
nav span {
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
  background: var(--yellow);
  color: #111;
  font-weight: 700;
  padding: 0 0.3em;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.4rem;
  align-items: end;
  padding: 2.4rem 0 1.6rem;
}
.kicker {
  color: var(--yellow);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.7rem;
}
.lead { font-size: 1.15rem; max-width: 38rem; color: var(--ink); }
.hero-cover { width: min(100%, 340px); margin-left: auto; border: 1px solid #333; }
.signed-strip {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.section { padding: 2.6rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.2rem; }
.books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem 1.2rem; }
.book-card img { width: 100%; height: auto; object-fit: contain; background: #111; }
.book-card h3 a { text-decoration: none; }
.book-card h3 a:hover { color: var(--yellow); }
.blurb, .series { color: var(--muted); font-size: 0.92rem; }
.series { margin-bottom: 0.25rem; }
.badge {
  display: inline-block;
  background: var(--yellow);
  color: #111;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.4rem;
  margin-bottom: 0.45rem;
}
.badge.soon { background: transparent; color: var(--yellow); border: 1px solid var(--yellow); }
.row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.4rem; }
.price { font-weight: 700; font-size: 1.15rem; }
.text-link { color: var(--yellow); }

.book-page, .author-page, .cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 2.4rem;
  padding: 2.2rem 0 3rem;
}
.book-cover { width: min(100%, 420px); }
.buy { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.signed { display: flex; gap: 0.7rem; align-items: flex-start; margin: 0.8rem 0 0.3rem; cursor: pointer; }
.signed input { margin-top: 0.28rem; accent-color: var(--yellow); }
.signed em { font-style: normal; color: var(--yellow); }
.signed-note, .fine, .empty { color: var(--muted); font-size: 0.92rem; }
button, .button {
  appearance: none;
  border: 0;
  background: var(--yellow);
  color: #111;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.1rem;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
button:hover, .button:hover { background: #fff; }
.added { margin-top: 0.8rem; }

.journal article, .post-tease {
  display: block;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.journal article:last-child { border-bottom: 1px solid var(--line); }
.journal h2 a:hover, .post-tease:hover h3 { color: var(--yellow); }
.journal time, .post-tease time { color: var(--yellow); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; }
.post { max-width: 42rem; padding: 2.4rem 0 3rem; }
.fac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.6rem 0 1rem;
}
.fac-grid img { width: 100%; height: 240px; object-fit: cover; border: 1px solid #333; }
.fac-grid figcaption { color: var(--muted); font-size: 0.88rem; margin-top: 0.4rem; }
.fac-grid strong { color: var(--yellow); display: block; letter-spacing: 0.08em; }
.author-page img { width: 100%; border: 2px solid var(--yellow); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.2rem; margin-top: 1.3rem; }
.facts div { border-top: 1px solid var(--line); padding-top: 0.4rem; }
.facts dt { color: var(--yellow); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; }
.contact { margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.contact a { color: var(--yellow); }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.lines img { width: 72px; height: 108px; object-fit: cover; }
.lines h2 { font-size: 1.15rem; }
.lines p { color: var(--muted); margin: 0.15rem 0; font-size: 0.9rem; }
.qty { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.35rem; }
.qty button { background: transparent; color: var(--ink); border: 1px solid #444; padding: 0.15rem 0.45rem; }
.remove { border: 0; color: var(--yellow); text-decoration: underline; text-transform: none; letter-spacing: 0; font-weight: 500; }
.summary { background: var(--bg-2); padding: 1.1rem; align-self: start; border-top: 4px solid var(--yellow); }
.summary p, .due { display: flex; justify-content: space-between; gap: 1rem; }
.due { font-weight: 700; font-size: 1.25rem; }
.summary .button, .checkout button { width: 100%; text-align: center; margin-top: 0.6rem; }
.checkout label { display: block; margin-bottom: 0.75rem; font-size: 0.88rem; letter-spacing: 0.06em; text-transform: uppercase; }
input, textarea {
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid #333;
  background: #0c0c0c;
  font: inherit;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}
.form-error { color: var(--yellow); text-transform: none; letter-spacing: 0; font-size: 0.95rem; margin-top: 0.8rem; }
.pay-list { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.pay-list .button { text-align: center; }
.done pre {
  white-space: pre-wrap;
  background: var(--bg-2);
  padding: 1rem;
  font-family: var(--sans);
  font-size: 0.92rem;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.3rem 0 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .hero, .books, .book-page, .author-page, .cart-layout, .checkout-layout, .site-header, .site-footer, .signed-strip {
    display: block;
  }
  nav { margin-top: 0.7rem; flex-wrap: wrap; }
  .hero-cover { margin: 1.2rem 0 0; }
  .book-card { margin-bottom: 1.4rem; }
}
