/* ═══════════════════════════════════════════════════════════════
   BATTLE CRY — Shared site styles
   Tokens, reset, navbar, footer, page-hero, common utilities.
   Page-specific CSS goes in each file after this include.
═══════════════════════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --gold:       #C9A84C;
  --gold-dark:  #a8851f;
  --gold-bg:    #fef3c7;
  --blue:       #C9A84C;   /* legacy alias — matches --gold */
  --green:      #1a7a3c;
  --green-bg:   #d4f0e0;
  --amber:      #b35c00;
  --amber-bg:   #ffecd1;
  --purple:     #6b21a8;
  --purple-bg:  #f3e8ff;
  --nav-bg:     #0d0b07;
  --nav-border: #C9A84C;
  --text:       #1a1a1a;
  --muted:      #666;
  --border:     #ddd;
  --body-bg:    #f5f2ed;
  --card-bg:    #fff;
  --radius:     8px;
  --radius-lg:  12px;
  --shadow:     0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:  0 4px 20px rgba(0,0,0,.12);
  --nav-h:      60px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  background: var(--body-bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: var(--nav-h); /* offset for sticky nav */
}

/* ══════════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════════ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 3px solid var(--nav-border);
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.4);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  gap: 1rem;
}

/* Brand / logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-cross {
  font-size: 1.4rem;
  color: var(--gold);
  line-height: 1;
}
.nav-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.nav-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}
.nav-brand-sub {
  font-size: .62rem;
  color: rgba(201,168,76,.75);
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}
.nav-links li a {
  display: block;
  padding: .4rem .85rem;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: .88rem;
  font-weight: 600;
  border-radius: 6px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.nav-links li a:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-links li a.active { color: var(--gold); }
.nav-links li a.active::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
  margin-top: 2px;
}

/* CTA button */
.nav-links li.nav-cta a {
  margin-left: .5rem;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  border-radius: 20px;
  padding: .4rem 1.1rem;
}
.nav-links li.nav-cta a:hover { background: var(--gold-dark); color: #fff; }
.nav-links li.nav-cta a.active::after { display: none; }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  height: 2px; width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 700px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--nav-bg);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-bottom: 3px solid var(--nav-border);
    padding: .5rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { border-radius: 0; padding: .75rem 1.5rem; font-size: .95rem; }
  .nav-links li.nav-cta { padding: .5rem 1rem; }
  .nav-links li.nav-cta a {
    border-radius: 8px;
    text-align: center;
    margin-left: 0;
  }
}

/* ══════════════════════════════════════════════════════════════
   PAGE HERO  (optional — each page shows its own)
══════════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, #111009 0%, #060600 100%);
  border-bottom: 3px solid var(--gold);
  color: #fff;
  text-align: center;
  padding: 2rem 1.5rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.page-hero h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.2;
}
.page-hero p {
  margin-top: .6rem;
  opacity: .8;
  font-size: .97rem;
  max-width: 560px;
  margin-inline: auto;
}

/* ══════════════════════════════════════════════════════════════
   COMMON LAYOUT HELPERS
══════════════════════════════════════════════════════════════ */
.container     { max-width: 960px; margin: 1.75rem auto; padding: 0 1.25rem; }
.container-sm  { max-width: 760px; margin: 1.75rem auto; padding: 0 1.25rem; }
.container-xs  { max-width: 580px; margin: 1.75rem auto; padding: 0 1.25rem; }

/* ── Status chips ───────────────────────────────────────────── */
.stat-chip {
  display: inline-flex; align-items: center; gap: 0;
  padding: .35rem .75rem; border-radius: 20px; font-size: .85rem; font-weight: 600;
  text-decoration: none; border: 2px solid transparent;
  transition: border-color .15s, transform .1s, box-shadow .15s;
  user-select: none; cursor: default;
}
.stat-chip.clickable { cursor: pointer; }
.sc-total  { background: var(--gold-bg);    color: var(--gold-dark); }
.sc-green  { background: var(--green-bg);   color: var(--green); }
.sc-amber  { background: var(--amber-bg);   color: var(--amber); }
.sc-none   { background: #eee;              color: #555; }
.sc-purple { background: var(--purple-bg);  color: var(--purple); }
.sc-green.clickable:hover  { border-color: var(--green);  box-shadow: 0 2px 8px rgba(26,122,60,.25);  transform: translateY(-1px); }
.sc-amber.clickable:hover  { border-color: var(--amber);  box-shadow: 0 2px 8px rgba(179,92,0,.25);   transform: translateY(-1px); }
.sc-none.clickable:hover   { border-color: #888;          box-shadow: 0 2px 8px rgba(0,0,0,.15);      transform: translateY(-1px); }
.sc-purple.clickable:hover { border-color: var(--purple); box-shadow: 0 2px 8px rgba(107,33,168,.25); transform: translateY(-1px); }
.chip-active.sc-green  { border-color: var(--green);  box-shadow: 0 0 0 3px rgba(26,122,60,.2); }
.chip-active.sc-amber  { border-color: var(--amber);  box-shadow: 0 0 0 3px rgba(179,92,0,.2); }
.chip-active.sc-none   { border-color: #888;          box-shadow: 0 0 0 3px rgba(0,0,0,.12); }
.chip-active.sc-purple { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(107,33,168,.2); }
.chip-tick { font-style: normal; font-size: .75rem; opacity: .8; margin-left: .3em; }

/* ── Stats bar ──────────────────────────────────────────────── */
.stats-bar {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center;
  background: #fff; border-bottom: 1px solid var(--border); padding: .9rem 1rem;
  position: sticky; top: var(--nav-h); z-index: 999;
}

/* ── Shared card ────────────────────────────────────────────── */
.card {
  background: var(--card-bg); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem;
}

/* ── Hero toggle (pill segmented control) ────────────────────── */
/* Used on list.php and map.php — defined once here */
.hero-toggle {
  display: inline-flex; margin-top: 1.1rem;
  background: rgba(255,255,255,.1); border-radius: 30px;
  padding: 3px; gap: 2px;
}
.hero-tab {
  padding: .45rem 1.3rem; border-radius: 26px; font-size: .88rem; font-weight: 700;
  text-decoration: none; color: rgba(255,255,255,.65);
  transition: background .18s, color .18s; white-space: nowrap;
}
.hero-tab:hover { color: #fff; background: rgba(255,255,255,.12); }
.hero-tab.active { background: var(--gold); color: #000; }

/* ── Legend (shared by list.php and map.php) ─────────────────── */
.legend {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--muted); align-items: center;
  justify-content: center; margin-bottom: 1rem;
}
.legend-item { display: flex; align-items: center; gap: .4rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-green  { background: var(--green); }
.dot-none   { background: #bbb; }
.legend-note {
  font-size: .8rem; color: var(--muted); font-style: italic;
  border-left: 2px solid var(--border); padding-left: .6rem;
  margin-left: .25rem;
}
.legend-note strong { font-style: normal; color: var(--text); }
.legend-divider { width: 1px; height: 1.3em; background: var(--border); }

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0d0b07;
  border-top: 3px solid var(--gold);
  color: rgba(255,255,255,.6);
  font-size: .85rem;
  margin-top: 3rem;
  padding: 2.5rem 1.25rem 1.5rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem 3rem;
}
@media (max-width: 640px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-brand .fb-logo {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .6rem;
}
.footer-brand .fb-cross { font-size: 1.4rem; color: var(--gold); }
.footer-brand .fb-name  { font-size: 1rem; font-weight: 800; color: #fff; }
.footer-brand p { font-size: .82rem; line-height: 1.55; }

.footer-col h4 {
  color: #fff; font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: .75rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .35rem; }
.footer-col ul li a {
  color: rgba(255,255,255,.55); text-decoration: none; font-size: .83rem;
  transition: color .15s;
}
.footer-col ul li a:hover { color: var(--gold); }

.footer-bottom {
  max-width: 960px; margin: 1.75rem auto 0;
  padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
  font-size: .78rem;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom a { color: rgba(255,255,255,.4); }
.footer-col ul li a { color: rgba(255,255,255,.55); }
.footer-pledge-btn {
  display: inline-block; margin-top: .25rem;
  padding: .45rem 1.1rem; border-radius: 20px;
  background: var(--gold); color: #000 !important;
  font-size: .8rem; font-weight: 700; letter-spacing: .03em;
  transition: opacity .15s;
}
.footer-pledge-btn:hover { opacity: .85; color: #000 !important; }
