/* ==========================================================================
   joegastonauthor.com — shared stylesheet
   Built to Joe_Gaston_Brand_Guidelines.md (author level) and
   Ray_Holder_Brand_Guidelines.md (series level).

   Accessibility note that matters: Amber Fog (#C49A3C) is DARK-BACKGROUND
   ONLY as a text colour. On Paper it fails contrast (2.3:1), so on light
   backgrounds it is used for rules, borders and underlines only — never
   for the text itself.
   ========================================================================== */

:root {
  /* Author level */
  --ink:        #1A1A1A;
  --paper:      #F5F0E8;
  --off-white:  #F0EDE6;
  --amber-fog:  #C49A3C;
  --stone:      #6B6B6B;
  --stone-dark: #5A5A5A;   /* for small text on Paper, keeps AA */

  /* Ray Holder series level */
  --estate-amber:  #D3AF37;
  --concrete-dark: #1C1C1C;
  --wet-slate:     #22282B;
  --night-cut:     #050F14;
  --fog-white:     #EDEDED;

  --serif-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --serif-body:    'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans-ui:       system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

  --wrap: 1080px;
  --measure: 34em;
}

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

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-synthesis-weight: none;
}

@media (min-width: 46em) {
  body { font-size: 1.125rem; }
}

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

a { color: var(--ink); text-decoration-color: var(--amber-fog); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover, a:focus { text-decoration-color: var(--ink); }

:focus-visible { outline: 3px solid var(--amber-fog); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--off-white);
  padding: 12px 18px; z-index: 100; font-family: var(--sans-ui); font-size: 0.9rem;
}
.skip:focus { left: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.measure { max-width: var(--measure); }
.measure-wide { max-width: 46em; }

/* ---------- Header / nav ------------------------------------------------ */

.site-header {
  background: var(--ink);
  color: var(--off-white);
  border-bottom: 2px solid var(--amber-fog);
}

.header-inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 52em) {
  .header-inner { flex-direction: row; justify-content: space-between; padding: 20px; }
}

.brand {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  color: var(--off-white);
  text-decoration: none;
  line-height: 1.1;
}
.brand span {
  display: block;
  font-family: var(--sans-ui);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-fog);
  margin-top: 5px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  font-family: var(--sans-ui);
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-nav a {
  color: var(--off-white);
  text-decoration: none;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a:focus { border-bottom-color: var(--amber-fog); }
.site-nav a.active { border-bottom-color: var(--amber-fog); color: var(--amber-fog); }

/* ---------- Sections ---------------------------------------------------- */

main { display: block; }

section { padding: 52px 0; }
@media (min-width: 46em) { section { padding: 72px 0; } }

.band { background: var(--ink); color: var(--off-white); }
.band a { color: var(--amber-fog); }
.band h2, .band h3 { color: var(--off-white); }
.band .section-label { color: var(--amber-fog); }

.band-soft { background: var(--off-white); }

.section-label {
  font-family: var(--sans-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin: 0 0 10px;
}

h1, h2, h3, h4 {
  font-family: var(--serif-display);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 16px;
  letter-spacing: -0.005em;
}

h1 { font-size: clamp(1.85rem, 5.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
h3 { font-size: clamp(1.18rem, 2.4vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.05rem; font-weight: 600; }

p { margin: 0 0 1.1em; }

.lead { font-size: 1.15em; }
.muted { color: var(--stone-dark); }
.band .muted,
.hero .muted,
.signup .muted,
.post-cta .muted,
.site-footer .muted { color: #BDBAB4; }

hr.rule {
  border: none;
  height: 2px;
  width: 64px;
  background: var(--amber-fog);
  margin: 28px 0;
}
hr.rule.center { margin-left: auto; margin-right: auto; }

blockquote.pull {
  margin: 28px 0;
  padding-left: 20px;
  border-left: 3px solid var(--amber-fog);
  font-size: 1.15em;
  font-style: italic;
}

/* ---------- Hero -------------------------------------------------------- */

.hero {
  background:
    linear-gradient(rgba(26,26,26,0.86), rgba(26,26,26,0.94)),
    url('images/photos/birmingham-streetlight.jpg') center/cover no-repeat;
  background-color: var(--ink);
  color: var(--off-white);
  padding: 64px 0 56px;
}
@media (min-width: 46em) { .hero { padding: 96px 0 84px; } }

.hero h1 { color: var(--off-white); max-width: 16em; }
.hero .eyebrow {
  font-family: var(--sans-ui);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber-fog);
  margin: 0 0 14px;
}
.hero .subline { font-size: 1.15em; max-width: 30em; color: #DEDAD2; }

/* ---------- Buttons ----------------------------------------------------- */

.btn, .btn-outline, .btn-amber {
  display: inline-block;
  font-family: var(--sans-ui);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 2px;
  border: 2px solid var(--ink);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  min-height: 44px;
  line-height: 1.35;
}

.btn { background: var(--ink); color: var(--paper); }
.btn:hover, .btn:focus { background: var(--paper); color: var(--ink); }

.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover, .btn-outline:focus { background: var(--ink); color: var(--paper); }

.band .btn { background: var(--amber-fog); color: var(--ink); border-color: var(--amber-fog); }
.band .btn:hover, .band .btn:focus { background: transparent; color: var(--amber-fog); }
.band .btn-outline { color: var(--off-white); border-color: var(--off-white); }
.band .btn-outline:hover, .band .btn-outline:focus { background: var(--off-white); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* ---------- Book grid --------------------------------------------------- */

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 34px 28px;
  margin-top: 32px;
  padding: 0;
  list-style: none;
}

.book-grid.single { grid-template-columns: minmax(0, 300px); }

.book-card { margin: 0; }
.book-card img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(26,26,26,0.24);
}
.book-card h3 { margin: 16px 0 4px; }
.book-card .meta {
  font-family: var(--sans-ui);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin: 0 0 8px;
}
.band .book-card .meta { color: var(--amber-fog); }
.book-card p { font-size: 0.97em; }
.book-card a.cover-link { display: block; text-decoration: none; }

/* ---------- Individual book page ---------------------------------------- */

.book-head {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 46em) {
  .book-head { grid-template-columns: minmax(220px, 300px) 1fr; gap: 48px; }
}
.book-head img { box-shadow: 0 18px 40px rgba(26,26,26,0.3); border-radius: 2px; }

.series-tag {
  font-family: var(--sans-ui);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin: 0 0 10px;
  display: inline-block;
  border-bottom: 2px solid var(--amber-fog);
  padding-bottom: 4px;
}

.tagline {
  font-family: var(--serif-display);
  font-size: 1.25em;
  font-style: italic;
  margin: 0 0 18px;
}

.details {
  margin: 0;
  font-family: var(--sans-ui);
  font-size: 0.9rem;
  border-top: 1px solid #D8D2C7;
}
.details div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding: 10px 0;
  border-bottom: 1px solid #D8D2C7;
}
.details dt { font-weight: 600; min-width: 12em; margin: 0; color: var(--ink); }
.details dd { margin: 0; color: var(--stone-dark); }

/* ---------- Reading order ----------------------------------------------- */

.reading-order { list-style: none; padding: 0; margin: 32px 0 0; counter-reset: step; }
.reading-order li {
  position: relative;
  padding: 0 0 26px 62px;
  margin: 0;
  border-left: 2px solid rgba(196,154,60,0.4);
  margin-left: 18px;
}
.reading-order li:last-child { border-left-color: transparent; padding-bottom: 0; }
.reading-order li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: -19px; top: -4px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--amber-fog);
  border-radius: 50%;
  font-family: var(--sans-ui);
  font-size: 0.9rem;
  font-weight: 600;
}
.reading-order h3 { margin: 0 0 6px; }
.reading-order p { margin: 0 0 8px; }

/* ---------- Signup ------------------------------------------------------ */

.signup {
  background: var(--ink);
  color: var(--off-white);
  border-top: 2px solid var(--amber-fog);
}
.signup-inner {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 52em) {
  .signup-inner { grid-template-columns: 1fr minmax(300px, 400px); gap: 56px; }
}
.signup h2 { color: var(--off-white); }
.signup .magnet-cover {
  width: 160px;
  box-shadow: 0 16px 34px rgba(0,0,0,0.5);
  border-radius: 2px;
  margin-bottom: 20px;
}

/* MailerLite form, restyled to brand. The class names come from MailerLite's
   own embed code and must not be renamed — their script depends on them. */
.ml-form-embedContainer { width: 100%; }
.ml-form-embedContent h4 {
  font-family: var(--serif-display);
  font-size: 1.25rem;
  margin: 0 0 10px;
  color: var(--off-white);
}
.ml-form-embedContent p { font-size: 0.98rem; color: #C9C5BE; margin: 0 0 10px; }
.ml-form-embedBody .form-control {
  width: 100%;
  font-family: var(--sans-ui);
  font-size: 1rem;
  padding: 13px 14px;
  margin: 0 0 10px;
  background: var(--off-white);
  color: var(--ink);
  border: 2px solid transparent;
  border-radius: 2px;
  min-height: 46px;
}
.ml-form-embedBody .form-control:focus { border-color: var(--amber-fog); outline: none; }
.ml-form-checkboxRow { margin: 6px 0 14px; font-family: var(--sans-ui); font-size: 0.82rem; color: #C9C5BE; }
.ml-form-checkboxRow label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.ml-form-checkboxRow input[type="checkbox"] { margin-top: 5px; width: 18px; height: 18px; flex: none; }
.ml-form-checkboxRow p { margin: 0; }
.ml-form-embedPermissionsContent p { font-family: var(--sans-ui); font-size: 0.78rem; color: #A9A59E; margin: 0 0 10px; }
.ml-form-embedSubmit button.primary {
  width: 100%;
  font-family: var(--sans-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 15px 20px;
  min-height: 48px;
  background: var(--amber-fog);
  color: var(--ink);
  border: 2px solid var(--amber-fog);
  border-radius: 2px;
  cursor: pointer;
}
.ml-form-embedSubmit button.primary:hover { background: transparent; color: var(--amber-fog); }
.ml-form-embedSubmit button.loading { width: 100%; padding: 15px; background: var(--stone); border: none; }
.ml-form-successContent h4 { font-family: var(--serif-display); color: var(--amber-fog); font-size: 1.3rem; margin: 0 0 8px; }
.ml-form-successContent p { color: var(--off-white); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ml-error .form-control { border-color: #E06666; }

/* ---------- Blog -------------------------------------------------------- */

.post-list { list-style: none; padding: 0; margin: 32px 0 0; }
.post-list li { padding: 26px 0; border-top: 1px solid #D8D2C7; }
.post-list li:last-child { border-bottom: 1px solid #D8D2C7; }
.post-list h2 { font-size: clamp(1.25rem, 2.8vw, 1.6rem); margin-bottom: 8px; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; text-decoration-color: var(--amber-fog); }

.post-meta {
  font-family: var(--sans-ui);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin: 0 0 10px;
}

article.post { max-width: 36em; }
article.post p, article.post ul, article.post ol { font-size: 1.05em; }
article.post hr { border: none; height: 1px; background: #D8D2C7; margin: 34px 0; }
article.post h2 { margin-top: 34px; }

.post-cta {
  margin-top: 44px;
  padding: 28px;
  background: var(--ink);
  color: var(--off-white);
  border-radius: 3px;
  border-left: 4px solid var(--amber-fog);
}
.post-cta h2 { color: var(--off-white); margin: 0 0 10px; font-size: 1.25rem; }
.post-cta p { margin: 0 0 16px; color: #C9C5BE; }
.post-cta .btn { background: var(--amber-fog); color: var(--ink); border-color: var(--amber-fog); }
.post-cta .btn:hover { background: transparent; color: var(--amber-fog); }

/* ---------- Feature / photo blocks -------------------------------------- */

.split {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 52em) {
  .split { grid-template-columns: 1fr 1fr; gap: 56px; }
  .split.narrow-left { grid-template-columns: minmax(220px, 340px) 1fr; }
}
.split img { border-radius: 2px; box-shadow: 0 14px 32px rgba(26,26,26,0.22); }

figure { margin: 0; }
figcaption {
  font-family: var(--sans-ui);
  font-size: 0.8rem;
  color: var(--stone-dark);
  margin-top: 10px;
}
.band figcaption { color: #A9A59E; }

/* ---------- Ray Holder series band -------------------------------------- */

.series-band {
  background:
    linear-gradient(rgba(5,15,20,0.9), rgba(28,28,28,0.94)),
    url('images/photos/birmingham-underpass.jpg') center/cover no-repeat;
  background-color: var(--night-cut);
  color: var(--fog-white);
}
.series-band h1, .series-band h2, .series-band h3 { color: var(--fog-white); }
.series-band .section-label, .series-band .eyebrow { color: var(--estate-amber); }
.series-band .muted { color: #BFC2C3; }
.series-band a { color: var(--estate-amber); }
.series-band .btn { background: var(--estate-amber); color: var(--night-cut); border-color: var(--estate-amber); }
.series-band .btn:hover, .series-band .btn:focus { background: transparent; color: var(--estate-amber); }
.series-band .btn-outline { color: var(--fog-white); border-color: var(--fog-white); background: transparent; }
.series-band .btn-outline:hover, .series-band .btn-outline:focus { background: var(--fog-white); color: var(--night-cut); }
.series-wordmark {
  font-family: var(--sans-ui);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--estate-amber);
  margin: 0 0 14px;
}

/* ---------- FAQ / details ----------------------------------------------- */

.faq { margin-top: 28px; max-width: 42em; }
.faq details {
  border-top: 1px solid #D8D2C7;
  padding: 16px 0;
}
.faq details:last-of-type { border-bottom: 1px solid #D8D2C7; }
.faq summary {
  cursor: pointer;
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.08rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  min-height: 32px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--stone-dark); font-family: var(--sans-ui); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { margin: 12px 0 0; }

/* ---------- Press kit --------------------------------------------------- */

.qa { margin-top: 28px; max-width: 42em; }
.qa h3 { margin-bottom: 6px; }
.qa p { margin-bottom: 26px; }

.copy-block {
  background: var(--off-white);
  border-left: 3px solid var(--amber-fog);
  padding: 22px 24px;
  margin: 18px 0 30px;
  max-width: 42em;
}
.copy-block p:last-child { margin-bottom: 0; }

/* ---------- Footer ------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: #BDBAB4;
  border-top: 2px solid var(--amber-fog);
  padding: 48px 0 40px;
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
}
@media (min-width: 40em) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.site-footer h2 {
  font-family: var(--sans-ui);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-fog);
  margin: 0 0 12px;
  font-weight: 600;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #DEDAD2; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { text-decoration: underline; text-decoration-color: var(--amber-fog); }
.site-footer .brand-foot {
  font-family: var(--serif-display);
  font-size: 1.3rem;
  color: var(--off-white);
  font-weight: 700;
  margin: 0 0 10px;
}
.colophon {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid #333;
  font-family: var(--sans-ui);
  font-size: 0.78rem;
  color: #97938D;
}
.colophon p { margin: 0 0 6px; }

/* ---------- Utilities --------------------------------------------------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.9rem; }
.stack > * + * { margin-top: 18px; }
