/* PURITY BUZZ — sacred theme layer (Christian iconography), loaded after
   site.css on every page. Decorative only: every ornament is a CSS
   pseudo-element (invisible to screen readers) and is dropped in forced-
   colors mode; scripture is real text in <blockquote class="verse">.
   Text tokens keep WCAG AA (>= 4.5:1) on the parchment and night surfaces. */

:root {
  /* shapes, used as masks so they take any color */
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 32'%3E%3Cpath d='M10 0h4v9h8v4h-8v19h-4V13H2V9h8z'/%3E%3C/svg%3E");
  --chirho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 48' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 3v42M20 3h7a8 8 0 0 1 0 16h-7M7 17l26 26M33 17L7 43'/%3E%3C/svg%3E");
  --ichthys: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M3 16Q27 -6 55 25M3 16Q27 38 55 7'/%3E%3C/svg%3E");

  --gilt: #b8913a;
  --gilt-soft: #d9bd73;
  --gilt-text: #7d5f1c;        /* 5.2:1 on parchment: gilt that passes AA as text */
  --crimson: #7d1f2c;
  --lapis: #1d3b73;
  --bg: #f6f0e1;               /* parchment */
  --bg-alt: #eee4cc;
  --surface: #fffdf6;
  --pattern-alpha: 0.05;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    --gilt-text: #d9bd73;
    --bg: #0b0e19;             /* night cathedral */
    --bg-alt: #10152a;
    --surface: #151b31;
    --pattern-alpha: 0.045;
  }
}
:root[data-theme="dark"] {
  --gilt-text: #d9bd73;
  --bg: #0b0e19;
  --bg-alt: #10152a;
  --surface: #151b31;
  --pattern-alpha: 0.045;
}

/* faint field of small crosses behind everything */
body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% -20%, rgba(184, 145, 58, 0.10), transparent 60%);
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--gilt);
  opacity: var(--pattern-alpha);
  -webkit-mask: var(--cross) 0 0 / 22px 30px repeat;
          mask: var(--cross) 0 0 / 22px 30px repeat;
  -webkit-mask-size: 14px 19px;
          mask-size: 14px 19px;
  -webkit-mask-repeat: space;
          mask-repeat: space;
}

/* header: a gilt rule under the navy, a cross before the name */
.site-header {
  background: linear-gradient(180deg, #0e1733 0%, #0b1420 100%);
  border-bottom: 2px solid var(--gilt);
  box-shadow: 0 3px 0 -1px rgba(217, 189, 115, 0.25);
}
.wordmark { letter-spacing: 0.08em; }
.wordmark::before {
  content: "";
  display: inline-block;
  width: 0.62em;
  height: 0.86em;
  margin-right: 0.5em;
  vertical-align: -0.06em;
  background: var(--gilt-soft);
  -webkit-mask: var(--cross) center / contain no-repeat;
          mask: var(--cross) center / contain no-repeat;
}

/* headings: a small gilt cross, Roman-inscription spacing */
.section h2, .mx-section-head h2, .mx-title h1, .hero h1 { letter-spacing: 0.01em; }
.section h2::before, .mx-section-head h2::before, .mx-title h1::before {
  content: "";
  display: inline-block;
  width: 0.46em;
  height: 0.64em;
  margin-inline-end: 0.42em; /* the gap goes between cross and text in RTL too */
  vertical-align: 0.02em;
  background: var(--gilt);
  -webkit-mask: var(--cross) center / contain no-repeat;
          mask: var(--cross) center / contain no-repeat;
}

/* landing hero: stained-glass light falling on a Chi-Rho */
.hero {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(217, 189, 115, 0.30), transparent 55%),
    repeating-conic-gradient(from -90deg at 50% -12%, rgba(217, 189, 115, 0.06) 0deg 5deg, transparent 5deg 13deg),
    linear-gradient(160deg, #0b1420 0%, var(--lapis) 62%, var(--crimson) 135%);
}
.hero::after {
  content: "";
  position: absolute;
  right: 7%;
  top: 14%;
  width: min(260px, 30vw);
  aspect-ratio: 40 / 48;
  background: var(--gilt-soft);
  opacity: 0.16;
  -webkit-mask: var(--chirho) center / contain no-repeat;
          mask: var(--chirho) center / contain no-repeat;
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.eyebrow { color: var(--gilt-soft); }

/* illuminated initial on the opening paragraph */
.lede::first-letter, .mx-sub::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 3.1em;
  line-height: 0.82;
  margin: 0.06em 0.12em 0 0;
  font-weight: 700;
  color: var(--gilt-text);
}
.lede::first-letter { color: var(--gilt-soft); }

/* gilt edges on cards */
.mx-card, .mx-tile, .fee-card, .kpi, .mx-hero, .maturity-diagram {
  box-shadow: inset 0 2px 0 rgba(184, 145, 58, 0.55);
}

/* scripture */
.verse {
  margin: 4px 0 28px;
  padding: 14px 22px 14px 20px;
  max-width: 760px;
  border-left: 3px solid var(--gilt);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: 0 3px 3px 0;
}
.verse p {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
}
.verse footer {
  margin-top: 6px;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gilt-text);
}
.hero .verse, .site-footer .verse {
  background: rgba(11, 20, 32, 0.35);
  box-shadow: inset 0 0 0 1px rgba(217, 189, 115, 0.25);
  margin-bottom: 26px;
}
.hero .verse p, .site-footer .verse p { color: rgba(247, 244, 236, 0.92); }
.hero .verse footer, .site-footer .verse footer { color: var(--gilt-soft); }

/* footers: an ichthys above the fine print */
.site-footer, .mx-foot { text-align: center; }
.site-footer::before, .mx-foot::before {
  content: "";
  display: block;
  width: 46px;
  height: 23px;
  margin: 0 auto 12px;
  background: var(--gilt);
  -webkit-mask: var(--ichthys) center / contain no-repeat;
          mask: var(--ichthys) center / contain no-repeat;
}
.site-footer .verse, .mx-foot .verse { margin: 0 auto 12px; text-align: left; }

/* no ornaments where they would get in the way */
@media (forced-colors: active) {
  body::before, .wordmark::before, .hero::after, .section h2::before, .mx-section-head h2::before,
  .mx-title h1::before, .site-footer::before, .mx-foot::before { display: none; }
  .lede::first-letter, .mx-sub::first-letter { float: none; font-size: inherit; color: inherit; }
}
@media (prefers-contrast: more) {
  body::before, .hero::after { display: none; }
}
@media print {
  body::before, .hero::after { display: none; }
}

/* Start page: numbered steps already carry their own gilt badge */
.mx-section-head h2:has(.st-num)::before { display: none; }
