/* Badass Novels — local rebuild
   Palette and fonts sourced from the live site's Avada config. */

:root {
  --brand:        #6666a4;
  --brand-dark:   #4f4f85;
  --brand-light:  #8989bf;
  --brand-fade:   rgba(102, 102, 164, 0.08);
  --link:         #016daf;
  --link-hover:   #6666a4;
  --green:        #65bc7b;
  --olive:        #54770f;
  --gold:         #c0830b;
  --bg:           #ffffff;
  --bg-alt:       #f6f6f6;
  --text:         #222;
  --text-muted:   #747474;
  --border:       #e5e4e3;
  --dark-bar:     #363839;
  --dark-bar-2:   #282a2b;
  --footer-text:  #999;

  --max-w:        1170px;
  --serif:        "Nixie One", "Palatino", Georgia, serif;
  --sans:         "PT Sans", "Helvetica Neue", Arial, sans-serif;
  --accent-sans:  "Open Sans", var(--sans);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--link); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--link-hover); }

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

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  color: var(--brand);
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.2;
  margin: 0 0 .6em;
}
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.2em; }

/* ————— Top mini-bar ————— */
.topbar {
  background: var(--dark-bar);
  color: #cfcfcf;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--dark-bar-2);
}
.topbar .inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: flex; justify-content: flex-end; gap: 18px; }
.topbar a { color: #bfbfbf; }
.topbar a:hover { color: #fff; }

/* ————— Header ————— */
.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0; z-index: 50;
}
.site-header .inner {
  max-width: var(--max-w); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.site-header .logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.site-header .logo img { height: 64px; width: auto; }
.site-header .brand-text { font-family: var(--serif); font-size: 22px; color: var(--brand); }
.site-header .brand-text small { display: block; font-family: var(--accent-sans); font-size: 11px; letter-spacing: .14em; color: var(--text-muted); text-transform: uppercase; }

.main-nav { margin-left: auto; display: flex; gap: 6px; }
.main-nav a {
  font-family: var(--accent-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 3px;
}
.main-nav a:hover, .main-nav a.active {
  background: var(--brand-fade);
  color: var(--brand);
}

/* ————— Page title bar (Avada-style) ————— */
.page-title {
  background: var(--brand) url('/public/img/page-hero.jpg') center/cover no-repeat;
  background-blend-mode: multiply;
  color: #fff;
  text-align: center;
  padding: 70px 24px;
  border-top: 3px solid var(--brand-dark);
  border-bottom: 3px solid var(--brand-dark);
}
.page-title h1 { color: #fff; font-size: 2.8rem; margin: 0; }
.page-title .crumb { margin-top: 10px; font-family: var(--accent-sans); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.page-title .crumb a { color: #fff; border-bottom: 1px dotted rgba(255,255,255,.4); }

/* ————— Hero (homepage) ————— */
.hero {
  background: linear-gradient(120deg, rgba(102,102,164,.92), rgba(79,79,133,.92)), url('/public/img/castle.jpg') center/cover no-repeat;
  color: #fff;
  padding: 120px 24px 110px;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 3.4rem; margin-bottom: 12px; }
.hero .lede { font-size: 1.2rem; max-width: 680px; margin: 0 auto 28px; opacity: .94; }
.hero .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 11px 26px;
  font-family: var(--accent-sans);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .12em;
  border-radius: 3px;
  border: 2px solid currentColor;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: all .15s ease;
}
.btn:hover { background: #fff; color: var(--brand); }
.btn.solid { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.solid:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { color: var(--brand); border-color: var(--brand); }
.btn.ghost:hover { background: var(--brand); color: #fff; }

/* ————— Section wrapper ————— */
.section { max-width: var(--max-w); margin: 0 auto; padding: 70px 24px; }
.section.alt { background: var(--bg-alt); max-width: none; }
.section.alt > .inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section h2 { text-align: center; margin-bottom: 8px; }
.section .section-sub { text-align: center; color: var(--text-muted); max-width: 680px; margin: 0 auto 40px; }
.section .divider {
  width: 60px; height: 3px; background: var(--brand);
  margin: 12px auto 30px; border-radius: 2px;
}

/* ————— Book grid ————— */
.book-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .book-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .book-grid { grid-template-columns: 1fr; } }

.book-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  text-decoration: none;
  color: inherit;
}
.book-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-light);
  box-shadow: 0 8px 24px rgba(102,102,164,.15);
}
.book-card .cover {
  aspect-ratio: 3/2;
  background: #ddd center/cover no-repeat;
}
.book-card .body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; }
.book-card .eyebrow {
  font-family: var(--accent-sans);
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 6px;
}
.book-card h3 { font-size: 1.3rem; margin: 0 0 6px; color: var(--text); }
.book-card p { color: var(--text-muted); font-size: 14px; line-height: 1.55; flex: 1; }
.book-card .meta {
  margin-top: 10px; font-size: 12px; color: var(--text-muted);
  font-family: var(--accent-sans); text-transform: uppercase; letter-spacing: .1em;
}
.book-card .meta .badge {
  display: inline-block; padding: 2px 8px;
  background: var(--brand-fade); color: var(--brand);
  border-radius: 2px; font-weight: 700;
}

/* ————— Book detail page ————— */
.book-detail { display: grid; grid-template-columns: 1fr 1.6fr; gap: 50px; align-items: start; }
@media (max-width: 820px) { .book-detail { grid-template-columns: 1fr; } }
.book-detail .cover-wrap img { border: 1px solid var(--border); border-radius: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.book-detail .eyebrow { color: var(--brand); font-family: var(--accent-sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.book-detail h1 { margin-top: 6px; font-size: 2.4rem; }
.book-detail .tagline { font-style: italic; color: var(--text-muted); font-size: 1.1rem; margin-bottom: 20px; }
.book-detail .cta-row { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.book-detail .facts {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 18px 34px; font-size: 13px;
}
.book-detail .facts dt { color: var(--text-muted); text-transform: uppercase; font-size: 11px; letter-spacing: .1em; margin: 0; }
.book-detail .facts dd { margin: 0; font-weight: 700; }

/* ————— About strip ————— */
.about-strip { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: center; }
@media (max-width: 700px) { .about-strip { grid-template-columns: 1fr; } }
.about-strip img { border-radius: 6px; border: 1px solid var(--border); }

/* ————— Footer ————— */
.site-footer {
  background: var(--dark-bar);
  color: var(--footer-text);
  padding: 50px 24px 30px;
  margin-top: 60px;
}
.site-footer .inner { max-width: var(--max-w); margin: 0 auto; }
.site-footer .rows { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
@media (max-width: 700px) { .site-footer .rows { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-family: var(--accent-sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: #fff; }
.site-footer .legal {
  border-top: 1px solid var(--dark-bar-2);
  padding-top: 18px;
  font-size: 12px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ————— Blockquote (matches live site) ————— */
blockquote {
  background: #f5f5f5;
  border-left: 4px solid var(--green);
  padding: 15px 20px;
  font-style: italic;
  margin: 2em 0;
}

/* ————— Utility ————— */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
