/*
Theme Name:  Fideograph
Theme URI:   https://fideograph.com
Author:      Know Your Faith Apostolate
Author URI:  https://catholicsay.com
Description: Custom theme for Fideograph — the Catholic historical verification archive. Data-driven apologetics built on the KYF design system.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License:     GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fideograph
Tags:        custom-menu, featured-images, full-width-template, custom-colors, threaded-comments
*/

/* ═══════════════════════════════════════════════════════════
   FIDEOGRAPH DESIGN TOKENS
   All colours, fonts, and spacing for the entire site.
   Edit here; changes propagate everywhere.
═══════════════════════════════════════════════════════════ */
:root {
  /* ── KYF Parchment Palette ── */
  --fg-gold:          #9B7A2E;
  --fg-gold-lt:       #d4aa60;
  --fg-gold-pale:     #f5ecd4;
  --fg-gold-dim:      #6b5220;
  --fg-ink:           #1c1810;
  --fg-ink-2:         #2e2a1e;
  --fg-ink-3:         #48432e;
  --fg-parchment:     #faf6ed;
  --fg-parchment-2:   #f4edd8;
  --fg-parchment-3:   #ece3c5;
  --fg-cream:         #fffdf7;
  --fg-red-deep:      #7a1212;
  --fg-red-mid:       #8B3000;
  --fg-red-pale:      #fdf0f0;
  --fg-blue-deep:     #0f2d4a;
  --fg-green-deep:    #0d3d1e;
  --fg-green-pale:    #eaf5ec;
  --fg-border:        #ddd5b8;
  --fg-border-2:      #c8bc98;
  --fg-shadow:        rgba(28, 24, 16, .12);
  --fg-shadow-2:      rgba(28, 24, 16, .22);

  /* ── Brand Mark Colours ── */
  --brand-gold:       #C9A84C;
  --brand-green:      #2D8A50;
  --brand-teal:       #1A9C80;
  --brand-blue:       #1862A8;
  --brand-purple:     #8040B0;
  --brand-crimson:    #A02858;
  --brand-red:        #C04820;
  --brand-amber:      #E8A020;
  --brand-ink:        #0F0E1A;

  /* ── Doctrine Category Colours ── */
  --doc-petrine:      #8B3000;
  --doc-eucharist:    #1A6B5A;
  --doc-mariology:    #8040B0;
  --doc-scripture:    #185FA5;
  --doc-sacraments:   #B07215;
  --doc-ecclesiology: #E8A020;
  --doc-eschatology:  #1862A8;

  /* ── Verdict Colours ── */
  --verdict-verified: #1A6A38;
  --verdict-refuted:  #8B3000;
  --verdict-disputed: #185FA5;

  /* ── Typography ── */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-serif:    'Source Serif 4', Georgia, serif;
  --font-garamond: 'EB Garamond', Georgia, serif;
  --font-sans:     'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* ── Layout ── */
  --max-width:      900px;
  --max-width-wide: 1080px;
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-serif);
  background: var(--fg-parchment);
  color: var(--fg-ink);
  line-height: 1.75;
  overflow-x: hidden;
}

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

a {
  color: var(--fg-gold);
  text-decoration: none;
  transition: color .15s;
}

a:hover {
  color: var(--fg-red-mid);
}

/* ═══════════════════════════════════════════════════════════
   READING PROGRESS BAR
═══════════════════════════════════════════════════════════ */
.fg-progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-gold), var(--fg-gold-lt));
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  transition: transform .05s linear;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT CONTAINERS
═══════════════════════════════════════════════════════════ */
.fg-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.fg-container--wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════════
   SECTION STRUCTURE
═══════════════════════════════════════════════════════════ */
.fg-section {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--fg-border);
}

.fg-section:last-of-type {
  border-bottom: none;
}

.fg-section__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-gold-dim);
  margin-bottom: 14px;
}

.fg-section__eyebrow span {
  display: block;
  height: 1px;
  width: 40px;
  background: var(--fg-gold);
  opacity: .5;
}

.fg-section__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-ink);
  margin-bottom: 8px;
}

.fg-section__title em {
  font-style: italic;
  color: var(--fg-red-deep);
}

.fg-section__deck {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(14px, 2vw, 17px);
  color: var(--fg-ink-3);
  line-height: 1.55;
  margin-bottom: 24px;
  max-width: 720px;
}

/* ═══════════════════════════════════════════════════════════
   KEY INSIGHT BAR (signature KYF component)
═══════════════════════════════════════════════════════════ */
.fg-key-insight {
  font-size: 15px;
  color: #5a2800;
  background: #fdf5ec;
  border: 1px solid #e8c890;
  border-left: 4px solid var(--fg-red-mid);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.fg-key-insight strong {
  color: var(--fg-red-mid);
}

/* ═══════════════════════════════════════════════════════════
   PROSE
═══════════════════════════════════════════════════════════ */
.fg-prose {
  font-size: 17px;
  line-height: 1.8;
  color: var(--fg-ink-2);
  max-width: 720px;
}

.fg-prose p {
  margin-bottom: 1.2em;
}

.fg-prose p:last-child {
  margin-bottom: 0;
}

.fg-prose strong {
  color: var(--fg-ink);
  font-weight: 600;
}

.fg-prose em {
  color: var(--fg-red-deep);
  font-style: italic;
}

.fg-prose--dropcap > p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 4.5em;
  font-weight: 900;
  float: left;
  line-height: .78;
  margin-right: .08em;
  margin-top: .06em;
  color: var(--fg-gold);
}

/* ═══════════════════════════════════════════════════════════
   SCRIPTURE PULL QUOTE
═══════════════════════════════════════════════════════════ */
.fg-scripture {
  margin: 28px 0;
  padding: 20px 24px 20px 28px;
  background: linear-gradient(135deg, var(--fg-parchment-2), var(--fg-parchment-3));
  border-left: 4px solid var(--fg-gold);
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: box-shadow .2s;
}

.fg-scripture:hover {
  box-shadow: 0 4px 20px var(--fg-shadow);
}

.fg-scripture__text {
  font-family: var(--font-garamond);
  font-size: 20px;
  font-style: italic;
  color: var(--fg-ink-2);
  line-height: 1.65;
  margin-bottom: 8px;
}

.fg-scripture__ref {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--fg-gold-dim);
}

.fg-scripture__note {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--fg-border);
  font-size: 13px;
  color: var(--fg-ink-3);
  line-height: 1.65;
  font-family: var(--font-serif);
}

.fg-scripture.is-open .fg-scripture__note {
  display: block;
}

.fg-scripture__hint {
  font-size: 10px;
  color: var(--fg-gold);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 6px;
  opacity: .7;
}

/* ═══════════════════════════════════════════════════════════
   ARGUMENT CARDS (expandable)
═══════════════════════════════════════════════════════════ */
.fg-arg-card {
  background: var(--fg-cream);
  border: 1px solid var(--fg-border);
  border-radius: 10px;
  margin: 16px 0;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s;
}

.fg-arg-card:hover {
  box-shadow: 0 4px 18px var(--fg-shadow);
}

.fg-arg-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--fg-parchment-2);
  border-bottom: 1px solid transparent;
}

.fg-arg-card.is-open .fg-arg-card__head {
  border-bottom-color: var(--fg-border);
}

.fg-arg-card__num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  color: var(--fg-gold);
  flex-shrink: 0;
  line-height: 1;
  width: 30px;
}

.fg-arg-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-ink);
  flex: 1;
}

.fg-arg-card__arrow {
  font-size: 13px;
  color: var(--fg-border-2);
  transition: transform .2s;
  flex-shrink: 0;
}

.fg-arg-card.is-open .fg-arg-card__arrow {
  transform: rotate(180deg);
}

.fg-arg-card__body {
  display: none;
  padding: 16px 18px 18px;
  font-size: 15px;
  color: var(--fg-ink-3);
  line-height: 1.7;
}

.fg-arg-card.is-open .fg-arg-card__body {
  display: block;
}

/* ═══════════════════════════════════════════════════════════
   OBJECTION / RESPONSE PAIR
═══════════════════════════════════════════════════════════ */
.fg-obj-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 20px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--fg-border);
}

.fg-obj-col {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.65;
}

.fg-obj-col--objection {
  background: var(--fg-red-pale);
  border-right: 1px solid var(--fg-border);
}

.fg-obj-col--response {
  background: var(--fg-green-pale);
}

.fg-obj-col__label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 10px;
}

.fg-obj-col--objection .fg-obj-col__label {
  color: var(--fg-red-mid);
}

.fg-obj-col--response .fg-obj-col__label {
  color: var(--verdict-verified);
}

/* ═══════════════════════════════════════════════════════════
   VERDICT PILL
═══════════════════════════════════════════════════════════ */
.fg-verdict-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: .1em;
  font-weight: 600;
  text-transform: uppercase;
}

.fg-verdict-pill--verified {
  background: var(--fg-green-pale);
  color: var(--verdict-verified);
  border: 1px solid rgba(26, 106, 56, .25);
}

.fg-verdict-pill--refuted {
  background: var(--fg-red-pale);
  color: var(--verdict-refuted);
  border: 1px solid rgba(139, 48, 0, .25);
}

.fg-verdict-pill--disputed {
  background: #eaf0fb;
  color: var(--verdict-disputed);
  border: 1px solid rgba(24, 95, 165, .25);
}

.fg-verdict-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fg-verdict-pill--verified .fg-verdict-pill__dot { background: var(--verdict-verified); }
.fg-verdict-pill--refuted  .fg-verdict-pill__dot { background: var(--verdict-refuted); }
.fg-verdict-pill--disputed .fg-verdict-pill__dot { background: var(--verdict-disputed); }

/* ═══════════════════════════════════════════════════════════
   CLAIM CARDS (archive grid)
═══════════════════════════════════════════════════════════ */
.fg-claim-card {
  background: var(--fg-cream);
  border: 1px solid var(--fg-border);
  border-radius: 10px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, transform .15s;
}

.fg-claim-card:hover {
  box-shadow: 0 6px 24px var(--fg-shadow-2);
  transform: translateY(-2px);
  color: inherit;
}

.fg-claim-card__band {
  height: 4px;
  width: 100%;
}

.fg-claim-card__head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--fg-border);
}

.fg-claim-card__cat {
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-gold);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fg-claim-card__cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fg-claim-card__q {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--fg-ink);
  line-height: 1.4;
}

.fg-claim-card__body {
  padding: 12px 18px;
}

.fg-claim-card__preview {
  font-size: 13px;
  color: var(--fg-ink-3);
  line-height: 1.6;
}

.fg-claim-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--fg-border);
  background: var(--fg-parchment);
}

.fg-claim-card__meta {
  display: flex;
  gap: 10px;
}

.fg-claim-card__meta-item {
  font-size: 10px;
  color: var(--fg-border-2);
}

.fg-claim-card__meta-item strong {
  color: var(--fg-gold-dim);
}

/* ═══════════════════════════════════════════════════════════
   FATHER QUOTE CARDS
═══════════════════════════════════════════════════════════ */
.fg-father-card {
  background: var(--fg-cream);
  border: 1px solid var(--fg-border);
  border-radius: 10px;
  overflow: hidden;
}

.fg-father-card__head {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--fg-border);
}

.fg-father-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.fg-father-card__name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-ink);
}

.fg-father-card__dates {
  font-size: 11px;
  color: var(--fg-ink-3);
}

.fg-father-card__body {
  padding: 14px 16px;
}

.fg-father-card__quote {
  font-family: var(--font-garamond);
  font-size: 15px;
  font-style: italic;
  color: var(--fg-ink-2);
  line-height: 1.65;
  border-left: 3px solid var(--fg-gold-lt);
  padding-left: 12px;
  margin-bottom: 8px;
}

.fg-father-card__source {
  font-size: 11px;
  color: var(--fg-gold-dim);
  letter-spacing: .04em;
}

/* ═══════════════════════════════════════════════════════════
   EVIDENCE TIMELINE
═══════════════════════════════════════════════════════════ */
.fg-ev-timeline {
  display: flex;
  flex-direction: column;
}

.fg-ev-item {
  display: grid;
  grid-template-columns: 72px 16px 1fr;
  gap: 0 12px;
  padding-bottom: 18px;
  align-items: start;
}

.fg-ev-item:last-child {
  padding-bottom: 0;
}

.fg-ev-item__year {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-gold);
  padding-top: 3px;
  text-align: right;
}

.fg-ev-item__spine {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.fg-ev-item__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--fg-gold);
  background: var(--fg-parchment);
  margin-top: 4px;
  flex-shrink: 0;
}

.fg-ev-item__dot--filled {
  background: var(--fg-gold);
}

.fg-ev-item__line {
  flex: 1;
  width: 1px;
  background: var(--fg-border);
  margin-top: 3px;
}

.fg-ev-item__text {
  font-size: 13px;
  color: var(--fg-ink-2);
  line-height: 1.55;
}

.fg-ev-item__source {
  font-size: 11px;
  font-style: italic;
  color: var(--fg-gold-dim);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════
   FILTER PILLS (shared component)
═══════════════════════════════════════════════════════════ */
.fg-filter-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.fg-filter-pill {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--fg-border-2);
  background: transparent;
  color: var(--fg-ink-3);
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font-serif);
}

.fg-filter-pill:hover {
  background: var(--fg-parchment-2);
}

.fg-filter-pill.is-active {
  background: var(--fg-red-mid);
  color: #fff;
  border-color: var(--fg-red-mid);
}

/* ═══════════════════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════════════════ */
.fg-stat-strip {
  display: flex;
  gap: 0;
}

.fg-stat {
  flex: 1;
  text-align: center;
  padding: 20px 16px;
  border-right: 1px solid var(--fg-border);
}

.fg-stat:last-child {
  border-right: none;
}

.fg-stat__number {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--fg-red-mid);
  display: block;
  line-height: 1;
  margin-bottom: 5px;
}

.fg-stat__label {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-ink-3);
}

/* ═══════════════════════════════════════════════════════════
   BREADCRUMB
═══════════════════════════════════════════════════════════ */
.fg-breadcrumb {
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(250, 246, 237, .35);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.fg-breadcrumb a {
  color: var(--brand-gold);
  opacity: .8;
}

.fg-breadcrumb a:hover {
  opacity: 1;
  color: var(--brand-gold);
}

/* ═══════════════════════════════════════════════════════════
   BENEDICTION
═══════════════════════════════════════════════════════════ */
.fg-benediction {
  background: var(--brand-ink);
  padding: 52px 24px;
  text-align: center;
}

.fg-benediction__inner {
  max-width: 560px;
  margin: 0 auto;
}

.fg-benediction__rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.fg-benediction__line {
  flex: 1;
  height: 1px;
  background: rgba(201, 168, 76, .2);
}

.fg-benediction__cross {
  color: var(--brand-gold);
  font-size: 15px;
}

.fg-benediction__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-style: italic;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}

.fg-benediction__sub {
  font-family: var(--font-garamond);
  font-size: 16px;
  font-style: italic;
  color: rgba(250, 246, 237, .45);
  margin-bottom: 28px;
  line-height: 1.7;
}

.fg-btn {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
  padding: 11px 30px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  transition: opacity .15s;
  text-decoration: none;
}

.fg-btn--gold {
  background: var(--brand-gold);
  color: var(--brand-ink);
}

.fg-btn--gold:hover {
  opacity: .85;
  color: var(--brand-ink);
}

/* ═══════════════════════════════════════════════════════════
   FADE-IN ANIMATION
═══════════════════════════════════════════════════════════ */
.fg-fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.fg-fade-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
  .fg-obj-pair {
    grid-template-columns: 1fr;
  }

  .fg-obj-col--objection {
    border-right: none;
    border-bottom: 1px solid var(--fg-border);
  }
}
