/* rjohnwalker.com — one stylesheet for the whole site */

:root {
  --bg: #1c1814;
  --bg-raised: #27211b;
  --ink: #efe8da;
  --ink-soft: #d6cebf;
  --ink-faint: #a39a89;
  --gold: #c9a45c;
  --gold-soft: rgba(201, 164, 92, 0.35);
  --rule: rgba(201, 164, 92, 0.28);

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", "Iowan Old Style", Georgia, serif;

  --measure: 36rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold); text-decoration-color: var(--gold-soft); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--gold); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem var(--gutter);
  max-width: 72rem;
  margin: 0 auto;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}

.site-nav { display: flex; gap: 1.75rem; }

.site-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--gold); }

/* ---------- shared type ---------- */

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1rem;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.1;
  margin: 0 0 1.25rem;
}

h1 { font-size: clamp(2.6rem, 1.6rem + 4.5vw, 5rem); letter-spacing: 0.02em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); }
h3 { font-size: 1.6rem; }

.rule {
  width: 6rem;
  height: 1px;
  background: var(--gold-soft);
  border: 0;
  margin: 2rem 0;
}

.lede {
  font-size: 1.2em;
  color: var(--ink);
}

p { margin: 0 0 1.1rem; color: var(--ink-soft); }

blockquote {
  margin: 2.5rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 1px solid var(--gold);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  line-height: 1.3;
  color: var(--ink);
}

blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- layout ---------- */

.section {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  max-width: 72rem;
  margin: 0 auto;
}

.section + .section { border-top: 1px solid var(--rule); }

.prose { max-width: var(--measure); }

.center { text-align: center; margin-left: auto; margin-right: auto; }
.center .rule { margin-left: auto; margin-right: auto; }

/* book hero: cover beside the pitch */
.book-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

@media (min-width: 52rem) {
  .book-hero { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.cover {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.6), 0 0 0 1px var(--rule);
}

.status {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--gold-soft);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- series list ---------- */

.series {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .series { grid-template-columns: repeat(3, 1fr); }
}

.series li {
  background: var(--bg);
  padding: 1.75rem 1.5rem;
}

.series .num {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.series .title {
  display: block;
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--ink);
  margin: 0.4rem 0 0.3rem;
}

.series .when { font-size: 0.95rem; color: var(--ink-faint); }
.series li.current .when { color: var(--gold); }

/* ---------- sign-up ---------- */

.signup {
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem);
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
}

.signup form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.75rem;
}

.signup input[type="email"] {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--gold-soft);
  border-radius: 0;
}

.signup input[type="email"]::placeholder { color: var(--ink-faint); }

.button {
  padding: 0.85rem 1.6rem;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
}

.button:hover { background: #d8b674; }

.fine { font-size: 0.85rem; color: var(--ink-faint); margin-top: 1rem; }

/* ---------- about ---------- */

.portrait {
  width: 6.5rem;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(0.9);
  margin: 0 0 2rem;
  border: 1px solid var(--rule);
}

.portrait-placeholder {
  width: 12rem;
  aspect-ratio: 4 / 5;
  margin: 0 0 2rem;
  border: 1px dashed var(--gold-soft);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem var(--gutter) 3rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

.site-footer p { color: var(--ink-faint); margin: 0 0 0.5rem; }
.site-footer a { color: var(--ink-soft); }

/* ---------- eye candy: gold dust and pull quotes ---------- */

body.dust {
  background:
    url("images/dust.svg") no-repeat center 140px / max(1600px, 100%) auto,
    var(--bg);
}

.pull {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0;
  border: 0;
  text-align: center;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem);
  line-height: 1.25;
}

.pull::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  margin: 0 auto 2rem;
  background: var(--gold);
}

.pull cite { margin-top: 1.5rem; }

/* The Brothers page: dust stays on the cover side, desktop only */
@media (min-width: 52rem) {
  body.dust-left {
    background:
      url("images/dust-left.svg") no-repeat center 60px / 1600px auto,
      var(--bg);
  }
}
