:root {
  --navy: #0b1b33;
  --navy-light: #142a4d;
  --gold: #c9a227;
  --gold-light: #e0c05c;
  --cream: #f5f1e6;
  --wood: #6e4a2e;
  --text-dark: #1a1a1a;
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Inter", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  margin: 0 0 0.5em;
}

a { color: var(--navy); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header.site-header {
  background: var(--navy);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  height: 48px;
  width: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-text {
  color: var(--cream);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-text small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  color: var(--gold-light);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

nav.main-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

nav.main-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--gold-light);
  border-color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.6rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--cream);
  padding: 64px 0 72px;
  text-align: center;
}

.hero img.hero-banner {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 32px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.hero h1 {
  color: var(--cream);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.hero p.tagline {
  color: var(--gold-light);
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 28px;
}

.hero p.lede {
  max-width: 680px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  color: #d8ddea;
}

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover { transform: translateY(-2px); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}

.btn-gold:hover { box-shadow: 0 6px 18px rgba(201,162,39,0.4); }

.btn-outline {
  border: 2px solid var(--gold);
  color: var(--gold-light);
  background: transparent;
}

.hero .cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Sections */
section { padding: 64px 0; }

.section-alt { background: #fff; }

.section-title {
  text-align: center;
  margin-bottom: 12px;
}

.section-sub {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
  color: #444;
}

/* Card grid for topic pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.pillar-card {
  background: #fff;
  border: 1px solid #e6e1d3;
  border-top: 3px solid var(--gold);
  border-radius: 8px;
  padding: 28px 22px;
  text-align: center;
}

.pillar-card .icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.pillar-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.pillar-card p {
  font-size: 0.92rem;
  color: #555;
  margin: 0;
}

/* Nav cards linking to the 3 pillar pages */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.nav-card {
  background: var(--navy);
  color: var(--cream);
  border-radius: 10px;
  padding: 36px 28px;
  text-decoration: none;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--navy-light);
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(11,27,51,0.3);
}

.nav-card h3 {
  color: var(--gold-light);
  font-size: 1.25rem;
}

.nav-card p {
  color: #cfd5e2;
  font-size: 0.92rem;
  margin: 0 0 14px;
}

.nav-card .arrow {
  color: var(--gold);
  font-weight: 700;
}

/* Page header (non-home pages) */
.page-hero {
  background: var(--navy);
  color: var(--cream);
  padding: 56px 0;
  text-align: center;
}

.page-hero h1 { color: var(--cream); }
.page-hero p { color: var(--gold-light); font-style: italic; margin: 0; }

/* Content blocks */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 56px;
}

.content-block.reverse { direction: rtl; }
.content-block.reverse > * { direction: ltr; }

@media (max-width: 800px) {
  .content-block { grid-template-columns: 1fr; }
}

.content-block h2 { margin-bottom: 14px; }

ul.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.check-list li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 12px;
  font-size: 0.98rem;
}

ul.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

/* Book cards */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.book-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e6e1d3;
  text-align: center;
  padding-bottom: 24px;
}

.book-cover {
  background: var(--navy);
  color: var(--gold-light);
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1rem;
  padding: 20px;
  text-align: center;
}

.book-card h3 {
  font-size: 1.05rem;
  padding: 18px 18px 6px;
}

.book-card .status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.status.available { background: #e4f3e6; color: #1f7a34; }
.status.soon { background: #f3ecd8; color: var(--wood); }

/* FAQ accordion */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border: 1px solid #e6e1d3;
  border-radius: 8px;
  margin-bottom: 14px;
  overflow: hidden;
}

.faq-item summary {
  padding: 18px 22px;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.4rem;
  font-weight: 400;
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: "\2212"; }

.faq-item p {
  padding: 0 22px 20px;
  margin: 0;
  color: #444;
  font-size: 0.96rem;
}

/* Topic link cards (Ramsey-style quick links) */
.topic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 8px;
}

.topic-links a {
  background: #fff;
  border: 1px solid var(--gold);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 30px;
  transition: background 0.2s, color 0.2s;
}

.topic-links a:hover {
  background: var(--gold);
}

/* Ask-the-book chat widget */
.chat-widget {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e6e1d3;
  border-radius: 10px;
  overflow: hidden;
}

.chat-log {
  max-height: 420px;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.94rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--navy);
  color: var(--cream);
}

.chat-msg.assistant {
  align-self: flex-start;
  background: #f5f1e6;
  color: var(--text-dark);
  border: 1px solid #e6e1d3;
}

.chat-msg.assistant .sources {
  display: block;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #7a6b3f;
  font-style: italic;
}

.chat-msg.loading { color: #888; font-style: italic; }

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid #e6e1d3;
  background: #fafaf7;
}

.chat-input-row input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.chat-input-row button {
  border: none;
  cursor: pointer;
}

.chat-empty-hint {
  color: #888;
  font-size: 0.88rem;
  text-align: center;
  padding: 6px 22px 0;
}

/* Contact form */
.contact-wrap {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: 10px;
  border: 1px solid #e6e1d3;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-group textarea { min-height: 130px; resize: vertical; }

/* Social row */
.social-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.social-row a {
  color: var(--cream);
  background: var(--navy-light);
  border: 1px solid var(--gold);
  padding: 10px 18px;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.social-row a:hover { background: var(--gold); color: var(--navy); }

/* Footer */
footer.site-footer {
  background: var(--navy);
  color: #b9c0d1;
  padding: 48px 0 24px;
  text-align: center;
}

footer.site-footer img { height: 56px; margin-bottom: 14px; }

footer.site-footer .tagline {
  color: var(--gold-light);
  font-style: italic;
  margin-bottom: 24px;
}

footer.site-footer nav {
  display: flex;
  gap: 22px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

footer.site-footer nav a {
  color: #d8ddea;
  text-decoration: none;
  font-size: 0.88rem;
}

footer.site-footer nav a:hover { color: var(--gold-light); }

footer.site-footer .copyright {
  font-size: 0.78rem;
  color: #7d859c;
  margin-top: 20px;
}

/* Mobile nav */
@media (max-width: 860px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 16px;
  }
  nav.main-nav.open { display: flex; }
  .nav-toggle {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}
