/* ============================================================
   bibleversefor.com — Shared Design System
   shared.css — link this on every page
   ============================================================ */

/* ── FONTS ─────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── TOKENS ────────────────────────────────────────────────── */
:root {
  /* Core palette */
  --gold:         #C9A96E;
  --gold-light:   #E8D5A3;
  --gold-pale:    #F5EDD8;
  --gold-dim:     rgba(201,169,110,0.35);
  --ink:          #1A1612;
  --ink-soft:     #4A4440;
  --ink-muted:    #7A7470;
  --parchment:    #FDF9F2;
  --cream:        #F9F4EB;
  --white:        #FFFFFF;
  --divider:      rgba(201,169,110,0.2);
  --divider-hard: rgba(201,169,110,0.4);

  /* Typography */
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --page-x: clamp(1.25rem, 5vw, 4rem);
  --max-w:  1140px;
  --max-w-text: 720px;

  /* Radius */
  --radius-sm: 2px;
  --radius:    4px;
  --radius-lg: 8px;

  /* Transitions */
  --ease: 0.2s ease;
}

/* ── DARK MODE ─────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --parchment:  #18130E;
    --cream:      #1F1810;
    --white:      #2A211A;
    --ink:        #F0E8D8;
    --ink-soft:   #C4B89A;
    --ink-muted:  #8A8078;
    --divider:    rgba(201,169,110,0.15);
    --divider-hard: rgba(201,169,110,0.3);
  }
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--parchment);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; border: none; background: none; }

/* ── LAYOUT HELPERS ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-x);
}

.container--text {
  max-width: var(--max-w-text);
}

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: 64px;
  background: rgba(253,249,242,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid var(--divider);
  display: flex;
  align-items: center;
}

@media (prefers-color-scheme: dark) {
  .site-header { background: rgba(31,24,16,0.94); }
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.site-logo svg {
  width: auto;
  height: 32px;
}

/* Nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--ease);
  white-space: nowrap;
}

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

.nav-cta {
  font-size: 0.7rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  padding: 0.5rem 1.25rem !important;
  border: 0.5px solid var(--gold-dim) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--gold) !important;
  transition: all var(--ease) !important;
}

.nav-cta:hover {
  background: rgba(201,169,110,0.08) !important;
  border-color: var(--gold) !important;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink-soft);
  transition: all var(--ease);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--parchment);
    border-bottom: 0.5px solid var(--divider);
    padding: 1rem var(--page-x) 1.5rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.6rem 0; font-size: 0.8rem !important; }
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  border-top: 0.5px solid var(--divider);
  padding: 3.5rem 0 2.5rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin-top: 1rem;
  max-width: 260px;
  font-weight: 300;
}

.footer-col-title {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 300;
  transition: color var(--ease);
  line-height: 1.4;
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  padding-top: 2rem;
  border-top: 0.5px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--ink-muted);
  font-weight: 300;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: #0D0A06;
  border: none;
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 0.5px solid var(--gold-dim);
}
.btn-outline:hover {
  border-color: var(--gold);
  background: rgba(201,169,110,0.06);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 0.5px solid var(--divider-hard);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-soft);
}

/* ── SEARCH BAR ─────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--white);
  border: 0.5px solid var(--divider-hard);
  border-radius: var(--radius-sm);
  padding: 0.9rem 3rem 0.9rem 1.25rem;
  transition: border-color var(--ease);
  outline: none;
  -webkit-appearance: none;
}

.search-input::placeholder { color: var(--ink-muted); }
.search-input:focus { border-color: var(--gold); }

.search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.search-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  cursor: pointer;
  display: none;
  background: none;
  border: none;
  padding: 2px;
  line-height: 1;
  font-size: 1rem;
}

.search-clear.visible { display: block; }

/* ── SECTION DIVIDER ─────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 3.5rem 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 0.5px;
  background: var(--divider);
}

.divider-mark {
  color: var(--gold);
  font-size: 0.65rem;
  opacity: 0.7;
  letter-spacing: 0.3em;
}

/* ── EYEBROW LABEL ───────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ── PAGE HERO (generic) ─────────────────────────────────────── */
.page-hero {
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 5vw, 4rem);
  text-align: center;
}

.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
  margin: 0.75rem 0 1.25rem;
}

.page-hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.page-hero p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 540px;
  margin: 0 auto 2rem;
}

/* ── PILL TAGS / FILTERS ─────────────────────────────────────── */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.pill {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  border: 0.5px solid var(--divider-hard);
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}

.pill:hover,
.pill.active {
  background: rgba(201,169,110,0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* ── ARTICLE CARD ─────────────────────────────────────────────── */
.article-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.5rem 0;
  border-bottom: 0.5px solid var(--divider);
  transition: all var(--ease);
}

.article-card:last-child { border-bottom: none; }

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.article-card-category {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.article-card-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--ink-muted);
  flex-shrink: 0;
}

.article-card-count {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 300;
}

.article-card h3 {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ink);
  transition: color var(--ease);
}

.article-card:hover h3 { color: var(--gold); }

.article-card-desc {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-soft);
  font-weight: 300;
  max-width: 640px;
}

.article-card-link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-top: 0.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  opacity: 0;
  transition: opacity var(--ease);
}

.article-card:hover .article-card-link { opacity: 1; }

/* ── CATEGORY CARD ───────────────────────────────────────────── */
.category-card {
  padding: 1.75rem 1.5rem;
  border: 0.5px solid var(--divider);
  border-radius: var(--radius);
  background: var(--white);
  transition: all var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-decoration: none;
}

.category-card:hover {
  border-color: var(--gold-dim);
  background: var(--parchment);
  transform: translateY(-1px);
}

.category-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.category-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.25;
}

.category-card-desc {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-weight: 300;
}

.category-card-count {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: auto;
  padding-top: 0.75rem;
}

/* ── NO RESULTS ──────────────────────────────────────────────── */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  display: none;
}

.no-results.visible { display: block; }

.no-results p {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.no-results span {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* ── RESULTS COUNT ───────────────────────────────────────────── */
.results-count {
  font-size: 0.78rem;
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 0.5rem;
}

/* ── UTILITY ─────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--ink-muted); }
.serif { font-family: var(--serif); }

/* ── HEADER/FOOTER SHARED LOGO SVG ──────────────────────────── */
/* Logo renders inline — see HTML files */

/* ── PINTEREST SAVE BUTTON ───────────────────────────────────── */
.pin-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: #E60023;
  border-radius: 100px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
  white-space: nowrap;
}

.verse-card-wrap:hover .pin-btn,
.verse-card-wrap:focus-within .pin-btn {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: none) {
  /* Always show on touch devices */
  .pin-btn { opacity: 1; transform: none; }
}
