/* =========================================================
   Holy Trinity, Plevna — stylesheet
   Palette and type are drawn from the parish's own materials:
   the forest-green bulletin banner, cream paper, and the
   brick-red of the Anglican cross. The dotted "leader line"
   connecting a date to its occasion is lifted directly from
   the printed schedule flyer.
   ========================================================= */

:root {
  --color-bg: #f7f4ec;          /* parchment */
  --color-bg-card: #efe9d8;     /* slightly deeper card surface */
  --color-ink: #2b2a26;         /* warm near-black for body text */
  --color-green-deep: #2f4a3a;  /* banner green */
  --color-green-mid: #4f6b52;   /* links, secondary accents */
  --color-brick: #a33b2e;       /* accent, drawn from the cross */
  --color-rule: #c9c2a8;        /* hairlines, dotted leaders */
  --color-muted: #6b6657;       /* secondary text */

  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 880px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.125rem;     /* 18px base — generous for older readers */
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a {
  color: var(--color-green-mid);
  text-decoration: underline;
}
a:hover { color: var(--color-brick); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-brick);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brick);
  margin: 0 0 0.4em;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--color-green-deep);
  color: #fbf9f1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fbf9f1;
  text-decoration: none;
}
.brand:hover { color: #fbf9f1; opacity: 0.9; }

.brand-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-sub {
  display: block;
  font-size: 0.85rem;
  color: #cfd9cd;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
}

.site-nav a {
  color: #ecf1ea;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  border-bottom-color: var(--color-brick);
  color: #fff;
}

/* ---------- Hero / notice board ---------- */

.hero {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.notice-board {
  background: var(--color-bg-card);
  border: 1px solid var(--color-rule);
  border-radius: 6px;
  padding: 1.75rem 1.75rem 1.5rem;
  margin-top: 0.75rem;
}

.notice-board .next-date {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 0.15em;
}

.notice-board .next-occasion {
  font-size: 1.05rem;
  color: var(--color-green-deep);
  font-weight: 600;
  margin-bottom: 0.9em;
}

.leader-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0;
}

.leader-row .label {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

.leader-row .fill {
  flex: 1;
  border-bottom: 2px dotted var(--color-rule);
  height: 0.6em;
}

.leader-row .value {
  margin-left: auto;
  text-align: right;
  font-weight: 600;
}

.notice-board .after-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--color-muted);
}

.notice-board .see-all {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 600;
}

/* ---------- Welcome section ---------- */

.welcome {
  padding-top: 2rem;
  padding-bottom: 2rem;
  display: flex;
  gap: 2.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.welcome-text { flex: 1 1 320px; }

.welcome-art {
  flex: 1 1 380px;
  max-width: 420px;
}

.welcome-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--color-rule);
}

/* ---------- Cards / quick links ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.card {
  display: block;
  background: var(--color-bg-card);
  border-left: 4px solid var(--color-brick);
  border-radius: 4px;
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: var(--color-ink);
}
.card:hover { background: #e7e0c9; }

.card h3 { margin-bottom: 0.25em; color: var(--color-green-deep); }
.card p { margin: 0; font-size: 0.95rem; color: var(--color-muted); }

/* ---------- News teaser ---------- */

.news-teaser {
  background: var(--color-bg-card);
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}

.news-teaser .date {
  font-size: 0.85rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Generic section / page ---------- */

.section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.page-title {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.page-title .eyebrow { margin-bottom: 0.5em; }

/* ---------- Schedule table (full list) ---------- */

.schedule-meta {
  background: var(--color-bg-card);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}
.schedule-meta p { margin: 0.25em 0; }

.schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.schedule-row {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-rule);
}
.schedule-row:last-child { border-bottom: none; }

.schedule-row.is-past { opacity: 0.55; }

.schedule-row.is-next {
  background: var(--color-bg-card);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  margin: 0 -1rem;
}

.schedule-row .row-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.schedule-row .row-date {
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}

.schedule-row .row-fill {
  flex: 1;
  min-width: 2rem;
  border-bottom: 2px dotted var(--color-rule);
  height: 0.6em;
}

.schedule-row .row-occasion {
  min-width: 0;
  text-align: right;
}

.row-recurring {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.schedule-row .row-detail {
  margin-top: 0.25rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

/* ---------- Clergy cards ---------- */

.clergy-card {
  background: var(--color-bg-card);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.clergy-card h3 { margin-bottom: 0.1em; }
.clergy-card .role { color: var(--color-green-mid); font-weight: 600; margin-bottom: 0.5em; }
.clergy-card .meta { font-size: 0.95rem; color: var(--color-muted); margin: 0.15em 0; }

/* ---------- Bulletins (news page) ---------- */

.bulletin {
  border-bottom: 1px solid var(--color-rule);
  padding: 1.5rem 0;
}
.bulletin:first-child { padding-top: 0; }
.bulletin:last-child { border-bottom: none; }
.bulletin .date {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-green-deep);
  color: #d9e0d6;
  margin-top: 3rem;
  padding: 1.75rem 0;
  font-size: 0.9rem;
}
.site-footer .tagline {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: #fbf9f1;
  margin-bottom: 0.4em;
}
.site-footer p { margin: 0.2em 0; }
.site-footer a { color: #d9e0d6; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  .site-nav { width: 100%; justify-content: flex-start; gap: 0.1rem 1.1rem; }
  /* Stacked, the flex bases below become *heights* rather than widths —
     which is what padded 200-odd empty pixels above the photo. Let both
     halves size to their own content instead. */
  .welcome { flex-direction: column-reverse; align-items: stretch; gap: 1.5rem; }
  .welcome-text,
  .welcome-art { flex: 0 0 auto; }
  .welcome-art { max-width: 100%; }
  h1 { font-size: 1.7rem; }

  .brand-name { font-size: 1.1rem; }

  /* Cards carry lighter inner padding so the text keeps its own gutter. */
  .notice-board { padding: 1.25rem 1.1rem 1.1rem; }
  .notice-board .next-date { font-size: 1.35rem; }
  .schedule-meta,
  .news-teaser,
  .clergy-card { padding: 1.1rem; }

  /* No room for a dotted leader to run: stack the date over the occasion. */
  .schedule-row .row-line { display: block; }
  .schedule-row .row-fill { display: none; }
  .schedule-row .row-occasion { text-align: left; }

  /* Drop the full-bleed pull so the highlighted row lines up with the
     gutter every other card on the page uses. */
  .schedule-row.is-next { margin: 0; padding: 0.9rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
