/* ============================================
   THE ICONOSTASIS — design tokens
   Palette inspired by darkened wood, gold leaf,
   and the screen of icons itself.
   ============================================ */
:root {
  --bg:            #14100c;   /* near-black walnut */
  --bg-raised:     #1c1712;   /* card / header surface */
  --bg-raised-2:   #241d16;   /* hover / active surface */
  --border:        #3a2f22;   /* warm hairline */
  --border-soft:   #2a221a;

  --text:          #ece4d3;   /* candlelight parchment */
  --text-secondary:#b6a98e;
  --text-muted:    #7d715c;

  --gold:          #c9a15a;   /* gilding accent, site accent */
  --gold-bright:   #e4c483;

  --theology:      #b8860b;
  --politics:      #9e2a2b;
  --conspiracies:  #5b3a87;
  --resources:     #2f5233;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body:    'Source Serif 4', 'Georgia', serif;
  --font-ui:      'Inter', -apple-system, sans-serif;

  --radius: 3px;
  --radius-lg: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(201,161,90,0.06), transparent 60%);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ============ TOP GOLD LINE ============ */
.gold-line {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--gold) 15%, var(--gold-bright) 50%, var(--gold) 85%, transparent);
}

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 16, 12, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.site-header.header-hidden { transform: translateY(-100%); }

.header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 20px 32px 14px;
  gap: 16px;
}
.header-spacer { min-width: 0; }
.site-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.site-title a { display: inline-flex; align-items: center; gap: 10px; }
.site-title svg { width: 26px; height: 26px; flex: none; color: var(--gold); }

.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-pill {
  display: inline-flex;
  align-items: center;
  background: var(--gold);
  color: #1c1712;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 8px 16px;
  white-space: nowrap;
  transition: background 0.15s;
}
.admin-pill:hover { background: var(--gold-bright); }

.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  width: 180px;
  font-family: var(--font-ui);
}
.search-wrap input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  width: 100%;
}
.search-wrap input::placeholder { color: var(--text-muted); }
.search-wrap svg { width: 15px; height: 15px; color: var(--text-muted); flex: none; }

.header-nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-soft);
  font-family: var(--font-ui);
  font-size: 12.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.header-nav a {
  color: var(--text-secondary);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.header-nav a:hover { color: var(--gold-bright); }
.header-nav a.active { color: var(--gold-bright); border-color: var(--gold); }

/* ============ DROPDOWN MENU ============ */
.menu-dropdown {
  position: relative;
  justify-self: start;
}
.menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.menu-trigger:hover { border-color: var(--gold); color: var(--gold-bright); }
.menu-trigger svg { width: 14px; height: 14px; }

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 2px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  z-index: 50;
}
.menu-panel.open { display: flex; }
.menu-panel a {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}
.menu-panel a:hover { background: var(--bg-raised-2); color: var(--gold-bright); }
.menu-panel a.active { color: var(--gold-bright); }

.menu-group { margin-bottom: 2px; }
.menu-group-label {
  display: block;
  padding: 10px 14px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}
.menu-group-label.active { color: var(--gold-bright); }
.menu-sub {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 10px;
  margin-bottom: 0;
}
.menu-sub:not(.sub-open) {
  display: none;
}
.menu-sub.sub-open {
  margin-bottom: 6px;
  margin-top: 2px;
}
.menu-sub a {
  padding: 7px 14px;
  font-size: 12px;
  color: var(--text-muted);
}
.menu-sub a:hover { color: var(--gold-bright); }
.menu-divider {
  height: 1px;
  background: var(--border-soft);
  margin: 4px 6px;
}
@media (max-width: 620px) {
  .menu-dropdown { justify-self: start; }
}

.tagline-bar {
  text-align: center;
  padding: 16px 24px 6px;
  max-width: 640px;
  margin: 0 auto;
}
.tagline-bar p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* ============ LAYOUT ============ */
.page-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 8px 24px 80px;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  margin-top: 24px;
}
@media (max-width: 860px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

.page-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  text-align: center;
  color: var(--gold-bright);
  margin: 28px 0 4px;
}
.page-sub {
  text-align: center;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 4px 0 28px;
  font-family: var(--font-ui);
}
.filter-tab {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-raised);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-tab:hover { border-color: var(--gold); color: var(--gold-bright); }
.filter-tab.active {
  background: var(--tab-color, var(--gold));
  border-color: var(--tab-color, var(--gold));
  color: #fff;
}

/* ============ POST CARDS ============ */
.post-feed { display: flex; flex-direction: column; gap: 18px; }

.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 22px;
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover { border-color: var(--gold); }

.post-card.featured {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 260px 1fr;
}
.post-card.featured .featured-img {
  background: linear-gradient(135deg, var(--bg-raised-2), var(--bg));
  min-height: 190px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.post-card.featured .featured-body { padding: 22px 24px; }
@media (max-width: 620px) {
  .post-card.featured { grid-template-columns: 1fr; }
  .post-card.featured .featured-img { min-height: 140px; }
}

.tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  padding: 4px 11px;
  border-radius: 3px;
  background: var(--tag-color, var(--gold));
}
.tag--theology     { --tag-color: var(--theology); }
.tag--politics      { --tag-color: var(--politics); }
.tag--conspiracies  { --tag-color: var(--conspiracies); }
.tag--resources     { --tag-color: var(--resources); }

.post-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 10px 0 6px;
  color: var(--text);
}
.post-card.featured .post-title { font-size: 26px; }
.post-excerpt {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0 0 8px;
}
.post-meta {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ============ SIDEBAR / AD SLOTS ============ */
.ad-slot {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 40px 12px;
  background: var(--bg-raised);
}
.ad-slot.banner { padding: 18px 12px; margin: 20px 0 8px; }
.ad-slot.sidebar { margin-bottom: 24px; }

/* ============ RESOURCES PAGE ============ */
.resource-section { margin-bottom: 34px; }
.resource-heading {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.social-card, .ref-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-raised);
  padding: 16px;
  text-align: center;
  transition: border-color 0.15s;
}
.ref-card { text-align: left; margin-bottom: 10px; display: block; }
.social-card:hover, .ref-card:hover { border-color: var(--gold); }
.social-card svg { width: 22px; height: 22px; margin: 0 auto 8px; }
.social-card span { font-family: var(--font-ui); font-size: 12.5px; color: var(--text-secondary); }
.ref-card p { margin: 0; font-family: var(--font-body); font-size: 15px; }

/* ============ ARTICLE PAGE ============ */
.article-hero {
  width: 100%;
  height: 340px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--bg-raised-2), var(--bg));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  margin: 18px 0 26px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.article-header { text-align: center; margin-bottom: 6px; }
.article-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--gold-bright);
  margin: 14px 0 10px;
}
.article-byline {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.article-body {
  max-width: 680px;
  margin: 36px auto 0;
  font-size: 18px;
  line-height: 1.75;
}
.article-body p { margin: 0 0 22px; }
.article-body h2 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 26px;
  margin: 40px 0 16px;
}

.article-end-ad { max-width: 680px; margin: 40px auto 0; }

/* ============ COMMENTS ============ */
.comments {
  max-width: 680px;
  margin: 48px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.comments h3 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold-bright);
  margin: 0 0 6px;
}
.comments-sub {
  font-family: var(--font-ui);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.comment-form textarea {
  width: 100%;
  min-height: 90px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px;
  resize: vertical;
  outline: none;
}
.comment-form textarea:focus { border-color: var(--gold); }
.comment-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.comment-form input[type="text"] {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  width: 200px;
}
.comment-form input[type="text"]:focus { border-color: var(--gold); }
.btn-submit {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: var(--gold);
  color: #1c1712;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-submit:hover { background: var(--gold-bright); }
.comment-confirm {
  display: none;
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--gold-bright);
  margin-top: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-raised);
}
.comment-confirm.show { display: block; }
.comment-note {
  font-family: var(--font-ui);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 20px;
  font-style: italic;
}

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 28px 24px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text-muted);
}
.site-footer a { color: var(--text-secondary); margin: 0 8px; }
.site-footer a:hover { color: var(--gold-bright); }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
