/* ============================================================================
 * For His Grace (FHG) — 864zeros Faith & Heritage Pillar Design System (v2.0)
 * Deploy root for Cloudflare Pages (https://forhisgrace.com)
 * Canonical Authorities:
 *   - 864z-build-kit/references/core/pillar-design-system.css ([data-pillar="FHG"])
 *   - 864zeros-web/style.css (FHG Warm Parchment, Charcoal & Bronze Surface)
 *   - GTM_MANIFEST.md §6 (Standardized Footer) & §7 (FHG Charcoal & Bronze)
 * ============================================================================ */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("./fonts/nunito-latin.woff2") format("woff2");
}

:root,
:root[data-theme="light"],
[data-pillar="FHG"] {
  /* --- FHG Foundation Accent (Bronze & Charcoal) --- */
  --blue: #8B6642;              /* WCAG-compliant Dark Bronze */
  --blue-core: #A67C52;         /* Canonical FHG Bronze */
  --blue-bright: #C49A6C;
  --blue-deep: #6e4f32;

  /* --- FHG Warm Parchment Surface Ladder --- */
  --black: #1D1D1D;
  --ink: #2D2D2D;               /* FHG Structural Charcoal */
  --body: #5C5C5C;              /* Body prose & descriptions */
  --muted: #78716c;             /* Captions, metadata, secondary links */
  --line: #E8E4DE;              /* Card & table borders */
  --bg: #FDFCF8;                /* FHG Warm Parchment */
  --card: #FFFFFF;

  /* --- Topbar, Hero & Media Surface Ladder --- */
  --canvas: #FDFCF8;
  --surface-1: #FDFCF8;
  --surface-2: #F6EFE4;
  --hairline: #E6DAC8;
  --on-surface: #2D2D2D;
  --on-surface-muted: #5C5C5C;

  /* --- Canonical FHG Pillar Tokens --- */
  --pillar-name: "FHG · Charcoal & Bronze";
  --pillar-accent: #8B6642;
  --pillar-accent-raw: #A67C52;
  --pillar-accent-dark: #6e4f32;
  --pillar-accent-soft: #F5EBE0;
  --pillar-accent-border: #DFC7B0;
  --pillar-structural: #2D2D2D;
  --pillar-hero-start: #FDFCF8;
  --pillar-hero-end: #F6EFE4;
  --pillar-hero-border: #E6DAC8;
}

/* ============================================================================
 * FHG HERITAGE DARK THEME (:root[data-theme="dark"])
 * Charcoal (#2D2D2D / #3D3D3D) & Bronze (#A67C52) per ScriptureScout FHG spec
 * ============================================================================ */
:root[data-theme="dark"] {
  --blue: #A67C52;
  --blue-core: #BD8E60;
  --blue-bright: #D4AC81;
  --blue-deep: #C49A6C;

  --ink: #F5F5F5;
  --body: #C8C4BE;
  --muted: #9A948C;
  --line: #3D3D3D;
  --bg: #222220;
  --card: #2D2D2D;
  --canvas: #222220;
  --surface-1: #2D2D2D;
  --surface-2: #353330;
  --hairline: #3D3D3D;
  --on-surface: #F5F5F5;
  --on-surface-muted: #C8C4BE;

  --pillar-accent: #C49A6C;
  --pillar-accent-raw: #A67C52;
  --pillar-accent-dark: #8B6642;
  --pillar-accent-soft: rgba(166, 124, 82, 0.16);
  --pillar-accent-border: rgba(196, 154, 108, 0.35);
  --pillar-structural: #3D3D3D;
  --pillar-hero-start: #2D2D2D;
  --pillar-hero-end: #222220;
  --pillar-hero-border: #3D3D3D;
}

/* ============================================================================
 * BASE & TOPBAR
 * ============================================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Nunito", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}

.topbar {
  background: var(--canvas);
  padding: 15px 28px;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.brand-mark svg {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(45, 45, 45, 0.12);
}
.brand-mark .brand-sub {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pillar-accent);
  background: var(--pillar-accent-soft);
  border: 1px solid var(--pillar-accent-border);
  padding: 2px 8px;
  border-radius: 999px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar-nav a {
  color: var(--on-surface-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: color .15s;
}
.topbar-nav a:hover {
  color: var(--ink);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--pillar-accent-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.theme-toggle:hover {
  border-color: var(--blue);
  background: var(--pillar-accent-soft);
}

/* ============================================================================
 * HERO — FHG Warm Parchment to Soft Cream-Bronze Wash
 * ============================================================================ */
.hero {
  background: linear-gradient(180deg, var(--pillar-hero-start) 0%, var(--pillar-hero-end) 100%);
  color: var(--ink);
  padding: 64px 24px 56px;
  border-bottom: 1px solid var(--pillar-hero-border);
}
.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.hero-art {
  margin: 0;
  background: #F6EFE4;
  border: 1px solid var(--pillar-accent-border);
  border-radius: 16px;
  padding: 10px 10px 12px;
  box-shadow: 0 12px 32px rgba(45, 45, 45, 0.10);
}
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px 10px 6px 6px;
}
.hero-caption {
  margin-top: 8px;
  padding: 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: 0.015em;
  color: #6E5D4B;
  text-align: right;
  opacity: 0.88;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--pillar-accent);
  background: var(--pillar-accent-soft);
  border: 1px solid var(--pillar-accent-border);
  border-radius: 999px;
  padding: 4px 12px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-core);
  display: inline-block;
}

.hero h1 {
  color: var(--ink);
  font-size: clamp(32px, 5vw, 44px);
  margin: 6px 0 4px;
  letter-spacing: -.025em;
  line-height: 1.12;
  font-weight: 800;
  max-width: 720px;
}
.hero p.sum {
  font-size: 19px;
  color: var(--body);
  margin: 0 0 14px;
  max-width: 680px;
  line-height: 1.6;
}

.store-actions {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(139, 102, 66, 0.22);
  transition: opacity .15s, background .15s, transform .15s;
}
.cta:hover {
  opacity: .94;
  transform: translateY(-1px);
}
.cta.ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--pillar-accent-border);
  box-shadow: 0 1px 2px rgba(45, 45, 45, 0.05);
}
.cta.ghost:hover {
  border-color: var(--blue);
  color: var(--blue-deep);
}

/* ============================================================================
 * CONTENT SECTIONS & CARDS
 * ============================================================================ */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 44px 24px 72px;
}

.thesis-callout {
  margin: 0 0 36px;
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-left: 5px solid var(--blue);
  border-radius: 14px;
  padding: 22px 26px;
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.68;
  box-shadow: 0 4px 18px rgba(45, 45, 45, 0.04);
}
.thesis-callout .eyebrow {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pillar-accent);
  margin-bottom: 8px;
}
.thesis-callout p {
  margin: 0 0 10px;
}
.thesis-callout p:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 36px 0 16px;
}
.section-head h2 {
  color: var(--ink);
  font-size: 23px;
  margin: 0;
  letter-spacing: -.015em;
}
.section-head span {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.pcard {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(45, 45, 45, 0.04);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.pcard:hover {
  border-color: var(--blue-core);
  box-shadow: 0 8px 24px rgba(139, 102, 66, 0.12);
  transform: translateY(-2px);
}
.pcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.pcard-badge {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--pillar-accent);
  background: var(--pillar-accent-soft);
  border: 1px solid var(--pillar-accent-border);
  border-radius: 999px;
  padding: 2px 10px;
}
.pcard-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.pcard h3 {
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -.01em;
}
.pcard p {
  margin: 0;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.58;
}
.pcard-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 700;
}
.pcard-links a {
  color: var(--pillar-accent);
  text-decoration: none;
}
.pcard-links a:hover {
  text-decoration: underline;
}

/* Pillars of Stewardship */
.pillars-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.pillars-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 3px solid var(--blue-core);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--body);
}
.pillars-list li strong {
  display: block;
  color: var(--ink);
  font-size: 15.5px;
  margin-bottom: 4px;
}

/* Launch Notice Card */
.launch-card {
  margin-top: 38px;
  background: var(--card);
  border: 1px solid var(--pillar-accent-border);
  border-radius: 14px;
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 18px rgba(139, 102, 66, 0.06);
}
.launch-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 18px;
}
.launch-card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--body);
  max-width: 580px;
}

/* ============================================================================
 * STANDARDIZED 864ZEROS BRAND FOOTER (GTM_MANIFEST.md §6)
 * ============================================================================ */
.brand-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.brand-footer__line {
  margin: 5px 0;
}
.brand-footer__product {
  color: var(--ink);
  font-weight: 700;
}
.brand-footer__privacy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.brand-footer__lock {
  vertical-align: -2px;
  color: var(--pillar-accent);
}
.brand-footer__legal a,
.brand-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.brand-footer__legal a:hover,
.brand-footer a:hover {
  color: var(--ink);
}
.brand-footer__legal span {
  margin: 0 6px;
}

@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 640px) {
  .topbar { padding: 14px 18px; }
  .hero { padding: 44px 18px 40px; }
  .wrap { padding: 32px 18px 56px; }
  .launch-card { padding: 20px; }
}
