/* One Flock · Katabi to Diocese
   Bark cloth (olubugo) umber, parchment, liturgical gold, and an accent that follows
   the Church year: green in Ordinary Time, violet in Advent and Lent, red in Holy Week
   and at Pentecost, gold at Christmas and Easter. */

:root {
  --of-umber: #5A2E17;        /* bark cloth */
  --of-umber-deep: #3E1E0E;
  --of-umber-soft: #8A5434;
  --of-gold: #B98A2E;
  --of-gold-soft: #E9D7A6;
  --of-parchment: #FBF7EE;
  --of-vellum: #F3EADA;
  --of-ink: #2B211A;
  --of-quiet: #6E5E52;
  --of-line: #E3D6C2;

  --season: #1F5C42;          /* set per season below */
  --season-soft: #E3EFE8;

  --of-serif: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --of-sans: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Django admin variables */
  --primary: var(--season);
  --secondary: var(--of-umber);
  --accent: var(--of-gold-soft);
  --primary-fg: #fff;
  --body-fg: var(--of-ink);
  --body-bg: var(--of-parchment);
  --body-quiet-color: var(--of-quiet);
  --body-medium-color: #4A3B30;
  --body-loud-color: var(--of-umber-deep);
  --header-color: var(--of-gold-soft);
  --header-branding-color: #FFF8E8;
  --header-bg: var(--of-umber);
  --header-link-color: #FFF8E8;
  --breadcrumbs-fg: #7A6656;
  --breadcrumbs-link-fg: var(--of-umber);
  --breadcrumbs-bg: var(--of-vellum);
  --link-fg: var(--of-umber-soft);
  --link-hover-color: var(--of-umber-deep);
  --link-selected-fg: var(--of-umber);
  --hairline-color: var(--of-line);
  --border-color: #D4C3A8;
  --error-fg: #9B1C1C;
  --message-success-bg: #E6F0E3;
  --message-warning-bg: #FBF1D6;
  --message-error-bg: #F8E3E0;
  --darkened-bg: var(--of-vellum);
  --selected-bg: #EFE3CC;
  --selected-row: #FBF1D6;
  --button-fg: #fff;
  --button-bg: var(--of-umber);
  --button-hover-bg: var(--of-umber-deep);
  --default-button-bg: var(--season);
  --default-button-hover-bg: var(--of-umber-deep);
  --close-button-bg: #8C7B6E;
  --close-button-hover-bg: #5C4D42;
  --delete-button-bg: #9B1C1C;
  --delete-button-hover-bg: #7A1414;
  --object-tools-fg: #fff;
  --object-tools-bg: var(--of-umber-soft);
  --object-tools-hover-bg: var(--of-umber-deep);
  --font-family-primary: var(--of-sans);
}

body.season-ordinary  { --season: #1F5C42; --season-soft: #E3EFE8; }
body.season-advent    { --season: #4B2A6B; --season-soft: #ECE5F3; }
body.season-lent      { --season: #4A2558; --season-soft: #EDE3F0; }
body.season-holyweek  { --season: #8E1B1B; --season-soft: #F5E1DE; }
body.season-pentecost { --season: #A3201A; --season-soft: #F7E2DC; }
body.season-christmas { --season: #9A7420; --season-soft: #F6EDD4; }
body.season-easter    { --season: #9A7420; --season-soft: #F6EDD4; }

/* ------------------------------------------------------------ page */
html, body { background: var(--of-parchment); }
body.of-landing { margin: 0; }
#content-related { background: transparent; }
#content-related .module h2 { background: var(--of-vellum); background-image: none; color: var(--of-umber); }
body {
  color: var(--of-ink);
  font-family: var(--of-sans);
  font-size: 15px;
  background-image:
    radial-gradient(circle at 12% 0%, rgba(185,138,46,.06), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(90,46,23,.05), transparent 45%);
  background-attachment: fixed;
}
h1, h2, h3, #site-name, .of-serif { font-family: var(--of-serif); }
#content h1 {
  font-size: 2rem; font-weight: 600; color: var(--of-umber-deep);
  letter-spacing: .01em; margin-bottom: .6em;
}
#content h1::after {
  content: ""; display: block; width: 72px; height: 3px; margin-top: .35em;
  background: linear-gradient(90deg, var(--of-gold), var(--season));
  border-radius: 2px;
}
#content h2 { font-size: 1.35rem; font-weight: 600; color: var(--of-umber); }
a:link, a:visited { color: var(--of-umber-soft); }
a:hover, a:focus { color: var(--of-umber-deep); }

/* ------------------------------------------------------------ header: bark cloth + woven band */
#header {
  position: relative;
  background-color: var(--of-umber);
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,.06) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #643420, #4E2714);
  padding: 14px 32px 18px;
  box-shadow: 0 2px 0 rgba(0,0,0,.08);
}
#header::after { /* mukeka weave: gold, season, umber */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background:
    repeating-linear-gradient(90deg,
      var(--of-gold) 0 14px, var(--season) 14px 22px,
      #F6EEDC 22px 25px, var(--of-umber-deep) 25px 33px);
}
#branding { display: flex; align-items: center; gap: 14px; }
.of-brand { display: flex; align-items: center; gap: 14px; text-decoration: none !important; }
.of-brand img { width: 46px; height: 46px; flex: none; }
.of-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.of-brand-name {
  font-family: var(--of-serif); font-size: 1.7rem; font-weight: 600;
  color: #FFF8E8; letter-spacing: .02em;
}
.of-brand-place {
  font-family: var(--of-sans); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .16em; color: var(--of-gold-soft);
}
#site-name { margin: 0; }
.of-season-pill {
  margin-left: 18px; padding: 3px 12px; border-radius: 999px;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: var(--season); border: 1px solid rgba(255,255,255,.35);
  white-space: nowrap;
}
#user-tools { font-size: .78rem; letter-spacing: .06em; color: var(--of-gold-soft); }
#user-tools a { border-bottom-color: rgba(233,215,166,.5); }
#user-tools a:hover { color: #fff; border-bottom-color: #fff; }
.theme-toggle { display: none !important; } /* one consistent look */

/* ------------------------------------------------------------ breadcrumbs */
div.breadcrumbs {
  background: var(--of-vellum); color: var(--breadcrumbs-fg);
  border-bottom: 1px solid var(--of-line);
  padding: 10px 32px; font-size: .85rem;
}
div.breadcrumbs a { color: var(--of-umber); font-weight: 600; }

/* ------------------------------------------------------------ sidebar */
#nav-sidebar { background: var(--of-parchment); border-right: 1px solid var(--of-line); }
#nav-sidebar .module caption, #nav-sidebar .module th { font-family: var(--of-sans); }
#nav-sidebar .current-model { background: var(--season-soft); }
#nav-sidebar .current-model a { color: var(--season); font-weight: 700; }
.toggle-nav-sidebar { background: var(--of-vellum); border-color: var(--of-line); color: var(--of-umber); }

/* ------------------------------------------------------------ modules / cards */
.module {
  background: #fff; border: 1px solid var(--of-line); border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 2px rgba(62,30,14,.05), 0 6px 18px rgba(62,30,14,.04);
}
.module h2, .module caption, .inline-group h2 {
  background: var(--of-umber);
  background-image: linear-gradient(90deg, var(--of-umber), #6B3A22);
  color: #FFF8E8; font-family: var(--of-serif); font-size: 1.15rem; font-weight: 600;
  letter-spacing: .03em; text-transform: none; padding: 10px 14px;
  border-bottom: 3px solid var(--season);
}
.module h2 a, .module caption a { color: #FFF8E8; }
#content-main .module table { width: 100%; }
.dashboard .module table th { font-weight: 600; }
.dashboard .module table th a { color: var(--of-umber); }
#content-related .module h2 { font-size: 1rem; }

/* ------------------------------------------------------------ tables */
thead th, tfoot td, table thead th {
  background: var(--of-vellum); color: var(--of-umber);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  border-bottom: 1px solid var(--of-line);
}
td, th { border-bottom-color: var(--of-line); }
#result_list tbody tr:nth-child(even) td, #result_list tbody tr:nth-child(even) th { background: #FDFAF3; }
#result_list tbody tr:hover td, #result_list tbody tr:hover th { background: var(--season-soft); }
#changelist .actions { background: var(--of-vellum); border-color: var(--of-line); }
#changelist-filter { background: #fff; border: 1px solid var(--of-line); border-radius: 10px; }
#changelist-filter h2 { background: var(--of-umber); color: #FFF8E8; font-family: var(--of-serif); border-radius: 10px 10px 0 0; }
#changelist-filter h3 { color: var(--of-umber); font-family: var(--of-serif); font-size: 1.05rem; }
#changelist-filter li.selected a { color: var(--season); }
#changelist #toolbar { background: var(--of-vellum); border-color: var(--of-line); border-radius: 8px; }

/* ------------------------------------------------------------ forms */
fieldset.module { padding-bottom: 6px; }
.form-row { border-bottom-color: var(--of-line); }
label { color: #4A3B30; }
.required label, label.required { color: var(--of-umber-deep); font-weight: 600; }
input[type=text], input[type=password], input[type=email], input[type=url], input[type=number],
input[type=tel], input[type=date], textarea, select, .vTextField {
  border: 1px solid #D4C3A8; border-radius: 6px; background: #fff; padding: 6px 8px;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--season);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--season) 18%, transparent);
}
.help, p.help, div.help { color: var(--of-quiet); font-size: .82rem; }
.errornote, ul.errorlist { border-radius: 6px; }

.button, input[type=submit], input[type=button], .submit-row input, a.button {
  border-radius: 6px; font-weight: 600; letter-spacing: .02em;
}
.submit-row { background: var(--of-vellum); border: 1px solid var(--of-line); border-radius: 10px; }
.submit-row input.default, input[type=submit].default {
  background: var(--season); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.submit-row input.default:hover { background: var(--of-umber-deep); }
.object-tools a:link, .object-tools a:visited { border-radius: 999px; }

/* ------------------------------------------------------------ messages */
ul.messagelist li { border-radius: 8px; margin: 0 0 8px; border-left: 4px solid var(--season); color: var(--of-ink); }
ul.messagelist li.error { border-left-color: #9B1C1C; }
ul.messagelist li.warning { border-left-color: var(--of-gold); }

/* ------------------------------------------------------------ footer */
#footer.of-footer {
  padding: 22px 32px 28px; margin-top: 30px; text-align: center;
  border-top: 1px solid var(--of-line); color: var(--of-quiet); font-size: .82rem;
}
.of-footer .of-verse { font-family: var(--of-serif); font-style: italic; font-size: 1.05rem; color: var(--of-umber); }
.of-footer .of-cross { color: var(--of-gold); margin: 0 6px; }

/* ------------------------------------------------------------ login */
body.login { background: var(--of-parchment); }
.login #container {
  margin-top: 8vh; border-radius: 14px; overflow: hidden; border: 1px solid var(--of-line);
  box-shadow: 0 18px 50px rgba(62,30,14,.14);
}
.login #header { padding: 22px 24px 26px; }
.login #header #branding { justify-content: center; }
.login .of-season-pill { display: none; }
.login #content { padding: 24px 28px 28px; background: #fff; }
.login .submit-row { background: none; border: 0; padding: 1em 0 0; margin: 0; }
.login .submit-row input { width: 100%; padding: 10px; font-size: 1rem; }
.login .of-login-note { text-align: center; color: var(--of-quiet); font-size: .82rem; margin-top: 14px; }

/* ------------------------------------------------------------ landing page */
.of-landing { min-height: 100vh; display: flex; flex-direction: column; }
.of-landing #header { padding: 22px 40px 26px; }
.of-hero { flex: 1; display: grid; place-items: center; padding: 48px 20px; text-align: center; }
.of-hero-inner { max-width: 680px; }
.of-hero img { width: 96px; height: 96px; margin-bottom: 18px; }
.of-hero h1 { font-family: var(--of-serif); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--of-umber-deep); margin: 0; font-weight: 600; }
.of-hero .of-tag { font-size: .85rem; letter-spacing: .3em; text-transform: uppercase; color: var(--of-gold); margin: 6px 0 22px; }
.of-hero p.of-lede { font-size: 1.1rem; line-height: 1.6; color: #4A3B30; }
.of-ladder { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 30px; }
.of-ladder span {
  padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--of-line);
  font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--of-umber);
}
.of-ladder span + span::before { content: none; }
.of-ladder i { color: var(--of-gold); font-style: normal; align-self: center; }
a.of-cta {
  display: inline-block; padding: 12px 30px; border-radius: 999px; text-decoration: none;
  background: var(--season); color: #fff !important; font-weight: 600; letter-spacing: .04em;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--season) 35%, transparent);
}
a.of-cta:hover { background: var(--of-umber-deep); }

/* ------------------------------------------------------------ small screens (katabi leaders on phones) */
@media (max-width: 767px) {
  #header { padding: 12px 16px 16px; }
  .of-brand-name { font-size: 1.35rem; }
  .of-brand img { width: 38px; height: 38px; }
  .of-season-pill { display: none; }
  div.breadcrumbs { padding: 8px 16px; }
  input[type=text], select, textarea { font-size: 16px; } /* stops phones zooming in */
}

@media print {
  #header, div.breadcrumbs, #nav-sidebar, .submit-row, #footer { display: none !important; }
  body { background: #fff; }
}
