/* ═══════════════════════════════════════════════════════════════════════
   Renovation Church — shared styles (every page)
   Dark theme · brand gold #fecc2f · no build step, no frameworks.
   ═══════════════════════════════════════════════════════════════════════ */

/* ---- Fonts (self-hosted) ---- */
@font-face { font-family: 'Metropolis'; src: url('../assets/fonts/Metropolis-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Metropolis'; src: url('../assets/fonts/Metropolis-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Proxima'; src: url('../assets/fonts/pn.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Proxima'; src: url('../assets/fonts/pnb.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;

  /* Brand */
  --gold: #fecc2f;
  --gold-deep: #daa709;
  --gold-soft: rgba(254, 204, 47, 0.16);

  /* Surfaces (dark) */
  --bg: #0d0e0d;
  --bg-raised: #151615;
  --bg-card: #1c1d1c;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);

  /* Text */
  --fg: #f3efe6;
  --fg-muted: #a7a294;
  --fg-faint: #6f6b61;

  /* Ministry accents */
  --accent-purple: #c471d6;
  --accent-blue: #47b0e8;
  --accent-orange: #ef9c47;
  --accent-green: #5bc452;
  --accent-red: #ff6259;

  /* Type */
  --font-display: 'Metropolis', system-ui, sans-serif;
  --font-body: 'Proxima', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Rhythm */
  --wrap: 1180px;
  --wrap-wide: 1360px;
  --header-h: 74px;
  --gutter: clamp(1rem, 5vw, 4rem);
  --radius: 18px;
  --radius-lg: 28px;
  --section-y: clamp(4rem, 10vw, 8rem);

  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --shadow-gold: 0 20px 60px -20px rgba(254, 204, 47, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }

/* `hidden` always wins, even over components that set their own display
   (scheduled cards/blocks rely on this). */
[hidden] { display: none !important; }
/* Scheduled content waits for its first check (js/site.js) so nothing
   expired flashes on load. */
html.sched-wait [data-show-from], html.sched-wait [data-show-until] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- Layout ---- */
.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.wrap-wide { width: min(var(--wrap-wide), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: var(--section-y); }
/* Inner pages: clear the fixed header. */
.below-header { padding-top: calc(var(--header-h) + var(--banner-h, 0px)); }

.eyebrow {
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em;
  font-size: 0.74rem; color: var(--gold);
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: #111; padding: 0.75rem 1rem; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---- Buttons ---- */
.btn {
  --btn-bg: var(--fg);
  --btn-fg: #111;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 2px solid var(--btn-bg);
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn--gold { --btn-bg: var(--gold); --btn-fg: #111; }
.btn--gold:hover { box-shadow: var(--shadow-gold); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--fg); border-color: rgba(255, 255, 255, 0.55); }
.btn--ghost:hover { border-color: var(--fg); background: rgba(255, 255, 255, 0.08); box-shadow: none; }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Photo / block placeholders — intentional, swap for real content. */
.ph {
  display: grid; place-items: center; min-height: 220px;
  background: linear-gradient(135deg, #1f211f, #141514);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--fg-faint);
}
.ph::after {
  content: attr(data-label);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}

/* ═══════════════════════ PAGE TOP (secondary pages) ═══════════════════════
   <section class="page-hero">
     <img class="page-hero__img" src="/assets/img/…jpg" alt="">   ← optional photo
     <div class="wrap-wide"> eyebrow, <h1 class="page-hero__title">, … </div>
   </section>
   Use with <site-header> (not `solid`). Leave out the <img> for a plain top.
   (/teachings and /thursology have their own player tops instead.) */
.page-hero {
  padding-top: calc(var(--header-h) + var(--banner-h, 0px) + clamp(2rem, 6vw, 4.5rem));
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
  background: radial-gradient(60% 120% at 0% 0%, rgba(254, 204, 47, 0.08), transparent 60%);
}
.page-hero__title {
  margin-top: 0.4rem;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.page-hero__lead { margin-top: 1rem; max-width: 60ch; color: var(--fg-muted); font-size: 1.1rem; }
.page-hero:has(.page-hero__img) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(62vh, 560px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--header-h) + var(--banner-h, 0px) + 4rem);
  padding-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: clamp(0.5rem, 2vw, 1.25rem);
  background: none;
}
.page-hero__img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
.page-hero:has(.page-hero__img)::before { /* darken so the words read; melt into the page */
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(8, 9, 8, 0.62) 0%, rgba(8, 9, 8, 0.2) 55%, rgba(8, 9, 8, 0) 100%),
    linear-gradient(to bottom, rgba(8, 9, 8, 0.35) 0%, rgba(8, 9, 8, 0) 30%, rgba(8, 9, 8, 0.45) 72%, var(--bg) 100%);
}
.page-hero:has(.page-hero__img) .page-hero__title { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4); }
.page-hero:has(.page-hero__img) .page-hero__lead { color: rgba(255, 255, 255, 0.85); }

/* ═══════════════════════ ANNOUNCEMENT BANNER ═══════════════════════ */
/* Set by js/site.js to the banner's height (0 when none is showing). */
:root { --banner-h: 0px; }

/* Hidden until js/site.js moves it into the pinned .aban stack. */
site-announcement { display: none; }
.aban { position: fixed; top: 0; left: 0; right: 0; z-index: 60; }
.aban site-announcement {
  display: block;
  /* Defaults. A style="" on the tag overrides these. */
  background-color: var(--gold);
  color: #111;
}
.aban site-announcement[hidden] { display: none; }
.aban__inner {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: min(var(--wrap-wide), 100% - var(--gutter) * 2);
  margin-inline: auto;
  min-height: 44px;
  padding-block: 0.6rem;
  color: inherit;
  text-align: center;
  font-weight: 700; font-size: 0.92rem; line-height: 1.35;
}
.aban__msg { text-wrap: balance; }
.aban__msg a { text-decoration: underline; }
.aban__arrow { flex: none; transition: transform 0.3s var(--ease); }
a.aban__inner:hover .aban__msg { text-decoration: underline; text-underline-offset: 3px; }
a.aban__inner:hover .aban__arrow { transform: translateX(4px); }
a.aban__inner:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }

/* ═══════════════════════════ HEADER ═══════════════════════════ */
site-header { display: contents; }

.hdr {
  position: fixed; top: var(--banner-h); left: 0; right: 0; z-index: 50;
  color: var(--fg);
  background-color: transparent;
  background-image: linear-gradient(to bottom, rgba(10, 10, 10, 0.6), rgba(10, 10, 10, 0));
  transition: background-color 0.4s var(--ease);
}
.hdr[data-scrolled], .hdr[data-solid] {
  background-color: color-mix(in srgb, #0a0b0a 88%, transparent);
  background-image: none;
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.hdr__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.hdr__logo { display: inline-flex; align-items: center; color: var(--fg); --wm-h: 24px; transform-origin: left center; transition: transform 0.3s var(--ease); }
.hdr__logo:hover { transform: scale(1.06); } /* stays white; grows a touch */
@media (prefers-reduced-motion: reduce) { .hdr__logo { transition: none; } .hdr__logo:hover { transform: none; } }

.wm { display: block; width: auto; height: var(--wm-h, 26px); }
.wm-icon { fill: var(--wm-icon, var(--gold)); }

.hdr__nav { display: flex; gap: 0.35rem; margin-left: auto; }
.navitem { position: relative; }
.navitem > a {
  display: inline-block; padding: 0.6rem 0.85rem;
  font-weight: 700; font-size: 0.95rem; border-radius: 10px;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.navitem > a:hover, .navitem > a[aria-current='page'] { background: rgba(255, 255, 255, 0.1); color: #fff; }
.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; padding: 0.5rem; box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}
/* Invisible bridge so the pointer can travel from the link to the menu. */
.submenu::before { content: ''; position: absolute; inset: -8px 0 auto; height: 8px; }
.navitem:hover .submenu, .navitem:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a {
  display: block; padding: 0.6rem 0.85rem; font-size: 0.92rem; font-weight: 600; border-radius: 9px;
  transition: background-color 0.18s, color 0.18s;
}
.submenu a:hover { background: var(--gold-soft); color: var(--gold); }

.hdr__cta { padding: 0.65em 1.2em; font-size: 0.9rem; }

.hdr__burger {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; align-items: center; justify-content: center;
  margin-left: auto; background: none; border: 0; cursor: pointer;
}
.hdr__burger span { width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.25s var(--ease); }
.hdr[data-open] .hdr__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hdr[data-open] .hdr__burger span:nth-child(2) { opacity: 0; }
.hdr[data-open] .hdr__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.hdr[data-open] { background-color: #0a0b0a; background-image: none; }

/* Mobile drawer — outside <header> so the header's backdrop-filter
   doesn't become the containing block of this fixed panel. */
.drawer {
  position: fixed; inset: calc(var(--header-h) + var(--banner-h, 0px)) 0 0 0; z-index: 45;
  background: #0a0b0a;
  padding: 1.5rem var(--gutter) 3rem;
  overflow-y: auto;
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.drawer[data-show] { opacity: 1; transform: none; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer-row { opacity: 0; transform: translateY(16px); transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.drawer[data-show] .drawer-row { opacity: 1; transform: none; transition-delay: calc(var(--i) * 55ms + 130ms); }
.drawer__link, .macc__head {
  font-family: var(--font-display); font-weight: 900; font-size: 1.5rem;
  color: inherit; padding: 1rem 0; border-bottom: 1px solid var(--line); text-align: left;
}
.macc__head {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer;
}
.macc__icon { position: relative; width: 20px; height: 20px; flex: none; }
.macc__icon::before, .macc__icon::after {
  content: ''; position: absolute; background: var(--gold); border-radius: 2px; transition: transform 0.35s var(--ease);
}
.macc__icon::before { left: 0; top: 9px; width: 20px; height: 2px; }
.macc__icon::after { left: 9px; top: 0; width: 2px; height: 20px; }
.macc[data-open] .macc__icon::before { transform: rotate(180deg); }
.macc[data-open] .macc__icon::after { transform: scaleY(0); }
.macc__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.38s var(--ease); }
.macc[data-open] .macc__panel { grid-template-rows: 1fr; }
.macc__inner { overflow: hidden; min-height: 0; display: flex; flex-direction: column; padding-left: 0.25rem; }
.macc__inner a { color: var(--fg-muted); font-weight: 600; padding: 0.55rem 0; }
.macc__inner a:hover { color: var(--gold); }
.macc__inner a:first-child { padding-top: 0.9rem; }
.macc__inner a:last-child { padding-bottom: 1.1rem; }
.drawer__cta { margin-top: 2rem; width: 100%; }

@media (max-width: 960px) {
  .hdr__nav, .hdr__cta { display: none; }
  .hdr__burger { display: flex; }
}

/* ═══════════════════════════ FOOTER ═══════════════════════════ */
site-footer { display: block; }

.foot { background: #0a0b0a; border-top: 1px solid var(--line); padding-top: clamp(3.5rem, 7vw, 5.5rem); }

.connect { padding-bottom: clamp(3rem, 6vw, 4.5rem); margin-bottom: clamp(3rem, 6vw, 4.5rem); border-bottom: 1px solid var(--line); }
.connect__title { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 2.2rem; }
.connect__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
.connect__sub { font-family: var(--font-display); font-weight: 900; font-size: 1.35rem; }
.connect__lead { color: var(--fg-muted); margin: 0.5rem 0 1.3rem; max-width: 40ch; }

.nl__chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.3rem; }
.chip {
  font-weight: 700; font-size: 0.9rem; line-height: 1;
  padding: 0.62em 1.05em; border-radius: 999px; cursor: pointer;
  color: var(--fg); background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  display: inline-flex; align-items: center; gap: 0.45em;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.chip:hover { border-color: var(--chip); color: #fff; transform: translateY(-1px); }
.chip::before { content: ''; width: 0; height: 0.9em; overflow: hidden; color: var(--chip); font-weight: 900; transition: width 0.2s var(--ease); }
.chip[aria-pressed='true'] { background: color-mix(in srgb, var(--chip) 22%, transparent); border-color: var(--chip); color: #fff; }
.chip[aria-pressed='true']::before { content: '✓'; width: 1em; }

.nl__row { display: flex; gap: 0.5rem; max-width: 480px; }
.nl__row input {
  flex: 1; min-width: 0; padding: 0.85em 1.1em; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05);
  color: var(--fg); font: inherit; font-size: 0.95rem;
}
.nl__row input::placeholder { color: var(--fg-muted); }
.nl__row input:focus { outline: none; border-color: var(--gold); }
.nl__submit { padding: 0.7em 1.4em; font-size: 0.95rem; white-space: nowrap; }
.nl__msg { min-height: 1.2em; margin-top: 0.85rem; font-size: 0.9rem; font-weight: 600; color: var(--fg-muted); }
.nl__msg.is-ok { color: var(--accent-green); }
.nl__msg.is-err { color: var(--accent-red); }

.connect__num { color: var(--gold); font-weight: 800; white-space: nowrap; }
.kw { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.kw__pill {
  padding: 0.6em 1.1em; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, 0.16);
  font-weight: 800; letter-spacing: 0.05em; font-size: 0.82rem;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.kw__pill:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }

.foot__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem; border-bottom: 1px solid var(--line);
}
.foot__logo { display: inline-flex; --wm-h: 26px; }
.foot__tag { margin-top: 1.1rem; max-width: 26ch; color: var(--fg-muted); }
.foot__soc { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.foot__soc a {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14); color: var(--fg-muted);
  transition: color 0.25s, border-color 0.25s, transform 0.25s;
}
.foot__soc a:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.foot__col h4 { font-family: var(--font-display); font-weight: 900; font-size: 1rem; margin-bottom: 1rem; }
.foot__col a, .foot__col p { display: block; color: var(--fg-muted); margin-bottom: 0.55rem; transition: color 0.2s; }
.foot__col a:hover { color: var(--gold); }
.foot__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding-block: 1.6rem; font-size: 0.85rem; color: var(--fg-muted);
}

@media (max-width: 760px) {
  .connect__grid { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
  .nl__row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-row { opacity: 1; transform: none; transition: none; }
  .macc__panel, .macc__icon::before, .macc__icon::after { transition: none; }
}
