/* ============================================================
   The Eight Zones of Religious Studies — A Methodological Atlas
   Palette sampled from the site emblem.
   ============================================================ */

:root {
  --bg:         #061423;   /* deep navy ground */
  --bg-deep:    #030E1C;   /* darker footer / vignette */
  --veil:       rgba(56, 75, 91, 0.16);   /* translucent glass panel */
  --veil-line:  rgba(187, 180, 163, 0.22);
  --cream:      #E7DFC9;   /* bright parchment — headings, active lines */
  --cream-soft: #BBB4A3;   /* linework cream — rules, labels */
  --text:       #C2CAD6;   /* cool body text */
  --text-dim:   #8B97A9;   /* secondary text */
  --gold:       #D2BE85;   /* interactive hover accent */
  --line:       rgba(187, 180, 163, 0.26);
  --line-faint: rgba(187, 180, 163, 0.13);

  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", "Helvetica Neue", Arial, sans-serif;

  --measure: 46rem;
  --measure-wide: 62rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.075rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(210, 190, 133, 0.28); color: var(--cream); }

a { color: inherit; }
a:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 3px; border-radius: 1px; }

em, i { font-style: italic; }
strong, b { font-weight: 500; color: var(--cream); }

/* ---------- utility type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-soft);
}

.eyebrow .sep { opacity: 0.45; margin: 0 0.5em; }

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(6, 20, 35, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-faint);
}

.site-header .inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.wordmark svg { display: block; }

.wordmark .wm-text {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--cream);
  white-space: nowrap;
}

.wordmark .wm-sub {
  display: block;
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

nav.primary {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav.primary a {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

nav.primary a:hover { color: var(--cream); }
nav.primary a[aria-current="page"] {
  color: var(--cream);
  border-bottom-color: var(--gold);
}

@media (max-width: 900px) {
  .site-header { position: static; }
  .site-header .inner { height: auto; flex-direction: column; align-items: flex-start; padding: 0.9rem 1.25rem; gap: 0.7rem; }
  nav.primary { justify-content: flex-start; gap: 1.1rem; }
}

/* ---------- hero (home) ---------- */

.hero {
  padding: 4.5rem 1.5rem 5rem;
  text-align: center;
  position: relative;
}

.hero-emblem {
  width: min(430px, 78vw);
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 76%);
}

.hero h1 {
  font-weight: 200;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--cream);
  max-width: 30ch;
  margin: 0 auto 1.1rem;
}

.hero .subtitle {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--cream-soft);
  margin-bottom: 2.6rem;
}

.hero .lede {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: left;
}

.hero .lede p + p { margin-top: 1.2rem; }

.cta-row {
  margin-top: 2.8rem;
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border: 1px solid var(--line);
  color: var(--cream);
  background: transparent;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover { border-color: var(--gold); color: var(--gold); }

.btn.solid {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--bg-deep);
}
.btn.solid:hover { background: var(--gold); border-color: var(--gold); color: var(--bg-deep); }

/* ---------- generic sections ---------- */

main { display: block; }

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.6rem 1.5rem;
}

.section.wide { max-width: var(--measure-wide); }

.section + .section { border-top: 1px solid var(--line-faint); }

.section .eyebrow { display: block; margin-bottom: 1rem; }

.section h2 {
  font-weight: 300;
  font-size: clamp(1.55rem, 3vw, 2.05rem);
  line-height: 1.25;
  color: var(--cream);
  margin-bottom: 1.6rem;
  max-width: 26ch;
}

.section h3 {
  font-weight: 400;
  font-size: 1.22rem;
  color: var(--cream);
  margin: 2.4rem 0 0.9rem;
}

.section p + p { margin-top: 1.2rem; }

.section ul, .section ol { padding-left: 1.4rem; margin: 1.1rem 0; }
.section li + li { margin-top: 0.7rem; }

/* definition-style commitment list (home) */
.commitments { margin-top: 0.4rem; }
.commitments .item { padding: 1.5rem 0; }
.commitments .item + .item { border-top: 1px solid var(--line-faint); }
.commitments .item .lead {
  font-weight: 500;
  color: var(--cream);
  display: block;
  margin-bottom: 0.45rem;
}

/* glass inset panel — echoes the emblem's translucent square */
.panel {
  background: var(--veil);
  border: 1px solid var(--veil-line);
  padding: 1.8rem 2rem;
  margin: 2rem 0;
}

.panel .panel-label {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-soft);
  display: block;
  margin-bottom: 0.9rem;
}

/* ---------- interactive map ---------- */

.map-section { text-align: center; }

.map-wrap {
  max-width: 620px;
  margin: 1.4rem auto 0;
}

.map-wrap svg { width: 100%; height: auto; display: block; }

.zmap text {
  font-family: var(--sans);
  fill: var(--cream-soft);
}

.zmap .axis-label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.24em;
  fill: var(--text-dim);
}

.zmap .ring {
  fill: none;
  stroke: var(--cream-soft);
  stroke-opacity: 0.42;
  stroke-width: 1;
  transition: stroke 0.18s ease, stroke-opacity 0.18s ease, stroke-width 0.18s ease;
}

.zmap .znum {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: fill 0.18s ease;
  pointer-events: none;
}

.zmap a.zone-hit { cursor: pointer; }
.zmap a.zone-hit .hit { fill: transparent; stroke: none; }
.zmap a.zone-hit .hit-ring { fill: none; stroke: transparent; stroke-width: 38; }

.zmap a.zone-hit:hover .ring,
.zmap a.zone-hit:focus-visible .ring {
  stroke: var(--gold);
  stroke-opacity: 1;
  stroke-width: 1.8;
}
.zmap a.zone-hit:hover .znum,
.zmap a.zone-hit:focus-visible .znum { fill: var(--gold); }
.zmap a.zone-hit:focus-visible { outline: none; }

.map-caption {
  min-height: 4.6rem;
  margin: 1.6rem auto 0;
  max-width: 34rem;
}

.map-caption .mc-title {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream);
  display: block;
  margin-bottom: 0.4rem;
}

.map-caption .mc-tag {
  font-style: italic;
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* legend — accessible list of zones */
.zone-legend {
  margin: 2.8rem auto 0;
  max-width: 56rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  text-align: left;
  border-top: 1px solid var(--line-faint);
}

.zone-legend a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.95rem 0.6rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line-faint);
  transition: background 0.18s ease;
}

.zone-legend a:hover { background: var(--veil); }

.zone-legend .zl-num {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--cream-soft);
  white-space: nowrap;
}

.zone-legend .zl-title {
  font-size: 0.98rem;
  color: var(--text);
}

.zone-legend a:hover .zl-title { color: var(--cream); }

@media (max-width: 720px) {
  .zone-legend { grid-template-columns: 1fr; }
}

/* ---------- zone page ---------- */

.zone-header {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 2.6rem;
  align-items: center;
}

.zone-header .glyph { width: 150px; height: 150px; }
.zone-header .glyph svg { width: 100%; height: 100%; display: block; }

.zone-header h1 {
  font-weight: 250;
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  line-height: 1.22;
  color: var(--cream);
  margin: 0.7rem 0 1rem;
  max-width: 24ch;
}

.zone-header .tagline {
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 52ch;
}

@media (max-width: 700px) {
  .zone-header { grid-template-columns: 1fr; gap: 1.6rem; padding-top: 3rem; }
  .zone-header .glyph { width: 118px; height: 118px; }
}

/* zone glyph strokes */
.zglyph .frame { stroke: var(--cream-soft); stroke-opacity: 0.32; stroke-width: 1; fill: none; }
.zglyph .frame-dot { fill: var(--cream-soft); fill-opacity: 0.5; }
.zglyph .ring { stroke: var(--cream-soft); stroke-opacity: 0.28; stroke-width: 1; fill: none; }
.zglyph .ring.active { stroke: var(--cream); stroke-opacity: 1; stroke-width: 1.7; }
.zglyph .core { fill: var(--cream); }

/* center of gravity statement */
.gravity {
  font-size: 1.28rem;
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  line-height: 1.55;
  max-width: 36ch;
}

/* roster entries */
.roster-entry { padding: 1.35rem 0; }
.roster-entry + .roster-entry { border-top: 1px solid var(--line-faint); }
.roster-entry .re-head { display: block; margin-bottom: 0.35rem; }
.roster-entry .re-head .re-name { font-weight: 500; color: var(--cream); }
.roster-entry .re-head .re-work { font-style: italic; color: var(--cream-soft); }
.roster-entry p { color: var(--text); }

/* the four cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-faint);
  border: 1px solid var(--line-faint);
  margin-top: 2rem;
}

.cards .card {
  background: var(--bg);
  padding: 1.8rem 1.7rem;
}

.cards .card:nth-child(odd) { background: rgba(56, 75, 91, 0.09); }

.cards .card .card-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.85rem;
}

.cards .card p { font-size: 1rem; line-height: 1.7; }

@media (max-width: 700px) {
  .cards { grid-template-columns: 1fr; }
}

/* disputes */
.dispute { padding: 1.3rem 0; }
.dispute + .dispute { border-top: 1px solid var(--line-faint); }
.dispute .d-title { font-weight: 500; color: var(--cream); display: block; margin-bottom: 0.35rem; }

/* further reading */
.reading-group { margin-top: 1.8rem; }
.reading-group .rg-label {
  font-style: italic;
  color: var(--cream-soft);
  display: block;
  margin-bottom: 0.6rem;
}
.reading-group ul { list-style: none; padding-left: 0; margin: 0; }
.reading-group li {
  padding: 0.5rem 0 0.5rem 1.1rem;
  border-left: 1px solid var(--line);
  font-size: 1rem;
}
.reading-group li + li { margin-top: 0.35rem; }

/* prev / next zone footer nav */
.zone-nav {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 2.6rem 1.5rem 3.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line-faint);
}

.zone-nav a {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.zone-nav a:hover { color: var(--gold); }
.zone-nav .center { color: var(--cream-soft); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--line-faint);
  margin-top: 4rem;
}

.site-footer .inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 3.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer .f-brand { max-width: 24rem; }

.site-footer .f-title {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cream);
  display: block;
  margin-bottom: 0.7rem;
}

.site-footer .f-note {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.site-footer nav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.55rem 2.4rem;
}

.site-footer nav a {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.site-footer nav a:hover { color: var(--cream); }

.site-footer .f-line {
  width: 100%;
  border-top: 1px solid var(--line-faint);
  padding-top: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- non-zone page header ---------- */

.page-header {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 4rem 1.5rem 2.6rem;
}

.page-header h1 {
  font-weight: 250;
  font-size: clamp(1.9rem, 3.8vw, 2.7rem);
  line-height: 1.22;
  color: var(--cream);
  margin: 0.7rem 0 1rem;
  max-width: 26ch;
}

.page-header .tagline {
  font-style: italic;
  color: var(--text-dim);
  font-size: 1.1rem;
  max-width: 56ch;
}

/* small italic question line under section headings */
.q-tagline {
  font-style: italic;
  color: var(--text-dim);
  margin: -0.8rem 0 1.4rem;
}

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; margin: 2rem 0; }

table.ztable {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line-faint);
  font-size: 0.98rem;
}

table.ztable th {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-soft);
  text-align: left;
  padding: 0.85rem 1rem;
  background: var(--veil);
  border-bottom: 1px solid var(--line);
}

table.ztable td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line-faint);
  vertical-align: top;
  line-height: 1.6;
}

table.ztable tr:last-child td { border-bottom: none; }
table.ztable td strong { font-weight: 500; }

/* ---------- translation chain ---------- */

.chain {
  background: var(--veil);
  border-left: 2px solid var(--gold);
  padding: 1.4rem 1.7rem;
  margin: 1.8rem 0;
  font-size: 1rem;
  line-height: 2;
  color: var(--cream-soft);
}

/* ---------- prayer page zone sections ---------- */

.zsec-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1.6rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.zsec-head .glyph-sm { width: 92px; height: 92px; }
.zsec-head .glyph-sm svg { width: 100%; height: 100%; display: block; }
.zsec-head h2 { margin-bottom: 0.15rem; }
.zsec-head .eyebrow { margin-bottom: 0.5rem; }

@media (max-width: 600px) {
  .zsec-head { grid-template-columns: 64px 1fr; gap: 1rem; }
  .zsec-head .glyph-sm { width: 64px; height: 64px; }
}

/* ---------- roster head inline styling (parser-generated) ---------- */

.roster-entry .re-head strong { font-weight: 500; color: var(--cream); }
.roster-entry .re-head em { color: var(--cream-soft); }

/* multiple paragraphs inside a card */
.cards .card p + p { margin-top: 0.85rem; }

/* related pages list */
.related-list { list-style: none; padding-left: 0 !important; }
.related-list li {
  padding: 0.75rem 0 0.75rem 1.1rem;
  border-left: 1px solid var(--line);
  margin: 0 !important;
}
.related-list li + li { margin-top: 0.5rem !important; }
.related-list a { color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s ease, color .2s ease; }
.related-list a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.related-list .future { color: var(--text-dim); }

/* citation format examples */
p.cite {
  border-left: 1px solid var(--line);
  padding: 0.6rem 0 0.6rem 1.2rem;
  color: var(--cream-soft);
  font-size: 1rem;
}

/* ---------- contact form ---------- */

.contact-form { margin-top: 1.6rem; max-width: 34rem; }

.contact-form label {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-soft);
  margin: 1.3rem 0 0.45rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: var(--veil);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.contact-form textarea { min-height: 9rem; resize: vertical; }

.contact-form button {
  margin-top: 1.6rem;
  cursor: pointer;
}

.form-hp { display: none; }
