/* ===========================================================
   Bible Unboxing — shared stylesheet
   Cool soft blue & white palette, modern responsive layout
   =========================================================== */

:root {
  --bg: #f6f9fc;
  --bg-soft: #eaf2f8;
  --card: #ffffff;
  --border: #dbe6ef;

  --primary: #2b5f7e;
  --primary-dark: #1e4a63;
  --primary-light: #4f89ab;
  --accent: #7fb0d6;
  --accent-soft: #d9ebf7;
  --gold: #c9a24b;

  --text: #223140;
  --text-muted: #5b7080;
  --text-faint: #8199a8;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 18px rgba(43, 95, 126, 0.08);
  --shadow-hover: 0 10px 30px rgba(43, 95, 126, 0.14);

  --serif: "Georgia", "Iowan Old Style", "Palatino Linotype", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--primary-dark);
  line-height: 1.25;
  margin: 0 0 0.5em 0;
}

p { margin: 0 0 1em 0; }

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

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 249, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-links a:hover {
  background: var(--accent-soft);
  color: var(--primary-dark);
}

.nav-links a.active {
  background: var(--primary);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--primary-dark);
}

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

.hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 72px 24px 64px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.75rem;
  max-width: 760px;
  margin: 0 auto 0.4em;
}

.hero p.lead {
  max-width: 620px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.page-hero {
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 24px 44px;
  text-align: center;
}

.page-hero h1 { font-size: 2.3rem; margin-bottom: 0.3em; }
.page-hero p { max-width: 640px; margin: 0 auto; color: var(--text-muted); }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

.btn-secondary {
  background: #fff;
  color: var(--primary-dark);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--accent-soft); color: var(--primary-dark); }

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

section { padding: 64px 0; }
section.tight { padding: 40px 0; }
section.alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-head h2 { font-size: 2rem; }
.section-head p { color: var(--text-muted); }

.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* ---------- Card grid (home nav cards) ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.nav-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: block;
}

.nav-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.nav-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: var(--primary-dark);
}

.nav-card h3 { margin-bottom: 8px; color: var(--primary-dark); }
.nav-card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 12px; }
.link-arrow { color: var(--primary); font-weight: 700; font-size: 0.9rem; }

/* ---------- Stats strip ---------- */

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stat-box {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

a.stat-box {
  text-decoration: none;
  color: inherit;
}

a.stat-box:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.stat-box .num {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-box .label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ---------- Testament intro ---------- */

.testament-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}

.testament-intro .badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.testament-intro h2 { font-size: 1.8rem; }
.testament-intro .meta-list { list-style: none; padding: 0; margin: 0; }
.testament-intro .meta-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}
.testament-intro .meta-list li:last-child { border-bottom: none; }
.testament-intro .meta-list span:first-child { color: var(--text-muted); }
.testament-intro .meta-list span:last-child { font-weight: 700; color: var(--primary-dark); }

/* ---------- Book page prev/next navigation ---------- */

.book-nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.book-nav-links .btn { flex: 0 1 auto; }
.book-nav-links .btn-placeholder { visibility: hidden; }

/* ---------- Category groups + book cards ---------- */

.category-block { margin-bottom: 46px; }

.category-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.category-heading h3 {
  font-size: 1.35rem;
  color: var(--primary-dark);
  margin-bottom: 0;
}

.category-count {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.category-desc {
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 0.97rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.book-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.book-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.book-card h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--primary-dark);
  font-family: var(--sans);
  font-weight: 700;
}

.book-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ---------- Noticeable verses (book pages) ---------- */

.verse-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.verse-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.verse-list li:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.verse-ref {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1rem;
  margin-bottom: 4px;
}

.verse-list p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.verse-list blockquote {
  margin: 6px 0 10px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--text);
}

.verse-list cite {
  display: block;
  text-align: right;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ---------- All-66-books chapter list (homepage) ---------- */

.chapter-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 8px;
}

.chapter-columns h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

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

.chapter-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}

.chapter-list li:last-child { border-bottom: none; }

.chapter-list a {
  color: var(--text);
  font-weight: 600;
}
.chapter-list a:hover { color: var(--primary); }

.chapter-list .ch-count {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ---------- Authors page ---------- */

.author-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.author-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow);
}

.author-card h3 {
  font-size: 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.author-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.author-books {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

section[id] {
  scroll-margin-top: 84px;
}

.author-books a {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}

.author-books a:hover {
  background: var(--accent-soft);
  color: var(--primary-dark);
  border-color: var(--accent);
}

/* ---------- Facts page ---------- */

.facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.fact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.fact-card h3 {
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fact-card h3 .emoji-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.fact-card p, .fact-card li { color: var(--text-muted); font-size: 0.95rem; }
.fact-card ul { padding-left: 20px; margin: 0; }
.fact-card li { margin-bottom: 6px; }

.timeline {
  border-left: 3px solid var(--accent);
  margin-left: 10px;
  padding-left: 28px;
}

.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item .tl-label {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.timeline-item p { font-size: 0.9rem; margin-bottom: 0; color: var(--text-muted); }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 32px 0;
  margin-top: 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--text-muted); font-weight: 600; }

.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a { color: var(--text-faint); font-weight: 600; }
.footer-legal a:hover { color: var(--primary-dark); }

/* ---------- Legal pages (terms / privacy / cookies) ---------- */

.legal-content { max-width: 760px; margin: 0 auto; }

.legal-content .updated {
  color: var(--text-faint);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.legal-content h2 {
  font-size: 1.3rem;
  margin-top: 40px;
}

.legal-content h2:first-of-type { margin-top: 0; }

.legal-content p, .legal-content li { color: var(--text-muted); }
.legal-content ul { padding-left: 22px; margin: 0 0 1em 0; }
.legal-content li { margin-bottom: 6px; }

/* ---------- Contact form ---------- */

.contact-form {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

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

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

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

.form-note {
  font-size: 0.85rem;
  color: var(--text-faint);
  margin-top: 16px;
  text-align: center;
}

.form-success {
  display: none;
  background: var(--accent-soft);
  color: var(--primary-dark);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 20px;
  text-align: center;
}

.form-success.show { display: block; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .stats-strip .stat-box:last-child { grid-column: span 2; }
  .testament-intro { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: repeat(2, 1fr); }
  .facts-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.1rem; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 18px;
    display: none;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: left; }
  .nav-toggle { display: inline-flex; }
  .book-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 52px 20px 44px; }
  .hero h1 { font-size: 1.8rem; }
  .book-nav-links { flex-direction: column; align-items: stretch; }
  .book-nav-links .btn { width: 100%; justify-content: center; }
  .chapter-columns { grid-template-columns: 1fr; gap: 24px; }
  .author-grid { grid-template-columns: 1fr; }
}
