/* ==========================================================================
   Property of Jesus Christ Ministries - www.pojc.org
   Site stylesheet. Mobile-first; breakpoints at 640px, 900px, 1000px and
   1340px (below 1340px the navigation collapses into a menu button).
   ========================================================================== */

:root {
  --navy-900: #0b1626;
  --navy-800: #10203a;
  --navy-700: #1a2f52;
  --navy-500: #3b5687;
  --gold-600: #a9781f;
  --gold-500: #c8963e;
  --gold-300: #e6c88a;
  --gold-100: #f6ecd6;
  --cream: #faf7f1;
  --paper: #ffffff;
  --ink: #1d2433;
  --ink-soft: #4a5468;
  --line: #e4ddd0;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 58, .06), 0 2px 8px rgba(16, 32, 58, .05);
  --shadow-md: 0 6px 24px rgba(16, 32, 58, .12);
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --header-h: 68px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy-700); text-decoration-color: var(--gold-500); text-underline-offset: 3px; }
a:hover { color: var(--gold-600); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--navy-800); margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
h4 { font-size: 1.2rem; }
p { margin: 0 0 1.1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 780px; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--gold-500); color: var(--navy-900); padding: 10px 16px; z-index: 200; font-weight: 600; }
.skip:focus { left: 8px; top: 8px; }

.eyebrow { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-600); margin: 0 0 .9rem; }

/* ---------- Header / navigation ---------- */

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(11, 22, 38, .97); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(230, 200, 138, .18); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: #fff; }
.brand svg { width: 34px; height: 34px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.brand-sub { font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-300); margin-top: 3px; }

.nav-toggle { display: inline-flex; align-items: center; gap: 10px; background: transparent; border: 1px solid rgba(230, 200, 138, .45); color: #fff; font: 600 .85rem var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; border-radius: 999px; cursor: pointer; }
.nav-toggle .bars { width: 18px; height: 12px; position: relative; display: inline-block; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.nav-toggle .bars::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; border-top: 2px solid currentColor; }

.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy-900); border-bottom: 1px solid rgba(230, 200, 138, .2); max-height: calc(100vh - var(--header-h)); overflow-y: auto; box-shadow: var(--shadow-md); }
.nav.open { display: block; }
.nav ul { list-style: none; margin: 0; padding: 8px 20px 20px; }
.nav a { display: block; padding: 13px 4px; color: #e9edf5; text-decoration: none; font-size: 1rem; font-weight: 500; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-300); }

.site-header .wrap { max-width: 1400px; }
@media (min-width: 1340px) {
  .nav-toggle { display: none; }
  .nav { display: block; position: static; background: none; border: 0; box-shadow: none; overflow: visible; max-height: none; }
  .nav ul { display: flex; align-items: center; gap: 1px; padding: 0; }
  .nav a { padding: 8px 7px; font-size: .82rem; border: 0; border-radius: 8px; white-space: nowrap; position: relative; }
  .nav a[aria-current="page"]::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: 2px; height: 2px; background: var(--gold-500); border-radius: 2px; }
  .nav a.nav-cta { margin-left: 8px; border: 1px solid rgba(230, 200, 138, .55); border-radius: 999px; padding: 7px 14px; color: var(--gold-300); }
  .nav a.nav-cta:hover { background: var(--gold-500); color: var(--navy-900); border-color: var(--gold-500); }
}

/* ---------- Buttons ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--sans); letter-spacing: .02em; padding: 13px 24px; border-radius: 999px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-300); color: var(--navy-900); }
.btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy-900); }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); color: #fff; }
.btn-outline { border-color: var(--navy-700); color: var(--navy-800); background: transparent; }
.btn-outline:hover { background: var(--navy-800); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Hero (home) and banner (inner pages) ---------- */

.hero, .banner { position: relative; color: #fff; background: var(--navy-900) center / cover no-repeat; isolation: isolate; }
.hero::before, .banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11, 22, 38, .55) 0%, rgba(11, 22, 38, .62) 55%, rgba(11, 22, 38, .9) 100%); }
.hero { background-image: url("../img/hero-home.jpg"); padding: clamp(72px, 13vw, 150px) 0 clamp(64px, 10vw, 120px); text-align: center; }
.hero h1 { color: #fff; margin-bottom: .35em; text-shadow: 0 2px 24px rgba(0, 0, 0, .35); }
.hero .eyebrow { color: var(--gold-300); }
.hero .verse { font-family: var(--serif); font-style: italic; font-size: clamp(1.25rem, 2.6vw, 1.7rem); color: #f3ead7; margin: 0 auto 2rem; max-width: 34ch; }
.hero .verse cite { display: block; font-family: var(--sans); font-style: normal; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-300); margin-top: .7rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.banner { background-image: url("../img/hero-home.jpg"); padding: clamp(44px, 7vw, 84px) 0 clamp(36px, 5vw, 60px); }
.banner--water { background-image: url("../img/hero-water.jpg"); }
.banner h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: .3em; }
.banner .lead { color: #e7ebf3; max-width: 62ch; margin: 0; font-size: 1.08rem; }
.crumbs { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 1rem; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; color: var(--gold-300); }
.crumbs a { color: #dfe5f0; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--paper { background: var(--paper); border-block: 1px solid var(--line); }
.section--navy { background: var(--navy-800); color: #e7ebf3; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section-head { margin-bottom: clamp(24px, 4vw, 40px); }
.section-head.center { text-align: center; }
.section-head p { color: var(--ink-soft); max-width: 62ch; margin: 0; }
.section-head.center p { margin-inline: auto; }
.rule { width: 64px; height: 3px; background: var(--gold-500); border: 0; border-radius: 2px; margin: 0 0 1.4rem; }
.center .rule { margin-inline: auto; }

.prose p { font-size: 1.1rem; }
.prose .pull { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 3.2vw, 2.1rem); line-height: 1.3; color: var(--navy-800); border-left: 3px solid var(--gold-500); padding: .2em 0 .2em 1em; margin: 1.6em 0; }

/* ---------- Home: explore grid ---------- */

.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile a { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tile a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold-300); }
.tile-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--gold-100); color: var(--gold-600); display: grid; place-items: center; margin-bottom: 16px; }
.tile-icon svg { width: 22px; height: 22px; }
.tile h3 { font-size: 1.45rem; margin-bottom: .3em; }
.tile p { font-size: .95rem; color: var(--ink-soft); margin: 0 0 1rem; line-height: 1.55; }
.tile .more { margin-top: auto; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-600); }

/* ---------- Document library ---------- */

.toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.search { position: relative; flex: 1 1 260px; max-width: 420px; }
.search input { width: 100%; font: inherit; font-size: 1rem; padding: 12px 16px 12px 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); }
.search input:focus { outline: 2px solid var(--gold-500); outline-offset: 1px; border-color: var(--gold-500); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-soft); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 600 .82rem var(--sans); letter-spacing: .04em; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.count { font-size: .88rem; color: var(--ink-soft); margin: 0; }

.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .docs { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .docs { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .docs--4 { grid-template-columns: repeat(4, 1fr); } }
.doc[hidden], [data-group][hidden] { display: none; }
.doc a { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold-500); border-radius: 10px; padding: 16px 18px 14px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s; }
.doc a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-500); }
.doc-kind { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-600); }
.doc-title { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; line-height: 1.2; color: var(--navy-800); }
.doc-meta { margin-top: auto; padding-top: 6px; font-size: .82rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.doc-meta .fmt { margin-left: auto; font-weight: 700; font-size: .68rem; letter-spacing: .1em; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--navy-500); }
.badge-new { position: absolute; top: -9px; right: 12px; background: var(--gold-500); color: var(--navy-900); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.doc--feature a { border-left-width: 3px; background: linear-gradient(180deg, #fffdf8, var(--paper)); }
.empty { text-align: center; color: var(--ink-soft); padding: 32px 0; }

.subhead { display: flex; align-items: center; gap: 16px; margin: clamp(40px, 6vw, 64px) 0 20px; }
.subhead:first-child { margin-top: 0; }
.subhead h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.quote-card { background: var(--navy-800); color: #fff; border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); text-align: center; box-shadow: var(--shadow-md); }
.quote-card .eyebrow { color: var(--gold-300); }
.quote-card blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.35; }
.quote-card cite { display: block; margin-top: 1rem; font-family: var(--sans); font-style: normal; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold-300); }

/* ---------- Audio tracks ---------- */

.note, .prose .note { background: var(--gold-100); border-left: 3px solid var(--gold-500); border-radius: 0 10px 10px 0; padding: 16px 20px; font-family: var(--serif); font-style: italic; font-size: 1.2rem; line-height: 1.45; color: var(--navy-800); margin: 0 0 1.5rem; }
.note cite { display: block; font-family: var(--sans); font-style: normal; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); margin-top: .5rem; }

.album { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 24px; }
.album-head { background: var(--navy-800); color: #fff; padding: 16px 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.album-head h3 { color: #fff; margin: 0; font-size: 1.45rem; }
.album-head p { margin: 0; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-300); }
.tracks { list-style: none; margin: 0; padding: 0; }
.track { display: grid; grid-template-columns: 1fr; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); position: relative; }
.track:first-child { border-top: 0; }
.track-info { display: flex; gap: 14px; align-items: flex-start; }
.track-num { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--gold-100); color: var(--gold-600); font-weight: 700; font-size: .85rem; display: grid; place-items: center; margin-top: 2px; }
.track-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--navy-800); margin: 0; line-height: 1.2; }
.track-title a { color: inherit; text-decoration: none; }
.track-title a:hover { color: var(--gold-600); text-decoration: underline; }
.track-title .tag-new { font: 700 .62rem var(--sans); letter-spacing: .14em; text-transform: uppercase; background: var(--gold-500); color: var(--navy-900); padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.track-meta { margin: 2px 0 0; font-size: .84rem; color: var(--ink-soft); }
.track audio { width: 100%; height: 40px; }
.track-actions { display: flex; align-items: center; }
@media (min-width: 900px) {
  .track { grid-template-columns: minmax(0, 1.1fr) minmax(260px, 1fr) auto; align-items: center; gap: 20px; }
}
.album-foot { border-top: 1px solid var(--line); padding: 16px 22px; background: #fdfbf6; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: .95rem; }

/* ---------- Make a difference ---------- */

.causes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .causes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .causes { grid-template-columns: repeat(3, 1fr); } }
.cause a { display: flex; gap: 16px; align-items: center; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s, border-color .2s; }
.cause a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--gold-300); }
.cause .tile-icon { margin: 0; flex-shrink: 0; }
.cause-title { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--navy-800); line-height: 1.2; display: block; }
.cause-host { font-size: .8rem; color: var(--ink-soft); display: block; margin-top: 4px; word-break: break-word; }

/* ---------- About ---------- */

.about-grid { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; } }
.portrait { margin: 0; background: var(--paper); padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md); max-width: 380px; margin-inline: auto; }
@media (min-width: 900px) { .portrait { position: sticky; top: calc(var(--header-h) + 24px); } }
.portrait img { border-radius: 8px; width: 100%; }
.portrait figcaption { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.1rem; padding: 10px 0 2px; color: var(--ink-soft); }
.bio + .bio { margin-top: 40px; padding-top: 40px; border-top: 1px solid var(--line); }

/* ---------- Initiative / call to action ---------- */

.initiative { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .initiative { grid-template-columns: 1fr 1fr; gap: 56px; } }
.initiative-logo { display: block; background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-md); }
.initiative-logo img { margin-inline: auto; }
.section--navy p { color: #d5dcea; }
.follow { text-align: center; padding: 36px 0; }

/* ---------- Simple pages (404, 500, tell a friend) ---------- */

.simple { text-align: center; padding: clamp(64px, 12vw, 140px) 0; }
.simple .code { font-family: var(--serif); font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--gold-500); margin: 0 0 .1em; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(22px, 4vw, 36px); max-width: 520px; margin: 0 auto; text-align: left; }
.form-card label { display: block; font-size: .88rem; font-weight: 600; margin: 0 0 6px; }
.form-card input[type="text"], .form-card input[type="email"] { width: 100%; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; background: #fff; }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy-900); color: #b9c3d6; padding: clamp(40px, 6vw, 64px) 0 24px; font-size: .94rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 48px; } }
.site-footer h2 { font-family: var(--sans); font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-300); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #dfe5f0; text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); text-decoration: underline; }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand p { margin: 0 0 .8em; max-width: 34ch; }
.footer-motto { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: #f3ead7; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .82rem; color: #8f9bb3; }
.footer-bottom p { margin: 0; }

@media (max-width: 420px) {
  .brand-name { font-size: 1.08rem; }
  .brand-sub { letter-spacing: .24em; }
  .nav-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .nav-toggle { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .toolbar, .hero-actions, audio { display: none !important; }
  body { background: #fff; }
  .hero, .banner { background: none; color: #000; padding: 0 0 16px; }
  .hero::before, .banner::before { display: none; }
  .hero h1, .banner h1 { color: #000; }
}
