/* judeora.pro — a dark gothic chapel at night (spec §4.1).
   Tokens §4.2 verbatim; only what emits or transmits light is saturated. */

:root {
  --nave-0:#0a0807; --nave-1:#13100c; --stone-1:#221d17; --stone-2:#3a3128;
  --ink:#ece2cf; --ink-dim:#b9ab92; --ink-faint:#8f8271; /* §4.2 value #7d7160 lifted one step: ≥4.5:1 on --nave-1 (WCAG AA; Lighthouse a11y). Body-ink 7:1 rule unaffected. */
  --gold:#c8a14a; --gold-hi:#e8c874;
  --flame-core:#fff4d6; --flame:#ffbe5c; --flame-edge:#e8742a; --glow:rgba(255,170,80,.18);
  --glass-ruby:#a3122e; --glass-cobalt:#1f3f9a; --glass-emerald:#1e7a4c;
  --glass-amber:#d98a1a; --glass-violet:#5b2a86; --glass-pale:#e9dfb8;
  --jude-green:#2e6b4c;
  --daylight: 0.5; /* set once on load by daylight.js (§4.4) */
  --serif: "EB Garamond", "EB Garamond Fallback", Georgia, serif;
  --display: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
}

/* Self-hosted woff2 (latin + latin-ext in one subset file; GDPR: never
   the Google Fonts CDN — spec §4.2). swap + size-adjusted Times-metric
   fallbacks so text does not shift while fonts load. */
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/ebgaramond-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "EB Garamond Fallback";
  src: local("Times New Roman"), local("Liberation Serif"), local("Times");
  size-adjust: 99.3%; ascent-override: 101%; descent-override: 30%; line-gap-override: 0%;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Fallback";
  src: local("Times New Roman"), local("Liberation Serif"), local("Times");
  size-adjust: 95.5%; ascent-override: 97%; descent-override: 30%; line-gap-override: 0%;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0 auto; max-width: 44rem; padding: 1.2rem 1.2rem 3rem;
  background: var(--nave-0); color: var(--ink);
  font: 19px/1.6 var(--serif);
}
@media (min-width: 56rem) { body { max-width: 50rem; font-size: 20px; } }

h1, h2, h3 {
  font-family: var(--display); font-weight: 600; line-height: 1.25;
  font-variant: small-caps; letter-spacing: .06em;
}
h1 { font-size: 2rem; color: var(--gold-hi); margin: .4rem 0 1rem; }
h2 { font-size: 1.4rem; color: var(--ink); margin-top: 2rem; }
h3 { font-size: 1.15rem; color: var(--ink-dim); }

a { color: var(--gold); }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
::selection { background: var(--gold); color: var(--nave-0); }

.skip {
  position: absolute; left: -999px; top: 0; background: var(--nave-1);
  color: var(--ink); padding: .5rem 1rem;
}
.skip:focus { left: 0; z-index: 10; }

/* Chapel header: flame wordmark + small-caps nav */
.site-head { display: flex; align-items: baseline; gap: .8rem; flex-wrap: wrap; border-bottom: 1px solid var(--stone-1); padding-bottom: .6rem; }
.wordmark { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-family: var(--display); font-variant: small-caps; letter-spacing: .06em; font-size: 1.3rem; }
.wordmark img { width: 1.1rem; height: 1.4rem; }
.site-head nav { margin-left: auto; display: flex; gap: 1rem; font-variant: small-caps; letter-spacing: .05em; }
.site-head nav a { text-decoration: none; color: var(--ink-dim); }
.site-head nav a:hover { color: var(--gold-hi); }

/* Three lancets under a pointed arch (§4.5 Home). Windows dim at night:
   brightness rides --daylight, set once on load (§4.4). */
.chapel { margin: 1.5rem 0 .5rem; padding: 1.2rem .6rem .2rem; background: var(--nave-1); border-radius: 50% 50% 0 0 / 4rem 4rem 0 0; }
.chapel img { width: 100%; height: auto; display: block; filter: brightness(calc(.55 + .45 * var(--daylight))); }
figcaption { font-size: .8rem; color: var(--ink-faint); font-variant: small-caps; letter-spacing: .06em; margin-top: .3rem; }
/* Passing-cloud shimmer: 60 s cycle, day only, off under reduced motion (§4.4, §4.6). */
.day .chapel img { animation: shimmer 60s ease-in-out infinite alternate; }
@keyframes shimmer {
  from { filter: brightness(calc(.55 + .45 * var(--daylight))); }
  to   { filter: brightness(calc(.40 + .72 * var(--daylight))); }
}
@media (prefers-reduced-motion: reduce) {
  .day .chapel img { animation: none; }
}

.invocation { text-align: center; margin: 1.4rem 0; }
.invocation .latin { font-family: var(--display); font-variant: small-caps; letter-spacing: .08em; color: var(--gold); font-size: 1.15rem; }
.invocation .vern { color: var(--ink-dim); margin-top: .2rem; }

/* Candles page: the St. Jude window hangs over the side altar (§4.5) —
   a modest lancet, not a facade. */
figure.altar { margin: 1rem auto; max-width: 220px; text-align: center; }
figure.altar img { width: 100%; height: auto; display: block; filter: brightness(calc(.55 + .45 * var(--daylight))); }

/* Rack + form */
.rack-zone { margin: 1.5rem 0; }
.rack-svg { width: 100%; height: auto; display: block; }
.burn-line { color: var(--gold); font-variant: small-caps; letter-spacing: .06em; text-align: center; }
/* The candle ledger (§4.6 list alternative): the site's panel idiom —
   stone border over the nave floor — with quiet hairline rows. It is
   the rack's reading surface, so it stays hushed: gold small-caps
   names, dim intentions, whispered private lines. */
.rack-list {
  max-height: 17rem; overflow: auto; overscroll-behavior: contain;
  margin: .9rem 0 .2rem; padding: .35rem 1.1rem;
  border: 1px solid var(--stone-1); background: var(--nave-1);
  color: var(--ink-dim); font-size: .95rem;
}
.rack-entry { display: flex; align-items: baseline; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--stone-1); }
.rack-entry:last-child { border-bottom: none; }
.rack-entry-flame { flex: none; width: 15px; height: 18px; }
.rack-entry-flame svg { width: 100%; height: 100%; display: block; position: relative; top: .18rem; } /* optical baseline */
.rack-entry-text { flex: 1; overflow-wrap: anywhere; line-height: 1.5; }
.rack-entry-private .rack-entry-flame svg { opacity: .28; filter: grayscale(.9); }
.rack-entry-hidden { color: var(--ink-faint); font-style: italic; }
.rack-entry-text strong {
  font-family: var(--display); font-weight: normal;
  font-variant: small-caps; letter-spacing: .04em; color: var(--gold);
}
.rack-entry-private .rack-entry-text { font-size: .9rem; }

/* Quiet toggle (show/collapse the ledger): a ghost key in the chapel
   palette — never the UA gray. Colour-only transitions stay polite
   under reduced motion. */
.quiet-btn {
  background: none; color: var(--gold); border: 1px solid var(--stone-2);
  padding: .4rem 1.1rem; font: inherit; font-size: .95rem;
  font-variant: small-caps; letter-spacing: .05em; cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.quiet-btn:hover { color: var(--gold-hi); border-color: var(--gold); }
.quiet-btn[aria-expanded="true"] { color: var(--ink-dim); border-color: var(--stone-1); }
.rack-toggle-row { text-align: center; margin: .6rem 0 .2rem; }
.light-form { border: 1px solid var(--stone-1); background: var(--nave-1); padding: 1rem 1.2rem; margin: 1.5rem 0; }
.light-form label { display: block; color: var(--ink-dim); font-size: .95rem; margin-bottom: .3rem; }
.light-form input[type="text"] {
  width: 100%; background: var(--nave-0); color: var(--ink);
  border: 1px solid var(--stone-2); padding: .45rem .6rem; font: inherit;
  transition: border-color .15s ease;
}
.light-form input[type="text"]:hover { border-color: var(--ink-faint); }
.light-form input[type="text"]:focus-visible { outline: 2px solid var(--gold-hi); border-color: var(--gold); }
.hp { position: absolute; left: -9999px; } /* honeypot: humans never see it */
.form-note { display: block; color: var(--ink-faint); font-size: .85rem; margin-top: .3rem; }
.light-form button {
  background: var(--jude-green); color: var(--ink); border: none;
  padding: .6rem 1.4rem; font: inherit; font-variant: small-caps; letter-spacing: .06em;
  cursor: pointer; transition: background-color .15s ease;
}
.light-form button:hover { background: #3a8a61; }
.ritual-msg { color: var(--gold-hi); }

/* Thanks form (§4.5): same .light-form chrome as the candle page;
   name + town share an aligned row, the testimony is a multi-line
   box beneath (the textarea is the only thing .light-form lacks). */
.thanks-form-row { display: flex; gap: 1rem; }
.thanks-form-row p { flex: 1; margin: 0 0 1rem; }
.light-form textarea {
  width: 100%; background: var(--nave-0); color: var(--ink);
  border: 1px solid var(--stone-2); padding: .45rem .6rem; font: inherit;
  resize: vertical; min-height: 7rem; line-height: 1.55;
  transition: border-color .15s ease;
}
.light-form textarea:hover { border-color: var(--ink-faint); }
.light-form textarea:focus-visible { outline: 2px solid var(--gold-hi); border-color: var(--gold); }
@media (max-width: 39.99rem) {
  .thanks-form-row { flex-direction: column; gap: 0; }
}

/* Book of Thanksgivings (§4.5): terse classified-ad entries. */
.thanks-book { list-style: none; padding: 0; margin: 1.4rem 0; }
.thanks-entry { border-bottom: 1px solid var(--stone-1); padding: .15rem 0; }
.thanks-entry:last-child { border-bottom: none; }
.thanks-entry blockquote { border-left: none; margin: .9rem 0; padding: 0 0 0 1.1rem; position: relative; }
.thanks-entry blockquote::before {
  content: ""; position: absolute; left: 0; top: .15rem; bottom: .15rem;
  width: 3px; background: var(--stone-2); border-radius: 2px;
}
.thanks-entry blockquote > strong {
  font-family: var(--display); font-weight: normal;
  font-variant: small-caps; letter-spacing: .04em; color: var(--gold);
}
.thanks-sig { color: var(--ink-faint); font-size: .92rem; white-space: nowrap; }
.thanks-empty-note { color: var(--ink-faint); font-style: italic; }

/* Home: latest five thanksgivings (§4.5). */
.latest-thanks { margin: 1.6rem 0; border: 1px solid var(--stone-1); background: var(--nave-1); padding: 1rem 1.2rem; }
.latest-thanks h2 { margin: 0 0 .6rem; font-size: 1.15rem; }
.latest-thanks ul { margin: 0; padding-left: 1.2rem; color: var(--ink-dim); }
.latest-thanks li { margin: .4rem 0; font-size: .97rem; }

/* Three arched doors: Life, Prayers, Candles (§4.5). */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.2rem 0 2rem; }
.door {
  display: block; padding: 1rem .6rem; text-align: center; text-decoration: none;
  color: var(--ink); font-family: var(--display); font-variant: small-caps; letter-spacing: .06em; font-size: 1.05rem;
  border: 2px solid var(--stone-2); border-bottom: none;
  border-radius: 100% 100% 0 0 / 42% 42% 0 0;
}
.door:hover { border-color: var(--gold); color: var(--gold-hi); box-shadow: 0 0 28px var(--glow) inset; }
@media (max-width: 40rem) { .chapel, .doors { grid-template-columns: 1fr; } .chapel { border-radius: 2rem 2rem 0 0 / 2rem 2rem 0 0; } }

.seasonal { border: 1px solid var(--stone-1); background: var(--nave-1); padding: .8rem 1rem; color: var(--ink-dim); font-size: .95rem; }
.seasonal strong { color: var(--gold); font-weight: normal; }

/* Life page: tier labels ride the right margin (§2). */
aside.tier {
  float: right; clear: right; margin: 0 0 .8rem 1.2rem; width: 8rem;
  font-variant: small-caps; letter-spacing: .06em; text-align: right;
  color: var(--gold); border-right: 3px solid var(--stone-2); padding-right: .5rem; font-size: .9rem;
}

article { margin-top: 1.4rem; }
article p { margin: .9rem 0; }
blockquote { border-left: 3px solid var(--gold); margin: 1rem 0; padding: .2rem 0 .2rem 1rem; color: var(--ink-dim); }

/* Provenance (§13.3): sources ride under the text. */
.provenance { border-top: 1px solid var(--stone-1); margin-top: 2.2rem; padding-top: .8rem; font-size: .88rem; color: var(--ink-dim); }
.provenance h2 { font-size: 1rem; margin: 0 0 .4rem; color: var(--ink-faint); }
.provenance ol { margin: 0; padding-left: 1.2rem; }
.provenance li { margin: .25rem 0; overflow-wrap: anywhere; }

.prayer-body { font-size: 1.22rem; line-height: 1.75; }
.prayer-body p.rubric { color: var(--ink-faint); font-style: italic; font-size: 1rem; }

.cta { display: inline-block; margin: 1.2rem 0; padding: .6rem 1.2rem; border: 2px solid var(--stone-2); border-radius: 100% 100% 0 0 / 42% 42% 0 0; text-decoration: none; font-family: var(--display); font-variant: small-caps; letter-spacing: .06em; }
.cta:hover { border-color: var(--gold); color: var(--gold-hi); }

footer.site-foot { border-top: 1px solid var(--stone-1); margin-top: 2.5rem; padding-top: .8rem; font-size: .85rem; color: var(--ink-faint); }
footer.site-foot nav { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
footer.site-foot a { color: var(--ink-dim); }
footer.site-foot .build-rev { margin: .2rem 0 0; font-size: .7rem; color: var(--ink-faint); opacity: .6; user-select: all; }

/* Inlined window SVGs: mix-blend-mode lives here, not in style attributes —
   CSP style-src 'self' blocks style="" (invariant 2 keeps the policy tight). */
.window-glow { mix-blend-mode: screen; }

/* Print (§4.5 prayer pages): ink on paper, chrome gone. */
@media print {
  body { max-width: none; background: #fff; color: #000; font-size: 12pt; }
  .site-head, footer.site-foot, .chapel, .doors, .seasonal, .cta, .skip { display: none; }
  h1, h2, h3, a { color: #000; }
  .provenance { border-color: #999; color: #333; }
}

/* Reading without JS is untouched: nothing here requires scripting. */
