@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Cormorant+Garamond:ital,wght@0,500;1,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --white: #FFFFFF;
  --panel: #EEF2F8;
  --ink: #0F2A52;
  --blue: #14315C;
  --blue-deep: #0B1F3D;
  --red: #B3242A;
  --red-deep: #8C1B20;
  --gold: #C9A227;
  --stone: #56607A;
  --line: rgba(15, 42, 82, 0.15);

  --serif: 'Playfair Display', Georgia, serif;
  --serif-italic: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 600; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: 0.01em; }
h3 { font-size: 1.15rem; }

p { max-width: 62ch; }

a { color: var(--red); }

/* -------- Layout shell: fixed spine + main column -------- */
.shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.spine {
  background: var(--ink);
  color: var(--white);
  padding: 2.5rem 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.spine .crest {
  font-family: var(--serif);
}

.spine .crest .mark {
  display: block;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  margin-bottom: 1.2rem;
  position: relative;
}
.spine .crest .mark::after {
  content: "†";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.3rem;
}

.spine .crest h2 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 0.2rem;
}

.spine .crest .parish-sub {
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.spine nav {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 3rem;
}

.spine nav a {
  color: var(--white);
  opacity: 0.75;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  width: fit-content;
}
.spine nav a:hover, .spine nav a.active {
  opacity: 1;
  border-bottom-color: var(--gold);
}

.spine .foot {
  font-size: 0.78rem;
  opacity: 0.55;
}

.main {
  padding: 4rem 5vw 5rem;
  max-width: 980px;
}

@media (max-width: 780px) {
  .shell { grid-template-columns: 1fr; }
  .spine { position: relative; height: auto; }
  .main { padding: 2.5rem 6vw 4rem; }
}

/* -------- Hero -------- */
.hero { margin-bottom: 4rem; }
.hero .eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.9rem;
}
.hero h1 { max-width: 18ch; }
.hero p.lede {
  font-family: var(--serif-italic);
  font-style: italic;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--stone);
  margin-top: 1.1rem;
  max-width: 48ch;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.9rem 1.8rem;
  border: 1px solid var(--red);
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  border-radius: 1px;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--red-deep); }

.btn.outline {
  background: transparent;
  color: var(--red);
}
.btn.outline:hover { background: var(--red); color: var(--white); }

/* -------- Ledger-style numbered process -------- */
.process {
  border-top: 1px double var(--line);
  margin-top: 3rem;
  padding-top: 2.5rem;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.step {
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
}

.step .num {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
}

.step h3 { margin-bottom: 0.3rem; }
.step p { font-size: 0.92rem; color: var(--stone); margin: 0; }

/* -------- Requirements ledger list -------- */
.ledger-list {
  border-top: 3px double var(--line);
  margin-top: 3rem;
  padding-top: 2rem;
}

.ledger-list ul {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
}

.ledger-list li {
  border-bottom: 1px dashed var(--line);
  padding: 0.75rem 0;
  display: flex;
  gap: 0.8rem;
}

.ledger-list li::before {
  content: "—";
  color: var(--gold);
}

/* -------- Forms -------- */
.form-page { max-width: 640px; }

.field { margin-bottom: 1.4rem; }

.field label {
  display: block;
  font-size: 0.88rem;
  color: var(--stone);
  margin-bottom: 0.4rem;
}

.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 2px;
  color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 1.4rem;
}
fieldset legend {
  font-size: 0.88rem;
  color: var(--stone);
  margin-bottom: 0.5rem;
  padding: 0;
}
.radio-group, .checkbox-group {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.radio-group label, .checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.hint { font-size: 0.82rem; color: var(--stone); margin-top: 0.3rem; }

.form-section-title {
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  margin: 2rem 0 1.4rem;
}

/* -------- Status / badges -------- */
.status-badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
}
.status-badge.verified { background: var(--red); color: var(--white); border-color: var(--red); }
.status-badge.warn { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* -------- Table (admin) -------- */
table.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.92rem;
}
table.ledger-table th {
  text-align: left;
  font-weight: 500;
  color: var(--stone);
  border-bottom: 1px solid var(--ink);
  padding: 0.6rem 0.8rem;
}
table.ledger-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
table.ledger-table tr:hover td { background: var(--panel); }

.notice {
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--red);
  background: var(--white);
  font-size: 0.92rem;
  margin: 1.2rem 0;
}
.notice.success { border-left-color: #3a6b4f; }
.notice.error { border-left-color: #b03a2e; }

/* hides text that will be swapped in from the database, so the page
   never flashes the wrong/default wording before the real content loads */
body.pending-content [data-key],
body.pending-content [data-chrome] {
  visibility: hidden;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1.6rem;
  margin-bottom: 1.5rem;
}

.greeting {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}
