/* ==========================================================
   Ophir Community — site styles
   Brand: black panel with sun pattern, magenta→purple→cyan
   frame, sunset sun gradient (magenta→red→orange→gold).
   ========================================================== */

:root {
  --ink: #0e0810;
  --panel: #160b15;
  --panel-2: #22101e;
  --cream: #fff7ee;
  --sand: #fbe9d7;
  --text: #2a1722;
  --muted: #6e5662;
  --line: #ecd8c6;

  --magenta: #e81e8c;
  --red: #f2333b;
  --orange: #f7821b;
  --gold: #fcc419;
  --purple: #8a2be2;
  --cyan: #1ec8f0;

  --sun: linear-gradient(180deg, var(--magenta), var(--red) 45%, var(--orange) 72%, var(--gold));
  --sun-h: linear-gradient(90deg, var(--magenta), var(--red) 40%, var(--orange) 70%, var(--gold));
  --frame: linear-gradient(90deg, var(--red), var(--magenta) 35%, var(--purple) 65%, var(--cyan));

  --radius: 14px;
  --max: 1180px;
  --shadow: 0 10px 30px rgba(40, 10, 30, .12);
  --font: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Marcellus", "Optima", "Candara", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img, video, iframe { max-width: 100%; display: block; }
a { color: var(--magenta); }
a:hover { color: var(--red); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; }
h3 { font-weight: 900; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase;
  background: var(--sun-h); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .75rem;
}
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- Dark "brand panel" with sun pattern ---------- */
.panel {
  position: relative;
  color: #fff;
  background-color: var(--ink);
  background-image:
    linear-gradient(90deg, rgba(110, 20, 90, .55), rgba(120, 60, 10, .45)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cg stroke='%23000' stroke-width='1.3' opacity='.85'%3E%3Cpath d='M11 3v16M3 11h16M5.3 5.3l11.4 11.4M16.7 5.3 5.3 16.7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 22px 22px;
}
.panel h2, .panel h3 { color: #fff; }
.panel p { color: rgba(255, 255, 255, .82); }
.framed { position: relative; border-radius: 6px; }
.framed::before {
  content: ""; position: absolute; inset: 0; padding: 4px; border-radius: inherit;
  background: var(--frame);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px;
  font: 900 .95rem/1 var(--font); letter-spacing: .03em;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn--sun { background: var(--sun-h); color: #fff; box-shadow: 0 8px 22px rgba(232, 30, 140, .35); }
.btn--sun:hover { color: #fff; box-shadow: 0 12px 28px rgba(232, 30, 140, .45); }
.btn--ghost { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .2); }
.btn--outline { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--text); }
.btn--outline:hover { background: var(--text); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 8, 16, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--frame); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; line-height: 1; color: #fff; }
.brand-name small { display: block; font-family: var(--font); font-size: .62rem; font-weight: 900; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: .55em .9em; border-radius: 999px;
  color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 700; font-size: .95rem;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-links .btn { margin-left: 8px; padding: .7em 1.2em; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 12px 16px 20px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .9em 1em; border-radius: 10px; }
  .nav-links .btn { margin: 10px 0 0; justify-content: center; }
}

/* ---------- Hero (brand banner image) ---------- */
.hero { position: relative; background: var(--ink); }
.hero-banner {
  width: 100%; height: auto; max-height: 82vh;
  object-fit: cover; object-position: 50% 48%;
}
.hero-band { text-align: center; padding: 34px 0 96px; }
.hero-band::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--frame); }
.hero-sub { max-width: 640px; margin: 0 auto 24px; font-size: 1.15rem; color: rgba(255, 255, 255, .92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.page-hero { padding: 84px 0 64px; text-align: center; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: .2em; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: -54px; position: relative; z-index: 5; }
.stat { text-align: center; padding: 30px 16px; background: #fff; box-shadow: var(--shadow); }
.stat:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.stat:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat strong {
  display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1.1;
  background: var(--sun); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { font-size: .9rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(1) { border-radius: var(--radius) 0 0 0; }
  .stat:nth-child(2) { border-radius: 0 var(--radius) 0 0; }
  .stat:nth-child(3) { border-radius: 0 0 0 var(--radius); border-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-radius: 0 0 var(--radius) 0; border-top: 1px solid var(--line); }
}

/* ---------- About / split ---------- */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.split h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.lead { font-size: 1.2rem; color: var(--text); }
.split-art { aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center; padding: 40px; }
.split-art img { width: 70%; filter: drop-shadow(0 16px 40px rgba(0, 0, 0, .5)); }
.split-art blockquote { margin: 26px 0 0; text-align: center; font-family: var(--font-display); font-size: 1.35rem; color: #fff; }
.split-art cite { display: block; font: 700 .85rem var(--font); color: var(--gold); margin-top: 8px; font-style: normal; letter-spacing: .1em; text-transform: uppercase; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 40px; } .split-art { aspect-ratio: auto; } }

/* ---------- Cards / pillars ---------- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.pillar { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 30px 26px; }
.pillar-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--sun); margin-bottom: 18px; }
.pillar-icon svg { width: 26px; height: 26px; color: #fff; }
.pillar h3 { font-size: 1.2rem; }
.pillar p { margin: 0; font-size: .98rem; }

/* ---------- Gallery ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  border: 0; cursor: pointer; padding: .55em 1.1em; border-radius: 999px;
  font: 700 .9rem var(--font); background: #fff; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line);
}
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--orange); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; box-shadow: none; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery-item {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--panel); font: inherit;
  box-shadow: 0 4px 14px rgba(40, 10, 30, .1);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 14px; text-align: left;
  color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.3;
  background: linear-gradient(180deg, transparent, rgba(14, 8, 16, .85));
}
.gallery-item figcaption small { display: block; font-weight: 400; opacity: .8; font-size: .8rem; margin-top: 2px; }
.play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -60%);
  width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sun-h); box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.play-badge svg { width: 24px; height: 24px; color: #fff; margin-left: 4px; }
.type-badge {
  position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase;
  background: rgba(14, 8, 16, .7); color: #fff;
}
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: rgba(10, 5, 10, .94); padding: 20px;
  align-items: center; justify-content: center; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox-stage { width: min(1100px, 100%); max-height: 78vh; display: grid; place-items: center; }
.lightbox-stage img, .lightbox-stage video { max-height: 78vh; width: auto; border-radius: 8px; }
.lightbox-stage .embed { width: 100%; aspect-ratio: 16 / 9; }
.lightbox-stage iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }
.lightbox-caption { color: #fff; text-align: center; margin-top: 16px; max-width: 760px; }
.lightbox-caption strong { display: block; font-size: 1.1rem; }
.lightbox-caption span { opacity: .75; font-size: .95rem; }
.lb-btn {
  position: absolute; background: rgba(255, 255, 255, .1); border: 0; color: #fff; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
}
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn svg { width: 24px; height: 24px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) { .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; } }

/* ---------- Blog ---------- */
.blog-toolbar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.blog-toolbar .filters { margin: 0; }
.search {
  flex: 0 1 300px; padding: .7em 1.1em; border-radius: 999px; border: 1.5px solid var(--line);
  font: 1rem var(--font); background: #fff; color: var(--text);
}
.search:focus { outline: none; border-color: var(--orange); }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.post-card {
  display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .2s ease;
}
.post-card:hover { transform: translateY(-4px); color: inherit; }
.post-card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-meta { font-size: .82rem; color: var(--muted); font-weight: 700; letter-spacing: .04em; margin-bottom: 8px; }
.post-meta .tag { color: var(--magenta); text-transform: uppercase; letter-spacing: .1em; }
.post-card h3 { font-size: 1.3rem; margin-bottom: .4em; }
.post-card p { color: var(--muted); font-size: .98rem; flex: 1; }
.read-more { font-weight: 900; color: var(--magenta); font-size: .92rem; }

/* Single post */
.post-hero { padding: 72px 0 0; }
.post-hero .container { max-width: 820px; }
.post-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.post-cover { max-width: 1000px; margin: 40px auto 0; padding: 0 20px; }
.post-cover img { width: 100%; border-radius: var(--radius); aspect-ratio: 16 / 8; object-fit: cover; }
.prose { max-width: 720px; margin: 0 auto; padding: 48px 20px 24px; font-size: 1.1rem; }
.prose h2 { font-size: 1.8rem; margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 4px solid; border-image: var(--sun) 1;
  font-family: var(--font-display); font-size: 1.35rem; color: var(--text);
}
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.post-nav { max-width: 720px; margin: 0 auto; padding: 24px 20px 80px; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.post-nav a { text-decoration: none; font-weight: 700; max-width: 48%; }
.post-nav small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }

/* ---------- CTA / Contact ---------- */
.cta { text-align: center; }
.cta h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
.cta p { max-width: 640px; margin: 0 auto 28px; font-size: 1.1rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.contact-list svg { width: 22px; height: 22px; color: var(--orange); flex: none; margin-top: 3px; }
.form { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: .75em 1em; border: 1.5px solid var(--line); border-radius: 10px;
  font: 1rem var(--font); background: var(--cream); color: var(--text);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--orange); background: #fff; }
.field textarea { min-height: 140px; resize: vertical; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; gap: 0; } .form { padding: 24px 18px; } }

/* ---------- Footer ---------- */
.site-footer { padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: var(--gold); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-tag { font-family: var(--font-display); font-size: 1.3rem; color: #fff; margin-top: 16px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); }
.socials a:hover { background: var(--magenta); }
.socials svg { width: 18px; height: 18px; color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .88rem; color: rgba(255, 255, 255, .6); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Scripture quotes in posts */
.prose blockquote p { margin: 0 0 .4em; }
.prose blockquote cite { display: block; font: 900 .8rem/1.4 var(--font); font-style: normal; letter-spacing: .12em; text-transform: uppercase; color: var(--magenta); }
.prose hr { border: 0; height: 3px; width: 72px; margin: 2.4em 0; background: var(--sun-h); border-radius: 3px; }
