/* Order of the Watchfire — "firelight at night"
   Warm near-black, parchment, antique gold + ember. Classical serif. */

:root {
  --ink: #14110d;
  --ink-2: #1b1610;
  --ink-3: #211a12;
  --parchment: #ece3d1;
  --parchment-dim: #d7ccb6;
  --muted: #a2957c;
  --gold: #c2993f;
  --gold-bright: #e3c277;
  --ember: #d9772f;
  --line: rgba(196, 158, 74, 0.20);
  --line-strong: rgba(196, 158, 74, 0.45);
  --maxw: 1040px;
  --measure: 40rem;
  --serif-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --serif-body: "EB Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--ink);
  background-image: radial-gradient(1100px 560px at 50% -8%, rgba(217, 119, 47, 0.12), transparent 62%);
  background-attachment: fixed;
  color: var(--parchment);
  font-family: var(--serif-body);
  font-size: 1.2rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--gold-bright); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--ember); }

.muted { color: var(--muted); }

.label {
  display: inline-block;
  font-family: var(--serif-body);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 500;
}

h1, h2, h3, h4 { font-family: var(--serif-display); font-weight: 600; line-height: 1.15; color: var(--parchment); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.85rem 1.5rem;
  background: rgba(20, 17, 13, 0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 0.55rem; margin-right: auto;
  color: var(--parchment);
  font-family: var(--serif-display); font-size: 1.4rem; font-weight: 600; letter-spacing: 0.01em;
}
.brand:hover { color: var(--gold-bright); }
.brand svg { width: 18px; height: 26px; flex: none; }
.inner-tag { font-family: var(--serif-body); font-style: normal; text-transform: uppercase;
  letter-spacing: 0.16em; font-size: 0.58rem; color: var(--gold);
  border: 1px solid var(--line-strong); border-radius: 2px; padding: 0.1rem 0.4rem;
  margin-left: 0.55rem; vertical-align: middle; }
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a {
  color: var(--parchment-dim);
  text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.72rem;
}
.site-nav a:hover { color: var(--gold-bright); }
.nav-toggle, .nav-toggle-label { display: none; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 1rem 1.5rem 4rem; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 5rem 1rem 3rem; }
.hero .flame { width: 80px; height: 116px; margin: 0 auto 1.4rem; display: block;
  filter: drop-shadow(0 0 30px rgba(217, 119, 47, 0.45)); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); margin: 0; letter-spacing: 0.01em; font-weight: 600; }
.hero .tagline { font-style: italic; color: var(--gold); font-size: clamp(1.1rem, 3vw, 1.5rem); margin: 0.5rem 0 0; }
.hero .lede { max-width: 34rem; margin: 0 auto; color: var(--parchment-dim); }

.rule { width: 120px; height: 1px; margin: 1.8rem auto;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent); border: 0; }
.rule-sm { width: 64px; margin: 1.2rem auto; }

/* ---------- Sections ---------- */
.block { margin-top: 4.5rem; }
.block-head { text-align: center; margin-bottom: 2rem; }
.block-head h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin: 0.35rem 0 0.4rem; }
.block-head p { margin: 0 auto; max-width: 34rem; color: var(--muted); font-style: italic; }

/* ---------- Card grid (charges, councils, members) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  gap: 1rem;
  justify-content: center;
}
.card { display: block; background: var(--ink-2); padding: 1.5rem 1.6rem; color: var(--parchment);
  border: 1px solid var(--line); border-radius: 3px;
  transition: background .2s ease, border-color .2s ease; }
.card:hover { background: var(--ink-3); border-color: var(--line-strong); }
.card h3 { margin: 0 0 0.3rem; font-size: 1.6rem; font-weight: 600; color: var(--gold-bright); }
.card p { margin: 0; color: var(--muted); font-style: italic; font-size: 1.02rem; line-height: 1.5; }
.card .count { font-style: normal; color: var(--gold); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.16em; margin-top: 0.6rem; }

.sect-name { text-align: center; font-family: var(--serif-display); color: var(--gold);
  font-size: 1.5rem; font-weight: 600; margin: 2.2rem 0 0.9rem; }
.sect-name:first-of-type { margin-top: 0.5rem; }

/* ---------- Index list (the canon) ---------- */
.index-list { list-style: none; padding: 0; margin: 0 auto; max-width: var(--measure); }
.index-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 0.9rem 0.2rem; border-bottom: 1px solid var(--line);
}
.index-list li a { font-family: var(--serif-display); font-size: 1.5rem; color: var(--parchment); }
.index-list li a:hover { color: var(--gold-bright); }
.index-list .desc { color: var(--muted); font-style: italic; font-size: 0.95rem; text-align: right; flex: none; max-width: 50%; }

.center { text-align: center; }
.more { margin-top: 1.4rem; text-align: center; }
.more a { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; }

/* ---------- Prose (canon / charge / member / council bodies) ---------- */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose > h1:first-child { font-size: clamp(2.2rem, 5vw, 3.2rem); text-align: center; margin: 1rem 0 0.4rem; }
.prose h1 + p { text-align: center; color: var(--muted); font-style: italic; }
.prose h2 { font-size: 1.7rem; color: var(--gold); margin: 2.6rem 0 0.6rem; font-weight: 600; }
.prose h3 { font-size: 1.34rem; color: var(--gold-bright); margin: 1.9rem 0 0.4rem; font-weight: 600; }
.prose p { margin: 0 0 1.1rem; }
.prose a { color: var(--gold-bright); border-bottom: 1px solid var(--line); }
.prose a:hover { color: var(--ember); border-color: var(--ember); }
.prose strong { color: var(--parchment); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin: 0.35rem 0; }
.prose hr { border: 0; height: 1px; margin: 2.6rem 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.prose code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.82em;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 3px; padding: 0.05rem 0.34rem; }
.prose pre { background: var(--ink-2); border: 1px solid var(--line); border-radius: 4px; padding: 1rem; overflow-x: auto; }
.prose pre code { background: none; border: 0; padding: 0; }

/* Inscriptions — blockquotes (the creed, the oath...) */
.prose blockquote {
  margin: 2.2rem auto; padding: 1.4rem 1.6rem; max-width: 34rem;
  border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: center;
  font-family: var(--serif-display); font-style: italic; font-size: 1.5rem; line-height: 1.5;
  color: var(--gold-bright);
}
.prose blockquote p { margin: 0.25rem 0; }
.prose blockquote strong { color: var(--ember); font-style: normal; }

/* tables */
.prose table { width: 100%; border-collapse: collapse; margin: 1.4rem 0; display: block; overflow-x: auto; font-size: 1.02rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; }
.prose th { background: var(--ink-2); color: var(--gold); font-family: var(--serif-display); font-weight: 600; }

/* ---------- Member marks (watches) ---------- */
.marks { list-style: none; padding: 0; margin: 0.5rem auto 2.4rem;
  display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.mark { display: inline-flex; flex-direction: column; align-items: center; text-align: center;
  min-width: 132px; padding: 0.6rem 1rem;
  background: var(--ink-2); border: 1px solid var(--line-strong); border-radius: 2px; }
.mark-charge { font-family: var(--serif-display); font-size: 1.25rem; color: var(--gold-bright); line-height: 1.1; margin-bottom: 0.25rem; }
.mark-warden { display: block; font-size: 0.74rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.2rem; }
.mark-warden.status-dark { opacity: 0.4; }
.mark-warden.status-retired { color: var(--gold); }
.mark-warden.status-retired::after { content: " · retired"; }

/* ---------- Footer ---------- */
.site-footer { text-align: center; padding: 3.5rem 1rem 2.5rem; border-top: 1px solid var(--line); margin-top: 4rem; }
.site-footer .refrain { font-family: var(--serif-display); font-style: italic; color: var(--gold); font-size: 1.5rem; margin: 0 0 0.3rem; }
.site-footer .muted { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.2em; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  body { font-size: 1.12rem; }
  .nav-toggle-label { display: block; cursor: pointer; padding: 0.4rem; margin-left: auto; }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    display: block; width: 22px; height: 1.5px; background: var(--gold-bright); position: relative; transition: 0.2s; }
  .nav-toggle-label span::before { content: ""; position: absolute; top: -7px; }
  .nav-toggle-label span::after { content: ""; position: absolute; top: 7px; }
  .site-nav { flex-basis: 100%; flex-direction: column; gap: 0; max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
  .nav-toggle:checked ~ .site-nav { max-height: 24rem; }
  .site-nav a { padding: 0.8rem 0.2rem; border-top: 1px solid var(--line); width: 100%; }
  .index-list .desc { display: none; }
}
