/* ============================================================
   Atlantic Independent Baptist Fellowship
   ============================================================ */

@font-face {
  font-family: 'Libre Baskerville';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/libre-baskerville-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/libre-baskerville-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/libre-baskerville-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-sans-3-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-sans-3-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/source-sans-3-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/source-sans-3-700.woff2') format('woff2');
}

:root {
  --burgundy: #7A1428;
  --burgundy-dark: #5C0E1E;
  --burgundy-soft: #F3E6E8;
  --blue: #1A2278;
  --ink: #1C1917;
  --text: #3A3632;
  --muted: #6A645C;
  --line: #E4DED4;
  --cream: #F6F2EA;
  --paper: #FFFcf7;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.07);
  --radius: 12px;
  --header-h: 5.75rem;
  --wrap: 70rem;
  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', 'Source Sans Pro', 'Segoe UI', Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--burgundy); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--burgundy-dark); }

:focus-visible {
  outline: 3px solid var(--burgundy);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--ink);
  color: var(--white);
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 0.75rem; }

.wrap {
  width: min(calc(100% - 2rem), var(--wrap));
  margin-inline: auto;
}

.wrap-narrow { width: min(calc(100% - 2rem), 46rem); margin-inline: auto; }

/* ----- Header ----- */
.topbar { height: 4px; background: var(--burgundy); }

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: var(--header-h);
  padding-block: 0.65rem;
}

.logo { display: flex; align-items: center; flex: 0 1 auto; text-decoration: none; }
.logo img {
  height: 4.15rem;
  width: auto;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.site-nav a {
  display: block;
  padding: 0.45rem 0.58rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  border-radius: 6px;
}
.site-nav a:hover { color: var(--burgundy); background: var(--burgundy-soft); }
.site-nav a[aria-current="page"] {
  color: var(--burgundy);
  box-shadow: inset 0 -2px 0 var(--burgundy);
  border-radius: 0;
  background: transparent;
}

/* ----- Page titles ----- */
.page-hero {
  padding: 3.25rem 0 2.5rem;
  text-align: center;
  background:
    linear-gradient(180deg, #fff 0%, var(--cream) 100%);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  margin: 0 0 0.6rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 3vw, 2.6rem);
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-hero p {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.15rem;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 0.85rem;
  color: var(--burgundy);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ----- Home ----- */
.home-hero {
  padding: 3rem 0 1rem;
  text-align: center;
}
.home-hero .hero-mark {
  height: 5.5rem;
  width: auto;
  margin: 0 auto 1.15rem;
}
.home-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 0.75rem;
  max-width: 22ch;
  margin-inline: auto;
}
.home-hero .lede {
  margin: 0 auto 0.25rem;
  max-width: 38rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.section { padding: 3.25rem 0; }
.section + .section { padding-top: 0; }
.section-header {
  text-align: center;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  color: var(--ink);
  margin: 0 0 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-header p { margin: 0 auto; max-width: 40rem; color: var(--muted); }

.rule {
  width: 3rem;
  height: 3px;
  background: var(--burgundy);
  margin: 0 auto 1.1rem;
  border: 0;
}

/* ----- Upcoming meeting card ----- */
.meeting-feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 11.5rem 1fr;
}
.meeting-feature.is-placeholder { border-style: dashed; box-shadow: none; }

.meeting-date {
  background: var(--burgundy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem 1rem;
}
.meeting-date .dow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  opacity: 0.85;
}
.meeting-date .day {
  font-family: var(--font-serif);
  font-size: 3.1rem;
  line-height: 1;
  font-weight: 700;
  margin: 0.2rem 0;
}
.meeting-date .mon {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.meeting-body { padding: 1.5rem 1.75rem; }
.meeting-body .label {
  color: var(--burgundy);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.meeting-body h2, .meeting-body h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--ink);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
.meeting-body p { margin: 0 0 0.35rem; }
.meeting-body .host { font-weight: 600; color: var(--ink); }
.meeting-body .muted { color: var(--muted); }
.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.15rem;
}

.meeting-list { display: grid; gap: 1rem; }
.meeting-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  overflow: hidden;
}
.meeting-card.is-past { opacity: 0.92; }
.meeting-card.is-placeholder {
  border-style: dashed;
  background: #fbf9f5;
}
.meeting-card .meeting-date { padding: 1rem 0.6rem; }
.meeting-card .meeting-date .day { font-size: 2.1rem; }
.meeting-card .meeting-body { padding: 1.1rem 1.25rem; }
.meeting-card h3 { font-size: 1.2rem; margin: 0 0 0.4rem; font-family: var(--font-serif); color: var(--ink); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.2;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--burgundy); color: var(--white); border-color: var(--burgundy); }
.btn-primary:hover { background: var(--burgundy-dark); border-color: var(--burgundy-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--burgundy); border-color: var(--burgundy); }
.btn-ghost:hover { background: var(--burgundy-soft); color: var(--burgundy-dark); }

/* ----- Pillars ----- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem 1.6rem;
  text-align: center;
}
.pillar .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--burgundy-soft);
  color: var(--burgundy);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}
.pillar h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
  font-style: italic;
  font-weight: 400;
}
.pillar p { margin: 0; color: var(--text); font-size: 1.02rem; }

/* ----- Prose / about ----- */
.prose { font-size: 1.125rem; }
.prose h2, .prose h3 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.3;
}
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 0.8rem; }
.prose h3 { font-size: 1.25rem; margin: 1.6rem 0 0.55rem; }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1.2rem; padding-left: 1.25rem; }
.prose li { margin: 0 0 0.4rem; }
.prose .lead { font-size: 1.2rem; color: var(--ink); }
.statement {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 4px solid var(--burgundy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.6rem;
  margin: 0 0 1.5rem;
}

/* ----- Officers ----- */
.officer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.officer-grid.three { grid-template-columns: repeat(3, 1fr); max-width: 54rem; margin-inline: auto; }
.officer {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.15rem 1.3rem;
  text-align: center;
}
.officer .role {
  color: var(--burgundy);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}
.officer .term { color: var(--muted); font-size: 0.88rem; margin: -0.15rem 0 0.45rem; }
.officer h3 { font-family: var(--font-serif); font-size: 1.15rem; color: var(--ink); margin: 0 0 0.35rem; }
.officer p { margin: 0; font-size: 0.98rem; }
.officer a { color: inherit; }
.officer a.email { color: var(--burgundy); word-break: break-word; font-size: 0.92rem; }

/* ----- Planters ----- */
.planter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.planter {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 10.5rem 1fr;
}
.planter img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 11rem;
  background: #eee;
}
.planter .body { padding: 1.2rem 1.3rem; }
.planter h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--ink); margin: 0 0 0.2rem; }
.planter .church { font-weight: 600; margin: 0 0 0.15rem; color: var(--ink); }
.planter p { margin: 0 0 0.2rem; font-size: 1rem; }
.planter .report { margin-top: 0.7rem; }

/* ----- Lists ----- */
.support-list, .helped-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.support-list li, .helped-list li {
  padding: 0.7rem 1.15rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.15rem 1rem;
}
.support-list li:first-child, .helped-list li:first-child { border-top: 0; }
.helped-list li {
  grid-template-columns: 6.5rem 1fr;
  align-items: baseline;
}
.helped-list .year {
  font-weight: 700;
  color: var(--burgundy);
  font-variant-numeric: tabular-nums;
}
.support-list .pastor { color: var(--muted); }
.support-list a, .helped-list a { color: var(--ink); text-decoration: none; }
.support-list a:hover, .helped-list a:hover { color: var(--burgundy); text-decoration: underline; }

/* ----- Resources ----- */
.resource-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.resource-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.resource-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink);
  margin: 0 0 0.4rem;
}
.resource-card .meta { color: var(--muted); font-size: 0.98rem; margin: 0 0 1rem; }
.resource-card audio { width: 100%; margin: 0.4rem 0 0.8rem; }

/* ----- Speakers archive ----- */
.year-block { margin: 0 0 0.65rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); overflow: hidden; }
.year-block summary {
  cursor: pointer;
  list-style: none;
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.15rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.year-block summary::-webkit-details-marker { display: none; }
.year-block summary::after { content: "+"; color: var(--burgundy); font-weight: 700; }
.year-block[open] summary::after { content: "–"; }
.year-block .table-wrap { padding: 0 0.4rem 0.6rem; overflow-x: auto; }
table.speakers {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
table.speakers th, table.speakers td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
table.speakers th { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
table.speakers .canceled { font-style: italic; color: var(--muted); }

/* ----- Contact ----- */
.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.contact-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.contact-card h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--ink);
  margin: 0 0 0.8rem;
}
.contact-card p { margin: 0 0 0.35rem; }
.address { font-style: normal; line-height: 1.6; }

/* ----- Constitution typography ----- */
.constitution { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem 1.75rem; }
.constitution h2 { font-family: var(--font-serif); font-size: 1.35rem; color: var(--ink); margin: 1.8rem 0 0.6rem; }
.constitution h2:first-child { margin-top: 0; }
.constitution h3 { font-size: 1.08rem; margin: 1rem 0 0.4rem; color: var(--ink); }
.constitution ol { margin: 0 0 0.6rem; }
.constitution li { margin: 0 0 0.3rem; }
.constitution .sub { list-style: lower-alpha; }
.constitution .sub2 { list-style: lower-roman; }
.amendment {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--cream);
  border-left: 3px solid var(--burgundy);
}

/* ----- Archive note ----- */
.archive-note {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.archive-note .when { color: var(--muted); margin: 0 0 0.6rem; font-size: 0.95rem; }
.archive-note h3 { font-family: var(--font-serif); margin: 0 0 0.5rem; color: var(--ink); }

/* ----- Footer ----- */
.site-footer {
  background: #1C1917;
  color: #d8d2c8;
  margin-top: 3.5rem;
  padding: 3rem 0 1.5rem;
  font-size: 1rem;
}
.site-footer a { color: #f3ece4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 2rem;
}
.site-footer h2 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b9b0a4;
  margin: 0 0 0.8rem;
  font-weight: 700;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.4rem; }
.site-footer .foot-logo { height: 3.6rem; width: auto; margin-bottom: 0.9rem; filter: brightness(10) grayscale(1); opacity: 0.92; }
.site-footer p { margin: 0 0 0.5rem; }
.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #3a352f;
  color: #9b948b;
  font-size: 0.92rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.cta-band {
  background: var(--burgundy);
  color: var(--white);
  padding: 2.6rem 0;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin: 0 0 0.6rem;
  color: var(--white);
}
.cta-band p { margin: 0 auto 1.2rem; max-width: 36rem; color: rgba(255,255,255,0.88); }
.cta-band .btn-primary { background: var(--white); color: var(--burgundy); border-color: var(--white); }
.cta-band .btn-primary:hover { background: var(--cream); color: var(--burgundy-dark); }
.cta-band .btn-ghost { color: var(--white); border-color: rgba(255,255,255,0.7); }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.7rem; }

/* ----- Utilities ----- */
.note { color: var(--muted); font-size: 0.98rem; }
.center { text-align: center; }
.split { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.25rem; }
.split h2 { font-family: var(--font-serif); color: var(--ink); margin: 0; font-size: 1.6rem; }

@media (max-width: 960px) {
  .officer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 0.7rem 0.5rem; }
  .logo img { height: 3.15rem; }
  .meeting-feature, .meeting-card, .planter { grid-template-columns: 1fr; }
  .meeting-date { flex-direction: row; gap: 0.7rem; padding: 0.85rem 1rem; }
  .meeting-date .day { font-size: 1.8rem; margin: 0; }
  .planter img { min-height: 14rem; max-height: 18rem; object-position: center top; }
  .resource-grid, .contact-grid, .planter-grid { grid-template-columns: 1fr; }
  .helped-list li { grid-template-columns: 1fr; }
  .home-hero { padding-top: 2rem; }
}

@media (max-width: 520px) {
  .officer-grid, .officer-grid.three, .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 1.05rem; }
}

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