/* ==========================================================================
   Bidwell Presbyterian Church — base stylesheet
   All colors/type are CSS custom properties so the whole site can be
   re-skinned from this one block once design direction is settled.
   ========================================================================== */

:root {
  /* Palette — drawn from the church seal: the gold of its rim and the cream
     of its field, grounded by a warm walnut brown. The seal's purple and green
     stay inside the logo so it remains the one saturated mark on the page. */
  --brown:        #6b4226;   /* links, labels, outlines */
  --brown-dark:   #3f2819;   /* page headers, footer */
  --brown-light:  #8a5a34;
  --gold:         #c08a35;   /* the seal's rim — buttons, rules, accents */
  --gold-light:   #e2b865;   /* gold text on dark brown; button hover */
  --ink:          #2b1f17;
  --ink-soft:     #5c4a3d;
  --paper:        #fffbf5;   /* page ground */
  --stone:        #f7eedf;   /* the seal's cream, for bands */
  --stone-mid:    #eadcc6;
  --rule:         #dccbb2;
  --white:        #ffffff;

  /* Type */
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-label:   "Cinzel", "Trajan Pro", Georgia, serif;   /* echoes the seal's lettering */
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --measure:      68rem;   /* max content width */
  --measure-text: 44rem;   /* comfortable reading width */
  --gutter:       clamp(1.25rem, 4vw, 3rem);
  --section-y:    clamp(3rem, 7vw, 5.5rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brown); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brown-dark); }

:focus-visible {
  outline: 3px solid var(--brown);
  outline-offset: 2px;
  border-radius: 2px;
}
.hero :focus-visible, .page-hero :focus-visible, .band :focus-visible,
.site-footer :focus-visible { outline-color: var(--gold-light); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + .5vw, 1.375rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.prose { max-width: var(--measure-text); }
/* When .prose sits on the .wrap itself, the narrow column would otherwise be
   centered in the window. Keep the block on the page grid and cap the
   children instead, so the text starts at the same left edge as everything else. */
.wrap.prose { max-width: var(--measure); }
.wrap.prose > * { max-width: var(--measure-text); }
.prose > * + h2 { margin-top: 2em; }
.prose > * + h3 { margin-top: 1.75em; }
.prose > .eyebrow + h2, .prose > .eyebrow + h3 { margin-top: 0; }

.section { padding-block: var(--section-y); }
.section--stone { background: var(--stone); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brown); color: var(--white);
  padding: .75rem 1.25rem; z-index: 200;
}
.skip-link:focus { left: 0; }

.eyebrow {
  font-family: var(--font-label);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brown);
  margin: 0 0 .75rem;
}

.lede { font-size: 1.1875rem; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600;
  font-size: .9375rem;
  letter-spacing: .01em;
  padding: .8rem 1.5rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1.5px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  transition: background-color .18s ease, color .18s ease;
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }
.btn--ghost { background: transparent; border-color: var(--brown); color: var(--brown); }
.btn--ghost:hover { background: var(--brown); border-color: var(--brown); color: var(--white); }
.btn--on-dark { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--on-dark:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,.6); color: var(--white); }
.btn--outline-light:hover { background: var(--white); border-color: var(--white); color: var(--brown-dark); }

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Site header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand__seal { width: 52px; height: 52px; flex: none; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-family: var(--font-label); font-weight: 700; font-size: 1.0625rem; letter-spacing: .02em; }
.brand__tag {
  font-size: .6875rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--brown); font-weight: 600; margin-top: .3rem;
}

.nav-toggle {
  display: none;
  align-items: center; gap: .5rem;
  background: none; border: 1px solid var(--rule); border-radius: 2px;
  min-height: 44px; padding: .6rem 1rem;
  font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--ink); cursor: pointer;
}

.nav__list {
  display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem);
  list-style: none; margin: 0; padding: 0;
}
.nav__list a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .9375rem;
  font-weight: 500;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav__list a:hover { color: var(--brown); }
.nav__list a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
.nav__list .nav__cta a {
  border: 1.5px solid var(--brown); border-radius: 2px;
  padding: .5rem 1rem; color: var(--brown); font-weight: 600;
}
.nav__list .nav__cta a:hover { background: var(--brown); color: var(--white); }
.nav__list .nav__cta--give a {
  background: var(--gold); border-color: var(--gold); color: var(--ink);
}
.nav__list .nav__cta--give a:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--ink); }

@media (max-width: 60rem) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 12px 24px rgba(0,0,0,.07);
  }
  .site-nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem; }
  .nav__list li + li { border-top: 1px solid var(--stone-mid); }
  .nav__list a { display: block; padding: .9rem 0; font-size: 1rem; border-bottom: none; }
  .nav__list a[aria-current="page"] { color: var(--brown); }
  .nav__list .nav__cta { border-top: none; padding-top: 1rem; }
  .nav__list .nav__cta--give { padding-top: .6rem; }
  .nav__list .nav__cta a { text-align: center; }
}

@media (max-width: 30rem) {
  .brand { gap: .6rem; }
  .brand__seal { width: 44px; height: 44px; }
  .brand__name { font-size: .9375rem; }
  .brand__tag { display: none; }
}

@media (min-width: 60rem) {
  /* The name sits right at the wrap threshold; keep it on one line where
     the full nav is shown. */
  .brand__name { white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--brown-dark); color: var(--white); }

/* The photo is zoomed around the "Bidwell United Presbyterian Church"
   lettering on the building, which sits at 50.6% / 45.7% of the source image.
   --hx/--hy move that point within the hero; --hz is the zoom. */
.hero__media {
  position: absolute; inset: 0; overflow: hidden;
  isolation: isolate;          /* keeps the grain's blend inside the photo */
  --hx: 0%; --hy: 0%; --hz: 1;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50.6% 45.7%;
  transform-origin: 50.6% 45.7%;
  transform: translate(var(--hx), var(--hy)) scale(var(--hz));
  opacity: .78;
}
/* Warm the photo toward the palette and keep the text legible. */
.hero__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg,
    rgba(63,40,25,.94) 0%, rgba(63,40,25,.86) 38%,
    rgba(63,40,25,.35) 58%, rgba(63,40,25,.12) 100%);
}
/* Film grain, applied at screen resolution so it stays fine at any zoom. */
.hero__media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  /* Gaussian noise centered on 50% gray: overlay-neutral, so it adds texture
     without brightening the photo. Tile is 160px; pixelated keeps it crisp. */
  background-image: url("../img/grain.png");
  background-size: 160px 160px;
  image-rendering: pixelated;
  mix-blend-mode: overlay;
  opacity: .28;
}

.hero__seal { width: 112px; height: 112px; margin-bottom: 1.5rem;
              filter: drop-shadow(0 6px 18px rgba(0,0,0,.35)); }
.hero__inner {
  position: relative;
  padding-block: clamp(4rem, 12vw, 8.5rem);
}
/* Text holds the left of the page grid; the building fills the right. */
.hero__inner > * { max-width: 34rem; }
.hero h1 { color: var(--white); margin-bottom: .35em; }
.hero__eyebrow { color: var(--gold-light); }
.hero p { color: rgba(255,255,255,.9); font-size: 1.1875rem; }
.hero .btn-row { margin-top: 2rem; }

/* Wide screens: building and its name on the right third. */
@media (min-width: 52rem) {
  .hero__media { --hx: 30%; --hy: -2%; --hz: 2; }   /* narrower desktops: clear the text */
}
@media (min-width: 72rem) {
  .hero__media { --hx: 24%; }
}
/* Phones and small tablets: text on top, the building and its name below. */
@media (max-width: 51.99rem) {
  .hero__inner { padding-bottom: 17rem; }
  .hero__media { --hx: 0%; --hy: 34%; --hz: 1.9; }
  .hero__media::after {
    background: linear-gradient(180deg,
      rgba(63,40,25,.94) 0%, rgba(63,40,25,.86) 52%,
      rgba(63,40,25,.3) 72%, rgba(63,40,25,.1) 100%);
  }
}

/* Compact hero for interior pages */
.page-hero {
  background: var(--brown-dark);
  color: var(--white);
  border-bottom: 3px solid var(--gold);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}
.page-hero h1 { color: var(--white); }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero p { color: rgba(255,255,255,.88); max-width: var(--measure-text); margin-bottom: 0; }

/* ---------- Service times bar ---------- */
.times { background: var(--stone); border-bottom: 1px solid var(--rule); }
.times__grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding-block: 2.5rem;
}
.times__item { border-left: 3px solid var(--gold); padding-left: 1rem; }
.times__label { font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; margin: 0 0 .3rem; }
.times__when { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; margin: 0; }
.times__note { font-size: .875rem; color: var(--ink-soft); margin: .25rem 0 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  list-style: none; margin: 0; padding: 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
  padding: 1.75rem;
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .9688rem; }
.card__link { margin-top: auto; padding: 1rem 0 .4rem; font-weight: 600; font-size: .9375rem; text-decoration: none; }
.card__link::after { content: " →"; }
.card__link:hover { text-decoration: underline; }

/* ---------- Two-column feature ---------- */
.split {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1.15fr .85fr; }
  .split--reverse > :first-child { order: 2; }
}

.pullquote {
  border-left: 3px solid var(--gold);
  padding: .25rem 0 .25rem 1.5rem;
  margin: 2rem 0;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-style: italic;
  color: var(--ink-soft);
}
.pullquote cite { display: block; margin-top: .75rem; font-size: .875rem; font-style: normal; font-family: var(--font-body); color: var(--ink-soft); }

/* Scripture / callout box */
.callout {
  background: var(--stone);
  border: 1px solid var(--rule);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.callout p:first-of-type { font-family: var(--font-display); font-size: 1.0625rem; }

/* ---------- Definition-style ministry list ---------- */
.entries { margin: 0; padding: 0; list-style: none; }
.entries > li { padding-block: 1.75rem; border-top: 1px solid var(--rule); }
.entries > li:last-child { border-bottom: 1px solid var(--rule); }
.entries h3 { margin-bottom: .4rem; }
.entries p { color: var(--ink-soft); max-width: var(--measure-text); }

/* ---------- Compact bulleted list ---------- */
.bullets { list-style: none; margin: 0; padding: 0; max-width: var(--measure-text); }
.bullets > li { position: relative; padding: .8rem 0 .8rem 1.5rem; border-bottom: 1px solid var(--rule); }
.bullets > li:first-child { border-top: 1px solid var(--rule); }
.bullets > li::before {
  content: ""; position: absolute; left: 0; top: 1.45rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold);
}
.bullets strong { font-family: var(--font-display); font-weight: 600; }
.bullets span { color: var(--ink-soft); }

/* ---------- Expandable roster (leadership page) ---------- */
.roster { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.roster > li { border-bottom: 1px solid var(--rule); }

.roster summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0; cursor: pointer;
  list-style: none;                 /* Firefox */
}
.roster summary::-webkit-details-marker { display: none; }   /* Safari/Chrome */
.roster summary:hover .roster__name { color: var(--brown); }
.roster summary:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.roster__name {
  display: block;
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 600;
  color: var(--ink); line-height: 1.3;
  transition: color .15s ease;
}
.roster__years {
  display: block; margin-top: .3rem;
  font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--brown);
}
.roster__chev {
  flex: none; margin-top: .55rem;
  width: .55rem; height: .55rem;
  border-right: 2px solid var(--brown); border-bottom: 2px solid var(--brown);
  transform: rotate(45deg); transform-origin: center;
  transition: transform .2s ease;
}
.roster details[open] .roster__chev,
.roster > li > details[open] .roster__chev { transform: rotate(-135deg); }

.roster__body { padding: 0 0 1.5rem; max-width: var(--measure-text); }
.roster__body p { color: var(--ink-soft); }
.roster__body .pullquote { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .roster__chev { transition: none; } }

/* ---------- Timeline (history page) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--stone-mid); }
.timeline > li { position: relative; padding: 0 0 2.25rem 1.75rem; }
.timeline > li::before {
  content: ""; position: absolute; left: -7px; top: .45rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--brown); border: 2px solid var(--white);
}
.timeline__year {
  display: block; font-family: var(--font-body); font-size: .8125rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--brown); margin-bottom: .35rem;
}
.timeline h3 { font-size: 1.125rem; margin-bottom: .35rem; }
.timeline p { color: var(--ink-soft); font-size: .9688rem; max-width: var(--measure-text); }

/* ---------- Events ---------- */
.event {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  padding: 1.75rem;
}
@media (min-width: 42rem) { .event { grid-template-columns: 9rem 1fr; } }
.event__date { font-family: var(--font-display); }
.event__month { display: block; font-size: .8125rem; letter-spacing: .12em; text-transform: uppercase; color: var(--brown); font-weight: 700; font-family: var(--font-body); }
.event__day { display: block; font-size: 2.5rem; font-weight: 600; line-height: 1; }
.event__year { display: block; font-size: .875rem; color: var(--ink-soft); font-family: var(--font-body); }
.event h3 { margin-bottom: .35rem; }
.event__meta { font-size: .875rem; color: var(--ink-soft); margin-bottom: .75rem; }

/* ---------- Contact / visit ---------- */
.info-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.info-grid h3 { font-size: 1.0625rem; margin-bottom: .4rem; }
.info-grid p, .info-grid address { font-style: normal; color: var(--ink-soft); }

/* Static map: always renders, never hijacks scrolling, and tapping it opens directions. */
.getting-here {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 52rem) { .getting-here { grid-template-columns: .8fr 1.2fr; } }
.getting-here address { font-style: normal; color: var(--ink-soft); margin: 1rem 0 1.5rem; }
.map { margin: 0; }
.map__link { display: block; border: 1px solid var(--rule); overflow: hidden; }
.map__link img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9; object-fit: cover;
  object-position: 46.5% 55%;          /* the pin */
  transition: transform .3s ease;
}
.map__link:hover img { transform: scale(1.02); }
@media (max-width: 42rem) { .map__link img { aspect-ratio: 4 / 3; } }
@media (prefers-reduced-motion: reduce) { .map__link img { transition: none; } }
.map figcaption { margin-top: .5rem; font-size: .75rem; color: var(--ink-soft); text-align: right; }
.map figcaption a { color: inherit; }

/* ---------- CTA band ---------- */
.band { background: var(--brown); color: var(--white); }
.band h2 { color: var(--white); }
.band p { color: rgba(255,255,255,.9); max-width: var(--measure-text); }
.band a:not(.btn) { color: var(--white); }
.band .btn-row { margin-top: 1.75rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brown-dark); color: rgba(255,255,255,.75); font-size: .9375rem; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2, .site-footer h3 { color: var(--white); }
.footer__grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding-block: 3.5rem 2.5rem;
}
@media (min-width: 60rem) {
  .footer__grid { grid-template-columns: 1.25fr .95fr 1.3fr .7fr; }
}
.site-footer address { font-style: normal; }
.footer__grid h3 { color: var(--gold-light); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; margin-bottom: 1rem; }
.footer__list { list-style: none; margin: 0; padding: 0; }
.footer__list li + li { margin-top: .55rem; }
@media (max-width: 60rem) {
  /* Thumb-sized rows for standalone links on phones and tablets */
  .footer__list a, .site-footer address a, .link-list a { display: inline-block; padding-block: .65rem; }
  .footer__list li:has(> a) + li { margin-top: 0; }
}
.link-list { padding-left: 1.2rem; }
.footer__seal { width: 72px; height: 72px; margin-bottom: 1rem; }
.footer__brand-name { font-family: var(--font-label); font-weight: 700; font-size: 1.125rem; color: var(--white); margin-bottom: .5rem; }
.footer__bottom {
  position: relative;
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between;
  font-size: .875rem;
}
.footer__bottom p { margin: 0; }
/* Rule spans the content column, not the gutters. */
.footer__bottom::before {
  content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter);
  height: 1px; background: rgba(226,184,101,.25);
}

