/* =========================================================================
   Brisbane United Methodist Church
   Design language follows umc.org: white ground, generous whitespace, a
   single strong red accent, sans-serif throughout, image-led cards.
   Red #E4002B is sampled directly from the church's own cross-and-flame mark.
   ========================================================================= */

:root {
  --umc-red: #e4002b;
  --umc-red-dark: #b8001f;
  --ink: #1a1a1a;
  --ink-mid: #4a4a4a;
  --ink-soft: #6b6b6b;
  --paper: #ffffff;
  --paper-alt: #f5f5f5;
  --paper-tint: #fafafa;
  --border: #e0e0e0;
  --border-strong: #c9c9c9;

  --font: "Helvetica Neue", Helvetica, Arial, "Segoe UI", Roboto, sans-serif;

  --radius: 4px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, 0.14);

  /* Body content stays at a comfortable reading measure, but the header and
     utility bars get a wider bound so the navigation is not boxed into the
     middle of a large monitor with dead space at both ends. */
  --max: 1300px;
  --max-wide: 1600px;
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; height: auto; }

a { color: var(--umc-red); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Skip link — keyboard users shouldn't have to tab the whole nav each page. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--umc-red); color: #fff; padding: 10px 18px;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--umc-red); outline-offset: 2px; }

.todo-flag {
  display: inline-block;
  background: #fff8e1; color: #7a5b00;
  border: 1px dashed #d9b64a; border-radius: 3px;
  padding: 1px 7px; font-size: 0.78rem; font-weight: 600;
}

/* ---------- Utility bar ---------- */
.utility-bar {
  background: var(--ink);
  color: #d4d4d4;
  font-size: 0.8rem;
}
.utility-bar .container {
  max-width: var(--max-wide);
  display: flex; justify-content: flex-end; align-items: center;
  gap: 22px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap;
}
.utility-bar a { color: #e8e8e8; }
.utility-bar a:hover { color: #fff; }
.utility-bar .u-left { margin-right: auto; color: #a8a8a8; }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.site-header .container {
  max-width: var(--max-wide);
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; padding-top: 16px; padding-bottom: 16px;
}
/* The lockup is a fixed-aspect raster. Setting only the height and leaving
   width:auto is what keeps it from being stretched — never set both. */
.brand { display: block; flex-shrink: 0; line-height: 0; }
.brand img { height: 64px; width: auto; max-width: none; }

nav.primary-nav > ul {
  list-style: none; display: flex; margin: 0; padding: 0; gap: 2px;
  align-items: center;
}
nav.primary-nav > ul > li { position: relative; flex-shrink: 0; }
nav.primary-nav > ul > li > a {
  display: block; padding: 10px 15px;
  color: var(--ink); font-weight: 600; font-size: 0.94rem;
  letter-spacing: 0.01em; border-bottom: 3px solid transparent;
  /* nowrap + flex-shrink:0 above: without both, a narrow header squeezes
     each item until its label breaks onto several lines. */
  white-space: nowrap;
}
nav.primary-nav > ul > li > a:hover,
nav.primary-nav > ul > li.active > a {
  color: var(--umc-red); text-decoration: none; border-bottom-color: var(--umc-red);
}
.dropdown-panel {
  display: none; position: absolute; left: 0; top: 100%;
  background: var(--paper); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); min-width: 250px; padding: 6px;
  border-radius: var(--radius);
}
nav.primary-nav > ul > li:hover .dropdown-panel,
nav.primary-nav > ul > li:focus-within .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block; padding: 9px 12px; border-radius: 3px;
  color: var(--ink); font-size: 0.88rem;
}
.dropdown-panel a:hover { background: var(--paper-alt); text-decoration: none; }
.dropdown-panel .soon::after {
  content: "soon"; margin-left: 7px; font-size: 0.62rem; font-weight: 700;
  color: var(--ink-soft); border: 1px solid var(--border-strong);
  border-radius: 3px; padding: 1px 4px; vertical-align: 1px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.btn-donate {
  background: var(--umc-red); color: #fff !important;
  padding: 10px 20px !important; border-radius: 2px;
  margin-left: 8px; border-bottom: none !important;
}
.btn-donate:hover { background: var(--umc-red-dark); text-decoration: none; }
.btn-portal {
  border: 2px solid var(--ink) !important; color: var(--ink) !important;
  padding: 8px 16px !important; border-radius: 2px; margin-left: 8px;
}
.btn-portal:hover { background: var(--ink); color: #fff !important; text-decoration: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--border-strong);
  border-radius: 3px; padding: 9px 12px; font-size: 1.1rem; cursor: pointer;
  line-height: 1;
}

/* At full size the logo + nav need ~1356px. Rather than jump straight to a
   hamburger on a 1280px laptop, tighten the nav's own footprint first so the
   full menu survives down to ~1240px. This block must stay ABOVE the collapse
   block below, which overrides the same padding for the stacked mobile menu. */
@media (max-width: 1440px) {
  .site-header .container { gap: 20px; }
  nav.primary-nav > ul > li > a { padding: 10px 11px; font-size: 0.88rem; }
  .btn-donate { padding: 9px 16px !important; }
  .btn-portal { padding: 7px 13px !important; }
  .brand img { height: 58px; }
}

@media (max-width: 1240px) {
  .nav-toggle { display: block; }
  .site-header .container { position: relative; }
  nav.primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg); max-height: 75vh; overflow-y: auto;
  }
  nav.primary-nav.open { display: block; }
  nav.primary-nav > ul { flex-direction: column; align-items: stretch; padding: 10px 18px 18px; }
  nav.primary-nav > ul > li > a { border-bottom: none; padding: 12px 2px; }
  .dropdown-panel {
    position: static; box-shadow: none; border: none; display: none;
    padding-left: 14px; min-width: 0;
  }
  nav.primary-nav > ul > li.open .dropdown-panel { display: block; }
  .btn-donate, .btn-portal { display: inline-block; margin: 8px 0 0; }
}

/* Declared after the wider breakpoints above: equal-specificity media rules are
   resolved by source order, so a small-screen override must come last or the
   1440px rule wins on a phone. */
@media (max-width: 600px) { .brand img { height: 46px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 2px;
  font-weight: 700; font-size: 0.92rem; border: 2px solid transparent;
  cursor: pointer; font-family: inherit; text-align: center;
  letter-spacing: 0.02em;
}
.btn-primary { background: var(--umc-red); color: #fff; }
.btn-primary:hover { background: var(--umc-red-dark); color: #fff; text-decoration: none; }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.16); text-decoration: none; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 0.84rem; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; min-height: 66vh;
  display: flex; align-items: center;
  background-color: var(--ink);
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 55%, rgba(0,0,0,0.25) 100%);
}
.hero .container { position: relative; z-index: 1; padding-top: 90px; padding-bottom: 90px; }
.hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.76rem;
  font-weight: 700; margin-bottom: 14px; color: #fff;
}
.hero .eyebrow::before {
  content: ""; display: inline-block; width: 34px; height: 3px;
  background: var(--umc-red); vertical-align: 4px; margin-right: 11px;
}
.hero h1 { color: #fff; max-width: 17ch; margin-bottom: 0.4em; }
.hero p.lede { max-width: 52ch; font-size: 1.12rem; color: #ededed; margin-bottom: 1.6em; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--ink); color: #fff; padding: 58px 0 46px; }
.page-hero .eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem;
  font-weight: 700; color: #fff; margin-bottom: 10px;
}
.page-hero .eyebrow::before {
  content: ""; display: inline-block; width: 30px; height: 3px;
  background: var(--umc-red); vertical-align: 4px; margin-right: 10px;
}
.page-hero h1 { color: #fff; margin-bottom: 0.3em; }
.page-hero p { color: #d8d8d8; max-width: 62ch; margin: 0; }
.breadcrumbs { font-size: 0.8rem; color: #a8a8a8; margin-bottom: 16px; }
.breadcrumbs a { color: #e0e0e0; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.tight { padding: 44px 0; }
section.alt { background: var(--paper-alt); }

.section-head { max-width: 66ch; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.74rem;
  font-weight: 700; color: var(--umc-red); margin-bottom: 10px;
}
.section-head p { color: var(--ink-mid); margin-bottom: 0; }

.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card { background: var(--paper); display: flex; flex-direction: column; }
.card > img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card .card-body { padding: 20px 0 0; }
.card .meta {
  font-size: 0.72rem; color: var(--umc-red); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.card h3 { font-size: 1.22rem; margin-bottom: 0.4em; }
.card p { color: var(--ink-mid); font-size: 0.95rem; margin-bottom: 0.7em; }
.card .more { font-weight: 700; font-size: 0.88rem; }

.card-boxed {
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.card-boxed .card-body { padding: 22px; }

/* ---------- Feature strip ---------- */
.info-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--border); }
.info-strip .info-card { padding: 26px 28px; border-right: 1px solid var(--border); }
.info-strip .info-card:last-child { border-right: none; }
.info-strip h3 {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--umc-red); margin-bottom: 8px;
}
.info-strip p { margin: 0; color: var(--ink-mid); font-size: 0.95rem; }
@media (max-width: 780px) {
  .info-strip { grid-template-columns: 1fr; }
  .info-strip .info-card { border-right: none; border-bottom: 1px solid var(--border); }
  .info-strip .info-card:last-child { border-bottom: none; }
}

/* ---------- Split feature ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: stretch;
}
.split .split-media img { width: 100%; height: 100%; object-fit: cover; min-height: 340px; }
.split .split-body { padding: 52px; display: flex; flex-direction: column; justify-content: center; }
.split.on-dark { background: var(--ink); color: #f0f0f0; }
.split.on-dark h2 { color: #fff; }
.split.on-dark p { color: #cfcfcf; }
.split blockquote {
  margin: 0 0 14px; font-size: 1.32rem; line-height: 1.5; font-style: italic; color: #fff;
}
.split cite { color: var(--umc-red); font-style: normal; font-weight: 700; font-size: 0.86rem; }
.split cite.on-light { color: var(--umc-red); }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split .split-body { padding: 34px 24px; }
  .split .split-media img { min-height: 240px; }
}

/* ---------- Prose ---------- */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.7em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-mid); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px;
  border-left: 4px solid var(--umc-red); font-style: italic; color: var(--ink);
}

/* ---------- Coming soon ---------- */
.coming-soon {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 46px 34px; text-align: center; background: var(--paper-tint);
}
.coming-soon h2 { margin-bottom: 0.3em; font-size: 1.5rem; }
.coming-soon p { color: var(--ink-mid); max-width: 52ch; margin: 0 auto 22px; }

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; margin: 1.3em 0; font-size: 0.94rem; }
table.data-table th, table.data-table td {
  border-bottom: 1px solid var(--border); padding: 12px 14px; text-align: left;
}
table.data-table thead th {
  background: var(--paper-alt); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-soft); border-bottom: 2px solid var(--border-strong);
}
.table-scroll { overflow-x: auto; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--ink); color: #b8b8b8; padding: 56px 0 26px; }
footer.site-footer .container { max-width: var(--max-wide); }
footer.site-footer .footer-brand img { height: 62px; width: auto; max-width: none; margin-bottom: 18px; }
footer.site-footer .footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px;
  padding-bottom: 32px; border-bottom: 1px solid #333;
}
footer.site-footer h4 {
  color: #fff; font-size: 0.76rem; text-transform: uppercase;
  letter-spacing: 0.11em; margin-bottom: 15px;
}
footer.site-footer ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer li { margin-bottom: 9px; font-size: 0.9rem; }
footer.site-footer a { color: #b8b8b8; }
footer.site-footer a:hover { color: #fff; }
footer.site-footer p { font-size: 0.9rem; color: #b8b8b8; }
footer.site-footer .bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 22px; font-size: 0.8rem; color: #8a8a8a;
}
@media (max-width: 880px) { footer.site-footer .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { footer.site-footer .footer-grid { grid-template-columns: 1fr; } }
