/* Made New — components: header, footer, buttons, cards, accordion */

/* ---------- Site header (Bay Life chrome) ----------
   Fixed and transparent by default so it overlays the hero artwork
   underneath it, with the Bay Life logo and nav shown in white. A
   no-JS load, or once the hero has scrolled out of view, gets the
   solid "is-solid" treatment instead — this is the safe default the
   CSS ships with; js/header-scroll.js only ever adds is-overlay on
   top of it, never removes the solid fallback outright. */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--color-chrome-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}
.site-header.is-overlay {
  background: transparent;
  box-shadow: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-2);
}

.bay-life-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.bay-life-logo img {
  height: 34px;
  width: auto;
  display: block;
}
.bay-life-logo .logo-white { display: none; }
.site-header.is-overlay .bay-life-logo .logo-navy { display: none; }
.site-header.is-overlay .bay-life-logo .logo-white { display: block; }

/* Made New header logo — inline SVG themed with currentColor, so no
   separate colored file variants are needed. Solid header (default,
   no-JS-safe) shows it in the brand orange; the transparent overlay
   state (over the hero) shows it in white. */
.made-new-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--color-primary);
  transition: color var(--transition-base);
}
.site-header.is-overlay .made-new-logo { color: var(--color-white); }
.made-new-logo svg {
  height: 40px;
  width: auto;
  display: block;
}

.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--color-chrome-border);
  border-radius: var(--radius);
  color: var(--color-chrome-text);
  cursor: pointer;
  transition: border-color var(--transition-base), color var(--transition-base);
}
.nav__toggle svg { width: 22px; height: 22px; }
.site-header.is-overlay .nav__toggle {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--color-white);
}

.nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-chrome-bg);
  border-bottom: 1px solid var(--color-chrome-border);
}
.nav__list.is-open { display: flex; }

/* Mobile dropdown is always solid, so its links always stay dark for
   readability — regardless of the header's overlay state above it. */
.nav__list a {
  display: block;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--color-chrome-text);
  text-decoration: none;
  border-top: 1px solid var(--color-chrome-border);
}
.nav__list a:hover,
.nav__list a[aria-current="page"] {
  color: var(--color-primary);
}

@media (min-width: 768px) {
  .nav__toggle { display: none; }
  .nav__list {
    display: flex;
    flex-direction: row;
    position: static;
    border: none;
    background: none;
    gap: var(--space-4);
  }
  .nav__list a {
    padding: var(--space-1) 0;
    border: none;
    transition: color var(--transition-base);
  }
  /* Desktop nav sits directly on the transparent header, so it
     follows the overlay state; the mobile dropdown above never does. */
  .site-header.is-overlay .nav__list a {
    color: var(--color-white);
  }
  .site-header.is-overlay .nav__list a:hover,
  .site-header.is-overlay .nav__list a[aria-current="page"] {
    color: rgba(255, 255, 255, 0.8);
  }
}

/* ---------- Site footer (Bay Life chrome) ---------- */
.site-footer {
  background: var(--color-atmosphere) url("/img/brand/gradient-footer.jpg") center/cover no-repeat;
  color: var(--color-white);
  padding-block: var(--space-6);
  margin-top: var(--space-8);
}
.site-footer a { color: var(--color-white); }
.site-footer a:hover { color: var(--color-horizon-pale); }

.site-footer__grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.site-footer__heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--color-horizon-pale);
}

.site-footer__bay-life-logo {
  margin-bottom: var(--space-2);
}
.site-footer__bay-life-logo img { height: 30px; width: auto; display: block; }

.site-footer__meta {
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: var(--text-sm);
  opacity: 0.85;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
  padding: 0.85em 1.6em;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn--primary:hover { background: var(--color-primary-hover); color: var(--color-white); }

.btn--secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}
.btn--secondary:hover { background: var(--color-ink); color: var(--color-white); }

/* For CTAs sitting directly on the hero's orange gradient, where the
   default orange .btn--primary would blend into the background. */
.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
}
.btn--white:hover { background: var(--color-bg-alt); color: var(--color-primary-hover); }

.btn--outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--outline-white:hover { background: var(--color-white); color: var(--color-primary); }

.btn--disabled {
  background: var(--color-line);
  color: var(--color-ink-soft);
  border-color: var(--color-line);
  cursor: not-allowed;
  position: relative;
}
.btn--disabled:hover { background: var(--color-line); color: var(--color-ink-soft); }

/* Sits above the disabled button rather than crammed inside it, so
   neither the label nor the tag ever has to wrap mid-word. */
.coming-soon-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.3em 0.85em;
  border-radius: 999px;
  margin-bottom: var(--space-2);
  white-space: nowrap;
}

.btn--disabled { white-space: nowrap; }
.card .btn { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: var(--color-sunrise-deep) url("/img/brand/gradient-main.jpg") center/cover no-repeat;
  color: var(--color-white);
  padding-block: var(--space-12) var(--space-8);
}
.hero h1 { color: var(--color-white); }
.hero .eyebrow { color: var(--color-white); opacity: 0.9; }
.hero p { color: var(--color-white); font-size: var(--text-md); max-width: 42rem; }

/* Home page hero: leads with the campaign's own hand-built logotype
   rather than restating it in Gotham. */
.hero--brand {
  text-align: center;
  padding-block: var(--space-12) var(--space-10);
}
.hero--brand .eyebrow { text-align: center; }
.hero__lockup {
  width: min(90%, 420px);
  margin: var(--space-3) auto var(--space-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; max-width: 20rem; }
}
.hero__tagline {
  font-size: var(--text-lg);
  font-weight: 500;
  font-style: italic;
}
.hero--brand p:not(.hero__tagline) {
  margin-inline: auto;
}

.event-feature {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

.primer-rsvp {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}
.primer-rsvp h3 {
  font-size: var(--text-md);
  margin-bottom: var(--space-3);
}

/* ---------- Media split: text paired with a photo ---------- */
.media-split {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
.media-split img {
  width: 100%;
  border-radius: var(--radius-lg);
}
@media (min-width: 768px) {
  .media-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .media-split--reverse .media-split__media { order: 2; }
  .media-split--reverse .media-split__text { order: 1; }
}

/* ---------- Pastor's letter feature ---------- */
.letter-feature {
  display: grid;
  gap: var(--space-4);
}
.letter-feature__portrait {
  width: 100%;
  max-width: 220px;
  border-radius: var(--radius-lg);
}
.letter-feature__signature {
  width: 230px;
  margin-top: -1.25rem;
  margin-left: -0.5rem;
  display: block;
}
.letter-feature blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
}
.letter-feature blockquote p { margin-bottom: var(--space-2); }
@media (min-width: 768px) {
  .letter-feature {
    grid-template-columns: 220px 1fr;
    gap: var(--space-6);
    align-items: start;
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.card-grid {
  display: grid;
  gap: var(--space-3);
}
@media (min-width: 768px) {
  .card-grid--2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Accordion (native details/summary) ---------- */
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}
.accordion-item summary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  padding: var(--space-3) 0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after {
  content: "+";
  font-size: 1.4em;
  line-height: 1;
  color: var(--color-primary);
  flex-shrink: 0;
}
.accordion-item details[open] summary::after { content: "\2212"; }
.accordion-item .accordion-body {
  padding-bottom: var(--space-3);
  color: var(--color-text-muted);
}

/* ---------- Daily thought slot ---------- */
.daily-thought {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.daily-thought__verse {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-lg);
  font-style: italic;
  margin: 0 0 var(--space-1);
}
.daily-thought__ref {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------- RSVP embed area ---------- */
.rsvp-panel {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}
.rsvp-embed-frame {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  min-height: 600px;
}

/* ---------- TODO / placeholder markers ---------- */
.todo-flag {
  display: block;
  background: repeating-linear-gradient(
    45deg,
    #FFF4E0,
    #FFF4E0 10px,
    #FFE9C2 10px,
    #FFE9C2 20px
  );
  border: 2px dashed var(--color-sunrise-deep);
  border-radius: var(--radius);
  padding: var(--space-3);
  color: var(--color-ink);
  font-size: var(--text-sm);
}
.todo-flag strong {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8em;
  color: var(--color-sunrise-deep);
  display: block;
  margin-bottom: 0.3em;
}

/* ---------- Lightbox ---------- */
[data-lightbox] {
  transition: opacity var(--transition-fast);
}
[data-lightbox]:hover {
  opacity: 0.88;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 26, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}
.lightbox-overlay[hidden] { display: none; }

.lightbox-image {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-white);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

/* ---------- Photo pair: plan/historical image + real ministry photo ---------- */
.photo-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.photo-pair img {
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin: 0;
}
