/* =========================================================
   The King's Chapel — static rebuild
   Brand: maroon #813732 / #692f28, dark theme, card-pattern bg
   ========================================================= */

@font-face {
  font-family: "Bodoni 72 Oldstyle";
  src: url("/fonts/bodoni-72-oldstyle.woff2") format("woff2"),
       url("/fonts/bodoni-72-oldstyle.woff") format("woff");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --maroon: #813732;
  --maroon-dark: #692f28;
  --ink: #0e0e0e;
  --dark: #141414;
  --darker: #0a0a0a;
  --cream: #ffffff;
  --text-light: #eaeaea;
  --text-muted: #cfcfcf;
  --text-dark: #2a2a2a;
  --display: "Bodoni 72 Oldstyle", "Roboto Slab", Georgia, serif;
  --body: "Roboto Slab", Georgia, "Times New Roman", serif;
  --ui: "Roboto", system-ui, -apple-system, sans-serif;
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--text-light);
  background: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: .03em;
  padding: 13px 34px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--maroon); color: #fff; }
.btn-solid:hover { background: var(--maroon-dark); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--text-light); border-color: rgba(255,255,255,.35); }
.btn-outline-dark:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
}
.brand-logo { width: 240px; height: auto; }

.primary-nav { display: flex; align-items: center; gap: 34px; }
.primary-nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0; padding: 0;
}
.primary-nav a {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color .2s ease;
}
.primary-nav ul a:hover { color: var(--maroon); }
.nav-donate { padding: 9px 26px; font-size: .95rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .25s ease; }
.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); }

/* ---------------- Section shells ---------------- */
.section { padding: 92px 0; }
.section-dark { background: var(--dark); }
.section-darker { background: var(--darker); }

.section-pattern {
  position: relative;
  background-color: #000;
  background-image: url("/images/card-background.png");
  background-size: 520px auto;
  background-repeat: repeat;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  pointer-events: none;
}
.section-pattern > .container { position: relative; z-index: 1; }

/* ---------------- Titles ---------------- */
.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3rem);
  text-align: center;
  margin: 0 0 .5em;
  color: var(--text-light);
}
.section-title.light { color: #fff; }
.section-subtitle {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  text-align: center;
  margin: 0 0 1.4em;
  color: var(--text-light);
}

/* ---------------- Hero ---------------- */
.hero { padding: 150px 0 160px; text-align: center; }
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(3rem, 8vw, 6rem);
  margin: 0 0 .15em;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 2px 18px rgba(0,0,0,.6);
}
.hero-subtitle {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.6vw, 1.9rem);
  letter-spacing: .04em;
  color: var(--text-light);
  margin: 0 0 2em;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

/* ---------------- About / creed ---------------- */
.creed {
  font-size: 1.12rem;
  line-height: 2;
  text-align: center;
  color: var(--text-muted);
  margin: 0 auto;
  max-width: 760px;
}

/* ---------------- Giving cards ---------------- */
.giving-inner { position: relative; z-index: 1; }
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  gap: 36px;
  justify-content: center;
  margin-top: 14px;
}
.card {
  background: var(--cream);
  color: var(--text-dark);
  border-radius: 10px;
  padding: 38px 36px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
}
.card-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--maroon);
  margin: 0 0 .6em;
  text-align: center;
}
.card p { margin: 0 0 1em; }
.card .btn { margin-top: auto; align-self: center; }
.email { color: var(--maroon); font-weight: 600; word-break: break-word; }
.email:hover { text-decoration: underline; }
.steps { margin: 0 0 1.4em; padding-left: 1.3em; }
.steps li { margin-bottom: .4em; }

/* ---------------- Sermon audio ---------------- */
.lead { text-align: center; font-size: 1.15rem; color: var(--text-muted); margin: 0 auto 1em; max-width: 680px; }
.byline { text-align: center; font-style: italic; color: var(--maroon); margin: 0 0 2.4em; }
.byline::before { content: ""; }
.episodes { list-style: none; margin: 0 auto 2.6em; padding: 0; max-width: 760px; }
.episodes li { border-bottom: 1px solid rgba(255,255,255,.08); }
.episodes a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 8px;
  color: var(--text-light);
  transition: color .2s ease, background-color .2s ease;
}
.episodes a:hover { color: #fff; background: rgba(129,55,50,.18); }
.ep-icon {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--maroon);
  color: #fff;
  font-size: .8rem;
  padding-left: 2px;
}
#sermon-audio .btn { display: block; width: max-content; margin: 0 auto; }

/* ---------------- Visit us ---------------- */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  margin-top: 18px;
}
.visit-info { text-align: center; }
.visit-line { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 .3em; color: var(--text-muted); }
.visit-time { font-family: var(--display); font-weight: 700; font-size: 2.6rem; margin: 0 0 .3em; color: var(--maroon); }
.visit-addr { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0 0 1.2em; color: var(--text-light); line-height: 1.4; }
.visit-note { font-size: 1.05rem; color: var(--text-muted); }
.visit-map {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  aspect-ratio: 4 / 3;
}
.visit-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(.15); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 30px 0;
  text-align: center;
}
.site-footer p { margin: 0; font-size: .9rem; color: #888; }

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .brand-logo { width: 200px; }
  .primary-nav {
    position: fixed;
    top: 88px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 8px 0 20px;
    transform: translateY(-120%);
    transition: transform .3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.5);
  }
  .primary-nav.open { transform: translateY(0); }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav ul li { border-bottom: 1px solid rgba(255,255,255,.06); }
  .primary-nav ul a { display: block; padding: 16px 24px; }
  .nav-donate { margin: 16px 24px 0; text-align: center; }

  .cards { grid-template-columns: minmax(0, 460px); }
  .visit-grid { grid-template-columns: 1fr; gap: 30px; }
  .section { padding: 70px 0; }
  .hero { padding: 110px 0 120px; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .brand-logo { width: 168px; }
  .card { padding: 30px 24px; }
}
