﻿/* Shared stylesheet used by both the homepage and content pages.
   Page-specific rules are scoped using body classes:
   - Homepage: body.home-page
   - Content pages: body.content-page
*/

/* Basic reset + consistent sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

/* =========================
   Homepage (index.html)
   ========================= */

body.home-page {
  background-image: url("images/Lighthouse.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #ffffff;

  min-height: 100vh;
  min-height: 100svh;
}

body.home-page .page {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  padding: clamp(18px, 4vw, 60px);
}

body.home-page .main_heading {
  position: absolute;
  top: clamp(18px, 6vh, 64px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  width: min(1100px, 92vw);
}
body.home-page .main_heading h2 {
  margin: 0;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
  font-style: italic;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: capitalize;
  color: #ffffff;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}
body.home-page .main_heading h2:first-child {
  font-size: clamp(1.3rem, 2.4vw, 2.2rem);
  letter-spacing: 0.08em;
}
body.home-page .main_heading h2:last-child {
  font-size: clamp(1.8rem, 3.6vw, 3.2rem);
  white-space: nowrap;
}

@media (max-width: 900px) {
  body.home-page .main_heading h2:last-child {
    font-size: clamp(1.55rem, 4.2vw, 2.6rem);
    letter-spacing: 0.04em;
  }
}

body.home-page .scripture_box1 {
  position: absolute;
  top: clamp(140px, 24vh, 260px);
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  text-align: center;
  font-size: clamp(1.05rem, 2.0vw, 1.7rem);
  line-height: 1.4;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

body.home-page .scripture_box2 {
  position: absolute;
  top: clamp(360px, 58vh, 640px);
  left: clamp(16px, 8vw, 120px);
  width: min(560px, 70vw);
  text-align: left;
  font-style: italic;
  font-size: clamp(0.95rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

body.home-page .invite {
  position: absolute;
  right: clamp(16px, 6vw, 120px);
  bottom: clamp(18px, 10vh, 90px);
  width: min(560px, 70vw);
  text-align: right;
  font-style: italic;
  font-size: clamp(0.9rem, 1.5vw, 1.35rem);
  line-height: 1.4;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.65);
}

body.home-page .invite_link {
  color: rgba(255, 255, 255, 0.96);
  text-decoration: none;
}
body.home-page .invite_link:hover {
  color: #ffffff;
  filter: brightness(1.06);
}
body.home-page .invite_link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
  border-radius: 4px;
}

body.home-page .scripture_text,
body.home-page .invite_text {
  margin: 0;
}
body.home-page .scripture_ref {
  white-space: nowrap;
}

@media (max-width: 767px) {
  body.home-page .page {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 18px;
  }
  body.home-page .main_heading,
  body.home-page .scripture_box1,
  body.home-page .scripture_box2,
  body.home-page .invite {
    position: static;
    transform: none;
    width: min(92vw, 720px);
  }
  body.home-page .scripture_box2 { text-align: left; }
  body.home-page .invite { text-align: left; }
}

/* =========================
   Content pages (about.html)
   ========================= */

body.content-page {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: #f7f5f0;
  color: #0f172a;
  min-height: 100vh;
  min-height: 100svh;
}

body.content-page .site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(10, 15, 25, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  flex-wrap: wrap;
}

body.content-page .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 0;
}
body.content-page .brand-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}
body.content-page .brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.content-page .site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
body.content-page .site-nav a {
  color: #e2e8f0;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
body.content-page .site-nav a:hover { background: rgba(226, 232, 240, 0.10); }
body.content-page .site-nav a[aria-current="page"] {
  background: rgba(226, 232, 240, 0.16);
  color: #ffffff;
}
body.content-page .site-nav a.is-disabled { opacity: 0.55; pointer-events: none; }

body.content-page .site-nav a.nav-cta {
  background: rgba(226, 232, 240, 0.16);
  color: #ffffff;
}
body.content-page .site-nav a.nav-cta:hover {
  background: rgba(226, 232, 240, 0.24);
}

body.content-page .site-main {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

body.content-page .card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  padding: clamp(16px, 3vw, 26px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  display: flow-root; /* contain floated images within articles */
}
body.content-page .card h1 {
  margin: 0 0 10px;
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  line-height: 1.15;
}
body.content-page .card h2 {
  margin: 18px 0 8px;
  font-size: 1.15rem;
}
body.content-page .card p {
  margin: 10px 0;
  line-height: 1.65;
  max-width: none;
}

body.content-page .note {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.10);
}

body.content-page .sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
body.content-page .media-card .media-placeholder {
  height: 170px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.02));
  border: 1px dashed rgba(15, 23, 42, 0.18);
  display: grid;
  place-items: center;
  color: rgba(15, 23, 42, 0.65);
  margin-bottom: 10px;
}
body.content-page .muted { color: rgba(15, 23, 42, 0.70); }

/* Articles page helpers */
body.content-page .toc {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.10);
}
body.content-page .toc-title {
  margin: 0 0 10px;
  font-size: 1rem;
}
body.content-page .toc-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 18px;
}
body.content-page .toc-list a { color: inherit; }

body.content-page .article-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.10);
}
body.content-page .article-figure {
  margin: 12px 0 10px;
}
body.content-page .article-figure img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.content-page .image-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
body.content-page .grid-figure { margin: 0; }
body.content-page .grid-figure img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.content-page a.nav-cta-inline {
  display: inline-block;
  background: rgba(10, 15, 25, 0.92);
  color: #ffffff;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 10px;
}
body.content-page a.nav-cta-inline:hover { filter: brightness(1.05); }

@media (max-width: 980px) {
  body.content-page .site-main { grid-template-columns: 1fr; }
  body.content-page .site-nav { justify-content: flex-start; }
}

@media (max-width: 700px) {
  body.content-page .toc-list { grid-template-columns: 1fr; }
  body.content-page .image-grid { grid-template-columns: 1fr; }
}


/* For the example Articles page helpers */

/* --- Articles hub + article pages (test) --- */
.article-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 860px) { .article-grid { grid-template-columns: 1fr 1fr; } }

.article-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: #ffffff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 120ms ease, transform 120ms ease;
}
.article-card:hover {
  box-shadow: 0 10px 22px rgba(15,23,42,0.08);
  transform: translateY(-1px);
}

.article-thumb {
  width: 120px;
  height: 78px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(15,23,42,0.10);
}
.article-title { margin: 0 0 4px; font-size: 1.05rem; }

.article-hero, .article-figure { margin: 12px 0 10px; }
.article-hero img, .article-figure img {
  width: 100%;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
}

/* Floatable, per-article images (text wraps around).
   Per-image sizing:
   - Add `style="--w: 280px"` on the <figure> to set a preferred width.
   - Add `style="--max: 55%"` on the <figure> to cap width as a % of the text column.
*/
.article-float{
  --w: 360px;
  --max: 45%;
  width: min(var(--w), var(--max));
  max-width: 100%;
  margin: 6px 0 10px 16px;
}
.article-float.float-right{ float:right; }
.article-float.float-left{ float:left; margin: 6px 16px 10px 0; }
.article-float img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
}
@media (max-width: 600px){
  .article-float.float-right,
  .article-float.float-left{
    float: none;
    /* Keep your per-image sizing on phones; just cap it to the viewport and center it. */
    width: min(var(--w, 360px), 100%);
    max-width: 100%;
    margin: 12px auto;
  }
}

/* Centered / custom-width images (use on <img> inside an article).
   Example: <img class="img-center" style="--w: 520px" ...>
*/
.img-center{
  --w: 720px;
  display: block;
  width: min(var(--w), 100%);
  height: auto;
  margin: 12px auto;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.12);
}


/* Utilities should override the default .article-figure img width rule */
body.content-page .article-figure img.img-center{ width: min(var(--w, 720px), 100%); max-height: none; object-fit: contain; margin-left:auto; margin-right:auto; }
body.content-page .article-figure img.img-inline{ width: var(--w, 1.15em); max-height: none; object-fit: contain; }

/* Inline images for mid-sentence placement.
   Keep these small; use em/px widths.
   Example: <img class="img-inline" style="--w: 1.15em" ...>
*/
.img-inline{
  --w: 1.15em;
  display: inline-block;
  width: var(--w);
  height: auto;
  vertical-align: -0.12em;
  margin: 0 .18em;
  border-radius: 4px;
  border: 1px solid rgba(15,23,42,0.18);
}

.article-nav { margin-top: 18px; display: flex; justify-content: space-between; gap: 12px; }
.quote {
  margin: 14px 0;
  padding: 10px 12px;
  border-left: 4px solid rgba(15,23,42,0.25);
  background: rgba(15,23,42,0.03);
  border-radius: 10px;
}







