/* David Buch · author hub stylesheet
   Palette + typography match the existing book sites: deep navy base, warm gold accent,
   classical-meets-modern. */

:root {
  --navy-deep: #050d1f;
  --navy: #0a1830;
  --navy-soft: #122042;
  --gold: #d4a233;
  --gold-light: #f0c554;
  --gold-bright: #f5d97c;
  --cream: #f4ead4;
  --cream-soft: #e8e1cd;
  --cream-mute: #d8caa3;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--navy-deep);
  color: var(--cream-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(ellipse 1100px 700px at 80% 0%, rgba(212, 162, 51, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse 900px 700px at 0% 100%, rgba(120, 230, 255, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #050d1f 0%, #0a1830 30%, #0a1830 70%, #050d1f 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* === Header / nav === */
.site-header {
  padding: 22px 32px;
  border-bottom: 1px solid rgba(212, 162, 51, 0.20);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand-name { color: var(--gold-light); }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--cream-mute);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--gold-light); }

main { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* === Hero === */
.hero {
  padding: 110px 0 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--sans);
  letter-spacing: 0.35em;
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--serif);
  font-size: 90px;
  margin: 0 0 18px;
  color: var(--cream);
  letter-spacing: 0.01em;
  line-height: 1.05;
}
.hero-title .accent { color: var(--gold-light); }
.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  color: var(--cream-mute);
  font-size: 22px;
  max-width: 700px;
  margin: 0 auto 32px;
  line-height: 1.5;
}
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
  border: 1px solid var(--gold);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(212, 162, 51, 0.40);
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(212, 162, 51, 0.08); }

/* === Divider === */
.divider-gold {
  display: flex; align-items: center; justify-content: center;
  margin: 64px 0;
  gap: 14px;
}
.divider-gold .line { flex: 0 0 80px; height: 1px; background: var(--gold); opacity: 0.6; }
.divider-gold .diamond {
  width: 10px; height: 10px;
  transform: rotate(45deg);
  background: var(--gold);
}

/* === Sections === */
section { padding: 24px 0 32px; }
.section-eyebrow {
  letter-spacing: 0.32em;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
section h2 {
  font-family: var(--serif);
  font-size: 42px;
  color: var(--cream);
  margin: 4px 0 32px;
  letter-spacing: 0.01em;
}
section p {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cream-soft);
  line-height: 1.7;
  max-width: 760px;
  margin: 0 0 18px;
}

/* === Book grid === */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 36px;
  margin-top: 24px;
}
.book-card {
  background: rgba(18, 32, 66, 0.50);
  border: 1px solid rgba(212, 162, 51, 0.20);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.book-card:hover { border-color: rgba(212, 162, 51, 0.50); transform: translateY(-2px); }
.book-cover-link { display: block; line-height: 0; }
.book-cover {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid rgba(212, 162, 51, 0.20);
}
.book-cover-placeholder {
  width: 100%;
  aspect-ratio: 5 / 8;
  background:
    repeating-linear-gradient(45deg, rgba(212, 162, 51, 0.06) 0px, rgba(212, 162, 51, 0.06) 12px, rgba(18, 32, 66, 0.50) 12px, rgba(18, 32, 66, 0.50) 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(212, 162, 51, 0.20);
}
.placeholder-label {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold-light);
  font-size: 24px;
  letter-spacing: 0.04em;
}
.book-body { padding: 22px 24px 24px; }
.book-meta {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 8px;
}
.book-body h3 {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--cream);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.book-tagline {
  font-family: var(--serif);
  font-style: italic;
  color: var(--cream-mute);
  font-size: 17px !important;
  margin: 0 0 14px !important;
  max-width: none !important;
}
.book-body p {
  font-size: 15.5px;
  margin: 0 0 14px;
  max-width: none;
}
.book-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.book-cta .btn { padding: 10px 18px; font-size: 14px; }
.book-card-soon { opacity: 0.95; }
.book-card-soon h3 { color: var(--cream-mute); }

/* === Contact === */
.contact-line {
  font-size: 22px !important;
  margin-top: 18px !important;
}
.contact-line a { color: var(--gold-light); text-decoration: none; border-bottom: 1px solid rgba(212, 162, 51, 0.40); }
.contact-line a:hover { color: var(--gold-bright); border-color: var(--gold); }
.contact-note { font-size: 15px !important; color: var(--cream-mute) !important; font-style: italic; }

/* === Footer === */
.site-footer {
  margin-top: 90px;
  padding: 28px 32px 38px;
  text-align: center;
  border-top: 1px solid rgba(212, 162, 51, 0.20);
  background: rgba(5, 13, 31, 0.50);
}
.site-footer p {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--cream-mute);
  margin: 4px auto;
  max-width: none;
}
.footer-links a { color: var(--gold-light); text-decoration: none; }
.footer-links a:hover { color: var(--gold-bright); text-decoration: underline; }

/* === Responsive === */
@media (max-width: 640px) {
  .hero-title { font-size: 60px; }
  .hero-sub { font-size: 18px; }
  section h2 { font-size: 32px; }
  .nav-links { display: none; }
  main { padding: 0 20px; }
  .site-header { padding: 16px 20px; }
}

/* === DAVID BUCH HUB — additions/overrides for the new page structure === */

/* Lede paragraph */
p.lede {
  font-family: var(--serif);
  font-style: italic;
  color: var(--cream-mute);
  font-size: 19px;
  line-height: 1.6;
  max-width: 760px;
  margin: 0 0 28px;
}

/* About body sections */
.about-body {
  max-width: 760px;
  padding-top: 16px;
}
.about-body h2 {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--cream);
  margin: 36px 0 14px;
  letter-spacing: 0.01em;
}
.about-body h2:first-of-type { margin-top: 16px; }
.about-body ul {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cream-soft);
  line-height: 1.7;
  padding-left: 22px;
}
.about-body ul li { margin: 8px 0; }
.about-body a {
  color: var(--gold-light);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 162, 51, 0.30);
}
.about-body a:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
}
.about-body em { font-style: italic; color: var(--cream); }

/* Book grid covers — uniform height across all three cards */
.book-card .book-cover {
  width: 100%;
  height: 320px;
  object-fit: contain;
  display: block;
  background: rgba(5, 13, 31, 0.55);
  border-bottom: 1px solid rgba(212, 162, 51, 0.20);
  padding: 16px 0;
}

/* Book detail (books.html) — wide layout per book */
.book-detail { padding: 24px 0; }
.book-detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}
.book-detail-cover {
  background: rgba(5, 13, 31, 0.55);
  border: 1px solid rgba(212, 162, 51, 0.20);
  border-radius: 6px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-cover-large {
  width: 100%;
  height: 380px;
  object-fit: contain;
  display: block;
}
.book-detail-body h2 {
  font-family: var(--serif);
  font-size: 38px;
  color: var(--cream);
  margin: 8px 0 8px;
}
.book-detail-body .book-tagline {
  font-style: italic;
  color: var(--cream-mute);
  font-size: 19px;
  margin: 0 0 18px;
}
.book-detail-body p {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--cream-soft);
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: none;
}
@media (max-width: 720px) {
  .book-detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .book-detail-cover { padding: 18px; max-width: 320px; margin: 0 auto; }
  .book-cover-large { height: 320px; }
}

/* Contact form */
.form-card {
  max-width: 640px;
  margin: 24px auto 80px;
  background: rgba(18, 32, 66, 0.50);
  border: 1px solid rgba(212, 162, 51, 0.30);
  border-radius: 6px;
  padding: 32px 36px;
}
.form-card label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-transform: uppercase;
}
.form-card input[type=text],
.form-card input[type=email],
.form-card select,
.form-card textarea {
  width: 100%;
  background: rgba(5, 13, 31, 0.7);
  border: 1px solid rgba(212, 162, 51, 0.30);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 3px;
  box-sizing: border-box;
}
.form-card textarea { resize: vertical; min-height: 140px; }
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(5, 13, 31, 0.9);
}
.form-card .submit-row { margin-top: 24px; text-align: right; }
.form-card button {
  background: var(--gold);
  color: var(--navy-deep);
  border: 1px solid var(--gold);
  padding: 12px 28px;
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.form-card button:hover { background: var(--gold-light); transform: translateY(-1px); }

/* Active nav link */
.nav-links a.active { color: var(--gold-light); }

/* === Generic anchor styling — was missing, causing browser-default blue on dark bg === */
a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold-bright); text-decoration: underline; }


/* === Social bar in footer (auto-generated) === */
.social-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 22px;
  max-width: 460px;
}
.social-bar a {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(212, 162, 51, 0.30);
  border-radius: 50%;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.social-bar a:hover {
  background: rgba(212, 162, 51, 0.12);
  border-color: var(--gold);
  transform: translateY(-2px);
}
.social-bar img {
  width: 22px;
  height: 22px;
  display: block;
}


/* === Global responsive utilities (auto-generated) === */
img, video, iframe, embed, object { max-width: 100%; height: auto; display: block; }
video { width: 100%; }
table { width: 100%; border-collapse: collapse; }
.table-wrap, .responsive-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Intro video on quietmind hero */
.intro-video { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; max-width: 1100px; margin: 0 auto; padding: 40px 0; }
.intro-video-frame { position: relative; background: rgba(0,0,0,0.4); border: 1px solid rgba(233,164,122,0.20); border-radius: 6px; overflow: hidden; }
.intro-video-frame video { width: 100%; height: auto; display: block; }
.intro-video-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.4); background: rgba(0,0,0,0.5); color: #fff; font-size: 28px; cursor: pointer; }
.intro-video-play:hover { background: rgba(0,0,0,0.7); }
.intro-video-frame.is-playing .intro-video-play { display: none; }
.intro-video-eyebrow { font-family: var(--sans); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--ember); margin-bottom: 8px; }

@media (max-width: 820px) {
  .intro-video { grid-template-columns: 1fr; gap: 20px; padding: 20px 18px; }
  .intro-video-play { width: 56px; height: 56px; font-size: 22px; }
}

/* Errata / book-table responsiveness — make table horizontally scrollable on small screens */
table.errata-table, table.toc-table { width: 100%; }
table.errata-table th, table.errata-table td, table.toc-table th, table.toc-table td { padding: 8px 10px; vertical-align: top; }
@media (max-width: 600px) {
  table.errata-table, table.toc-table { font-size: 13px; }
  table.errata-table th, table.errata-table td, table.toc-table th, table.toc-table td { padding: 6px 6px; }
}


/* Hub-only — book grid stacks on small screens */
@media (max-width: 720px) {
  .book-grid, .three-up, .two-up { grid-template-columns: 1fr !important; gap: 20px; }
}

/* === Responsive — mobile / tablet (auto-generated) === */
@media (max-width: 820px) {
  .site-header { padding: 16px 18px; }
  .nav { flex-wrap: wrap; gap: 10px 18px; justify-content: center; }
  .brand { font-size: 19px; }
  .nav-links { gap: 18px; flex-wrap: wrap; justify-content: center; }
  .nav-links a { font-size: 13px; }
  main { padding: 0 18px; }
  .hero { padding: 56px 0 36px; }
  .hero-title { font-size: 48px; line-height: 1.08; }
  .hero-sub { font-size: 17px; }
  h1 { font-size: 36px !important; }
  h2 { font-size: 24px; }
  .section-eyebrow { font-size: 12px; }
  p.lede { font-size: 17px; }
  .book-card .book-cover { height: 240px; }
  .book-detail-grid { grid-template-columns: 1fr !important; gap: 22px; }
  .book-detail-cover { max-width: 280px; margin: 0 auto; padding: 16px; }
  .book-cover-large { height: 300px; }
  .book-detail-body h2 { font-size: 30px; }
  .form-card { padding: 22px 18px; margin: 18px 0 60px; border-radius: 4px; }
  .form-card input, .form-card select, .form-card textarea { font-size: 16px; padding: 12px 12px; }
  .form-card .submit-row { text-align: center; }
  .site-footer { padding: 28px 18px; font-size: 13px; }
  .footer-links { flex-wrap: wrap; }
  .social-bar { gap: 10px; }
  .social-bar a { width: 38px; height: 38px; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 38px; }
  .hero-sub { font-size: 16px; }
  h1 { font-size: 30px !important; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12px; letter-spacing: 0.02em; }
  .btn { padding: 10px 18px; font-size: 14px; }
  .book-detail-body h2 { font-size: 26px; }
  .book-cover-large { height: 260px; }
  .social-bar a { width: 34px; height: 34px; }
  .social-bar img { width: 18px; height: 18px; }
}

/* === Button hover overrides === */
.btn:hover { text-decoration: none; }
.btn-primary, .btn-primary:hover { color: var(--navy-deep); }
.btn-ghost, .btn-ghost:hover { color: var(--cream); }
