/* ==========================================================================
   2nd Chapter Church — Core Styles (Header, Nav, Footer, Utilities)
   File: /assets/css/2nd-styles.css
   ==========================================================================

   CONTENTS
   01) Reset & Tokens
   02) Base & Utilities
   03) Header (dark) + Primary Nav
   04) Dropdown Menus
   05) Mobile Menu (drawer)
   06) Footer (professional / white)
   07) Buttons & Links
   08) Accessibility & Motion
   ========================================================================== */


/* ========================================================================== */
/* 01) RESET & TOKENS                                                         */
/* ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

:root{
  /* Surfaces */
  --page-bg: #ffffff;
  --panel:   #ffffff;

  /* Text */
  --txt:     #0d1321;
  --muted:   #000000;

  /* Brand */
  --brand:   #0b5cff;
  --brand-2: #1844b5;

  /* Header (dark) */
  --nav-bg:  #000000;   /* solid black bar */
  --nav-txt: #ffffff;   /* white items */
  --nav-muted:#b8c0d0;

  /* Footer */
  --foot-bg: #f5f7fb;
  --foot-sub:#114abb;

  /* Layout tokens */
  --container: 1100px;
  --r: 16px; /* radius */
  --shadow: 0 10px 30px rgba(2,10,40,.10);
  --ring: 0 0 0 3px rgba(11,92,255,.35);

  /* Type scale */
  --fs-0: clamp(14px, 3.2vw, 16px);
  --fs-1: clamp(16px, 3.6vw, 18px);
  --fs-2: clamp(20px, 4.8vw, 24px);
  --fs-3: clamp(24px, 6vw, 32px);
}


/* ========================================================================== */
/* 02) BASE & UTILITIES                                                       */
/* ========================================================================== */

body {
  background: var(--page-bg);
  color: var(--txt);
  font: 400 var(--fs-0)/1.55 system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: min(var(--container), 92vw);
  margin-inline: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }


/* ========================================================================== */
/* 03) HEADER (dark) + PRIMARY NAV                                            */
/* ========================================================================== */

header.site {
  background: var(--nav-bg);
  color: var(--nav-txt);
  position: relative;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

header.site .site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

header.site .logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

header.site .logo img {
  width: 44px; height: 44px;
  border-radius: 10px;
  flex: 0 0 44px;
  background: #111;
}

header.site .brand h1 {
  font-size: 18px;
  line-height: 1.1;
  margin: 0;
  color: var(--nav-txt);
  font-weight: 700;
  letter-spacing: .2px;
}

header.site .brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--nav-muted);
}

/* Primary nav base */
.site-nav { color: var(--nav-txt); }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { color: var(--nav-txt); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* Desktop spacing (applied at >= 900px) */
@media (min-width: 900px) {
  .site-nav > ul {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .site-nav > ul > li > a,
  .site-nav > ul > li > button.dd-toggle {
    padding: 10px 8px;
    border-radius: 10px;
    font-size: 15px;
  }
}

/* CTA in nav */
.site-nav .cta .btn {
  margin-left: 4px;
}

/* Mobile menu toggle */
.nav-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--nav-txt);
  width: 42px; height: 42px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255,255,255,.06); }

/* Show/hide toggle by breakpoint */
@media (min-width: 900px) { .nav-toggle { display: none; } }
@media (max-width: 899.98px) { .nav-toggle { display: inline-flex; } }


/* ========================================================================== */
/* 04) DROPDOWN MENUS                                                         */
/* ========================================================================== */

.has-dd { position: relative; }

.dd-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--nav-txt);
  cursor: pointer;
  font: inherit;
  display: inline-flex; align-items: center; gap: 6px;
}

.caret { display: inline-block; transform: translateY(-1px); }

/* Panel */
.dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: 220px;
  background: #0e0e0e;
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  z-index: 100;
}

.dropdown li a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #fff;
}
.dropdown li a:hover { background: rgba(255,255,255,.06); text-decoration: none; }

/* Open state (via JS toggling .is-open) */
.dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

/* Hover fallback (desktop only) */
@media (min-width: 900px) {
  .has-dd:hover > .dropdown {
    opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s;
  }
}


/* ========================================================================== */
/* 05) MOBILE MENU (drawer)                                                   */
/* ========================================================================== */

/* The header script uses [hidden] on small screens; respect it. */
.site-nav[hidden] { display: none !important; }

@media (max-width: 899.98px) {
  .site-nav {
    position: absolute;
    left: 0; top: 100%;
    width: 100%;
    background: #0b0b0b;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
  }

  .site-nav ul {
    display: grid;
    gap: 2px;
    padding: 10px;
  }

  .site-nav > ul > li > a,
  .site-nav > ul > li > .dd-toggle {
    display: block;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border-radius: 12px;
    font-size: 16px;
  }

  /* Mobile dropdown shown inline under its toggle */
  .dropdown {
    position: static;
    transform: none;
    border: 0;
    border-radius: 12px;
    background: rgba(255,255,255,.04);
    padding: 4px;
    margin: 6px 0 0 0;
    opacity: 1; visibility: visible; /* controlled by .is-open visibility of parent group */
  }

  .dropdown:not(.is-open) { display: none; }
}

/* When JS sets .is-open on nav itself, make sure it's visible (safety) */
.site-nav.is-open { display: block; }
/* === (A) Tokens: add a nav height to reuse for anchors ==================== */
:root{
  /* ...your existing tokens... */
  --nav-h: 68px; /* matches .site-bar min-height */
}
/* ========================================================================== */
/* === (B) Make the header sticky at the very top =========================== */
/* REPLACE your current `header.site { ... }` block with this one */
/* ========================================================================== */
header.site {
  background: var(--nav-bg);
  color: var(--nav-txt);

  /* Sticky behavior */
  position: sticky;
  top: 0;               /* stays glued to the top */
  z-index: 1000;        /* above page content; dropdowns are children so they still layer over */

  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

/* Keep your existing .site-bar rule; just ensure its height is set via min-height */
header.site .site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--nav-h); /* was 68px; now uses the token */
}

/* === (C) Mobile drawer stays attached under the sticky header ============= */
@media (max-width: 899.98px) {
  .site-nav {
    position: absolute; /* relative to the sticky header */
    left: 0; top: 100%; /* sits directly below the bar */
    width: 100%;
    background: #0b0b0b;
    border-top: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
  }
}

/* === (D) Prevent headings/anchors from hiding under the sticky bar ======== */
html { scroll-padding-top: calc(var(--nav-h) + 8px); } /* smooth in-page jumps */

/* Optional: slightly stronger shadow once you’ve scrolled (tiny enhancement)
   If you want this effect, add the JS below to toggle .is-scrolled on the header. */
header.site.is-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,.2); }


/* ========================================================================== */
/* 06) FOOTER (professional / white)                                          */
/* ========================================================================== */

.site-footer {
  background: var(--foot-bg);
  color: var(--txt);
  border-top: 1px solid #e9eef5;
 margin-top: 0px;
}

.site-footer a{
    color:#ffffff;
    text-decoration: none;
}

.footer-grid {
  display: grid;
  gap: 30px;
  padding: 36px 0;
  grid-template-columns: 1fr;
}

.site-footer .logo {
  display: inline-flex; align-items: center; gap: 12px;
  color: inherit;
  text-decoration: none;
  margin-bottom: 10px;
}

.site-footer .logo img {
  width: 40px; height: 40px; border-radius: 10px; background: #111;
}

.site-footer .brand h3 {
  font-size: 18px; margin: 0; line-height: 1.1; font-weight: 700;
}
.site-footer .brand p {
  margin: 2px 0 0; font-size: 12px; color: var(--muted);
}

.site-footer .blurb { color: var(--muted); margin: 10px 0 0; max-width: 520px; }

.site-footer h4 {
  font-size: 14px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--txt); margin: 0 0 10px;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer a { color: var(--brand-2); }
.site-footer a:hover { text-decoration: underline; }

.social { display: flex; gap: 10px; margin-top: 12px; }
.social a {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: #f1f4f9; color: #0b1220;
}
.social a:hover { background: #e7ecf6; text-decoration: none; }

.subfooter {
  background: var(--foot-sub);
  border-top: 1px solid #e9eef5;
  padding: 12px 0;
  font-size: 13px;
  color: var(--muted);
}

.subfooter .subflex {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

.to-top { color: var(--brand-2); text-decoration: none; }
.to-top:hover { text-decoration: underline; }

/* Footer grid at tablet/desktop */
@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.2fr .8fr .8fr .8fr;
  }
}


/* ========================================================================== */
/* 07) BUTTONS & LINKS                                                        */
/* ========================================================================== */

.btn {
  --btn-bg: #ffffff;
  --btn-txt: #0b1220;
  --btn-bd: rgba(11, 18, 32, .12);

  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-txt);
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(2,10,40,.04);
  transition: transform .06s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;
}

.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn-give {
  --btn-bg: linear-gradient(180deg, var(--brand) 0%, var(--brand-2) 100%);
  --btn-txt: #fff;
  --btn-bd: transparent;
  box-shadow: 0 8px 18px rgba(24,68,181,.25);
}
.btn-give:hover { box-shadow: 0 10px 24px rgba(24,68,181,.33); }

header.site a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 4px;
}


/* ========================================================================== */
/* 08) ACCESSIBILITY & MOTION                                                 */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Ensure contrast for header links on black */
header.site .site-nav a,
header.site .dd-toggle { color: #fff; }

/* Keyboard focus in dark header: increase visibility */
header.site :focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }

/* Small tweaks */
address { font-style: normal; color: var(--muted); }

/* ========================================================================== */
/* 09) ===== Hero: Video Backdrop with Centered Watermark =====               */
/* ========================================================================== */

.hero{
  position: relative;
  min-height: clamp(420px, 80vh, 900px);
  display: grid;
  place-items: center;
  background: #000;
  isolation: isolate;

  /* Tunables (override inline if needed) */
  --wm-size: min(90vw, 800px);
  --wm-opacity: .10;
  --wm-x: 50%;
  --wm-y: 75%;
}

.hero-video{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-overlay{
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(80% 60% at 50% 45%, rgba(255,255,255,.08), transparent 55%),
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.65));
}

.hero-center{
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 10vw;
  text-align: center;
}

.hero-mark{
  position: absolute;
  left: var(--wm-x);
  top:  var(--wm-y);
  transform: translate(-50%, -50%);
  width: var(--wm-size);
  max-width: 100%;
  height: auto;

  opacity: var(--wm-opacity);
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 34px rgba(0,0,0,.45));
}

/* Optional: pick blend mode via a class */
.hero--dark  .hero-mark { mix-blend-mode: screen; }   /* good for white mark */
.hero--light .hero-mark { mix-blend-mode: multiply; } /* good for black mark */

@media (max-width: 640px){
  .hero { --wm-size: min(90vw, 800px); }
}

@media (prefers-reduced-motion: reduce){
  .hero-video{ display: none; }
  .hero{ background: #0b0b0b url('/img/hero/hero-poster.jpg') center/cover no-repeat; }
}
/* Layer both items in the same grid cell */
.hero { display: grid; } /* you likely already have this */
.hero-content,
.hero-center { grid-area: 1 / 1; }

/* Move ONLY the text block to the left */
.hero-content{
  justify-self: start;       /* <-- pushes to the left edge */
  align-self: center;        /* vertically centers */
  text-align: left;
  max-width: min(66ch, 920px);
  margin-left: clamp(16px, 6vw, 96px);
  color: #fff;
  z-index: 2;
}

/* Keep watermark centered */
.hero-center{
  justify-self: center;
  align-self: center;
  z-index: 1;
}

/* Optional: deepen left-side contrast so text pops */
.hero-overlay{
  background:
    linear-gradient(90deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.18) 55%, rgba(0,0,0,.06) 85%, transparent 100%),
    radial-gradient(80% 60% at 50% 45%, rgba(255,255,255,.06), transparent 55%);
}
/* ===== Formats & Pricing (buy box) ===== */

.buy-box{ margin: 1rem 0 1.5rem; }

.price-cards{
  list-style: none;
  padding: 0; margin: 0;
  display: grid;
  gap: clamp(10px, 2.5vw, 14px);
  grid-template-columns: 1fr;
}
@media (min-width: 780px){
  .price-cards{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.price-card{
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 16px 18px;
  border-radius: 16px;                    /* generous radius */
  background: var(--card, #fff);
  border: 1px solid rgba(2,10,40,.08);
  box-shadow: var(--shadow, 0 6px 24px rgba(2,10,40,.08));
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.price-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(2,10,40,.12);
}
.price-card:focus{ outline: none; }
.price-card:focus-visible{
  box-shadow: 0 0 0 4px var(--ring, rgba(11,92,255,.25));
}

.price-top{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .35rem;
}
.format{ font-weight: 800; letter-spacing: .015em; }
.price{ font-weight: 800; font-size: 1.1rem; }

.note{
  color: var(--muted, #4a5670);
  font-size: .95rem;
  min-height: 1.2em;                      /* keeps height even when empty */
}

/* Optional: highlight the first card (Kindle) lightly in brand tint */
.price-cards li:first-child .price-card{
  background: linear-gradient(0deg, rgba(11,92,255,.06), rgba(11,92,255,.06)), var(--card, #fff);
  border-color: rgba(11,92,255,.22);
}

/* Screen-reader only (utility) */
.sr-only{
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Optional dark theme adjustments */
@media (prefers-color-scheme: dark){
  .price-card{
    background: var(--panel, #0f1525);
    border-color: rgba(255,255,255,.08);
    box-shadow: none;
  }
  .note{ color: rgba(255,255,255,.72); }
}
.pastors { margin-top: clamp(24px, 5vw, 48px); }
.pastors-grid{
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px){
  .pastors-grid{ grid-template-columns: 0.9fr 1.1fr; }
}
.pastors-photo img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(2,10,40,.12);
  object-fit: cover;
}
.pastors-text h3{ margin: 0 0 .35rem; }
.pastors-text p{ margin: 0 0 .75rem; }


